/* ============================================================
   mobile.css — SLS Residences at Palm Jumeirah
   Comprehensive mobile & tablet responsive fixes.

   Load LAST, after all other stylesheets:
   <link rel="stylesheet" href="styles.css?version=1.7.1" />
   <link rel="stylesheet" href="theme-patch.css?version=1.5.2" />
   <link rel="stylesheet" href="responsive.css" />
   <link rel="stylesheet" href="mobile.css" />

   Rules here are MOBILE-ONLY (max-width guards).
   Desktop (≥1025px) is never touched.
   ============================================================ */


/* ============================================================
   1. HERO — mobile polish
   ============================================================ */

@media (max-width: 1024px) {

  /* Hero: always bottom-align content so text sits over veil */
  .hero__content-inner::after {
    display: none;
  }

  .hero {
    justify-content: flex-end;
    padding-bottom: calc(var(--gutter) + 80px);
    /* clear meta bar */
    height: 90vh !important;
    min-height: 90vh !important;
  }

  .hero__content {
    width: 100%;
  }

  .hero__content-inner {
    padding: 0;
    max-width: 100%;
  }

  .hero__title {
    font-size: clamp(38px, 10vw, 72px);
    line-height: 1.0;
    margin-bottom: 16px;
  }

  .hero__lede {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 32px;
    max-width: 100%;
  }

  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    justify-content: center;
    padding: 16px 20px;
    font-size: 11px;
  }

  /* Kicker text smaller */
  .kicker {
    font-size: 9px;
    letter-spacing: 0.22em;
    margin-bottom: 20px;
  }

  /* Meta bar — wrap to 2 cols */
  .hero__meta {
    flex-wrap: wrap;
    gap: 0;
    padding: 16px var(--gutter);
    justify-content: flex-start;
  }

  .hero__meta-item {
    flex: 1 1 calc(50% - 1px);
    min-width: 0;
    padding: 12px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .hero__meta-item:nth-child(2),
  .hero__meta-item:nth-child(4) {
    border-right: none;
  }

  .hero__meta-divider {
    display: none;
  }

  /* Fully hide scroll indicator on mobile — wastes space */
  .hero__scroll {
    display: none;
  }

  .nav__cta {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }
}


/* ============================================================
   2. RESIDENCE (fullbleed) — mobile
   ============================================================ */

