/* ============================================================
   ZANE GEORGE - RESPONSIVE DESIGN SYSTEM
   Breakpoints: 
   - Mobile: max-width 768px
   - Tablet: max-width 1024px
   - Desktop: 1440px and above
   ============================================================ */

/* TABLET & BELOW (1024px) */
@media (max-width: 1024px) {
  .nav-container {
    max-width: 100%;
    padding: 0 30px;
  }

  .nav-brand {
    padding: 0 20px;
  }

  .nav-links-left, .nav-links-right {
    gap: 15px;
  }

  .hero-title, .hero-title-italic {
    font-size: clamp(40px, 8vw, 80px);
  }
/* 
  .hero-dw-logo {
    top: 120px;
    left: 40px;
    max-width: 150px;
  } */

  .main-wrap, .contact-main {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    padding: 0 20px !important;
    margin: 60px auto !important;
    width: 100% !important;
    display: block !important;
    max-width: 100% !important;
  }

  .editorial-block {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    text-align: center !important;
  }

  .editorial-side-title {
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  .hero-title-wrap {
    flex-direction: column !important;
    gap: 20px !important;
    white-space: normal !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    text-align: center !important;
  }

  .hero-title, .hero-title-italic {
    white-space: normal !important;
    text-align: center !important;
  }

  /* CONTACT PAGE SPECIFIC FIXES */
  .contact .main-wrap {
    padding-top: 60px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
  }

  .contact .glass-panel {
    padding: 30px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .contact-portrait-wrap {
    width: 100% !important;
    max-width: 450px !important;
    margin: 0 auto !important;
    min-height: auto !important;
  }

  .contact-portrait {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .contact-quick-info {
    margin-top: 30px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .sidebar {
    order: 2;
    margin-top: 0;
  }

  .testimonials-editorial-grid {
    column-count: 1;
    gap: 40px;
  }

  .about-hero-large .container {
    grid-template-columns: 1fr;
    gap: 60px;
    text-align: center;
  }

  .about-portrait-main {
    height: 50vh;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }
}

/* MOBILE (768px) */
@media (max-width: 768px) {
  .grid-container {
    display: none;
  }

  /* GLOBAL */
  body.menu-open {
    overflow: hidden;
  }

  body {
    overflow-x: hidden;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .container {
    padding: 0 20px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  /* NAVIGATION & MOBILE MENU */
  .main-nav {
    z-index: 10000; /* Ensure it stays above everything */
  }

  .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    width: 100%;
  }

  .nav-brand {
    padding: 0;
    text-align: left;
    flex: 0 1 auto; /* Don't force growth */
  }

  .nav-brand a {
    align-items: flex-start;
  }

  .brand-main {
    font-size: 18px;
  }

  .brand-sub {
    font-size: 7px;
  }

  /* MOBILE MENU BACKGROUND OVERLAY */
  .main-nav::before {
    content: '';
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 998;
    transition: left 0.6s cubic-bezier(0.76, 0, 0.24, 1);
  }

  body.menu-open .main-nav::before {
    left: 0;
  }

  .nav-links-left, .nav-links-right {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh; /* Container is full height but transparent */
    background: transparent !important;
    flex-direction: column;
    align-items: center;
    z-index: 999;
    transition: left 0.6s cubic-bezier(0.76, 0, 0.24, 1);
    gap: 20px;
    overflow-y: auto;
    padding: 0;
  }

  .nav-links-left {
    padding-top: 120px; /* Start below brand */
    justify-content: flex-start;
    height: auto; /* Let it wrap content */
    max-height: 100vh;
  }

  .nav-links-right {
    margin-top: 350px; /* Position below the left links without blocking clicks */
    padding-top: 0;
    justify-content: flex-start;
    height: auto;
    max-height: calc(100vh - 350px);
    transition-delay: 0.05s;
  }

  .nav-links-left.mobile-active,
  .nav-links-right.mobile-active {
    left: 0;
  }

  .nav-link {
    font-size: 18px;
    letter-spacing: 0.3em;
    opacity: 1;
  }

  /* Hamburger Toggle */
  .mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 18px;
    cursor: pointer;
    z-index: 10002;
    flex-shrink: 0;
    position: absolute; /* Bulletproof position */
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
  }

  .mobile-toggle .line {
    width: 100%;
    height: 2px; /* Thicker for visibility */
    background: var(--gold);
    transition: all 0.4s ease;
  }

  .mobile-toggle.active .line:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }

  .mobile-toggle.active .line:nth-child(2) {
    transform: translateY(-8.5px) rotate(-45deg);
  }

  /* HERO */
  .hero {
    height: 70vh;
  }

  .hero-dw-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: -40%;
    max-width: 100px;
    z-index: 10;
  }

  .hero-content {
    padding: 40px 20px;
    width: 100%;
    box-sizing: border-box;
  }

  .hero-title-wrap {
    flex-direction: column;
    gap: 20px;
  }

  .section-h .word,
  .section-h .char,
  .hero-title .word,
  .hero-title .char,
  .hero-title-italic .word,
  .hero-title-italic .char {
    display: inline !important;
    white-space: normal !important;
  }

  h2.section-h,
  .hero-title,
  .hero-title-italic {
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    font-size: clamp(2.5rem, 8vw, 7rem) !important;
    line-height: 1.1;
  }

  .hero-title, .hero-title-italic {
    text-align: center;
  }

  .hero-split-line {
    width: 40px;
    height: 1px;
  }

  .hero-watermark {
    font-size: 25vw;
  }

  /* CURTAIN REVEAL */
  .curtain-container {
    height: 60vh;
  }

  .curtain-text h2 {
    font-size: 32px;
  }

  /* EDITORIAL BLOCKS */
  .editorial-block {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    text-align: center !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
  }

  .editorial-side-title {
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .editorial-side-title h2 {
    font-size: 32px;
  }


  .contact-large-link {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .editorial-content-main {
    margin-top: 40px !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .editorial-content-main h2.section-h-sm {
    font-size: 32px !important;
    text-align: center;
    margin-bottom: 30px !important;
    line-height: 1.2;
    letter-spacing: 0px;
  }

  /* FORMS */
  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-group input, .form-group textarea {
    width: 100%;
    box-sizing: border-box;
  }

  .editorial-form .btn-outline-gold {
    width: 100%;
    padding: 18px;
  }


  .contact .secondary-info-grid {
    grid-template-columns: 1fr !important; /* Stack columns on mobile */
    gap: 30px !important;
  }

  /* FOOTER */
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-col {
    padding: 40px 20px;
    text-align: center;
    border-bottom: 1px solid var(--line-color);
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-links, .footer-socials, .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-col:first-child, .footer-col:last-child {
    padding: 40px 20px;
  }

  .footer-col.v-divider {
    border-left: none;
  }

  .footer-bottom-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 30px 20px;
  }

  /* IMAGES */
  .agent-img, .contact-portrait-wrap, .property-card img {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  /* TICKER */
  .ticker-item {
    font-size: 20px;
    margin: 0 25px;
  }

  .affiliate-grid {
    gap: 40px;
  }

  .affiliate-logo {
    height: 100px;
  }

  /* ABOUT PAGE RESPONSIVE FIXES */
  .about-hero-large {
    padding: 100px 0 60px;
    min-height: auto;
  }

  .about-hero-large .container {
    gap: 40px;
  }

  .about-bg-text {
    font-size: 30vw !important;
    top: 20%;
    transform: translate(-50%, 0);
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    margin: 60px 0;
  }

  .stat-item {
    padding: 40px 20px;
    border-right: 1px solid var(--line-color) !important;
    border-bottom: 1px solid var(--line-color) !important;
  }

  .stat-item:nth-child(2n) {
    border-right: none !important;
  }

  .stat-item:nth-child(3), .stat-item:nth-child(4) {
    border-bottom: none !important;
  }

  .signature-wrap {
    align-items: center !important;
    text-align: center !important;
    width: 100%;
  }

  .nav-container {
    display: block !important;
    padding: 15px 20px;
    position: relative;
    width: 100%;
  }

  .nav-brand {
    display: inline-block;
  }

  .philosophy-section {
    padding: 100px 0 !important;
  }

  h2.section-h {
    font-size: clamp(1.8rem, 5vw, 3rem) !important;
    line-height: 1.3 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  .about-hero-large .container {
    padding-top: 40px; /* Space for fixed nav */
  }
}

/* DESKTOP (1440px+) */
@media (min-width: 1440px) {
  .container, .nav-container, .main-wrap, .footer-grid, .footer-bottom-content {
    max-width: 1600px;
  }
}

/* Hide mobile toggle on desktop */
@media (min-width: 769px) {
  .mobile-toggle {
    display: none;
  }
}

/* LAPTOP (1024px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  .hero-title, .hero-title-italic {
    font-size: clamp(48px, 6vw, 85px) !important;
    white-space: nowrap !important;
  }
  
  .hero-title-wrap {
    gap: 25px !important;
  }

  .hero-content {
    padding: 0 50px !important;
  }
}
