/*
 * Sunny Estate Agent — v6 mobile hero, navigation and internal hero alignment.
 * Loaded after all previous styles so these rules are the final source of truth.
 */

/* Lock the document while the off-canvas menu is open. */
body.menu-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

/* Internal page hero content starts close to the header, like the home hero. */
@media (min-width: 1061px) {
  .page-hero-copy {
    justify-content: flex-start !important;
    padding-top: 30px !important;
    padding-bottom: 34px !important;
  }

  .page-hero-copy .breadcrumbs {
    margin-bottom: 14px;
  }

  .page-hero-copy .eyebrow {
    margin-top: 0;
  }
}

/* A true solid off-canvas navigation. No page content can show through it. */
@media (max-width: 1160px) {
  .mobile-nav {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(92vw, 410px) !important;
    height: 100dvh !important;
    min-height: 100vh;
    padding: 20px 20px 30px !important;
    flex-direction: column;
    gap: 7px !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff8f2 !important;
    background-image: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate3d(105%, 0, 0) !important;
    transition: transform .3s ease, opacity .2s ease, visibility .3s ease !important;
    box-shadow: -24px 0 70px rgba(44, 24, 12, .28) !important;
    backdrop-filter: none !important;
    isolation: isolate;
    z-index: 10020 !important;
  }

  .mobile-nav.open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) !important;
  }

  .mobile-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #fff8f2;
  }

  .mobile-nav-head {
    position: sticky;
    top: -20px;
    z-index: 2;
    margin: -20px -20px 14px !important;
    padding: 18px 20px 16px;
    background: #fff8f2;
    border-bottom: 1px solid #ead8c9;
  }

  .mobile-nav-head img {
    width: 184px;
    height: auto;
  }

  .mobile-nav-head button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #e4cdbc !important;
    border-radius: 10px;
    background: #fff !important;
    color: #24140d !important;
    cursor: pointer;
  }

  .mobile-nav > a:not(.btn) {
    display: flex;
    align-items: center;
    min-height: 48px;
    margin: 0 !important;
    padding: 12px 15px !important;
    border: 1px solid #ead8c9 !important;
    border-radius: 10px;
    background: #fff !important;
    color: #24140d !important;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
  }

  .mobile-nav > a:not(.btn):hover,
  .mobile-nav > a:not(.btn):focus-visible {
    border-color: #e9630d !important;
    color: #d95000 !important;
    background: #fff3e9 !important;
  }

  .mobile-nav .btn {
    flex: 0 0 auto;
    width: 100%;
    min-height: 52px;
    margin-top: 10px !important;
  }

  .nav-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 10010 !important;
    background: rgba(26, 14, 8, .62) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity .25s ease, visibility .25s ease !important;
  }

  .nav-backdrop.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