@media (max-width: 1024px) {
  .residence--fullbleed {
    min-height: auto;
  }

  .residence__stage {
    grid-template-columns: 1fr;
    padding: clamp(90px, 14vh, 130px) var(--gutter) clamp(48px, 8vh, 80px);
    gap: 48px;
    align-items: start;
    min-height: auto;
  }

  .residence__copy-zone {
    max-width: 100%;
  }

  .residence__copy-zone .display--light {
    font-size: clamp(30px, 8vw, 52px);
    line-height: 1.06;
  }

  .residence__lede {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(245, 241, 234, 0.78);
  }

  .residence__cta {
    margin-top: 28px;
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Stats zone: 2 cols */
  .residence__stats-zone {
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 0;
  }

  .res-stat {
    padding: 24px 20px;
  }

  .res-stat__sub {
    font-size: 11px;
    display: block;
    /* re-show on tablet */
  }
}

@media (max-width: 640px) {
  .residence__stats-zone {
    grid-template-columns: 1fr 1fr;
  }

  .res-stat {
    padding: 18px 14px;
  }

  .res-stat__number {
    font-size: clamp(36px, 10vw, 54px);
  }

  .res-stat__sub {
    display: none;
  }
}


/* ============================================================
   3. PULL QUOTE — blur reveal fix for mobile
   ============================================================ */

@media (max-width: 1024px) {

  /* The pull-quote uses JS to add inline filter/opacity/transform.
     On mobile we override those initial hidden states immediately
     so it always shows. The JS-set inline styles win by specificity
     so we use the class the JS sets to show it. */
  .pull-quote {
    height: auto !important;
    min-height: 60vh;
    padding: var(--section-y) var(--gutter) !important;
    position: relative !important;
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .pin-spacer {
    height: auto !important;
    padding: 0px !important;
  }

  /* Force visible — remove blur reveal JS hidden state */
  .pull-quote__inner {
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    padding: 0;
  }

  .pull-quote .display--xl {
    font-size: clamp(22px, 6vw, 42px);
    line-height: 1.2;
    font-weight: 400;
    text-wrap: balance;
  }

  .pull-quote__rule {
    margin: 28px auto 16px;
  }

  .pull-quote__cite {
    font-size: 10px;
  }
}


/* ============================================================
   4. REVEAL-ARCH (scroll-driven cinematic) — mobile fix
   ============================================================ */

@media (max-width: 1024px) {

  /* Disable sticky + height so it renders as a normal section */
  .reveal-arch {
    height: auto !important;
  }

  .reveal-arch__pin {
    position: relative !important;
    height: 80vh;
    min-height: 480px;
  }

  /* Media fills the pin */
  .reveal-arch__media {
    position: absolute;
    inset: 0;
  }

  .reveal-arch__media video,
  .reveal-arch__media img {
    filter: none !important;
    /* remove blur that JS sets */
    transition: none !important;
  }

  /* Content always visible */
  .reveal-arch__title .word>span {
    transform: none !important;
    transition: none !important;
  }

  .reveal-arch__lede {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Force drawing state so callouts & title show */
  .reveal-arch {
    /* apply same CSS as .is-drawing manually */
  }

  .reveal-arch .arch-line {
    stroke-dashoffset: 0 !important;
  }

  .reveal-arch .arch-dot {
    opacity: 1 !important;
  }

  .reveal-arch .arch-callout {
    opacity: 1 !important;
    transform: translateX(0) !important;
  }

  .reveal-arch__content {
    padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(32px, 5vh, 64px);
  }

  .reveal-arch__title {
    font-size: clamp(32px, 8vw, 56px);
    margin-bottom: 16px;
  }

  .reveal-arch__lede {
    font-size: 14px;
    max-width: 100%;
    margin-bottom: 24px;
  }

  /* Hide callouts on small screens (they overflow) */
  .reveal-arch__callouts {
    display: none;
  }

  .reveal-arch__progress {
    display: block;
  }
}

@media (max-width: 640px) {
  .reveal-arch__pin {
    height: 65vh;
    min-height: 380px;
  }
}


/* ============================================================
   5. GALLERY — mobile
   ============================================================ */

@media (max-width: 1024px) {
  .gallery {
    padding: var(--section-y) 0;
  }

  .gallery__editorial {
    padding: 0 var(--gutter);
    gap: clamp(20px, 4vw, 40px);
  }

  /* Hero gal: taller portrait on mobile */
  .gal--hero {
    aspect-ratio: 3/4;
    min-height: 0;
  }

  .gal--wide-feature,
  .gal--wide {
    aspect-ratio: 16/10;
    min-height: 260px;
  }

  /* Gallery text row: single col, text first */
  .gallery__row--text-image {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  /* Diagonal grid: 1 col on mobile */
  .gal-dg-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 24px 0 40px;
    gap: 0;
  }

  .gal-dg-rule {
    display: none;
  }

  .gal-dg-card--tl,
  .gal-dg-card--tr,
  .gal-dg-card--bl {
    grid-column: 1 !important;
    grid-row: auto !important;
    padding: 0 0 32px 0;
  }

  .gal-dg-card--tr {
    padding-top: 0;
    flex-direction: column;
  }

  .gal-dg-img-wrap img {
    width: 100%;
    height: auto;
    min-height: 260px;
    object-fit: cover;
  }

  .gal-dg-meta {
    margin-top: 16px;
  }

  .gal-dg-ghost {
    display: none;
    /* hide on mobile, they overflow */
  }

  /* Overlay: always visible on mobile (no hover) */
  .gal__overlay {
    opacity: 1 !important;
    transform: none !important;
  }

  .gal figcaption {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 640px) {
  .gal--hero {
    aspect-ratio: 3/4;
  }

  .gal--wide-feature,
  .gal--wide {
    aspect-ratio: 4/5;
    min-height: 0;
  }

  .gal__overlay {
    padding: 20px;
  }

  .gal__title {
    font-size: 20px;
  }

  .gal__caption {
    font-size: 13px;
  }
}


/* ============================================================
   6. DAY IN THE LIFE — mobile
   ============================================================ */

/* Mobile rules for day section moved to responsive patch */



/* ============================================================
   7. AMENITIES (amen-scene) — mobile fix
   The full-screen parallax scene needs special treatment.
   On mobile we make it scrollable with visible content.
   ============================================================ */

@media (max-width: 768px) {

  .amenities-section {
    padding: 0 !important;
    background: transparent !important;
  }

  .amen-scene {
    height: 40vh !important;
    min-height: 340px !important;
    cursor: auto !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Background: ensure active image shows */
  .amen-bg__img.is-active {
    opacity: 1 !important;
  }

  /* Veil: slightly lighter so content pops */
  .amen-veil {
    background:
      linear-gradient(180deg,
        rgba(11, 11, 12, 0.40) 0%,
        rgba(11, 11, 12, 0.05) 20%,
        rgba(11, 11, 12, 0.10) 45%,
        rgba(11, 11, 12, 0.80) 78%,
        rgba(11, 11, 12, 0.97) 100%),
      linear-gradient(90deg,
        rgba(11, 11, 12, 0.50) 0%,
        rgba(11, 11, 12, 0.10) 50%,
        rgba(11, 11, 12, 0.0) 100%);
  }

  /* Top bar */
  .amen-topbar {
    padding: 20px var(--gutter) 0;
  }

  .amen-topbar__eyebrow {
    font-size: 9px;
  }

  /* Ghost number: smaller, not obstructing */
  .amen-ghost {
    font-size: clamp(72px, 20vw, 110px);
    bottom: 96px;
    right: 12px;
    opacity: 0.04;
  }

  /* Main content: push up from bottom strip */
  .amen-content {
    padding: 0 var(--gutter) 116px;
  }

  .amen-content__inner {
    max-width: 100%;
  }

  /* Tag */
  .amen-tag {
    font-size: 9px;
    letter-spacing: 0.22em;
    padding: 5px 12px;
    margin-bottom: 16px;
    /* Always show — JS sets opacity via class */
    opacity: 1 !important;
    transform: none !important;
  }

  /* Title */
  .amen-title {
    font-size: clamp(28px, 8vw, 52px);
    margin-bottom: 12px;
    line-height: 1.05;
  }

  .amen-title__line {
    /* Always visible */
    transform: none !important;
    opacity: 1 !important;
  }

  /* Description */
  .amen-desc {
    font-size: 13px;
    line-height: 1.65;
    max-width: 100%;
    color: rgba(245, 241, 234, 0.65);
    /* Always visible */
    opacity: 1 !important;
    transform: none !important;
  }

  /* Side index: hidden on mobile (using strip instead) */
  .amen-index {
    display: none !important;
  }

  /* Bottom strip: larger tap targets, scrollable */
  .amen-strip {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .amen-strip::-webkit-scrollbar {
    display: none;
  }

  .amen-strip__item {
    min-width: 70px;
    flex: 0 0 auto;
    padding: 12px 8px 14px;
  }

  .amen-strip__num {
    font-size: 13px;
  }

  .amen-strip__label {
    font-size: 7px;
    letter-spacing: 0.12em;
  }
}

@media (max-width: 480px) {
  .amen-strip__label {
    display: none;
  }

  .amen-strip__num {
    font-size: 14px;
  }

  .amen-strip__item {
    min-width: 52px;
    padding: 14px 8px;
  }

  .amen-content {
    padding: 0 16px 108px;
  }

  .amen-title {
    font-size: clamp(26px, 9vw, 44px);
  }
  
  .gal-text__body.social {
      font-size: 13px;
  }
}


/* ============================================================
   8. FLOOR PLANS — mobile
   ============================================================ */

@media (max-width: 1024px) {
  .plans {
    padding: var(--section-y) var(--gutter);
  }

  .plans__tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0;
    gap: 0;
  }

  .plans__tabs::-webkit-scrollbar {
    display: none;
  }

  .plans__tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 14px 18px;
    font-size: 10px;
  }

  /* Single column layout */
  .plans__panel.is-active {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .plans__panel.is-active>div:first-child {
    width: 100%;
  }

  .plans__panel.is-active>div:first-child img,
  .plans__panel.is-active .plans__art {
    width: 100%;
    max-width: 100%;
  }

  .plans__art {
    padding: 28px 20px;
  }

  .plans__detail h3 {
    font-size: clamp(22px, 5vw, 32px);
  }

  .plans__detail dl>div {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
}

@media (max-width: 640px) {
  .plans__tab {
    padding: 12px 14px;
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  .plans__detail dl>div {
    flex-direction: column;
    gap: 4px;
  }

  .plans__detail dd {
    font-size: 15px;
  }
}


/* ============================================================
   9. LOCATION — mobile fix (broken layout)
   ============================================================ */

@media (max-width: 1024px) {

  /* The location section is a grid set in theme-patch.
     On mobile override to single column. */
  section#location {
    padding: var(--section-y) var(--gutter);
    max-width: 100%;
  }

  section#location>.location {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 40px;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0;
  }

  .location {
    display: grid !important;
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .location__map {
    aspect-ratio: 16/10;
    width: 100%;
    min-height: 280px;
  }

  .location__photo {
    width: 100%;
    height: 100%;
    min-height: 280px;
  }

  .location__photo video,
  .location__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1) !important;
    /* disable JS scale on mobile */
  }

  .location__copy .display {
    font-size: clamp(26px, 6vw, 44px);
  }

  .location__copy .lead {
    font-size: 14px;
    max-width: 100%;
  }

  .location__list {
    margin-top: 28px;
  }

  .location__list li {
    padding: 16px 0;
    gap: 16px;
  }

  .location__list li strong {
    font-size: 18px;
    min-width: 80px;
  }

  .location__list li span {
    font-size: 13px;
  }

  /* Figcaption in video */
  .location__photo figcaption {
    padding: 60px 20px 20px;
  }
}

@media (max-width: 640px) {
  .location__map {
    aspect-ratio: 4/3;
    min-height: 240px;
  }

  .location__list li strong {
    font-size: 16px;
  }
}


/* ============================================================
   10. ENQUIRE SECTION — mobile
   ============================================================ */

@media (max-width: 1024px) {
  .enquire {
    background-attachment: scroll;
    /* fixed bg causes issues on iOS */
    min-height: auto;
    padding: var(--section-y) var(--gutter);
  }

  .enquire__inner {
    grid-template-columns: 1fr !important;
    gap: 48px;
  }

  .enquire__copy .lead {
    max-width: 100%;
    font-size: 14px;
  }

  .enquire__contacts {
    margin-top: 32px;
    gap: 16px;
  }

  .enquire__contacts a {
    font-size: 18px;
  }

  .enquire__form {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: clamp(20px, 3vw, 32px);
  }
}

@media (max-width: 640px) {
  .enquire__form {
    grid-template-columns: 1fr !important;
  }

  .field--full {
    grid-column: 1 !important;
  }

  .enquire__contacts a {
    font-size: 16px;
  }
}


/* ============================================================
   11. ENQUIRE MODAL (popup form) — mobile fix
   ============================================================ */

@media (max-width: 768px) {
  .enquire-modal {
    padding: 0;
    align-items: flex-end;
    /* slide up from bottom */
  }

  .enquire-modal__panel {
    width: 93%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(100%) scale(1) !important;
    /* slide in from bottom */
    transition: transform 380ms cubic-bezier(0.23, 1, 0.32, 1) !important;
  }

  .enquire-modal.is-open .enquire-modal__panel {
    transform: translateY(0) scale(1) !important;
  }

  .enquire-modal__form {
    grid-template-columns: 1fr !important;
    gap: 20px;
    padding: 24px 20px 40px;
  }

  .enquire-modal__form .field--full {
    grid-column: 1 !important;
  }

  /* Close button: larger tap target */
  .enquire-modal__close {
    width: 44px;
    height: 44px;
    top: 16px;
    right: 16px;
  }

  /* Add a drag handle visual cue */
  .enquire-modal__panel::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 12px auto 0;
  }

  /* Form labels and inputs */
  .enquire-modal__form .field label {
    font-size: 10px;
  }

  .enquire-modal__form .field input,
  .enquire-modal__form .field select,
  .enquire-modal__form .field textarea {
    font-size: 16px;
    /* prevents iOS zoom on focus */
    padding: 14px 0;
  }

  .enquire-modal__form .field select {
    -webkit-appearance: none;
    appearance: none;
  }

  .enquire-modal__form .btn--block {
    padding: 18px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .enquire-modal__panel {
    max-height: 96vh;
  }

  .enquire-modal__form {
    padding: 20px 16px 48px;
  }
}


/* ============================================================
   12. FOOTER — mobile
   ============================================================ */

@media (max-width: 1024px) {
  .footer__top {
    grid-template-columns: 1fr !important;
    gap: 40px;
    padding-bottom: 40px;
  }

  .footer__cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .footer__cols h4 {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .footer__cols a {
    font-size: 13px;
    padding: 6px 0;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    font-size: 10px;
  }
}

@media (max-width: 640px) {
  .footer {
    padding: 56px var(--gutter) 40px;
  }

  .footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer__bottom {
    margin-top: 24px;
  }
}

@media (max-width: 480px) {
  .footer__cols {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}


/* ============================================================
   13. FLOATING CONTACT BAR — mobile
   ============================================================ */

@media (max-width: 768px) {
  .floating-contact {
    bottom: 20%;
    right: 0;
    transform: none;
  }

  .contact-btn {
    padding: 10px 8px;
    min-width: 52px;
    gap: 3px;
  }

  .contact-btn svg {
    width: 20px;
    height: 20px;
  }

  .contact-btn span {
    font-size: 6px;
  }
}


/* ============================================================
   14. NAVIGATION — mobile
   ============================================================ */

@media (max-width: 1024px) {
  .nav {
    padding: 16px var(--gutter);
  }

  .nav.is-scrolled {
    padding: 12px var(--gutter);
  }

  .nav__toggle {
    display: flex;
    cursor: pointer;
  }

  /* Hamburger → X when open */
  .nav__toggle[aria-expanded="true"] span:first-child {
    transform: rotate(45deg) translate(4px, 4px);
  }

  .nav__toggle[aria-expanded="true"] span:last-child {
    transform: rotate(-45deg) translate(4px, -4px);
  }

  .nav__toggle span {
    transition: transform 200ms ease;
  }

  /* Mobile menu dropdown */
  .nav__links.is-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(246, 241, 234, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0 var(--gutter);
    gap: 0;
    border-top: 1px solid var(--ink-100);
    border-bottom: 1px solid var(--ink-100);
    z-index: 99;
  }

  .nav__links.is-open a {
    color: var(--ink-900) !important;
    padding: 18px 0;
    border-bottom: 1px solid var(--ink-100);
    font-size: 12px;
    letter-spacing: 0.22em;
  }

  .nav__links.is-open a:last-child {
    border-bottom: none;
  }

  /* Show enquire CTA in mobile menu — add as last item feel */
  .nav__links {
    display: none;
  }
}


/* ============================================================
   15. SECTION HEADS — mobile padding
   ============================================================ */

@media (max-width: 1024px) {
  .section-head {
    padding: 0 var(--gutter);
  }

  .section-head .display {
    font-size: clamp(26px, 6vw, 48px);
  }

  .section-head .eyebrow {
    font-size: 10px;
    margin-bottom: 16px;
  }

  .padding-top-section {
    padding-top: var(--section-y);
  }
}


/* ============================================================
   16. MARQUEE — mobile
   ============================================================ */

@media (max-width: 640px) {
  .marquee {
    padding: 16px 0;
  }

  .marquee__track {
    font-size: 16px;
    gap: 32px;
  }
}


/* ============================================================
   17. GALLERY DISCLAIMER — mobile
   ============================================================ */

@media (max-width: 640px) {
  .gallery__disclaimer {
    padding: 16px var(--gutter);
    font-size: 13px;
  }
}


/* ============================================================
   18. GENERAL — blur reveal animations
   Force all blur-reveal / split-words to show on mobile.
   JS observers sometimes don't fire on reduced-motion or when
   elements are partially off-screen at load time.
   ============================================================ */

@media (max-width: 1024px) {

  /* Blur-reveal words: always show on mobile */
  .blur-reveal__word {
    filter: none !important;
    opacity: 1 !important;
    transition: none !important;
  }

  /* Split-words headlines */
  .split-words .word>span {
    transform: none !important;
    transition: none !important;
  }

  /* Generic reveal elements */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    filter: none !important;
  }

  [data-reveal="up"],
  [data-reveal="clip"] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Day chapter always visible */
  .day__chapter {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Gallery diagonal cards */
  .gal-dg-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Res-stat tiles */
  .res-stat {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Mood items */
  .mood {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* ============================================================
   19. iOS SAFE AREA + SCROLL FIXES
   ============================================================ */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 1024px) {
    .footer {
      padding-bottom: calc(32px + env(safe-area-inset-bottom));
    }

    .enquire-modal__panel {
      padding-bottom: env(safe-area-inset-bottom);
    }

    .amen-strip {
      padding-bottom: env(safe-area-inset-bottom);
    }
  }
}

/* Prevent horizontal scroll on the whole page */
@media (max-width: 1024px) {

  html,
  body {
    overflow-x: hidden;
    max-width: 100vw;
  }
}

/* Prevent background-attachment: fixed on iOS (causes blank sections) */
@media (max-width: 1024px) {
  .enquire {
    background-attachment: scroll !important;
  }

  .residence__bg {
    background-attachment: scroll !important;
  }
}

/* ============================================================
   3D ARCH CAROUSEL RESPONSIVE OVERRIDES
   ============================================================ */

@media (max-width: 1024px) {
  .day {
    padding: 80px var(--gutter) 60px !important;
  }

  .arch-slider {
    height: 440px;
    margin: 35px 0 5px;
  }

  .arch-slider__card {
    width: 190px;
    height: 280px;
  }

  .arch-slider__arrow {
    width: 46px;
    height: 46px;
    top: 38%;
    z-index: 200;
  }

  .arch-slider__arrow--prev {
    left: 10px;
  }

  .arch-slider__arrow--next {
    right: 10px;
  }

  .arch-details {
    max-width: 90%;
    margin-top: 25px;
    min-height: 120px;
  }

  .arch-details__title {
    font-size: 24px;
  }

  .arch-details__body {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .day {
    padding: 60px var(--gutter) 40px !important;
  }

  .arch-slider {
    height: 330px;
    margin: 30px 0 5px;
  }

  .arch-slider__card {
    width: 140px;
    height: 200px;
    border-radius: 0px;
  }

  .arch-slider__card-overlay {
    padding: 14px;
  }

  .arch-slider__card-time {
    font-size: 9px;
    margin-bottom: 4px;
  }

  .arch-slider__card-label {
    font-size: 13px;
    line-height: 1.2;
  }

  .arch-slider__arrow {
    display: none !important; /* Hide arrows on touch screens */
  }

  .arch-details {
    max-width: 100%;
    margin-top: 15px;
    min-height: 105px;
  }

  .arch-details__meta {
    gap: 8px;
    margin-bottom: 8px;
  }

  .arch-details__num {
    font-size: 16px;
  }

  .arch-details__time {
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  .arch-details__title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .arch-details__body {
    font-size: 13px;
    line-height: 1.6;
  }
}

/* ============================================================
   AMENITIES SECTION — LAYOUT & NAVIGATION OVERRIDES (MOBILE)
   ============================================================ */
@media (max-width: 768px) {
  .amen-glass-circle {
    display: flex !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    transform: none !important;
    align-items: flex-start !important;
    text-align: left !important;
  }
  
  .amen-arrow {
    display: none !important;
  }
  
  .amen-pagination {
    bottom: 30px !important;
    gap: 10px !important;
  }
  
  .amen-pagination__line {
    width: 30px !important;
  }
  
  .amen-content {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    height: auto !important;
    padding: 0 var(--gutter) 70px !important;
    pointer-events: none !important;
  }
  
  .amen-content__inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .amen-title {
    font-size: clamp(28px, 8vw, 44px) !important;
    text-align: left !important;
    margin-bottom: 12px !important;
    line-height: 1.05 !important;
  }
  
  .amen-title__line {
    text-align: left !important;
    display: inline !important;
  }
  
  .amen-desc {
    font-size: 14px !important;
    max-width: 100% !important;
    text-align: left !important;
  }
  
  .amen-tag {
    border-radius: 20px !important;
    margin-bottom: 16px !important;
    display: inline-block !important;
  }
  
  .amen-topbar {
    top: 75px !important;
  }
  .arch-slider__card.is-active:hover {
      width: 90% !important;
      height: 350px !important;
      transform: scale(1.05);
      z-index: 99999 !important;
      opacity: 1 !important;
    }
}

@media (max-width: 480px) {
  .amen-pagination {
    bottom: 24px !important;
  }
  .amen-content {
    padding-bottom: 60px !important;
  }
}
