/* =========================================================
   Glasscor Security — Responsive Styles (Mobile-First)
   ========================================================= */

/* --- Tablet: max 1024px -------------------------------- */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-item:nth-child(2) { border-right: none; }
  .about-grid { gap: 48px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .contact-grid { gap: 40px; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .quality-grid { grid-template-columns: 1fr; }
}

/* --- Mobile: max 768px --------------------------------- */
@media (max-width: 768px) {
  :root { --max-w: 100%; }
  .section { padding: 64px 0; }

  /* Navigation */
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 0; right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 40px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0,0,0,.4);
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-item { width: 100%; }
  .nav-link {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: var(--radius);
  }
  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255,255,255,.07);
    border-radius: var(--radius);
    margin-top: 4px;
    padding: 4px 0;
    display: none;
  }
  .nav-item.open .nav-dropdown { display: block; }
  .nav-dropdown a { color: rgba(255,255,255,.75); font-size: .9rem; padding: 10px 24px; }
  .nav-dropdown a:hover { background: rgba(255,255,255,.1); color: var(--white); }
  .nav-dropdown .dropdown-cat { color: rgba(255,255,255,.4); border-top-color: rgba(255,255,255,.1); }
  .nav-cta { margin-left: 0; margin-top: 12px; width: 100%; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
  }
  .nav-overlay.active { display: block; }

  /* Hero */
  .hero-content { padding: 120px 0 80px; max-width: 100%; }
  .hero-stats { gap: 28px; flex-wrap: wrap; }
  .hero-stat-num { font-size: 1.8rem; }
  .hero-product-img { width: 100%; opacity: .2; }
  .hero-overlay { background: linear-gradient(to right, rgba(13,30,58,.95) 0%, rgba(13,30,58,.7) 100%) !important; }

  /* Features */
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feature-item { padding: 20px; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-img-wrap img { height: 320px; }

  /* Products */
  .products-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .products-tabs { justify-content: center; }

  /* Values */
  .values-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .value-card { padding: 28px 16px; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { padding: 40px 20px; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-right: 1px solid rgba(255,255,255,.12); }
  .stat-item:nth-child(4) { border-right: none; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; }
  .project-card-overlay { opacity: 1; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 28px 20px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  /* Cookie */
  .cookie-inner { flex-direction: column; gap: 16px; }
  .cookie-actions { width: 100%; justify-content: stretch; }
  .btn-accept, .btn-reject { flex: 1; text-align: center; }

  /* CTA */
  .cta-actions { flex-direction: column; align-items: center; }

  /* Page hero */
  .page-hero { padding: 110px 0 56px; }
}

/* --- Small mobile: max 480px --------------------------- */
@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .feature-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); }
  .feature-item:last-child { border-bottom: none; }
  .values-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { border-right: none !important; border-bottom: 1px solid rgba(255,255,255,.12); }
  .stat-item:last-child { border-bottom: none; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .cert-grid { gap: 32px; }
}

/* --- Large screens: min 1400px ------------------------- */
@media (min-width: 1400px) {
  :root { --max-w: 1320px; }
}

/* --- Print --------------------------------------------- */
@media print {
  #site-header, #site-footer, #cookie-banner, .hero-actions, .cta-section { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .page-hero { background: #f0f0f0 !important; color: #000 !important; padding: 40px 0 !important; }
  .page-hero-title { color: #000 !important; }
  a[href]:after { content: " (" attr(href) ")"; font-size: 9pt; }
}
