/******************************************
 * 1. GLOBAL RESPONSIVE BASE
 ******************************************/

/* Tablet and below */
@media (max-width: 1024px) {
  html {
    font-size: 15px;
  }

  body {
    overflow-x: hidden;
  }

  .container {
    width: 94%;
    max-width: 1100px;
    margin: 0 auto;
  }

  h1,
  .page-hero h1 {
    font-size: clamp(2rem, 3vw, 2.6rem);
  }

  h2 {
    font-size: 1.8rem;
  }

  .page-hero {
    padding-top: 4.5rem;
    padding-bottom: 3rem;
  }
}

/* Mobile base */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .container {
    width: 92%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
  }
}

/******************************************
 * 2. HEADER, NAVBAR, TOGGLER
 ******************************************/

@media (max-width: 768px) {
  .header-area {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  }

  .navbar-area {
    padding: 0.5rem 0;
  }

  .site-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .site-logo img {
    max-width: 140px;
    height: auto;
  }

  body {
    padding-top: 70px;
  }

  /* Collapsed nav menu */
  .site-navbar ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    margin: 0;
    padding: 0.75rem 1.25rem 1.25rem 1.25rem;
    list-style: none;
    background: rgba(5, 8, 20, 0.96);
  }

  .site-navbar ul.open {
    display: flex;
  }

  .site-navbar ul li {
    margin: 0.35rem 0;
  }

  .site-navbar ul a {
    display: block;
    text-align: center;
    color: #ffffff;
    font-size: 0.9rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  .site-navbar ul a:hover {
    color: #d8f744;
  }

  /* Burger button */
  .nav-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    cursor: pointer;
    border: none;
    background: transparent;
  }

  .nav-toggler span,
  .nav-toggler span::before,
  .nav-toggler span::after {
    content: "";
    display: block;
    width: 22px;
    height: 2px;
    margin: 0;
    background-color: #18274f;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .nav-toggler span::before {
    transform: translateY(-6px);
  }

  .nav-toggler span::after {
    transform: translateY(6px);
  }

  .nav-toggler.toggler-open span {
    transform: rotate(45deg);
  }

  .nav-toggler.toggler-open span::before {
    transform: rotate(-90deg) translateX(-6px);
  }

  .nav-toggler.toggler-open span::after {
    opacity: 0;
  }
}

/******************************************
 * 3. DISABLE FULL SCREEN SCROLL-STACK ON MOBILE
 ******************************************/

@media (max-width: 768px) {
  main.scroll-stack {
    height: auto;
    min-height: 0;
    overflow-y: visible;
    scroll-snap-type: none;
    padding-top: var(--header-height);
  }

  .page-screen {
    min-height: 0;
    height: auto;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    justify-content: flex-start;
    padding: 3rem 1.25rem;
  }

  .page-screen--hero,
  .page-screen--partners,
  .page-screen--contact,
  .page-screen--community {
    padding: 3.5rem 1.25rem 2.5rem 1.25rem;
  }
}

/******************************************
 * 4. HOME HERO, FEATURE SWIPER
 ******************************************/

