/* =============================================================
   DOMUS — COMPREHENSIVE MOBILE RESPONSIVE FIX
   Applied to ALL pages. Breakpoints: 768px / 480px / 390px
   ============================================================= */

/* ─ 1. GLOBAL OVERFLOW PREVENTION ─────────────────────────── */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

*, *::before, *::after {
  box-sizing: border-box;
}

section, header, footer, main {
  overflow-x: hidden;
  max-width: 100%;
}

img, video {
  max-width: 100%;
  height: auto;
}

/* ─ 2. SITE HEADER — All Pages ─────────────────────────────── */
@media (max-width: 768px) {
  .footer-logo-img {
    height: 30px !important;
  }

  .site-header {
    padding: 0.6rem 1rem !important;
    position: fixed;
    width: 100%;
  }
  .logo-img {
    height: 32px !important;
  }
  .hamburger {
    width: 36px;
    height: 36px;
  }
}

/* ─ 3. MOBILE NAV ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-header {
    height: 56px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.6rem 1.25rem !important;
    position: fixed !important;
    top: 0 !important;
    z-index: 10010 !important;
    transition: background 0.3s ease, border-color 0.3s ease !important;
  }

  /* When mobile menu is open, header matches white luxury surface */
  body.mobile-nav-open .site-header {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(28, 28, 30, 0.08) !important;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.04) !important;
  }

  body.mobile-nav-open .site-header .hamburger span {
    background: #1C1C1E !important;
  }

  /* Hide floating WhatsApp & Pooja Advisor stack when menu is open so they never obscure links */
  body.mobile-nav-open .domus-floating-stack {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    transform: translateY(24px) !important;
  }

  /* Prevent background page scroll on mobile */
  body.mobile-nav-open {
    overflow: hidden !important;
    touch-action: none;
  }

  /* Mobile menu container: clean start below header with 100dvh viewport awareness */
  .mobile-nav {
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: calc(100vh - 56px) !important;
    height: calc(100dvh - 56px) !important;
    max-height: calc(100dvh - 56px) !important;
    background: #ffffff !important;
    z-index: 10005 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y;
    transform: translateX(100%) !important;
    transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0.42s !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .mobile-nav.open {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s !important;
  }

  .mobile-nav-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1.25rem 1.5rem calc(2.5rem + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
  }

  /* Main navigation links: Home, About, Projects, Life at The Domus, Contact */
  .mobile-nav a,
  .mobile-nav .mobile-nav-link {
    font-family: var(--font-display, "Cormorant Garamond", Georgia, serif) !important;
    font-size: clamp(1.45rem, 5.2vw, 1.8rem) !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    color: var(--charcoal, #1C1C1E) !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
    padding: 0.9rem 0 !important;
    border-bottom: 1px solid rgba(28, 28, 30, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
    transform: none !important;
    transition: color 0.22s ease, padding-left 0.22s ease !important;
    background: transparent !important;
  }

  .mobile-nav a:hover,
  .mobile-nav a:active,
  .mobile-nav a.active,
  .mobile-nav .mobile-nav-link:hover,
  .mobile-nav .mobile-nav-link:active,
  .mobile-nav .mobile-nav-link.active {
    color: var(--gold, #B89A5C) !important;
  }

  /* Projects item wrap */
  .mobile-nav-item-wrap {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    border-bottom: 1px solid rgba(28, 28, 30, 0.08) !important;
    padding: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  .mobile-nav-item-wrap a,
  .mobile-nav-item-wrap .mobile-projects-link {
    border-bottom: none !important;
    flex-grow: 1 !important;
    padding: 0.9rem 0 !important;
    margin: 0 !important;
  }

  .mobile-nav-toggle {
    background: transparent !important;
    border: none !important;
    color: var(--charcoal, #1C1C1E) !important;
    padding: 0.9rem 0.5rem !important;
    min-width: 44px !important;
    min-height: 44px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.2s ease !important;
    outline: none !important;
  }

  .mobile-nav-toggle svg {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .mobile-nav-toggle.is-active svg {
    transform: rotate(180deg) !important;
    stroke: var(--gold, #B89A5C) !important;
  }

  /* Projects Submenu */
  .mobile-sub-links {
    display: none !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
    margin: 0.5rem 0 0.85rem 0 !important;
    padding: 0 0 0.5rem 0.65rem !important;
    border-left: 1.5px solid rgba(184, 154, 92, 0.3) !important;
    max-height: none !important;
    opacity: 0 !important;
    overflow: visible !important;
    transition: opacity 0.3s ease !important;
  }

  .mobile-sub-links.is-open {
    display: flex !important;
    opacity: 1 !important;
    animation: mobileSubFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  @keyframes mobileSubFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Category Group Accordion */
  .mobile-cat-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.25rem;
    border-radius: 4px;
    background: rgba(250, 249, 246, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.04);
  }

  .mobile-cat-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0.75rem 0.85rem !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    text-align: left !important;
    min-height: 44px !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: background 0.2s ease !important;
  }

  .mobile-cat-header:active,
  .mobile-cat-header:hover {
    background: rgba(184, 154, 92, 0.06) !important;
  }

  .mobile-cat-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-cat-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C4C4C6;
    display: inline-block;
    flex-shrink: 0;
    transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  }

  .mobile-cat-group.is-open .mobile-cat-bullet {
    background: var(--gold, #B89A5C);
    box-shadow: 0 0 6px rgba(184, 154, 92, 0.45);
    transform: scale(1.15);
  }

  .mobile-cat-title {
    font-family: var(--font-mono, monospace) !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    color: #4A4A4D !important;
    transition: color 0.2s ease !important;
  }

  .mobile-cat-group.is-open .mobile-cat-title {
    color: #000000 !important;
    font-weight: 700 !important;
  }

  .mobile-cat-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-cat-count {
    font-family: var(--font-mono, monospace) !important;
    font-size: 0.6rem !important;
    letter-spacing: 0.1em !important;
    color: #8E8E93 !important;
    background: rgba(0, 0, 0, 0.04);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
  }

  .mobile-cat-chevron {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    stroke: #8E8E93 !important;
  }

  .mobile-cat-group.is-open .mobile-cat-chevron {
    transform: rotate(180deg) !important;
    stroke: var(--gold, #B89A5C) !important;
  }

  /* Project items list under category */
  .mobile-cat-list {
    display: none;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.2rem 0.5rem 0.6rem 1.6rem;
    box-sizing: border-box;
  }

  .mobile-cat-group.is-open .mobile-cat-list {
    display: flex;
    animation: mobileListFade 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes mobileListFade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Individual project links */
  .mobile-nav .mobile-sub-link {
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif) !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #555558 !important;
    padding: 0.55rem 0 0.55rem 0.6rem !important;
    border-bottom: 1px dashed rgba(28, 28, 30, 0.06) !important;
    border-left: 2px solid transparent !important;
    display: flex !important;
    align-items: center !important;
    min-height: 38px !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
    transform: none !important;
    transition: color 0.18s ease, padding-left 0.18s ease, border-color 0.18s ease !important;
  }

  .mobile-nav .mobile-sub-link:last-child {
    border-bottom: none !important;
  }

  .mobile-nav .mobile-sub-link:hover,
  .mobile-nav .mobile-sub-link:active,
  .mobile-nav .mobile-sub-link.active {
    color: #000000 !important;
    border-left-color: var(--gold, #B89A5C) !important;
    padding-left: 0.95rem !important;
  }

  /* Mobile menu footer: Est. 2014 — Mumbai */
  .mobile-nav-footer {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    margin-top: 2rem !important;
    padding: 1.25rem 0 1rem !important;
    border-top: 1px solid rgba(28, 28, 30, 0.08) !important;
    font-family: var(--font-mono, monospace) !important;
    font-size: 0.64rem !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    color: #8E8E93 !important;
    display: block !important;
    text-align: left !important;
  }
}

/* ─ 4. HERO SECTIONS ─ ALL PAGES ───────────────────────────── */
@media (max-width: 768px) {
  /* Home page hero — Mobile Viewport & Preserved Video Composition */
  .hero-domus-style {
    height: 100vh;
    height: 100svh;
    min-height: 100svh;
    max-height: 100dvh;
    background: #000000;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0;
  }

  /* Obsolete mobile video hero styles removed */

  /* Index page hero fallback */
  .hero {
    min-height: 100svh;
  }
}

/* ─ 5. ABOUT.HTML SECTIONS ──────────────────────────────────── */
@media (max-width: 768px) {
  /* About hero section */
  .about-section .about-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .about-section .about-image-wrapper img {
    min-height: 280px !important;
    aspect-ratio: 4/3;
    border-radius: 20px;
  }
  /* Stats / counters */
  .counters {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .counter .num {
    font-size: clamp(2rem, 9vw, 3rem);
  }
  /* Philosophy section */
  .philosophy {
    padding-block: 60px 50px !important;
  }
  .philosophy-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 2.2rem !important;
  }
  .philosophy-content {
    order: 1 !important;
    align-items: flex-start !important;
  }
  .philosophy-quote {
    font-size: clamp(36px, 8vw, 44px) !important;
    margin-top: 25px !important;
    margin-bottom: 25px !important;
    line-height: 1.06 !important;
  }
  .philosophy-rule {
    margin-bottom: 25px !important;
  }
  .philosophy-body {
    font-size: 14px !important;
    line-height: 1.65 !important;
    margin-bottom: 30px !important;
  }
  .philo-float {
    order: 2 !important;
    width: 100% !important;
  }
  .philo-float img {
    aspect-ratio: 16 / 10 !important;
    height: 100% !important;
  }
  .philo-float.f1 {
    aspect-ratio: 16 / 10 !important;
    box-shadow: none !important;
  }
  .philo-float.f2 {
    display: none !important;
  }

  /* Team 2-column on mobile */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .team-photo {
    aspect-ratio: 1;
  }
}

@media (max-width: 480px) {
  .counters {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* ─ 6. SERVICES.HTML ─────────────────────────────────────────── */
/* Services hero 3-column → 1-column */
@media (max-width: 768px) {
  .services-hero {
    padding-top: 100px !important;
    padding-bottom: 50px !important;
    min-height: auto !important;
  }
  .services-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }
  .services-hero-title {
    font-size: clamp(2rem, 8vw, 2.8rem) !important;
  }
  .services-hero-desc {
    max-width: 100% !important;
  }
  .artwork-frame {
    max-width: 260px;
    margin: 0 auto;
  }

  /* UGC Real Lives section */
  .ugc-section {
    padding: clamp(3rem, 7vw, 4.5rem) 0 !important;
    overflow: hidden !important;
  }
  .ugc-container {
    padding: 0 16px !important;
    box-sizing: border-box !important;
  }
  .ugc-heading {
    font-size: clamp(1.8rem, 8vw, 2.4rem) !important;
    font-family: var(--font-display) !important;
    margin-bottom: 20px !important;
  }
  .ugc-carousel {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-x: contain !important;
    touch-action: pan-x pan-y !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    gap: 16px !important;
    padding: 8px 16px 20px !important;
    margin: 0 -16px !important;
    width: calc(100% + 32px) !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
  .ugc-carousel::-webkit-scrollbar {
    display: none !important;
  }
  .ugc-item {
    flex: 0 0 calc(100vw - 52px) !important;
    max-width: 340px !important;
    min-width: 270px !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: normal !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    box-sizing: border-box !important;
  }

  /* Services editorial blocks — stack */
  .services-intro {
    padding: 60px 0 30px !important;
  }
  .services-list-container {
    gap: 70px !important;
  }
  .service-block,
  .service-block.row-reverse {
    flex-direction: column !important;
    gap: 1.8rem !important;
    align-items: flex-start !important;
  }
  .service-media, .service-info {
    width: 100%;
    max-width: 100%;
  }
  .service-image-wrap {
    aspect-ratio: 4/3 !important;
  }
  .service-description {
    max-width: 100% !important;
  }
  .service-title {
    font-size: clamp(1.6rem, 6vw, 2rem) !important;
  }

  /* Process timeline section */
  .process-section {
    padding: 70px 0 !important;
  }
  .process-header-block {
    margin-bottom: 50px !important;
  }
  #process-heading {
    font-size: clamp(2rem, 7vw, 3rem) !important;
  }
  .process-timeline-container {
    gap: 55px !important;
  }
  .process-stage-item {
    flex-direction: column !important;
    padding-left: 28px !important;
    gap: 0.6rem !important;
  }
  .stage-number-col {
    flex: none !important;
  }
  .stage-large-num {
    font-size: 2rem !important;
  }
  .stage-desc {
    max-width: 100% !important;
  }
}

/* ─ 7. PROJECTS.HTML ─────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Project showcase cards */
  .projects-showcase {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 0 16px !important;
  }
  .project-showcase-card {
    padding: 12px !important;
    border-radius: 22px !important;
  }
  /* Stats luxury section (2 col → 1 col already handled above) */
  .stats-section-luxury {
    padding: clamp(50px, 8vw, 90px) 16px !important;
  }
  .stats-grid-luxury {
    grid-template-columns: 1fr !important;
    gap: 50px !important;
    padding: 0 !important;
  }
  .stat-number-large {
    font-size: clamp(70px, 18vw, 120px) !important;
  }
  .stat-number-plus {
    font-size: clamp(40px, 10vw, 70px) !important;
  }
  /* Gallery carousel */
  .gallery-slide {
    min-width: 82vw !important;
  }
  .gallery-carousel-wrapper {
    border-radius: 18px !important;
  }
}

/* ─ 8. PROJECT DETAIL PAGES (domus-prive, east, west) ──────── */
@media (max-width: 768px) {
  /* About info section below hero */
  .property-inner {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .property-left {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .property-right {
    display: none !important;
  }
  .property-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
    margin: 1rem 0 0.5rem !important;
  }
  .property-list span {
    font-size: 14px !important;
    min-width: 120px !important;
    padding: 4px 10px !important;
  }
  .property-list strong {
    font-size: 16px !important;
  }

  /* Amenities grid */
  .amenities-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  .amenity-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 8px !important;
  }
  .amenity-card img {
    width: 50px !important;
    height: 50px !important;
  }
  .amenity-card p {
    font-size: 14px !important;
    margin-top: 6px !important;
  }

  /* Gallery section */
  .gallery-heading {
    font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
  }

  /* Mobile carousel for project pages */
  .mobile-carousel {
    padding: 40px 0 !important;
  }
  .mobile-carousel__header {
    padding: 30px 16px !important;
  }
  .mobile-carousel__heading {
    font-size: clamp(1.8rem, 8vw, 2.4rem) !important;
  }

  /* Footer in project detail */
  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .footer-right {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }
  .footer-left {
    max-width: 100% !important;
  }
  .footer-logo-wrap {
    justify-content: center !important;
  }
  .domus-footer {
    padding: 50px 16px 30px !important;
  }
  /* New footer from project-detail.css */
  .footer-top-row {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .footer-explore-links {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }
  .footer-middle-row {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding: 24px 0 !important;
  }
  .footer-bottom-row {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

@media (max-width: 480px) {
  /* Amenities: 2 col stays readable but icons smaller */
  .amenity-card img {
    width: 40px !important;
    height: 40px !important;
  }
  .amenity-card p {
    font-size: 12px !important;
  }
  /* Property list — smaller pills */
  .property-list span {
    font-size: 12px !important;
    min-width: 100px !important;
  }
}

/* ─ 10. FOOTER — ALL PAGES (main site footer from style.css) ── */
@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    align-items: start !important;
    margin-bottom: 2rem !important;
  }
  .footer-brand {
    grid-column: 1 !important;
  }
  .footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.6rem !important;
    text-align: left !important;
  }
  /* Social icons in footer */
  .footer-socials {
    justify-content: flex-start !important;
  }
  /* Back to top */
  .back-to-top {
    bottom: 1.2rem;
    right: 1.2rem;
    width: 40px;
    height: 40px;
  }
  /* Remove excess height on footer */
  .site-footer {
    min-height: auto !important;
    padding-top: clamp(3rem, 7vw, 4.5rem) !important;
  }
  .site-footer a, .footer-col a {
    color: #AAA39B !important;
  }
  .site-footer a:hover, .footer-col a:hover {
    color: #C8A45D !important;
  }
  .footer-col h5 {
    color: #8D877F !important;
  }
  /* Fix social links in footer */
  .footer-social a {
    padding: 0 !important;
    color: #AAA39B !important;
  }
  .footer-social a:hover {
    color: #C8A45D !important;
  }
}

@media (max-width: 480px) {
  .footer-top {
    grid-template-columns: 1fr !important;
  }
  .footer-brand {
    grid-column: 1 !important;
  }
}

/* ─ 11. CONTAINER PADDING ────────────────────────────────────── */
@media (max-width: 768px) {
  .container {
    padding-left: 1.2rem !important;
    padding-right: 1.2rem !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* ─ 12. SECTION SPACING ──────────────────────────────────────── */
@media (max-width: 768px) {
  section {
    /* Allow sections to naturally size themselves; don't hard-set */
  }
  /* Section heads */
  .section-head {
    max-width: 100% !important;
  }
  .eyebrow, .gold-eyebrow {
    font-size: 0.65rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.14em !important;
  }
}

/* ─ 13. FORM INPUTS (Contact page) ──────────────────────────── */
@media (max-width: 768px) {
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px !important; /* prevents iOS zoom on focus */
    padding: 12px 0 !important;
  }
  .btn-submit,
  .btn-pill-discover,
  .hero-cta {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ─ 14. 3D Carousel (index page) ─────────────────────────────── */
@media (max-width: 480px) {
  .carousel-3d-stage { height: 260px !important; }
  .carousel-3d-slide { width: 180px !important; height: 230px !important; }
}

/* ─ 15. BACK TO TOP BUTTON ───────────────────────────────────── */
.back-to-top {
  z-index: 9900;
}

/* ─ 16. THE DOMUS INTRO MOBILE OVERRIDES ─────────────────────── */
@media (max-width: 768px) {
  .domus-intro {
    padding-block: 60px 50px !important;
  }
  .domus-intro-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 2.2rem !important;
  }
  .domus-intro-content {
    order: 2 !important;
    align-items: flex-start !important;
  }
  .domus-intro-media {
    order: 1 !important;
    width: 100% !important;
  }
  .domus-intro-media img {
    aspect-ratio: 16 / 11 !important;
  }
  .domus-intro-headline {
    font-size: clamp(36px, 8vw, 44px) !important;
    margin-top: 25px !important;
    margin-bottom: 25px !important;
    line-height: 1.06 !important;
  }
  .domus-intro-rule {
    margin-bottom: 25px !important;
  }
  .domus-intro-body {
    font-size: 14px !important;
    line-height: 1.65 !important;
  }
  .domus-intro-cta {
    margin-top: 30px !important;
  }
}

/* ─ 17. PROJECTS INTRO & GRID MOBILE OVERRIDES ───────────────── */
@media (max-width: 768px) {
  .projects-section {
    padding-top: 70px !important;
    padding-bottom: 60px !important;
  }
  .projects-intro {
    margin-bottom: 36px !important;
  }
  .projects-intro h2 {
    font-size: clamp(38px, 8vw, 44px) !important;
    margin-top: 16px !important;
    margin-bottom: 12px !important;
    line-height: 1.06 !important;
  }
  .projects-intro-desc {
    font-size: 14px !important;
    line-height: 1.65 !important;
  }
  .project-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .project-card {
    grid-column: 1 / -1 !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .project-card .media {
    width: 100% !important;
    height: auto !important;
  }
  .project-card:nth-child(1) .media,
  .project-card:nth-child(4) .media {
    aspect-ratio: 16 / 10.5 !important;
  }
  .project-card:nth-child(2) .media,
  .project-card:nth-child(3) .media {
    aspect-ratio: 4 / 3 !important;
  }
  .project-details {
    padding-inline: 0 !important;
  }
  .project-num {
    font-size: 9px !important;
    margin-bottom: 2px !important;
  }
  .project-title {
    font-size: 14px !important;
    margin-bottom: 1px !important;
    line-height: 1.25 !important;
  }
  .project-category {
    font-size: 9px !important;
    letter-spacing: 0.12em !important;
  }
  .project-arrow {
    font-size: 9px !important;
    margin-top: 10px !important;
  }
  .projects-footer {
    margin-top: 40px !important;
    text-align: left !important;
  }
}

