/* ============================================================
   ASK'S LAW FIRM — Responsive CSS
   Clean single-file, mobile-first approach
   ============================================================ */

/* ── BASE RESET ── */
*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  min-width: 0;
  width: 100%;
}

img, video, iframe, table {
  max-width: 100%;
  height: auto;
}

/* ── CONTAINER ── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── NAVBAR ── */
#navbar { padding: 16px 0; }
#navbar.scrolled { padding: 10px 0; }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.nav-logo {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo span { color: #B08D57; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 1;
  flex-wrap: nowrap;
}

.nav-link {
  font-size: 0.72rem;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-phone { white-space: nowrap; font-size: 0.78rem; }
.btn-nav   { white-space: nowrap; }
.hamburger { display: none; }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: #0F172A;
  z-index: 999;
  padding: 80px 32px 40px;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }

/* ── HERO ── */
#hero {
  height: 100vh;
  min-height: 560px;
  max-height: 900px;
  padding-top: 80px;
}
.hero-title { line-height: 1.15; }
.hero-ctas  { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── STAT STRIP ── */
.stat-strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.stat-item { padding: 16px 32px; }

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* ── WHY CHOOSE US ── */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── PRACTICE AREAS ── */
.pa-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pa-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 16px;
}

/* ── TEAM ── */
.team4-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ── TIMELINE ── */
.timeline-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: relative;
}

/* ── TESTIMONIALS ── */
.tst-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── STATS ── */
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}

/* ── BRANCHES ── */
.branches-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

/* ── FAQ ── */
.faq-new-wrap {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: start;
}

/* ── FOOTER ── */
.ft-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.ft-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ============================================================
   1200px
   ============================================================ */
@media (max-width: 1200px) {
  .container { padding: 0 24px; }
  .nav-links { gap: 14px; }
  .nav-link  { font-size: 0.68rem; }
  .nav-phone { display: none; }
  .branches-grid { grid-template-columns: repeat(3, 1fr); }
  .pa-grid { grid-template-columns: repeat(3, 1fr); }
  .tst-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   1024px — Tablet Landscape
   ============================================================ */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }

  /* Nav */
  .nav-links { display: none !important; }
  .nav-phone { display: none !important; }
  .hamburger { display: flex !important; }

  /* Sections */
  .about-grid          { grid-template-columns: 1fr; gap: 36px; }
  .team4-grid          { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .pa-grid             { grid-template-columns: repeat(2, 1fr); }
  .branches-grid       { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .tst-grid            { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .faq-new-wrap        { grid-template-columns: 1fr; gap: 32px; }
  .faq-new-left        { position: static; }
  .timeline-track      { grid-template-columns: repeat(3, 1fr); }
  .stats-inner         { grid-template-columns: repeat(2, 1fr); }

  .about-img-main      { height: 380px; }
}

/* ============================================================
   768px — Tablet Portrait
   ============================================================ */
@media (max-width: 768px) {
  .container { padding: 0 18px; }

  /* Typography */
  h1 { font-size: clamp(1.6rem, 5.5vw, 2.2rem) !important; }
  h2 { font-size: clamp(1.4rem, 4.5vw, 1.9rem) !important; }

  /* Hero */
  .hero-title    { font-size: clamp(1.5rem, 5vw, 2rem) !important; line-height: 1.2; }
  .hero-sub      { font-size: 0.9rem; }
  .hero-ctas     { flex-direction: column; }
  .hero-ctas .btn { width: 100%; justify-content: center; }

  /* Stat strip */
  .stat-item { flex: 1 1 45%; padding: 14px 16px; }
  .stat-item + .stat-item { border-left: none !important; }

  /* About */
  .about-grid            { grid-template-columns: 1fr; }
  .about-img-main        { height: 260px; }
  .about-img-badge       { width: 100px; height: 100px; bottom: -10px; right: -10px; }
  .about-img-badge-num   { font-size: 1.4rem; }
  .about-specializations { grid-template-columns: 1fr 1fr; }

  /* Why */
  .why-grid { grid-template-columns: 1fr; }

  /* PA */
  .pa-header { flex-direction: column; align-items: flex-start; }
  .pa-grid   { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  /* Team */
  .team4-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .team4-img-wrap img { height: 200px; }

  /* Timeline — vertical */
  .timeline-track {
    display: flex;
    flex-direction: column;
    padding-left: 44px;
    gap: 0;
  }
  .timeline-track::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 20px;
    width: 2px; height: auto;
    right: auto;
    background: rgba(176,141,87,0.2);
  }
  .timeline-line-fill { display: none; }
  .timeline-step {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: 18px;
    padding: 0 0 32px;
  }
  .timeline-dot { flex-shrink: 0; margin-bottom: 0; }

  /* Testimonials */
  .tst-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }

  /* Stats */
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-counter-item + .stat-counter-item::before { display: none; }
  .counter-number { font-size: 2.8rem !important; }

  /* Branches */
  .branches-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* FAQ */
  .faq-new-wrap { grid-template-columns: 1fr; gap: 24px; }
  .faq-new-left { text-align: center; }
  .faq-new-left .btn { width: 100%; justify-content: center; }
  .faq-call-link { justify-content: center; }

  /* CTA */
  .cta-banner-btns { flex-direction: column; }
  .cta-banner-btns .btn { width: 100%; justify-content: center; }

  /* Footer */
  .ft-nav { flex-wrap: wrap; justify-content: center; gap: 14px; }
  .ft-info-grid { grid-template-columns: 1fr; text-align: center; }
  .ft-info-item + .ft-info-item { border-left: none !important; border-top: 1px solid rgba(176,141,87,0.12); }
  .ft-bottom-inner { flex-direction: column; text-align: center; }
  .ft-socials { justify-content: center; }

  /* Page hero */
  .page-hero { padding: 120px 0 48px; }
}

/* ============================================================
   480px — Mobile
   ============================================================ */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  /* Hero */
  .hero-title { font-size: clamp(1.4rem, 5.5vw, 1.8rem) !important; }
  #hero { padding-top: 70px; }

  /* Navbar */
  .nav-logo   { font-size: 1.1rem; }
  .btn-nav    { padding: 8px 14px; font-size: 0.72rem; }

  /* About */
  .about-img-main { height: 230px; }
  .about-specializations { grid-template-columns: 1fr; }

  /* PA */
  .pa-grid { grid-template-columns: 1fr; }

  /* Team */
  .team4-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .team4-img-wrap img { height: 170px; }
  .team4-role { font-size: 0.82rem; }

  /* Stats */
  .counter-number { font-size: 2.4rem !important; }

  /* Branches */
  .branches-grid { grid-template-columns: 1fr; }
  .branch-card { padding: 20px 16px; }

  /* Testimonials */
  .tst-card { padding: 20px 16px; }
  .tst-text { font-size: 0.84rem; }

  /* Buttons */
  .btn { padding: 12px 18px; font-size: 0.8rem; }

  /* WhatsApp */
  .whatsapp-float { width: 48px; height: 48px; font-size: 1.2rem; bottom: 16px; right: 16px; }
}