@media (max-width: 1024px) {
  .page-screen--hero {
    padding-top: 5rem;
  }

  .feature-slider {
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .hero-shell {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .feature-slider {
    width: 100%;
  }

  .feature-swiper-shell {
    width: 100%;
    height: auto;
  }

  .feature-swiper,
  .feature-swiper .swiper-wrapper,
  .feature-swiper .swiper-slide {
    height: auto;
  }

  .feature-slide {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding: 1.75rem 1.25rem 2.25rem 1.25rem;
  }

  .feature-slide__content {
    order: 2;
    text-align: left;
  }

  .feature-slide__image {
    order: 1;
  }

  .feature-slide__image img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .feature-slide__eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.16em;
  }

  .feature-slide__content h3 {
    font-size: 1.6rem;
    line-height: 1.25;
  }

  .feature-slide__cta {
    width: 100%;
    text-align: center;
  }

  .feature-swiper__controls {
    margin-top: 1.25rem;
  }

  .feature-progress-dots {
    justify-content: center;
  }

  .feature-swiper__arrow {
    width: 40px;
    height: 40px;
  }
}

/******************************************
 * 5. HOME PARTNERS AND STEPS / FLIP CARDS
 ******************************************/

@media (max-width: 1024px) {
  .page-screen--partners {
    gap: 2rem;
  }

  .logo-marquee__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .page-screen--partners {
    padding-top: 3rem;
    padding-bottom: 2.5rem;
  }

  .logo-marquee__header {
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
  }

  .logo-marquee__track {
    margin-top: 1.25rem;
  }

  .approach {
    padding: 3rem 1.25rem 2.5rem 1.25rem;
  }

  .approach__header {
    text-align: center;
    margin-bottom: 1.75rem;
  }

  .steps-layout {
    display: block;
  }

  .steps-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .step-card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .step-card .inner,
  .step-card .front,
  .step-card .back {
    min-height: 210px;
  }

  .step-card .front .step-number {
    font-size: 1.2rem;
  }

  .step-card .back h3 {
    font-size: 1.4rem;
  }

  .hero-scroll-tag {
    margin-top: 1.75rem;
  }
}

/******************************************
 * 6. HOME FIND-US BLOCK AND MAP
 ******************************************/

@media (max-width: 1024px) {
  .find-us__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
    gap: 1.75rem;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .page-screen--home .page-screen--contact,
  .page-screen--home-contact {
    padding-top: 0;
  }

  .find-us {
    padding: 1.5rem 1.25rem 2rem 1.25rem;
  }

  .find-us__header {
    text-align: center;
    margin-bottom: 1.75rem;
  }

  .find-us__layout {
    display: block;
  }

  .find-card,
  .find-us__single {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 1.5rem auto;
  }

  .find-us__map {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .find-card__address,
  .find-card__contact {
    font-size: 0.95rem;
  }

  .contact-map__frame iframe {
    width: 100%;
    height: 280px;
  }
}

/******************************************
 * 7. SERVICES: PRICING GRID, CTAS, FAQ
 ******************************************/

@media (max-width: 1024px) {
  .services-pricing__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }

  .services-pricing__card {
    min-height: 0;
  }
}

@media (max-width: 768px) {
  .page-hero--services {
    padding: 5.5rem 1.25rem 3rem 1.25rem;
  }

  .services-pricing {
    padding: 3rem 1.25rem 2.5rem 1.25rem;
  }

  .services-pricing__header {
    text-align: center;
    margin-bottom: 2rem;
  }

  .services-pricing__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .services-pricing__card {
    display: flex;
    flex-direction: column;
  }

  .services-card__media {
    order: -1;
    margin-bottom: 1rem;
  }

  .services-card__frame img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .services-card__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .services-card__actions .feature-slide__cta {
    width: 100%;
    text-align: center;
  }

  /* Modal triggers grid */
  .services-modals__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
  }

  .services-modal-btn {
    width: 100%;
  }

  .avh-modal__content {
    max-width: 94%;
    margin: 4.5rem auto 2rem auto;
  }

  /* FAQ accordion including last item */
  .services-faq {
    padding: 3rem 1.25rem 3.5rem 1.25rem;
  }

  .services-faq__header {
    text-align: left;
    margin-bottom: 1.5rem;
  }

  #FAQ,
  #FAQ * {
    font-family: "Open Sans", sans-serif !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
  }

  #FAQ h2,
  #FAQ h3,
  #FAQ h4 {
    font-weight: 600 !important;
    font-size: 1rem !important;
  }

  .accordion {
    margin-top: 1.25rem;
  }

  .accordion li > a {
    font-size: 0.98rem;
    padding: 0.85rem 0;
  }

  .accordion li p {
    font-size: 0.95rem;
  }
}

/******************************************
 * 8. ABOUT PAGE: COPY AND POLAROIDS
 ******************************************/

@media (max-width: 1024px) {
  .about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.1fr);
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .page-hero--about {
    padding: 5.5rem 1.25rem 3rem 1.25rem;
  }

  .about-layout {
    display: block;
  }

  .about-copy {
    margin-bottom: 2.5rem;
  }

  .page-about__gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
  }

  .page-about__gallery figure {
    margin: 0;
    max-width: 260px;
    width: 100%;
  }
}

/******************************************
 * 9. GALLERY, OFFERS, COMMUNITY GRIDS
 ******************************************/

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .offers-grid,
  .community-rate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .gallery-grid figure {
    margin: 0;
  }

  .offers-grid,
  .community-rate-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .offer-card,
  .community-rate-card {
    width: 100%;
    max-width: 100%;
  }
}

