/* ============================================================
   Dar Al Hashem Construction — Responsive Styles
   ============================================================ */

/* ── Tablet Large (≤ 1280px) ─────────────────────────────────── */
@media (max-width: 1280px) {
  :root { --section-py: 96px; }
  .container, .container-wide { padding: 0 32px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
  .footer-col--brand { grid-column: 1 / -1; }
  .sectors-grid { grid-template-columns: repeat(5, 1fr); }
  .group-grid { grid-template-columns: repeat(2, 1fr); }
  .expertise-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ── Tablet (≤ 1024px) ───────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --section-py: 80px; }

  /* Navbar */
  .nav-social { display: none; }
  .hamburger  { display: flex; }
  .primary-nav {
    position: fixed;
    inset: 0; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,10,0.98);
    backdrop-filter: blur(16px);
    display: flex; align-items: flex-start;
    padding: 120px 40px 40px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    z-index: 999;
    overflow-y: auto;
  }
  .primary-nav.is-open { transform: translateX(0); }
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }
  .nav-item { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .nav-link {
    padding: 18px 0;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    justify-content: space-between;
  }
  .nav-link--cta {
    margin: 16px 0 0;
    border: 1px solid var(--border-gold);
    padding: 16px 24px;
    justify-content: center;
  }
  .nav-dropdown {
    position: static;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    display: none;
    padding: 0 0 8px 16px;
  }
  .nav-item.has-dropdown.is-open .nav-dropdown { display: block; }
  .nav-dropdown a { padding: 10px 0; font-size: 0.95rem; border-left: none; }
  .nav-dropdown a:hover { padding-left: 8px; }

  /* Layout adjustments */
  .welcome-grid { grid-template-columns: 1fr; gap: 56px; }
  .welcome-visual { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .expertise-cards { grid-template-columns: repeat(2, 1fr); }
  .group-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { display: none; }
  .expertise-header,
  .sectors-header,
  .projects-header,
  .group-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col--brand { grid-column: 1 / -1; }
}

/* ── Mobile (≤ 768px) ────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --section-py: 64px; }
  .container, .container-wide, .container-narrow { padding: 0 20px; }

  /* Hero */
  .hero-title { font-size: clamp(2.2rem, 8vw, 3.2rem); }
  .hero-cta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-cta .btn { width: 100%; justify-content: center; }

  /* Sections */
  .section-heading { font-size: clamp(1.8rem, 6vw, 2.5rem); }
  .welcome-cta { flex-direction: column; }
  .welcome-cta .btn { width: 100%; justify-content: center; }
  .stats-row { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }
  .expertise-cards { grid-template-columns: 1fr; }
  .group-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* Achievements */
  .achievements-inner { flex-direction: column; gap: 0; }
  .achievement-item { border-right: none; border-bottom: 1px solid var(--border); width: 100%; }
  .achievement-item:last-child { border-bottom: none; }

  /* Newsletter */
  .newsletter-inner { flex-direction: column; align-items: flex-start; }
  .newsletter-form { max-width: 100%; width: 100%; }
  .newsletter-input-wrap { flex-direction: column; border-radius: var(--radius); }
  .newsletter-input-wrap button { justify-content: center; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }

  /* Page hero */
  .page-hero { padding: 140px 0 64px; }
  .page-hero h1 { font-size: clamp(1.8rem, 7vw, 2.8rem); }
}

/* ── Mobile Small (≤ 480px) ──────────────────────────────────── */
@media (max-width: 480px) {
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid-4  { grid-template-columns: 1fr; }
  .btn { padding: 12px 24px; font-size: 12px; }
  .hero-title { font-size: clamp(2rem, 9vw, 2.8rem); }
}

/* ── Accessibility: Reduced Motion ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-label, .hero-title, .hero-subtitle, .hero-cta { opacity: 1; animation: none; }
}
