/* ============================================================
   JD Soluções Elétricas — Responsive
   Mobile First
   ============================================================ */

/* ----- Mobile (< 576px) ----- */
@media (max-width: 575.98px) {
  .hero-brand img {
    height: 56px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn-jd {
    width: 100%;
  }

  .hero-scroll {
    display: none;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .service-card {
    padding: 1.5rem 1.25rem;
  }

  .about-image-wrap img {
    height: 280px;
  }

  .about-image-wrap::before {
    display: none;
  }

  .portfolio-item img {
    height: 220px;
  }

  .testimonial-card {
    padding: 1.75rem 1.25rem;
  }

  .clients-row {
    gap: 0.75rem;
  }

  .client-badge {
    padding: 0.75rem 1.1rem;
    font-size: 0.875rem;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-actions .btn-jd {
    width: 100%;
  }

  .contact-info-card {
    padding: 1.5rem 1.25rem;
  }

  .contact-info-item a,
  .contact-info-item p,
  .footer-jd .footer-links a,
  .footer-jd .footer-links span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .map-wrap {
    height: 280px;
  }

  .navbar-jd .brand-text {
    display: none;
  }

  .stat-item {
    padding: 1rem 0.5rem;
  }

  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}

/* ----- Tablet (≥ 576px) ----- */
@media (min-width: 576px) {
  .hero-brand img {
    height: 64px;
  }
}

/* ----- Tablet landscape / small laptop (≥ 768px) ----- */
@media (min-width: 768px) {
  .navbar-jd .navbar-collapse {
    background: transparent;
  }

  .portfolio-item img {
    height: 260px;
  }
}

/* Mobile / tablet nav overlay when expanded */
@media (max-width: 991.98px) {
  .navbar-jd .container {
    max-width: 100%;
  }

  .navbar-jd .navbar-collapse {
    background-color: rgba(7, 42, 66, 0.98);
    margin-top: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    max-height: calc(100dvh - var(--navbar-height) - 1.5rem);
    overflow-y: auto;
  }

  .navbar-jd .nav-link {
    padding: 0.75rem 1rem !important;
  }

  .navbar-jd .nav-link.active::after {
    display: none;
  }

  .navbar-jd .btn-nav {
    margin: 0.75rem 0 0.25rem;
    width: 100%;
  }

  .hero::after {
    height: 60px;
  }

  .diff-item {
    padding: 1rem 0;
  }
}

/* ----- Desktop (≥ 992px) ----- */
@media (min-width: 992px) {
  .hero-content {
    max-width: 680px;
  }

  .about-image-wrap img {
    height: 520px;
  }

  .about-image-wrap {
    overflow: visible;
  }
}

/* ----- Large desktop (≥ 1200px) ----- */
@media (min-width: 1200px) {
  .portfolio-item img {
    height: 300px;
  }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-scroll {
    animation: none;
  }
}

/* ----- Print ----- */
@media print {
  .navbar-jd,
  .whatsapp-float,
  .hero-scroll {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
    background: var(--color-primary) !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    overflow: visible;
  }
}
