* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.html, .body {
    margin: 0;
}

h2 {
    font-size: 2rem;
}

h3 {
    margin-top: 15px;
    font-size: 1rem;
}

.services ul {
    padding-left: 5%;
    line-height: 1.8;
}

.cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: auto;
    font-size: clamp(1rem, 1vw, 3rem);
}

.header-phone {
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(2rem, 3vw, 4rem);
    position: relative;
    font-weight: 600;
    color: #333333;
    text-decoration: none;
    margin-bottom: clamp(1rem, 2vw, 2rem);
}

.hero-section {
    position: relative;
    width: 100%;
    height: 40vh;
    overflow: hidden;
    z-index: 0;
}

.hero-section[data-hero-type="image"] {
  height: auto; /* Remove fixed height */
  aspect-ratio: 5 / 2; /* Adjust to your image's aspect ratio (width / height) */
  background-size: 100%; /* Full width, proportional height */
  background-position: left top; /* Align to left to ensure right side is visible */
  background-repeat: no-repeat;
  background-attachment: fixed; /* Parallax effect */
  background-color: #f0f0f0; /* Fallback for empty space */
}

.hero-section[data-hero-type="image-san-rafael"] {
  aspect-ratio: 5 / 2; /* Adjust to your image's aspect ratio (width / height) */
  background-size: 100%; /* Full width, proportional height */
  background-position: left top; /* Align to left to ensure right side is visible */
  background-repeat: no-repeat;
  background-attachment: fixed; /* Parallax effect */
  background-color: #f0f0f0; /* Fallback for empty space */
}


.hero-label {
  position: absolute; 
  bottom: 0; 
  right: 10px; 
  color: gray; 
  font-size: 0.7rem; 
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  background: rgba(0, 0, 0, 0.6); 
  padding: 5px 10px;
  border-radius: 5px;  
  z-index: 2; 
}

/* Video background styles */
.hero-section[data-hero-type="video"] {
  background: #000; /* Fallback color if video fails to load */
}

.page-specific .horizontal-layout1 {
    display: flex;
    justify-content: space-around; 
    gap: 20px; 
    width: 100%;
    margin-bottom: 1vw; 
    flex-wrap: wrap; 
}

.group {
    display: flex; 
    align-items: center; 
    gap: 1vw; 
    font-size: clamp(1rem, 1vw, 3rem);
    margin-bottom: 10px;
}

.label {
    margin: 0; 
}

.accordion {
    font-size: clamp(1rem, 1vw, 3rem);
}

.hours-container {
    display: flex;
    flex-direction: column; 
}

.panel {
    display: none; 
    padding: 10px;
}

.panel.active {
    display: block;
}

.text-content {
    position: relative;
    font-size: clamp(1rem, 1vw, 3rem);
}

.text-content h1 {
    font-size: clamp(2rem, 2vw, 4rem);
}

.page-flex h2 {
    font-size: clamp(1rem, 1vw, 3rem);
    padding: 5px 0;
}

.image-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    height: 100%; 
    padding: 0 10%; 
    box-sizing: border-box;
    width: 100vw;
    max-width: 100%;
    overflow: hidden;
  }
  
  .logo {
    width: clamp(200px, 12vw, 400px); 
    height: auto;
    padding: 30px;
    background: rgba(255, 255, 255);
    border-radius: 50%;
    border: solid 3px;
    margin-left: 0;
    flex-shrink: 0;
  }
  
  .flag {
    width: clamp(200px, 12vw, 400px); 
    height: auto;
    margin-right: 0;
    flex-shrink: 0;
  }

  .hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: 1;
    box-sizing: border-box;
  }

.cta-email {
    display: block;
    font-size: larger;
    margin: 20px auto;
    padding: 10px 20px; 
    background-color: #CE3337; 
    color: white;
    border: none;
    border-radius: 5px; 
    cursor: pointer; 
}

.hours-pitch {
    text-align: center;
    margin-bottom: 1vw;
}

.page-layout {
    display: flex;
    flex-wrap: wrap;
    padding: clamp(2rem, 2vw, 6rem);
    width: 100vw;
    margin:auto;
    justify-content: center; 
}

.page-flex {
    display: flex; 
    flex-wrap: wrap; 
    gap: 2%; 
    width: 100%;
    margin: auto;
}

.services {
    flex: 0 0 79%; 
    padding: 2vw; 
    box-sizing: border-box; 
    font-size: clamp(1rem, 1vw, 3rem);
}

.landing-image {
    flex: 0 0 19%;
    box-sizing: border-box;
}

