/* ============================================
   RESPONSIVE — Mobile-First Breakpoints
   ============================================ */

/* ---------- Max 1024px — Tablet ---------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat::after { display: none; }

  .navbar__phone { display: none; }
  .navbar__lang { display: none; }
}

/* Keep contact-grid 2-column on tablets — only stack on real mobile */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .attorney-hero-photo {
    max-width: 400px;
  }
}

/* ---------- Max 768px — Mobile ---------- */
@media (max-width: 768px) {
  :root {
    --space-4xl: 64px;
    --space-5xl: 80px;
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  .container {
    padding: 0 var(--space-md);
  }

  /* Navbar — Mobile */
  .navbar__menu { display: none; }
  .navbar__cta-desktop { display: none; }
  .navbar__hamburger { display: flex; }
  .navbar__search-btn { display: flex; }

  .navbar__inner {
    padding: 0 var(--space-md);
  }

  /* Grid Collapse */
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  /* Hero — Mobile Optimized for Conversion */
  .hero {
    min-height: auto;
    padding: 140px 0 var(--space-2xl);
  }

  .hero__badge {
    font-size: 0.7rem;
    padding: 5px 12px;
  }

  .hero__title {
    font-size: clamp(2rem, 8vw, 2.5rem);
    line-height: 1.1;
    margin-bottom: var(--space-md);
  }

  .hero__subtitle {
    font-size: 0.95rem;
    margin-bottom: var(--space-lg);
  }

  .hero__phone {
    display: none;
  }

  .hero__ctas {
    flex-direction: column;
    margin-bottom: var(--space-xl);
  }

  .hero__ctas .btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    font-size: 0.95rem;
  }

  .hero__ctas .btn--primary {
    box-shadow: 0 6px 24px rgba(201, 168, 76, 0.4);
  }

  /* Add bottom padding so content isn't hidden behind sticky CTA bar */
  body.has-emergency-bar {
    padding-bottom: 80px;
  }

  /* FREE CONSULTATION Spotlight — mobile */
  .free-spotlight {
    padding: var(--space-2xl) var(--space-md);
    border-radius: var(--radius-xl);
  }

  .free-spotlight__badge {
    font-size: 0.65rem;
    padding: 6px 14px;
    letter-spacing: 1.5px;
  }

  .free-spotlight__free {
    font-size: 2.75rem;
    letter-spacing: -1px;
  }

  .free-spotlight__price-crossed {
    font-size: 1.2rem;
  }

  .free-spotlight__subtitle {
    font-size: 1rem;
  }

  .free-spotlight__description {
    font-size: 0.925rem;
  }

  .free-spotlight__cta {
    padding: 16px 20px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.5px;
    text-align: center;
    justify-content: center;
  }

  /* Commitment section — mobile */
  .commitment {
    padding: var(--space-3xl) 0;
  }

  .commitment__title {
    font-size: 1.85rem;
    letter-spacing: -0.5px;
  }

  .commitment__quote {
    font-size: 0.95rem;
    padding: 0 var(--space-sm);
  }

  .commitment__label {
    font-size: 0.65rem;
    letter-spacing: 2px;
  }

  .commitment__label::before,
  .commitment__label::after {
    width: 20px;
  }

  /* Emergency bar — mobile */
  .emergency-bar {
    font-size: 0.72rem;
    padding: 8px 12px;
    line-height: 1.3;
  }

  .emergency-bar span {
    display: block;
  }

  .emergency-bar a {
    font-size: 0.88rem;
  }

  /* Fix navbar below emergency bar on mobile (bar is taller) */
  body.has-emergency-bar .navbar {
    top: 72px;
  }

  /* Center ALL buttons on mobile */
  .btn {
    text-align: center;
  }

  .btn--primary,
  .btn--outline {
    display: flex;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  /* Center CTA sections on mobile */
  .cta-banner__actions,
  .hero__ctas {
    align-items: center;
  }

  /* Brazilian Promise section — center button */
  #community-promise .btn {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
  }

  /* Center all text-center content on mobile */
  [style*="text-align:center"] .btn,
  [style*="text-align: center"] .btn {
    margin-left: auto;
    margin-right: auto;
  }

  /* Language badges — mobile */
  .community__lang-badge {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  /* Flag container in hero mobile */
  .community__flags {
    gap: var(--space-md);
  }

  .community__flag {
    width: 72px;
    height: 48px;
  }

  /* FAQ - better tap targets */
  .faq-question {
    min-height: 56px;
    font-size: 0.9rem;
  }

  /* Better section spacing on mobile */
  .section-header {
    margin-bottom: var(--space-xl);
  }

  .section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    line-height: 1.15;
  }

  /* Tighter card padding on mobile */
  .card {
    padding: var(--space-lg);
  }

  /* Tighter CTA banner padding */
  .cta-banner {
    padding: var(--space-xl) var(--space-md);
  }

  /* Fix image heights on mobile */
  .attorney-card__photo {
    height: 340px;
  }

  /* Remove tilt effect on mobile */
  .tilt-card {
    transform: none !important;
  }

  /* Stat numbers smaller */
  .stat__number {
    font-size: 1.85rem;
  }

  /* Hero CTAs extra prominent on mobile */
  .hero__ctas .btn--primary {
    padding: 18px 24px;
    font-size: 1rem;
    box-shadow: 0 8px 32px rgba(201, 168, 76, 0.45);
  }

  /* Emergency card on mobile */
  .emergency-card {
    padding: var(--space-lg);
  }

  .emergency-card__phone {
    font-size: 1.35rem;
  }
}

