/* =========================================================
   Advocate Management System - Main Stylesheet
   Theme: Navy (#0B1F44) + Gold (#D4A017 / #E8B923)
   ========================================================= */

:root{
  --navy: #0b1f44;
  --navy-dark: #071530;
  --navy-light: #14295c;
  --gold: #d4a017;
  --gold-light: #e8b923;
  --text-dark: #1c2536;
  --text-muted: #5b6478;
  --bg-light: #f6f7fb;
  --white: #ffffff;
  --border-radius: 5px;
  --font-display: 'Roboto', sans-serif;
  --font-body: 'Roboto', sans-serif;

  /* multi-color accents for cards/icons */
  --c-blue: #2f6fed;
  --c-green: #1fa971;
  --c-purple: #7b4fe0;
  --c-orange: #f0842f;
  --c-red: #e0455a;
  --c-teal: #16a3a3;
}

*{ margin:0; padding:0; box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}
img{ max-width:100%; display:block; }
a{ text-decoration:none; color:inherit; }
ul{ list-style:none; }
h1,h2,h3,h4{ font-family: var(--font-display); color: var(--navy); line-height:1.25; }

.container{
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:0 20px;
}

/* ---------- TOP BAR ---------- */
.top-bar{
  background: var(--navy-dark);
  color: #cfd6e6;
  font-size: .82rem;
}
.top-bar-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  padding:8px 20px;
}
.top-bar-left, .top-bar-right{
  display:flex;
  align-items:center;
  gap:20px;
  flex-wrap:wrap;
}
.top-bar i{ color: var(--gold-light); margin-right:5px; }
.social-icons a{
  color:#cfd6e6;
  margin-left:12px;
  transition:.2s;
}
.social-icons a:hover{ color: var(--gold-light); }

/* ---------- MAIN HEADER ---------- */
.main-header{
  background: var(--white);
  box-shadow: 0 2px 10px rgba(11,31,68,.08);
  position: sticky;
  top:0;
  z-index: 500;
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 20px;
  gap:14px;
  flex-wrap:nowrap;
}
.brand{ display:flex; align-items:center; gap:12px; flex-shrink:0; min-width:0; }
.brand-icon{
  width:46px; height:46px;
  background: var(--navy);
  color: var(--gold-light);
  border-radius: var(--border-radius);
  display:flex; align-items:center; justify-content:center;
  font-size:1.4rem;
}
.brand-logo-img{ max-height:46px; max-width:180px; object-fit:contain; }
.brand-text{ display:flex; flex-direction:column; line-height:1.2; }
.brand-name{ font-family: var(--font-display); font-weight:700; color: var(--navy); font-size:1.05rem; white-space:nowrap; }
.brand-tagline{ font-size:.72rem; color: var(--text-muted); }