.landing-img-desktop {
    position: relative;
    float: right;
    z-index: 0;
    margin-bottom: 20px;
    margin-right: 20px;
}

.landing-image-windsor {
    height: 273px;
    width: 720px;
    display: block;
    margin: 20px auto;
    border-radius: 8px; /* Matches video for consistency */
}

.image-overlay-container {
    position: relative;
    display: block;
    max-width: 720px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
}

.image-overlay-container:hover {
    transform: scale(1.05); /* Matches video hover scale */
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    bottom: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: clamp(0.9rem, 1vw, 1.2rem);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.image-overlay-container:hover .image-caption,
.image-overlay-container:active .image-caption {
    opacity: 1;
}

.image-tap-icon {
    display: none; /* Hidden by default (desktop) */
}

.landing-img-mobile {
    display: none;
}

/*Used only for landing page*/
.page-specific .nav-container {
    z-index: 1000;
}

.section-background-img {
    width: 100%;
    background-image: 
        linear-gradient(to left, rgba(255, 255, 255, 50%), rgba(255, 255, 255, 100%)),
        url('/__images/locations/c300_first_job_san_rafael.jpg');
    background-size: 800px 100%;
    background-position: right;
    background-repeat: no-repeat;
}

@media screen and (max-width: 767px) {

    .header-phone {
        font-size: 2.0em;
        margin-bottom: 10px;
    }

    .hours-pitch {
        font-size: .9em;
        margin: 0;
        text-align: justify;
    }

    .page-specific .horizontal-layout1 .group {
        flex-direction: column;
        justify-content: center;
        margin-bottom: 2%;
    }

    .accordion {
        margin: 0;
    }

    .services {
        padding-left: 0px;
        max-width: 95%;
    }
}

.clear-float {
    clear: both; 
}

.hero-video {
    float: right; 
    border-radius: 0px;
    margin: 0 auto;
    object-fit: cover;
}

.hero-video video {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}

.hero-section::after {
    content: "";
    display: table;
    clear: both;
}

#email-form {
    width: 600px;
    color: black;
    background: white;
    border: #CE3337 1px solid;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    position: fixed;
    z-index: 1060;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1),  /* Main shadow */
               0 6px 20px rgba(0, 0, 0, 0.1); /* Deeper shadow for depth */
}

.form-floating {
    margin-top: 10px;
}

#email-form h2 {
    color: black;
}

#email-logo {
    width: 75px;
    height: 75px;
    margin-right: 20px;
}

#email-header {
    display: column;
    text-align: center;
}

body.page-specific .nav-container {
  background-color: #000; 
  width: 100%;
}

.nav.wrapper {
  padding: 0; 
  max-width: 100%;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

.custom-menu {
  list-style: none;
  display: flex;
  justify-content: center; 
  width: 100%;
  background-color: #000; 
  margin: 0;
  white-space: nowrap;
}

.custom-menu > li {
  position: relative;
  max-width: calc(100% / 7); 
  font-size: clamp(1rem, 0.8vw, 2rem);
  text-align: center; 
}

.custom-menu a {
  color: white;
  text-decoration: none;
  padding: 1rem;
  display: block;
}

.custom-menu > li:hover > a {
  background-color: #CE3337;
}

.custom-menu > li:has(.submenu) > a::after {
  content: '\25BE'; 
  margin-left: 0.5rem; 
  display: inline-block;
  font-size: 0.8rem; 
  vertical-align: middle; 
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #000;
  min-width: 300px;
  list-style: none;
  width: 100%; 
}

.submenu li a {
  padding: 0.8rem;
  text-align: left; 
}

.submenu li:hover a {
  background-color: #CE3337;
}

/* Mobile Toggle */
.nav-toggle {
  display: none; /* Hidden on desktop */
  color: white;
  text-decoration: none;
  padding: 1rem;
  font-size: 1.2rem;
  background-color: #000;
  width: 100%;
  text-align: center;
}

.custom-tooltip {
    pointer-events: none; /* Prevents tooltip from interfering with hover */
}

.custom-tooltip.light-border {
   color: #fff;
   box-shadow: '4px 2px 10px rgba(0,0,0,0.8)';
}

.landing-video-container {
        margin: 20px 0;
        text-align: center;
}

.landing-video-wrapper {
  display: inline-block;
  max-width: 100%;
  overflow: hidden; /* Ensures scaled video doesn’t overflow */
  border-radius: 8px; /* Maintains rounded corners */
}

.video-overlay-container {
  position: relative;
  transition: transform 0.3s ease; /* Smooth scale transition */
}

.video-overlay-container:hover {
  transform: scale(1.05); /* Slight scale-up on hover */
  
}

.landing-video-wrapper video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.video-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent black background */
  color: #fff;
  text-align: left;
  padding: 25px;
  font-size: clamp(0.9rem, 1vw, 1.2rem);
  opacity: 0; /* Hidden by default */
  transition: opacity 0.3s ease; /* Smooth fade-in */
}