/* ---------- Extra small phones ---------- */
@media (max-width: 380px) {
  .free-spotlight__free {
    font-size: 2.25rem;
  }

  .commitment__title {
    font-size: 1.5rem;
  }

  .hero__title {
    font-size: 1.75rem;
  }

  .emergency-bar {
    font-size: 0.65rem;
  }

  .emergency-bar a {
    font-size: 0.82rem;
  }
}

  .trust-badges {
    flex-direction: column;
    gap: var(--space-md);
  }

  /* Stats */
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .stat__number {
    font-size: 2rem;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  /* CTA Banner */
  .cta-banner {
    padding: var(--space-2xl) var(--space-lg);
  }

  .cta-banner__actions {
    flex-direction: column;
  }

  .cta-banner__actions .btn {
    width: 100%;
  }

  /* FAQ */
  .faq-question {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.925rem;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Attorney cards — mobile (heads visible!) */
  img.attorney-card__photo {
    aspect-ratio: 3 / 4;
    height: auto;
    object-fit: cover;
    object-position: center top;
  }

  /* Community flags */
  .community__flag {
    font-size: 2.5rem;
  }

  /* Process Steps */
  .process-step {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .process-step::before {
    font-size: 2rem;
  }

  /* Mobile Sticky CTA Bar */
  .mobile-cta-bar {
    display: flex;
  }

  /* Adjust floating buttons to sit above mobile bar */
  .floating-buttons {
    bottom: 80px;
    right: 16px;
  }

  .floating-btn {
    width: 48px;
    height: 48px;
  }

  .floating-btn svg {
    width: 22px;
    height: 22px;
  }

  .chat-popup {
    right: 16px;
    bottom: 144px;
    width: calc(100% - 32px);
  }

  /* Section headers */
  .section-header {
    margin-bottom: var(--space-2xl);
  }

  /* Blog cards */
  .blog-card__image {
    height: 160px;
  }

  /* Map */
  .map-container {
    height: 250px;
  }

  /* Service Hero */
  .service-hero {
    padding: var(--space-5xl) 0 var(--space-2xl);
  }

  /* Testimonial cards */
  .testimonial-card {
    padding: var(--space-lg);
  }
}

/* ---------- Max 480px — Small Mobile ---------- */
@media (max-width: 480px) {
  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero__title {
    font-size: 2rem;
  }

  .btn--lg {
    padding: 16px 28px;
    font-size: 0.95rem;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    padding: var(--space-md) var(--space-sm);
  }

  .stat__number {
    font-size: 1.75rem;
  }

  .navbar__logo-text {
    font-size: 1rem;
  }

  .navbar__logo-text span {
    font-size: 0.58rem;
    letter-spacing: 2px;
  }

  .community__flags {
    gap: var(--space-md);
  }

  .community__flag {
    font-size: 2rem;
  }

  .community__lang-badge {
    padding: 8px 14px;
    font-size: 0.825rem;
  }

  .footer__copy,
  .footer__disclaimer {
    font-size: 0.7rem;
  }
}

/* ---------- Landscape phones fix ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: var(--space-3xl) 0;
  }

  .navbar__mobile-menu {
    gap: var(--space-md);
  }

  .navbar__mobile-menu a {
    font-size: 1.25rem;
  }
}

/* ---------- Print ---------- */
@media print {
  .navbar,
  .mobile-cta-bar,
  .floating-buttons,
  .chat-popup {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .hero {
    min-height: auto;
    padding: 20px 0;
  }
}
