/* ==========================================================================
   NEXAGE.AI — COMPREHENSIVE RESPONSIVE DESIGN SYSTEM
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LARGE TABLETS & SMALL LAPTOPS (<= 1180px)
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .nav-container {
    padding: 0 1.25rem;
  }

  .nav-links {
    gap: 0.95rem;
  }

  .nav-item-link {
    font-size: 0.82rem;
  }

  .hero-slide-split-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1.75rem;
  }

  .hero-visual-card {
    height: 380px;
  }

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

  .onprem-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .tri-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .bento-grid-12 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .engineering-grid {
    grid-template-columns: 1fr 1fr;
  }

  .services-consulting-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .service-cons-card.featured-card {
    grid-column: span 2;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.75rem 1.5rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .values-grid-6 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* --------------------------------------------------------------------------
   2. MEDIUM TABLETS & MOBILE NAVIGATION DRAWER (<= 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --header-height: 68px;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - var(--header-height));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 2rem 1.75rem;
    gap: 1.15rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    z-index: 999;
    border-top: 1px solid rgba(10, 127, 153, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-item-link {
    font-size: 1.15rem;
    padding: 0.65rem 0;
    display: block;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .mobile-menu-cta-item {
    display: block;
    padding-top: 0.5rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .header-actions .btn-primary.hide-mobile {
    display: none;
  }

  .hero-slide-split-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    text-align: center;
  }

  .hero-slide-left {
    align-items: center;
    text-align: center;
  }

  .hero-slide-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-slide-title {
    font-size: 2.5rem;
  }

  .hero-slide-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-slide-actions {
    justify-content: center;
  }

  .hero-visual-card {
    height: 320px;
  }

  .slider-progress-dock {
    margin-top: 1.25rem;
  }

  .agents-grid-10 {
    grid-template-columns: repeat(2, 1fr);
  }

  .onprem-highlight-box {
    padding: 2rem;
  }

  .trust-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-tabs-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
  }

  .bento-tab-btn {
    width: 100%;
    text-align: center;
    font-size: 0.82rem;
    padding: 0.65rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
  }

  .depark-hub-banner {
    flex-direction: column;
    text-align: left;
    gap: 1.5rem;
  }

  .depark-map-wrap {
    width: 100% !important;
    flex: none !important;
    height: 260px !important;
    min-height: 240px !important;
  }
}

/* --------------------------------------------------------------------------
   3. TABLETS & HORIZONTAL CHIP SCROLL (<= 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .bento-tabs-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    width: 100%;
    margin-bottom: 1.5rem;
  }

  .bento-tab-btn {
    width: 100%;
    text-align: center;
    font-size: 0.82rem;
    padding: 0.65rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    border-radius: var(--radius-full);
  }

  .engineering-grid {
    grid-template-columns: 1fr;
  }

  .models-grid-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --------------------------------------------------------------------------
   4. MOBILE PHONES (<= 600px)
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .section,
  .hero-slider-section,
  .site-footer,
  .container,
  .container-wide {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .hero-slide-title, 
  .section-title, 
  .hero-slide-desc, 
  .section-desc, 
  .depark-title, 
  .depark-desc, 
  .founders-message-text {
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }

  .hero-slide-badge {
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
    font-size: 0.75rem !important;
    padding: 0.35rem 0.75rem !important;
  }

  .section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .hero-slider-section {
    padding-top: calc(var(--header-height) + 1rem);
    padding-bottom: 1.5rem;
  }

  .hero-slide-title {
    font-size: 2rem;
  }

  .hero-slide-desc {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }

  .hero-slide-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .hero-slide-actions .btn-primary,
  .hero-slide-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .hero-visual-card {
    height: 250px;
    border-radius: var(--radius-lg);
  }

  .hero-card-floating-badge {
    display: none;
  }

  .slider-progress-dock {
    max-width: calc(100vw - 2.5rem) !important;
    padding: 0.4rem 0.65rem !important;
    gap: 0.45rem !important;
    margin-top: 1rem !important;
  }

  .slider-segment-bar {
    width: 38px !important;
  }

  .slider-progress-segment.active .slider-segment-bar {
    width: 54px !important;
  }

  .agents-grid-10 {
    grid-template-columns: 1fr;
  }

  .onprem-grid-4 {
    grid-template-columns: 1fr;
  }

  .onprem-highlight-box {
    padding: 1.5rem 1.25rem;
  }

  .engineering-showcase-box {
    padding: 1.5rem 1.25rem !important;
    border-radius: var(--radius-xl) !important;
  }

  .values-section-box {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }

  .depark-hub-banner {
    padding: 1.5rem 1.25rem !important;
    border-radius: var(--radius-xl) !important;
  }

  .depark-contact-details {
    padding: 0.85rem 1rem !important;
  }

  .bento-tabs-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 1.25rem;
  }

  .bento-tab-btn {
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.6rem 0.35rem;
    min-height: 42px;
  }

  .bento-grid-12 {
    grid-template-columns: 1fr;
  }

  .trust-metrics-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .modal-overlay {
    padding: 0.5rem;
  }

  .modal-content {
    padding: 1.25rem 1rem;
    max-height: 98vh;
    border-radius: var(--radius-lg);
  }

  .modal-content .form-row-2col {
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .modal-content .form-group {
    margin-bottom: 0.45rem;
  }

  .modal-content .form-label {
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
  }

  .modal-content .form-control {
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
  }

  .modal-content textarea.form-control {
    min-height: 48px;
    max-height: 60px;
  }

  .services-consulting-grid {
    grid-template-columns: 1fr;
  }

  .service-cons-card.featured-card {
    grid-column: span 1;
    grid-template-columns: 1fr;
    padding: 1.5rem 1.25rem;
  }

  .founders-message-card {
    padding: 2rem 1.25rem;
  }

  .values-grid-6 {
    grid-template-columns: 1fr;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-brand-col p {
    max-width: 100% !important;
  }

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

/* --------------------------------------------------------------------------
   5. COMPACT MOBILE SCREENS (<= 380px — iPhone SE / Small Screens)
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  .brand-logo-img {
    height: 44px;
  }

  .hero-slide-title {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.55rem;
  }

  .hero-visual-card {
    height: 210px;
  }

  .slider-segment-bar {
    width: 30px !important;
  }

  .slider-progress-segment.active .slider-segment-bar {
    width: 44px !important;
  }
}

/* ---------- HOME OVERVIEW ---------- */
@media (max-width: 1100px) {
  .ov-stage .ov-agents { flex-wrap: wrap; gap: .75rem .5rem; }
  .ov-stage .ov-agent { flex: 0 0 calc(20% - .5rem); }
}
@media (max-width: 860px) { .ov-grid { grid-template-columns: 1fr; } .ov-mod { flex-basis: calc(25% - .75rem); } }
@media (max-width: 640px) {
  .ov-section { padding-top: 1.5rem; padding-bottom: 2.5rem; }
  .ov-stage-copy { display: block; }
  .ov-stage .ov-agents { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem .35rem; }
  .ov-agent { flex: none; font-size: .66rem; }
  .ov-agent img, .ov-stage .ov-agent img { max-width: 72px; }
  .ov-stage .ov-agent { flex: none; }
  .ov-modules { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem .35rem; }
  .ov-mod { flex: none; font-size: .66rem; }
  .ov-mod img { width: 64px; height: 64px; }
}
