/* ===== TABLET (max-width: 1024px) ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-v2-content { flex: 0 0 55%; padding: 40px 40px 32px; }
  .hero-v2-main h1 { font-size: 2.8rem; }
  .section-header h2 { font-size: 2.2rem; }
  .welcome-grid, .about-preview, .contact-grid, .product-detail { gap: 40px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .features-list { columns: 2; }

  .timeline::before { left: 20px; }
  .timeline-item { width: 100%; left: 0 !important; padding-left: 60px; padding-right: 0; text-align: left !important; }
  .timeline-item::before { left: 12px !important; right: auto !important; }

  .event-card { flex-direction: column; }
  .event-card-img { width: 100%; height: 200px; }

  .payment-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* ===== MOBILE (max-width: 768px) ===== */
@media (max-width: 768px) {
  :root { --section-padding: 80px 0; }

  .top-bar { display: none; }

  /* Navbar mobile */
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 80%; max-width: 320px;
    height: 100vh; background: var(--bg-white); flex-direction: column;
    align-items: flex-start; padding: 80px 32px 32px; gap: 0;
    transition: right .4s var(--ease); box-shadow: var(--shadow-lg); overflow-y: auto;
  }
  .nav-links.active { right: 0; }
  .nav-links a { font-size: 1.05rem; padding: 14px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links a::after { display: none; }
  .nav-links .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: transparent; padding: 0 0 0 16px; }
  .menu-toggle { display: flex; }
  .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(28,25,23,.4); z-index: 999; }
  .nav-overlay.active { display: block; }
  .nav-quote-btn { display: none; }

  /* Hero V2 */
  .hero-v2 { flex-direction: column; min-height: auto; }
  .hero-v2-content { flex: none; padding: 100px 24px 32px; text-align: center; }
  .hero-v2-logo { justify-content: center; margin-bottom: 32px; }
  .hero-v2-main h1 { font-size: 2.2rem; }
  .hero-v2-main p { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-v2-line { margin: 20px auto; }
  .hero-v2-actions { justify-content: center; flex-wrap: wrap; }
  .hero-v2-image { min-height: 320px; clip-path: polygon(0 12%,100% 0,100% 100%,0 100%); animation: heroClipInMobile 1s cubic-bezier(.16,1,.3,1) forwards; }
  @keyframes heroClipInMobile { from { clip-path: polygon(0 100%,100% 100%,100% 100%,0 100%); } to { clip-path: polygon(0 12%,100% 0,100% 100%,0 100%); } }
  .hero-v2-footer { justify-content: center; flex-wrap: wrap; gap: 16px; }

  /* Page hero */
  .page-hero { padding: 90px 0 24px; }
  .page-hero h1 { font-size: 1.6rem; }

  /* Products page */
  .products-page { padding: 80px 0 48px; }
  .products-header h1 { font-size: 1.6rem; margin-bottom: 16px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card-overlay { padding: 16px 14px 14px; }
  .product-card-overlay h3 { font-size: .85rem; }
  .product-tag { font-size: .58rem; }

  .section-header { margin-bottom: 24px; }
  .section-header h2 { font-size: 1.5rem; }
  .section-header p { font-size: .85rem; margin-top: 8px; }
  .section-label { font-size: .65rem; margin-bottom: 8px; }
  :root { --section-padding: 60px 0; }

  /* Categories — pill showcase */
  .categories-grid {
    display: flex !important;
    gap: 10px;
    overflow: hidden;
    padding: 0 0 16px;
    scrollbar-width: none;
  }
  .categories-grid::-webkit-scrollbar { display: none; }
  .category-card {
    flex: 1 1 0;
    min-width: 0;
    height: 200px;
    border-radius: 80px;
    scroll-snap-align: center;
    transition: flex .45s cubic-bezier(.4,0,.2,1), border-radius .45s cubic-bezier(.4,0,.2,1);
  }
  .category-card.active {
    flex: 5 1 0;
    border-radius: 18px;
  }
  .category-card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  .category-card-content h3 { font-size: .95rem; }
  .category-card-content span { font-size: .7rem; }
  .category-card:not(.active) .category-card-content {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    bottom: auto; top: 0; left: 0; right: 0;
    height: 100%;
    padding: 14px 0;
    align-items: center;
    justify-content: center;
  }
  .category-card:not(.active) .category-card-content h3 {
    font-size: .72rem;
    white-space: nowrap;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .category-card:not(.active) .category-card-content span { display: none; }

  /* Grids */
  .grid-2, .grid-3, .grid-4, .expert-grid { grid-template-columns: 1fr; }
  .catalogs-grid { grid-template-columns: repeat(2, 1fr); }

  /* Videos — horizontal scroll on mobile */
  .videos-grid {
    display: flex !important;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    scrollbar-width: none;
  }
  .videos-grid::-webkit-scrollbar { display: none; }
  .videos-grid .video-thumb {
    flex: 0 0 75%;
    scroll-snap-align: center;
    border-radius: 16px;
    overflow: hidden;
  }
  .videos-grid .video-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }

  /* Features list — compact 2-col mobile grid */
  .features-list { columns: unset !important; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .feature-item { padding: 10px 0; gap: 6px; }
  .feature-num { font-size: .6rem; min-width: 14px; }
  .feature-title { font-size: .76rem; white-space: normal; }
  .feature-desc { display: none !important; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* Welcome / About */
  .welcome-grid, .about-preview { grid-template-columns: 1fr; gap: 32px; }
  .welcome-img img, .about-preview-img img { height: 300px; }

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

  /* CTA */
  .cta-banner { padding: 44px 28px; flex-direction: column; text-align: center; gap: 28px; }
  .cta-banner h2 { font-size: 1.6rem; }
  .cta-banner-text { max-width: 100%; }

  /* Filter */
  .filter-bar { gap: 6px; }
  .filter-btn { padding: 8px 16px; font-size: .82rem; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }
  .map-container { height: 300px; }

  /* VR */
  .vr-container { height: 320px; }
  .vr-info { flex-direction: column; text-align: center; }
  .vr-buttons { justify-content: center; }

  /* Payment */
  .payment-grid { grid-template-columns: 1fr; }

  /* Stats */
  .stat-card h3 { font-size: 2.2rem; }
  .stat-card { padding: 20px; }

  /* Testimonials */
  .testimonial-card { min-width: 300px; }

  /* Event gallery */
  .event-gallery { grid-template-columns: 1fr 1fr; }

  /* Product detail */
  .product-detail { grid-template-columns: 1fr; }
}

/* ===== SMALL MOBILE (max-width: 480px) ===== */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-v2-main h1 { font-size: 1.8rem; }
  .section-header h2 { font-size: 1.5rem; }
  .card-body { padding: 20px; }
  .page-hero { padding: 80px 0 20px; }
  .page-hero h1 { font-size: 1.4rem; }
  .page-hero p { font-size: .85rem; }
  .products-page { padding: 72px 0 40px; }
  .products-header h1 { font-size: 1.4rem; }
  .products-grid { gap: 8px; }
  .product-card { border-radius: 10px; }
  .features-list { columns: 1; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .event-gallery { grid-template-columns: 1fr; }
  .category-card { height: 240px; }
}