/******************************************
 * 10. CONTACT PAGE LAYOUT
 ******************************************/

@media (max-width: 1024px) {
  .page-screen--contact .container {
    width: 94%;
  }

  .page-screen--contact .contact-layout,
  .page-screen--contact .contact-grid,
  .page-screen--contact .row {
    gap: 1.75rem;
  }
}

@media (max-width: 768px) {
  .page-hero--contact {
    padding: 5.5rem 1.25rem 2.75rem 1.25rem;
  }

  .page-screen--contact {
    padding: 0 0 1.5rem 0;
  }

  .page-screen--contact .contact-layout,
  .page-screen--contact .contact-grid,
  .page-screen--contact .row {
    display: block;
  }

  .contact-shell {
    padding: 0 1.25rem 2rem 1.25rem;
  }

  .contact-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 640px;
    margin: 0 auto 2rem auto;
  }

  .contact-social,
  .contact-panel__info {
    width: 100%;
    max-width: 100%;
  }

  .contact-map {
    padding: 0 1.25rem 2.5rem 1.25rem;
  }

  .contact-map__inner h2 {
    text-align: left;
  }

  .contact-map__frame iframe {
    width: 100%;
    height: 280px;
  }

  .contact-social-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .contact-social-card {
    margin: 0 auto;
  }
}

/******************************************
 * 11. FOOTER STACKING
 ******************************************/

@media (max-width: 1024px) {
  .footer-top-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    align-items: center;
  }

  .footer-page-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .footer-top-bar {
    padding: 2rem 1.25rem 1.5rem 1.25rem;
  }

  .footer-page-links a {
    font-size: 0.8rem;
    margin: 0.2rem 0.5rem;
  }

  .footer-social-section {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .footer-bottom-section {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* MOBILE FIXES: HERO SWIPER, STEP CARDS, HOME FOOTER */
@media (max-width: 768px) {
  /* 1. Hero swiper: stack image + copy, let height grow naturally */
  .page-screen--hero {
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .feature-slider {
    min-height: auto;
    height: auto;
    align-items: flex-start;
  }

  .feature-slider .container {
    height: auto;
    padding-left: 16px;
    padding-right: 16px;
  }

  .feature-swiper-shell {
    display: block;
    padding: 16px;
  }

  .feature-swiper {
    height: auto;
    aspect-ratio: auto;
  }

  .feature-swiper .swiper-wrapper,
  .feature-swiper .swiper-slide {
    height: auto;
  }

  .feature-slide {
    flex-direction: column;
    gap: 20px;
  }

  .feature-slide__image img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .feature-slide__content {
    align-items: flex-start;
    text-align: left;
    padding: 16px 0 0 0;
  }

  .feature-swiper__controls {
    margin-top: 16px;
  }

  /* 2. Step cards: remove flip, show back content as a normal card */
  .steps-cards {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    margin-top: 24px;
  }

  .step-card {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    perspective: none;
  }

  .step-card .inner {
    transform: none !important;
  }

  .step-card .front {
    display: none;
  }

  .step-card .back {
    position: relative;
    transform: none !important;
    padding: 24px 20px;
  }

  /* 3. Home scroll stack + footer: behave like a normal scrolling page */
  main.scroll-stack {
    height: auto;
    min-height: 0;
    overflow-y: visible;
    scroll-snap-type: none;
  }

  .page-screen {
    min-height: 0;
    height: auto;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }

  .site-footer.footer-refresh {
    margin-top: 40px;
  }
}

/* Force burger colour (closed and open) on mobile */

@media (max-width: 768px) {
  .nav-toggler span,
  .nav-toggler span::before,
  .nav-toggler span::after,
  .nav-toggler.toggler-open span,
  .nav-toggler.toggler-open span::before,
  .nav-toggler.toggler-open span::after {
    background-color: #18274f !important;
  }
}

/* Make all FAQ accordion text consistent on mobile (including last item) */

@media (max-width: 768px) {
  #FAQ .accordion li a,
  #FAQ .accordion li p {
    font-family: "Open Sans", sans-serif !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
  }

  #FAQ .accordion li a {
    font-weight: 600 !important;
    font-size: 1rem !important;
  }
}