.video-overlay-container:hover .video-caption {
  opacity: 1; /* Show caption on hover */
}

.video-tap-icon {
    display: none; /* Hidden by default (desktop) */
}

/* Style the designer credit to span full width and appear subtle */
.designer-credit {
  width: 100%;
  text-align: left;
  font-size: 0.8rem;
  color: #666;
  margin-top: 1rem;
  padding-top: 0.5rem;
}

.designer-credit a {
  color: #666;
  text-decoration: none;
}

@media (min-width: 2160px) {
    .custom-menu > li {
        font-size: clamp(1rem, 2vw, 2rem);
    }
}

@media (max-width: 768px) {
  .nav-toggle {
      display: block; /* Show toggle on small devices */
  }
  .custom-menu {
      display: none; /* Hidden by default on mobile */
      flex-direction: column;
      width: 100%;
  }
  .custom-menu.active {
      display: flex; /* Show when toggled */
  }
  .custom-menu > li {
      flex: none; /* Remove equal width on mobile */
      text-align: left; /* Align left for mobile */
  }

  .custom-menu > li > a::after {
    transition: transform 0.3s ease; /* Smooth rotation */
  }
  .custom-menu > li.active > a::after {
      transform: rotate(180deg); /* Upward chevron when submenu is open */
  }

  .submenu {
      position: static;
      width: 100%;
  }
}

@media (max-width: 575.98px) { /* Using 575.98px to match Bootstrap's breakpoint for <576px */
    .page-layout {
        padding: 1rem !important;
        line-height: 1.5;
    }
    .hero-section {
        height: 300px;
        overflow: visible;
    }

    .hero-section[data-hero-type="image"] {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: scroll; /* Disable parallax on mobile */
    }

    .hero-section[data-hero-type="video"] {
        background: #000; /* Fallback for video */
    }

    .hero-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        }

    .hero-section[data-hero-type="image"] {
        aspect-ratio: 3 / 2; /* Adjust to your image's aspect ratio (width / height) */
    }

    .hero-label {
        bottom: 0; 
        left: 0; 
    }

    .section-background-img {
        background-image: none !important;
        /* Add other styles to reset as needed */
    }

    .image-container {
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        padding: 0;
        overflow: visible;
        width: 100%;
        max-width: 100%;
    }

    .logo {
        width: 125px;
        height: 125px;
        padding: 10px;
        border: 1px solid;
        position: relative;
        z-index: 1001;
    }

    .flag {
        width: 100px;
        margin-bottom: 10px;
        padding: 0;
        position: relative;
        z-index: 1001;
    }

    /* Ensure no default spacing on images */
    .logo img,
    .flag img {
        display: block;
        margin: 0;
    }

    .landing-image {
        display: none;
    }
    .landing-img-mobile {
        display: block;
    }
    
    .landing-image-windsor {
        width: 100%;
        height: auto;
        max-width: 720px;
    }
    .image-overlay-container:hover {
        transform: none; /* Matches video: no scale on mobile */
    }
    .image-caption {
        font-size: 0.9rem;
        padding: 8px;
    }
    .image-tap-icon {
        display: block;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 32px; /* Matches video icon size */
        height: 32px;
        background: rgba(0, 0, 0, 0.5);
        padding: 10px;
        border-radius: 50%;
        z-index: 2;
        transition: opacity 0.3s ease;
    }
    .image-tap-icon[src$=".svg"] {
        fill: #fff; /* Ensure SVG fill is white */
    }
    .image-overlay-container:hover .image-tap-icon,
    .image-overlay-container:active .image-tap-icon {
        opacity: 0; /* Hide icon when caption appears */
    }
    .services {
        flex: 0 0 100%;
    }

    .services li {
        line-height: 1.5;
    }

    .video-tap-icon {
        display: block;
        position: absolute;
        top: 50%;
        left: 50%;
        width: 32px;
        height: 32px;
        transform: translate(-50%, -50%);
        color: #fff;
        background: rgba(0, 0, 0, 0.5);
        padding: 10px;
        border-radius: 50%;
        z-index: 2;
        transition: opacity 0.3s ease;
    }
    .video-overlay-container:hover .video-tap-icon,
    .video-overlay-container:active .video-tap-icon {
        opacity: 0; /* Hide icon when caption appears */
    }
  }