.main-nav{
  display:flex;
  align-items:center;
  gap:18px;
  flex-wrap:nowrap;
  flex-shrink:1;
  min-width:0;
}
.main-nav a{
  font-size:.88rem;
  font-weight:500;
  color: var(--text-dark);
  padding:6px 2px;
  border-bottom:2px solid transparent;
  transition:.2s;
  white-space:nowrap;
}
.main-nav a:hover, .main-nav a.active{
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.main-nav > .btn-gold{ display:none; } /* shown only inside the mobile dropdown - see 860px media query */
.mobile-nav-contact{ display:none; } /* shown only on mobile - see 860px media query */

.header-actions{ display:flex; align-items:center; gap:14px; flex-shrink:0; }
.btn-gold{
  background: var(--gold);
  color: var(--white);
  font-weight:600;
  padding:10px 22px;
  border-radius: var(--border-radius);
  white-space:nowrap;
  transition:.2s;
  border:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.btn-gold:hover{ background: var(--gold-light); }
.btn-outline-navy{
  border:2px solid var(--navy);
  color: var(--navy);
  font-weight:600;
  padding:9px 22px;
  border-radius: var(--border-radius);
  display:inline-flex; align-items:center; gap:6px;
  transition:.2s;
}
.btn-outline-navy:hover{ background: var(--navy); color:var(--white); }

.nav-toggle{
  display:none;
  background:none;
  border:none;
  font-size:1.6rem;
  color: var(--navy);
  cursor:pointer;
}

/* ---------- HERO ---------- */
.hero{
  position:relative;
  background: var(--navy, #0b1f44);
  color:#fff;
  min-height: 560px;
  overflow:hidden;
}
.hero-slide{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}
.hero-slide::before{
  content:'';
  position:absolute;
  inset:0;
  background: linear-gradient(120deg, rgba(7,21,48,.92) 10%, rgba(11,31,68,.6) 55%, rgba(11,31,68,.3) 100%);
  z-index:1;
}
.hero-inner{
  position:relative;
  z-index:2;
  width:100%;
  padding:70px 20px 110px;
}
.hero-content{ max-width:640px; text-align:justify; text-align-last:left; }
.hero-eyebrow{
  color: var(--gold-light);
  font-weight:700;
  letter-spacing:1.5px;
  font-size:.8rem;
  margin-bottom:14px;
}
.hero h1{
  color:#fff;
  font-size: 2.6rem;
  font-weight:700;
  margin-bottom:18px;
  text-align:left;
}
.hero h1 span{ color: var(--gold-light); }
.hero p{
  color:#d7ddec;
  max-width:520px;
  margin-bottom:28px;
  font-size:1.02rem;
}
.hero-btns{ display:flex; gap:14px; flex-wrap:wrap; }
.hero-btns .btn-outline-navy{ border-color:#fff; color:#fff; }
.hero-btns .btn-outline-navy:hover{ background:#fff; color:var(--navy); }
.hero-dots{
  position:absolute;
  bottom:30px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:8px;
  z-index:3;
}
.hero-dots span{
  width:9px; height:9px;
  border-radius:50%;
  background:rgba(255,255,255,.35);
}
.hero-dots span.active{ background: var(--gold-light); width:22px; border-radius:5px; }
.hero-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(255,255,255,.15);
  color:#fff;
  border:none;
  width:42px; height:42px;
  border-radius:50%;
  font-size:1.2rem;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  z-index:3;
}
.hero-arrow.prev{ left:20px; }
.hero-arrow.next{ right:20px; }

/* ---------- FEATURE STRIP (overlaps hero) ---------- */
.feature-strip-wrap{
  max-width:1160px;
  margin:-70px auto 0;
  padding:0 20px;
  position:relative;
  z-index:10;
}
.feature-strip{
  background:#fff;
  border-radius: var(--border-radius);
  box-shadow: 0 15px 40px rgba(11,31,68,.15);
  display:grid;
  grid-template-columns: repeat(6, 1fr);
  gap:0;
  padding:30px 10px;
}
.feature-item{
  text-align:center;
  padding:10px 8px;
  border-right:1px solid #eef0f5;
}
.feature-item:last-child{ border-right:none; }
.feature-icon{
  width:52px; height:52px;
  border-radius: var(--border-radius);
  display:flex; align-items:center; justify-content:center;
  color:#fff;
  font-size:1.4rem;
  margin:0 auto 12px;
}
.feature-item h4{ font-size:.86rem; margin-bottom:3px; color:var(--navy); }
.feature-item p{ font-size:.74rem; color:var(--text-muted); }
.feature-strip-3col{ grid-template-columns: repeat(3, 1fr); }

/* ---------- SECTION HEADING ---------- */
.section{ padding:90px 0 60px; }
.section-tight{ padding:60px 0; }
.section-heading{ text-align:center; margin-bottom:44px; }
.section-heading .eyebrow{
  display:flex; align-items:center; justify-content:center; gap:10px;
  color: var(--gold); font-weight:700; font-size:.85rem; letter-spacing:1px; margin-bottom:8px;
}
.section-heading .eyebrow::before, .section-heading .eyebrow::after{
  content:""; width:26px; height:2px; background: var(--gold);
}
.section-heading h2{ font-size:2rem; font-weight:700; }
.bg-light{ background: var(--bg-light); }

/* ---------- PRACTICE AREAS ---------- */
.practice-grid{
  display:grid;
  grid-template-columns: repeat(6, 1fr);
  gap:18px;
}
.practice-card{
  background:#fff;
  border:1px solid #edeff5;
  border-radius: var(--border-radius);
  text-align:center;
  padding:30px 16px;
  transition:.25s;
}
.practice-card:hover{ box-shadow:0 12px 28px rgba(11,31,68,.1); transform:translateY(-4px); border-color:transparent; }
.practice-card i{ font-size:2.1rem; color: var(--gold); margin-bottom:14px; }
.practice-card h4{ font-size:.95rem; margin-bottom:6px; }
.practice-card p{ font-size:.8rem; color: var(--text-muted); }

/* ---------- STATS BAR ---------- */
.stats-bar{
  background: var(--navy);
  color:#fff;
  padding:44px 0;
}
.stats-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:20px;
  text-align:center;
}
.stat-item i{ font-size:1.8rem; color: var(--gold-light); margin-bottom:10px; }
.stat-item h3{ color:#fff; font-size:1.8rem; font-weight:700; }
.stat-item p{ color:#b9c1d9; font-size:.85rem; }

/* ---------- WHY CHOOSE US ---------- */
.why-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:50px;
  align-items:center;
}
.why-imgs{ position:relative; }
.why-imgs img{ border-radius: var(--border-radius); display:block; }
.why-imgs img.img-main{ width:80%; height:340px; object-fit:cover; }
.why-imgs .img-main{ width:80%; }
.why-imgs .img-badge{
  position:absolute; bottom:-20px; right:-10px;
  width:55%;
  border:6px solid #fff;
  box-shadow:0 10px 30px rgba(11,31,68,.18);
}
.why-imgs img.img-badge{ height:180px; object-fit:cover; }
.why-content .eyebrow{ color: var(--gold); font-weight:700; font-size:.85rem; margin-bottom:8px; }
.why-content h2{ font-size:1.9rem; margin-bottom:16px; }
.why-list{ margin:20px 0; }
.why-list li{ display:flex; align-items:center; gap:10px; margin-bottom:10px; font-size:.94rem; }
.why-list i{ color: var(--c-green); font-size:1.1rem; }
.why-actions{ display:flex; align-items:center; gap:20px; flex-wrap:wrap; margin-top:20px; }
.cta-box{
  background: var(--navy);
  color:#fff;
  border-radius: var(--border-radius);
  padding:22px 24px;
  max-width:320px;
}
.cta-box h4{ color:#fff; font-size:1.05rem; margin-bottom:6px; }
.cta-box p{ color:#b9c1d9; font-size:.85rem; margin-bottom:14px; }

/* ---------- TESTIMONIALS ---------- */
.testi-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:22px;
}
.testi-card{
  background:#fff;
  border-radius: var(--border-radius);
  padding:28px;
  box-shadow: 0 8px 24px rgba(11,31,68,.06);
}
.testi-card i.bi-quote{ font-size:1.6rem; color: var(--gold-light); }
.testi-card p{ color: var(--text-muted); font-size:.92rem; margin:14px 0 18px; }
.testi-person{ display:flex; align-items:center; gap:12px; }
.testi-person img{ width:44px; height:44px; border-radius:50%; object-fit:cover; }
.testi-person strong{ display:block; font-size:.9rem; color:var(--navy); }
.testi-person span{ font-size:.78rem; color: var(--text-muted); }

/* ---------- BLOG ---------- */
.blog-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:22px;
}
.blog-card{
  border-radius: var(--border-radius);
  overflow:hidden;
  border:1px solid #edeff5;
  transition:.25s;
}
.blog-card:hover{ box-shadow:0 12px 28px rgba(11,31,68,.1); }
.blog-card img{ height:170px; width:100%; object-fit:cover; }
.blog-card-body{ padding:18px; }
.blog-date{ font-size:.75rem; color: var(--gold); font-weight:600; margin-bottom:6px; display:block; }
.blog-card h4{ font-size:1rem; margin-bottom:10px; }
.blog-card a.read-more{ font-size:.82rem; font-weight:600; color: var(--navy); }

/* ---------- CTA BANNER ---------- */
.cta-banner{
  background: linear-gradient(90deg, var(--navy) 0%, var(--purple2, #4a3a91) 100%);
  background: linear-gradient(90deg, #1a2d5e 0%, #4d3a91 100%);
  border-radius: var(--border-radius);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:20px;
  padding:30px 34px;
}
.cta-banner-left{ display:flex; align-items:center; gap:16px; }
.cta-banner-left i{ font-size:2rem; color: var(--gold-light); }
.cta-banner h4{ color:#fff; font-size:1.15rem; }
.cta-banner p{ color:#d7ddec; font-size:.85rem; }

/* ---------- FOOTER ---------- */
.site-footer{
  background: var(--navy-dark);
  color:#b9c1d9;
  padding-top:60px;
  font-size:.88rem;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr 1.1fr;
  gap:30px;
  padding-bottom:40px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.footer-grid h5{ color:#fff; font-size:1rem; margin-bottom:16px; }
.footer-brand{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.footer-brand .brand-icon{ background: var(--gold); color: var(--navy); }
.footer-brand strong{ color:#fff; font-size:1rem; }
.site-footer ul li{ margin-bottom:9px; }
.site-footer ul li a:hover{ color: var(--gold-light); }
.footer-contact li{ display:flex; gap:10px; margin-bottom:12px; align-items:flex-start; }
.footer-contact i{ color: var(--gold-light); margin-top:3px; }
.footer-social{ display:flex; gap:10px; margin-top:16px; }
.footer-social a{
  width:34px; height:34px;
  border:1px solid rgba(255,255,255,.2);
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition:.2s;
}
.footer-social a:hover{ background: var(--gold); border-color: var(--gold); color:var(--navy); }
.newsletter-form{ display:flex; margin-top:10px; }
.newsletter-form input{
  flex:1;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.05);
  color:#fff;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  font-size:.85rem;
}
.newsletter-form button{
  background: var(--gold);
  border:none;
  color:#fff;
  padding:0 16px;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  cursor:pointer;
}
.footer-bottom{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  padding:20px 0;
  font-size:.8rem;
}
.footer-bottom a{ margin-left:16px; }
.footer-credit{
  text-align:center;
  padding:14px 0 20px;
  font-size:.8rem;
  color:#c7cee0;
  border-top:1px solid rgba(255,255,255,.08);
}
.footer-credit a{
  color: var(--gold-light);
  font-weight:700;
  text-decoration:none;
}
.footer-credit a:hover{ text-decoration:underline; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px){
  .practice-grid{ grid-template-columns: repeat(3, 1fr); }
  .feature-strip{ grid-template-columns: repeat(3, 1fr); }
  .feature-item{ border-right:none; border-bottom:1px solid #eef0f5; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .hero-inner{ text-align:center; padding-bottom:140px; }
  .hero-content{ max-width:100%; margin:0 auto; text-align:center; text-align-last:auto; }
  .hero h1{ text-align:center; }
  .hero-btns{ justify-content:center; }
  .hero p{ margin-left:auto; margin-right:auto; text-align:justify; text-align-last:left; }
  /* Hero was a fixed 560px tall with absolutely-positioned slide content;
     on narrow screens long headlines/text wrap to more lines than that
     fixed height allows, so the text overflowed past the bottom of the
     hero and collided with the feature-strip card pulled up on top of it.
     Letting the slide sit in normal flow makes the hero grow to fit
     whatever text it holds, so nothing overlaps below it. */
  .hero{ min-height:auto; }
  .hero-slide{ position:relative; }
}

@media (max-width: 860px){
  /* Top bar is hidden on mobile - its content moves into the hamburger menu instead */
  .top-bar{ display:none; }

  .header-inner{ padding:12px 16px; gap:8px; flex-wrap:nowrap; }
  .brand-name{ font-size:.92rem; }
  .brand-tagline{ display:none; }
  .header-actions{ gap:8px; }
  .header-actions .btn-gold{ display:none; } /* moved into the mobile nav below to prevent header overflow */

  .main-nav{
    display:none;
    position:absolute;
    top:100%; left:0; right:0;
    background:#fff;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    box-shadow:0 10px 20px rgba(11,31,68,.1);
    padding:10px 20px 20px;
    max-height:calc(100vh - 70px);
    overflow-y:auto;
  }
  .main-nav.open{ display:flex; }
  .main-nav a{ width:100%; padding:12px 0; border-bottom:1px solid #f0f1f5 !important; }
  .main-nav .btn-gold{ display:inline-flex; justify-content:center; margin-top:14px; }
  .nav-toggle{ display:block; flex-shrink:0; }

  .mobile-nav-contact{
    display:flex;
    flex-direction:column;
    gap:12px;
    padding:16px 0 0;
    margin-top:8px;
    border-top:1px solid #f0f1f5;
    font-size:.82rem;
    color: var(--text-muted);
    width:100%;
    box-sizing:border-box;
  }
  /* block layout (not flex) so long text wraps normally instead of forcing
     the row wider than the screen - flex items refuse to shrink below their
     content's natural width by default, which was pushing icons off-screen */
  .mobile-nav-contact span{
    display:block;
    width:100%;
    word-break:break-word;
  }
  .mobile-nav-contact span i{
    color: var(--gold);
    margin-right:8px;
    width:16px;
    display:inline-block;
    text-align:center;
  }
  .mobile-nav-contact .social-icons{ margin-top:4px; }
  .mobile-nav-contact .social-icons a{ color: var(--navy); margin:0 10px 0 0; font-size:1.1rem; }

  .why-grid{ grid-template-columns:1fr; }
  .testi-grid, .blog-grid{ grid-template-columns: repeat(2, 1fr); }
  .stats-grid{ grid-template-columns: repeat(2, 1fr); }

  /* Why-choose-us image block: stack instead of absolute-overlap to avoid horizontal overflow */
  .why-imgs{ display:flex; flex-direction:column; align-items:center; gap:16px; }
  .why-imgs .img-main{ width:100%; }
  .why-imgs .img-badge{ position:static; width:65%; margin:0 auto; border-width:4px; }
  /* Show the whole uploaded image on mobile instead of cropping to a fixed height */
  .why-imgs img.img-main{ height:auto; object-fit:contain; margin:0 auto; }
  .why-imgs img.img-badge{ height:auto; object-fit:contain; }

  /* "Need Legal Assistance" card: the 320px desktop cap left a big gap on
     the right on mobile - stretch it edge-to-edge like the button above it. */
  .cta-box{ max-width:none; width:100%; box-sizing:border-box; text-align:center; }

  /* Footer: Quick Links + Our Services sit side by side as 2 columns on mobile */
  .footer-grid{
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "brand brand"
      "links services"
      "contact newsletter";
  }
  .footer-col-brand{ grid-area: brand; }
  .footer-col-links{ grid-area: links; }
  .footer-col-services{ grid-area: services; }
  .footer-col-contact{ grid-area: contact; }
  .footer-col-newsletter{ grid-area: newsletter; }

  /* Grid items default to min-width:auto, which refuses to shrink below the
     widest unbroken text (e.g. "Document Management") - that was forcing
     the whole footer wider than the screen. min-width:0 + wrapping fixes it. */
  .footer-grid > div{ min-width:0; }
  .site-footer ul li a{ word-break:break-word; overflow-wrap:break-word; }
  .footer-contact span{ word-break:break-word; overflow-wrap:break-word; }
  .newsletter-form{ width:100%; max-width:100%; }
  .newsletter-form input{ min-width:0; }

  .footer-bottom{
    flex-direction:column;
    align-items:center;
    text-align:center;
    gap:10px;
  }
  .footer-bottom a{ margin:0 8px; }
}

@media (max-width: 600px){
  .practice-grid{ grid-template-columns: repeat(2, 1fr); }
  .feature-strip{ grid-template-columns: repeat(2, 1fr); }
  .feature-strip-3col{ grid-template-columns: 1fr; }
  .testi-grid, .blog-grid{ grid-template-columns: 1fr; }
  .hero h1{ font-size:1.9rem; }
  .cta-banner{ flex-direction:column; text-align:center; }
  .cta-banner-left{ flex-direction:column; }
}

@media (max-width: 420px){
  .footer-grid{ grid-template-columns: 1fr 1fr; } /* keep 2-column pairing even at very small widths */
}

/* prevent any element from forcing horizontal scroll */
img, table, .container, section{ max-width:100%; }

/* Global safeguard: flex/grid children default to min-width:auto, which
   refuses to shrink below their content's natural width and is the single
   most common cause of mobile horizontal overflow. Forcing min-width:0 on
   direct children of our flex/grid containers lets them wrap/shrink instead
   of pushing the layout wider than the viewport. */
.header-inner > *, .footer-grid > *, .stats-grid > *, .practice-grid > *,
.feature-strip > *, .testi-grid > *, .blog-grid > *, .why-grid > * {
  min-width: 0;
}