/* Mobile/tablet home hero: use the real image, then add only a dark readability layer. */
@media (max-width: 900px) {
  .hero {
    background: #20150f !important;
  }

  .hero-visual::before {
    background:
      linear-gradient(90deg, rgba(27, 17, 11, .62) 0%, rgba(27, 17, 11, .43) 58%, rgba(27, 17, 11, .25) 100%),
      linear-gradient(180deg, rgba(18, 11, 8, .18) 0%, rgba(18, 11, 8, .22) 46%, rgba(18, 11, 8, .58) 100%) !important;
  }

  .hero-slide img {
    filter: none !important;
    opacity: 1 !important;
  }

  .hero-copy,
  .hero-copy h1 {
    color: #fff !important;
  }

  .hero-copy .text-orange {
    color: #ff7a1a !important;
  }

  .hero-copy .eyebrow {
    color: #ffd7ba !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .34);
  }

  .hero-copy .lead {
    color: rgba(255, 255, 255, .94) !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .38);
  }

  .hero-copy h1 {
    text-shadow: 0 3px 18px rgba(0, 0, 0, .34);
  }

  .hero-bullets span {
    color: #fff !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .38);
  }

  .hero-bullets svg {
    color: #ff8a39 !important;
  }

  .service-pill {
    border-color: rgba(255, 255, 255, .78) !important;
    background: rgba(255, 255, 255, .91) !important;
    color: #2a170e !important;
    box-shadow: 0 7px 22px rgba(0, 0, 0, .12);
  }

  .hero-actions .btn-outline {
    border-color: rgba(255, 255, 255, .9) !important;
    background: rgba(23, 13, 8, .28) !important;
    color: #fff !important;
  }

  .hero-slider-dots {
    border-color: rgba(255, 255, 255, .55) !important;
    background: rgba(255, 255, 255, .9) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
  }

  /* All main internal pages use the same full-image hero treatment on smaller screens. */
  .page-hero {
    --mobile-page-hero-height: 650px;
    position: relative;
    min-height: var(--mobile-page-hero-height) !important;
    background: #20150f !important;
  }

  .services-hero { --mobile-page-hero-height: 690px; }
  .about-hero { --mobile-page-hero-height: 700px; }
  .projects-hero { --mobile-page-hero-height: 660px; }
  .area-hero { --mobile-page-hero-height: 640px; }
  .blog-hero { --mobile-page-hero-height: 640px; }
  .contact-hero { --mobile-page-hero-height: 650px; }

  .page-hero > .page-hero-grid,
  .projects-hero > .page-hero-grid {
    position: relative;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: var(--mobile-page-hero-height) !important;
    height: var(--mobile-page-hero-height) !important;
    margin: 0 !important;
  }

  .page-hero-image,
  .projects-hero .page-hero-image {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden;
  }

  .page-hero-image::before {
    z-index: 1;
    background:
      linear-gradient(90deg, rgba(27, 17, 11, .65) 0%, rgba(27, 17, 11, .42) 60%, rgba(27, 17, 11, .24) 100%),
      linear-gradient(180deg, rgba(20, 12, 8, .18) 0%, rgba(20, 12, 8, .28) 52%, rgba(20, 12, 8, .62) 100%) !important;
  }

  .page-hero-image img,
  .projects-hero .page-hero-image img {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    filter: none !important;
    opacity: 1 !important;
  }

  .page-hero-copy {
    position: relative;
    z-index: 3;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start !important;
    width: min(100%, 760px);
    min-height: var(--mobile-page-hero-height) !important;
    height: var(--mobile-page-hero-height) !important;
    padding: 32px max(22px, calc((100vw - 720px) / 2)) 64px !important;
    color: #fff !important;
  }

  .page-hero-copy h1,
  .page-hero-copy .lead,
  .page-hero-copy .breadcrumbs,
  .page-hero-copy .breadcrumbs a,
  .page-hero-copy .breadcrumbs span,
  .page-hero-features span {
    color: #fff !important;
  }

  .page-hero-copy h1 {
    margin-top: 0;
    text-shadow: 0 3px 18px rgba(0, 0, 0, .36);
  }

  .page-hero-copy .text-orange {
    color: #ff7a1a !important;
  }

  .page-hero-copy .eyebrow {
    margin-top: 0 !important;
    color: #ffd7ba !important;
    text-shadow: 0 1px 7px rgba(0, 0, 0, .35);
  }

  .page-hero-copy .lead,
  .page-hero-features span {
    text-shadow: 0 1px 8px rgba(0, 0, 0, .38);
  }

  .page-hero-features svg {
    color: #ff8a39 !important;
  }

  .page-hero-copy .hero-actions .btn-outline {
    border-color: rgba(255, 255, 255, .9) !important;
    background: rgba(23, 13, 8, .26) !important;
    color: #fff !important;
  }
}

@media (max-width: 760px) {
  .hero-copy {
    padding-top: 30px !important;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 11.2vw, 49px) !important;
  }

  .page-hero-copy {
    padding: 28px 18px 58px !important;
  }

  .page-hero-copy h1,
  .services-hero .page-hero-copy h1,
  .projects-hero .page-hero-copy h1 {
    font-size: clamp(39px, 11.2vw, 50px) !important;
    line-height: 1.02;
  }

  .page-hero-copy .lead {
    font-size: 15px;
    line-height: 1.56;
  }

  .page-hero-copy .breadcrumbs {
    margin-bottom: 13px;
    font-size: 12px;
  }

  .page-hero-features {
    gap: 11px 15px !important;
  }

  .page-hero-features span {
    font-size: 12px !important;
  }
}

@media (max-width: 430px) {
  .mobile-nav {
    width: 94vw !important;
  }

  .hero,
  .hero > .hero-grid,
  .hero-copy {
    min-height: 800px !important;
  }

  .page-hero {
    --mobile-page-hero-height: 680px;
  }

  .services-hero { --mobile-page-hero-height: 730px; }
  .about-hero { --mobile-page-hero-height: 740px; }
  .projects-hero { --mobile-page-hero-height: 700px; }
  .contact-hero { --mobile-page-hero-height: 690px; }
}
