/* Header styles for THEFIRM website */
/* Global styles to prevent horizontal scrolling */
html, body {
  overflow-x: hidden;
}

body * {
  max-width: 100%;
}
.thefirm-header {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.3;
  text-align: center;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  color: black;
  
  /* Font display optimization */
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom header container */
.custom-header-container {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 200px;
  overflow: hidden;
  max-width: 100vw; /* Prevent container from extending beyond viewport */
}

/* Background image */
.header-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

/* Mask container */
.header-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Masked header text */
.masked-header {
  position: relative;
  z-index: 2;
  color: black; /* Default color outside the image */
  mix-blend-mode: difference; /* This will make text white on dark backgrounds */
  font-weight: 800 !important;
  padding: 20px;
  width: 100%;
  text-align: center;
  text-transform: uppercase;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  word-wrap: break-word; /* Ensure text wraps properly */
}

/* Add styles for line breaks */
br {
  display: block;
  content: "";
  margin-top: 10px;
}

/* Laptop optimization */
@media (min-width: 1024px) and (max-width: 1440px) {
  .thefirm-header,
  .masked-header {
    font-size: 28px;
    padding: 30px 16px;
  }
  
  br {
    margin-top: 8px;
  }
}

/* Tablet optimization */
@media (max-width: 768px) {
  .thefirm-header,
  .masked-header {
    font-size: 24px;
    padding: 25px 15px;
  }
  
  br {
    margin-top: 6px;
  }
}

/* Mobile optimization */
@media (max-width: 480px) {
  .thefirm-header,
  .masked-header {
    font-size: 20px;
    padding: 20px 10px;
    letter-spacing: 0.5px;
  }
  
  br {
    margin-top: 5px;
  }
}
