/* ============================================
   EDITH REAL ESTATE — RESPONSIVE
   Single source of truth for all responsive rules
   ============================================ */

/* ---------- TABLET (769–1024px) ---------- */
@media (max-width: 1024px) {
  /* Header: hide desktop nav, show mobile toggle */
  .header__nav { display: none; }
  .header__cta { display: none; }
  .header__toggle { display: flex; }

  /* Homepage layouts */
  .intro__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .intro__body { max-width: 100%; }

  .discovery__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .services-grid .service-card {
    min-height: auto;
  }
  .service-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-xl) var(--space-lg);
  }
  .service-panel:last-child { border-bottom: none; }

  .insights__grid {
    grid-template-columns: 1fr 1fr;
  }
  .insights__grid .insight-card:first-child {
    grid-row: auto;
    grid-column: 1 / -1;
  }

  /* Quick search */
  .quick-search__inner { flex-wrap: wrap; }
  .quick-search__field {
    flex: 1 1 calc(50% - var(--space-md));
    min-width: 140px;
  }
  .quick-search__btn { width: 100%; }

  /* Properties page */
  .property-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .filter-bar { flex-wrap: wrap; }
  .filter-bar__field {
    min-width: 140px;
    flex: 1 1 calc(50% - var(--space-md));
  }

  /* Service detail */
  .service-detail__grid {
    grid-template-columns: 60px 1fr;
    gap: var(--space-xl);
  }
  .service-detail__visual {
    grid-column: 1 / -1;
    order: -1;
  }

  /* About */
  .about-story,
  .about-story--reversed {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .about-story--reversed .about-story__visual { order: auto; }
  .about-values__grid { grid-template-columns: 1fr; }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  /* Footer */
  .footer__top {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }
  .footer__brand { grid-column: span 2; }
}

/* ---------- MOBILE (max-width: 768px) ---------- */
@media (max-width: 768px) {
  .page-hero { min-height: 45vh; padding-top: 75px; }

  /* Reduce section padding on mobile */
  :root {
    --section-padding: clamp(2.5rem, 5vw, 3.5rem);
    --section-padding-lg: clamp(3rem, 6vw, 5rem);
  }

  /* Hero adjustments */
  .hero { min-height: 100svh; }
  .hero__orbital {
    width: 300px;
    height: 300px;
    right: -25%;
    opacity: 0.3;
  }
  .hero__orbital::before { display: none; }
  .hero__content { padding-bottom: var(--space-2xl); }
  .hero__headline { font-size: var(--text-hero-mobile); }
  .hero__actions { flex-direction: column; gap: var(--space-sm); }
  .hero__actions .btn { width: 100%; }
  .hero__scroll-indicator { display: none; }

  /* Quick search */
  .quick-search { margin-top: -20px; padding-bottom: var(--space-xl); }
  .quick-search__inner {
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-lg);
  }
  .quick-search__field { min-width: 100%; }
  .quick-search__btn { width: 100%; }
  /* Override inline grid on homepage quick search */
  .quick-search__inner[style] {
    grid-template-columns: 1fr !important;
    padding: var(--space-lg) !important;
  }
  .quick-search__inner[style] > div { min-width: 0; }

  /* Discovery */
  .discovery__grid { grid-template-columns: 1fr 1fr; }
  .discovery-card { min-height: 150px; padding: var(--space-lg) var(--space-md); }
  .discovery-card:last-child { grid-column: 1 / -1; }

  /* Insights */
  .insights__grid { grid-template-columns: 1fr; }
  .insights__grid .insight-card:first-child { grid-column: auto; }
  .insights__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  /* Properties */
  .property-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; padding: var(--space-md); }
  .filter-bar__field { flex: 1 1 100%; min-width: 0; }
  .filter-bar__actions { width: 100%; }
  .filter-bar__actions .btn { flex: 1; }

  /* Blog / Journal */
  .blog-featured {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .blog-featured__image { aspect-ratio: 16/9; }
  .blog-featured__body { padding: var(--space-lg); }
  .journal-grid { grid-template-columns: 1fr; }

  /* Service detail */
  .service-detail__grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .service-detail__number { font-size: 2.5rem; }
  .service-detail__visual img { height: 220px; }

  /* About */
  .about-story__visual img { height: 260px; }
  .about-service-card { padding: var(--space-xl) !important; }

  /* Social Video */
  .social-video-grid {
    grid-template-columns: 1fr;
  }
  .content-archive {
    grid-template-columns: 1fr;
  }
  .social-profiles__grid {
    flex-direction: column;
    align-items: center;
  }

  /* Social CTA */
  .social-cta__links {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
  }
  .social-cta__link {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  /* Final CTA */
  .final-cta { padding: var(--space-3xl) 0; }

  /* Footer */
  .footer__top { grid-template-columns: 1fr; gap: var(--space-xl); }
  .footer__brand { grid-column: auto; }
  .footer__bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  /* WhatsApp float removed — replaced by FAQ chat */

  /* Mobile menu */
  .mobile-menu__link { font-size: clamp(1.25rem, 4vw, 1.75rem); }
}

/* ---------- SMALL MOBILE (max-width: 480px) ---------- */
@media (max-width: 480px) {
  .discovery__grid { grid-template-columns: 1fr; }
  .discovery-card:last-child { grid-column: auto; }

  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }

  .final-cta__actions {
    flex-direction: column;
    align-items: center;
  }
  .final-cta__actions .btn {
    width: 100%;
    max-width: 320px;
  }

  .filter-bar__field { min-width: 100%; }

  .play-btn { width: 64px; height: 64px; }
  .play-btn svg { width: 20px; height: 20px; }

  .brand-statement__quote {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
  }
}

/* ---------- HOMEPAGE NEW SECTIONS — TABLET (1024px) ---------- */
@media (max-width: 1024px) {
  .trust-strip__inner { gap: var(--space-xl); }
  .brand-story__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .brand-story__content { max-width: 100%; }
  .spotlight__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .value-prop__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .why-edith__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .why-edith__content { max-width: 100%; }
  .why-edith__visual { order: -1; aspect-ratio: 16/9; }
  .video-teaser { min-height: 60vh; }
  .insights__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
}

/* ---------- HOMEPAGE NEW SECTIONS — MOBILE (768px) ---------- */
@media (max-width: 768px) {
  .trust-strip__inner {
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
  }
  .trust-strip__item { justify-content: center; }
  .value-prop__grid {
    grid-template-columns: 1fr;
  }
  .video-teaser { min-height: 50vh; }
  .video-teaser__content { padding: var(--space-xl) 0; }
  .why-edith__visual { aspect-ratio: 4/3; }
  .final-cta--enhanced { padding: var(--space-3xl) 0; }
  .final-cta--enhanced .final-cta__headline {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
  }
  .final-cta--enhanced .final-cta__actions {
    flex-direction: column;
    align-items: center;
  }
  .final-cta--enhanced .final-cta__actions .btn {
    width: 100%;
    max-width: 320px;
  }
  .spotlight__meta { flex-wrap: wrap; gap: var(--space-md); }
}

/* ---------- LARGE SCREENS (min-width: 1440px) ---------- */
@media (min-width: 1440px) {
  :root { --container-max: 1400px; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__line-inner { transform: none !important; }
  .hero__sub, .hero__actions, .hero__scroll-indicator { opacity: 1 !important; transform: none !important; }
  .mobile-menu__link, .mobile-menu__cta { opacity: 1 !important; transform: none !important; }
  .hero__scroll-indicator .scroll-line { animation: none; }
  .play-btn::before { animation: none; }
}
