/* ==========================================================
   RESPONSIVE — Mobile-first Breakpoints
   phamducanh.vn
   ========================================================== */

/* ── Mobile: < 768px ── */
@media (max-width: 767px) {
  /* Navigation */
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    background: rgba(10, 22, 40, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px var(--space-8) var(--space-8);
    gap: var(--space-2);
    transition: right var(--transition-slow);
    z-index: var(--z-overlay);
    overflow-y: auto;
  }

  .main-nav.open {
    right: 0;
  }

  .nav-link {
    font-size: var(--text-lg);
    padding: var(--space-3) var(--space-4);
    width: 100%;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: var(--space-4);
    text-align: center;
    width: 100%;
    display: block;
  }

  .menu-toggle {
    display: flex;
  }

  /* Mobile overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-overlay) - 1);
  }

  .nav-overlay.active {
    display: block;
  }

  /* Hero */
  .hero {
    min-height: 100svh;
  }

  .hero-content {
    padding-top: 100px;
  }

  .hero-heading {
    font-size: var(--text-4xl);
  }

  .hero-social {
    display: none;
  }

  .hero-scroll {
    display: none;
  }

  /* Stats */
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  .stat-item::after {
    display: none;
  }

  .stat-number {
    font-size: var(--text-3xl);
  }

  /* Grids */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .content-split,
  .content-split-reverse {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    direction: ltr;
  }

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

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

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

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

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

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .footer-legal a {
    margin-left: var(--space-4);
  }

  /* Timeline */
  .timeline::before {
    left: 16px;
  }

  .timeline-item {
    padding-left: 48px;
  }

  .timeline-dot {
    left: 7px;
    width: 18px;
    height: 18px;
  }

  .timeline-item.timeline-highlight .timeline-dot {
    left: 5px;
    width: 22px;
    height: 22px;
  }

  /* Manifesto */
  .manifesto-quote {
    font-size: var(--text-2xl);
  }

  /* Section headers */
  .section-title {
    font-size: var(--text-3xl);
  }

  /* Page header */
  .page-header {
    padding: calc(var(--space-24) + 80px) 0 var(--space-12);
  }

  .page-title {
    font-size: var(--text-3xl);
  }

  /* Buttons */
  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
    justify-content: center;
  }

  /* Back to top */
  .back-to-top {
    bottom: var(--space-4);
    right: var(--space-4);
    width: 42px;
    height: 42px;
  }
}

/* ── Tablet: 768px – 1023px ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 50%;
    max-width: 400px;
    height: 100vh;
    background: rgba(10, 22, 40, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px var(--space-8) var(--space-8);
    gap: var(--space-2);
    transition: right var(--transition-slow);
    z-index: var(--z-overlay);
  }

  .main-nav.open {
    right: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-overlay) - 1);
  }

  .nav-overlay.active {
    display: block;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: var(--space-4);
  }

  .hero-social {
    display: none;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

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

  .stat-item::after {
    display: none;
  }

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

/* ── Desktop: >= 1024px ── */
@media (min-width: 1024px) {
  .nav-overlay {
    display: none !important;
  }
}

/* ── Large Desktop: >= 1440px ── */
@media (min-width: 1440px) {
  .hero-content {
    max-width: var(--container-wide);
  }
}