/* ============================================================
   375px — Small Mobile
   ============================================================ */
@media (max-width: 375px) {
  .container { padding: 0 14px; }
  .hero-title { font-size: 1.35rem !important; }
  .nav-logo   { font-size: 1rem; }
  .btn-nav    { padding: 7px 12px; font-size: 0.68rem; }
  .team4-img-wrap img { height: 155px; }
  .counter-number { font-size: 2.1rem !important; }
}

/* ============================================================
   320px — Smallest
   ============================================================ */
@media (max-width: 320px) {
  .container  { padding: 0 12px; }
  .hero-title { font-size: 1.25rem !important; }
  .nav-logo   { font-size: 0.9rem; }
  .btn-nav    { display: none; }
  .branches-grid { grid-template-columns: 1fr; }
  .pa-grid    { grid-template-columns: 1fr; }
  .team4-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Landscape Mobile
   ============================================================ */
@media (max-width: 768px) and (orientation: landscape) {
  #hero { min-height: 100svh; max-height: none; }
  .hero-title { font-size: 1.4rem !important; }
}

/* ============================================================
   Large screens
   ============================================================ */
@media (min-width: 1440px) {
  .container { max-width: 1360px; }
}
@media (min-width: 1920px) {
  .container { max-width: 1600px; }
  .hero-title { font-size: 3.2rem !important; }
}

/* ============================================================
   Touch devices
   ============================================================ */
@media (pointer: coarse) {
  .btn,
  .btn-nav,
  #proceedBtn        { min-height: 30px; }
  .faq-question      { min-height: 52px; }
  .hamburger         { min-width: 44px; min-height: 44px; }
  .ft-social,
  .footer-social,
  .social-link       { min-width: 44px; min-height: 44px; }
  a, button          { -webkit-tap-highlight-color: transparent; }
}

/* ============================================================
   Safe area — notched phones
   ============================================================ */
@supports (padding: env(safe-area-inset-bottom)) {
  .mobile-menu {
    padding-bottom: max(40px, env(safe-area-inset-bottom));
  }
  .whatsapp-float {
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
  }
}
