/* ==========================================================================
   EL JHOWA - RESPONSIVE STYLES
   Mobile-First & Adaptive Breakpoints
   Zero Overflow / Mobile 2-Column Product Cards
   ========================================================================== */

/* Reseteo Global de Desbordamiento y Contención */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

/* Contención estricta en Grids y Flex para evitar overflow */
.hero-grid,
.about-grid,
.services-grid,
.process-grid,
.contact-grid,
.stats-grid,
.footer-grid {
  min-width: 0;
  width: 100%;
}

.hero-content,
.hero-media-wrapper,
.about-media-col,
.about-content-col,
.contact-info-col,
.contact-form-col,
.stat-card,
.service-card,
.process-step-card,
.contact-detail-card,
.quote-form-card,
.form-group,
.form-control {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   TABLET / LAPTOP PEQUEÑA (< 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-visual {
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-media-col {
    max-width: 540px;
    margin: 0 auto;
    width: 100%;
  }

  .about-image-card img {
    height: 380px;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
  }
}

/* ==========================================================================
   TABLET PEQUEÑA Y MÓVILES GRANDES (< 768px)
   Requisitos de la Cámara de Comercio:
   - Grid de catálogo de 2 columnas limpias
   - Header ultra-limpio sin desbordamiento
   - Sin emojis
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --header-height: 66px;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Barra de Anuncios */
  .announcement-bar {
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
  }

  .announcement-content {
    font-size: 0.78rem;
    gap: 0.5rem;
  }

  .announcement-link {
    font-size: 0.78rem;
  }

  /* Header & Navegación Móvil */
  .site-header {
    height: var(--header-height);
  }

  .header-inner {
    gap: 0.5rem;
  }

  .brand-logo-wrap {
    gap: 0.6rem;
    min-width: 0;
  }

  .brand-logo-img {
    height: 44px;
    width: auto;
    max-width: 130px;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    object-fit: contain;
    flex-shrink: 0;
  }

  .brand-title-text {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-slogan-text {
    display: none; /* Ocultar eslogan en móvil para no apiñar el header */
  }

  .nav-actions {
    gap: 0.4rem;
    flex-shrink: 0;
  }

  /* En móviles el botón de WhatsApp en el header muestra solo el icono para ahorrar espacio */
  #navWhatsAppBtn {
    padding: 0.45rem 0.65rem;
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
  }

  #navWhatsAppBtn span {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    padding: 0.45rem 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    color: var(--text-main);
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(8, 11, 17, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-gold);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    display: none;
    z-index: 998;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    font-size: 1.05rem;
    width: 100%;
    padding: 0.5rem 0;
  }

  /* Hero Móvil */
  .hero-section {
    padding: 3rem 0 2.5rem 0;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.8rem;
    margin-bottom: 1rem;
  }

  .hero-title {
    font-size: 2.1rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-features-list {
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1.25rem;
  }

  .hero-feat-item {
    font-size: 0.82rem;
  }

  .hero-card-showcase img {
    height: 250px;
  }

  .hero-card-title {
    font-size: 1.25rem;
  }

  .hero-card-sub {
    font-size: 0.78rem;
  }

  /* Stats Móvil */
  .stats-section {
    padding: 2.5rem 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1.15rem 0.65rem;
  }

  .stat-icon-wrap {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
  }

  .stat-number {
    font-size: 1.85rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  /* Quiénes Somos Móvil */
  .about-section {
    padding: 4rem 0;
  }

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

  .about-badge {
    position: static;
    margin-top: 0.75rem;
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-sm);
  }

  .about-story-box {
    padding: 1.15rem;
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
  }

  .about-cards-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .about-feature-box {
    padding: 1rem;
    gap: 0.75rem;
  }

  .about-feat-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .about-feat-text h4 {
    font-size: 0.95rem;
  }

  .about-feat-text p {
    font-size: 0.8rem;
  }

  .founder-signature-box {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .founder-avatar {
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }

  .founder-name {
    font-size: 0.88rem;
  }

  .founder-role {
    font-size: 0.75rem;
  }

  /* ==========================================================================
     CATÁLOGO DE SERVICIOS EN MÓVIL: 2 COLUMNAS ESTRICTAS
     ========================================================================== */
  .services-section {
    padding: 4rem 0;
  }

  .services-controls-wrapper {
    margin-bottom: 1.75rem;
    gap: 0.85rem;
  }

  .category-filters {
    gap: 0.4rem;
  }

  .cat-pill {
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    gap: 0.35rem;
  }

  .search-box-wrap {
    max-width: 100%;
    width: 100%;
  }

  .search-input {
    padding: 0.6rem 1rem 0.6rem 2.4rem;
    font-size: 0.82rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem;
  }

  .service-card {
    border-radius: var(--radius-md);
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .service-img-wrap {
    height: 125px;
    width: 100%;
  }

  .service-category-badge {
    top: 6px;
    left: 6px;
    padding: 0.2rem 0.45rem;
    font-size: 0.65rem;
  }

  .service-body {
    padding: 0.75rem 0.6rem;
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .service-price-tag {
    font-size: 0.75rem;
    margin-bottom: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .service-title {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.5em;
  }

  .service-excerpt {
    display: none; /* Mantiene la tarjeta ultra compacta y simétrica en móvil */
  }

  .service-features-list {
    display: none; /* Se visualiza dentro del modal al tocar "Ver Detalles" */
  }

  .service-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.4rem;
    width: 100%;
  }

  .service-card-actions .btn {
    width: 100%;
    padding: 0.4rem 0.3rem;
    font-size: 0.72rem;
    justify-content: center;
  }

  .service-card-actions .btn i {
    font-size: 0.75rem;
  }

  /* Proceso Creativo Móvil */
  .process-section {
    padding: 4rem 0;
  }

  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .process-step-card {
    padding: 1.25rem 0.85rem;
    border-radius: var(--radius-md);
  }

  .step-number {
    font-size: 1.7rem;
    top: 0.5rem;
    right: 0.6rem;
  }

  .step-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .step-title {
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
  }

  .step-desc {
    font-size: 0.75rem;
    line-height: 1.45;
  }

  /* Contacto y Cotización Móvil */
  .contact-section {
    padding: 4rem 0;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
  }

  .contact-lead {
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
  }

  .contact-cards-list {
    gap: 0.75rem;
  }

  .contact-detail-card {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .contact-icon-box {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .contact-label {
    font-size: 0.72rem;
  }

  .contact-val {
    font-size: 0.88rem;
  }

  .quote-form-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
    width: 100%;
  }

  .form-card-title {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
  }

  .form-card-sub {
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-label {
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
  }

  .form-control {
    padding: 0.7rem 0.85rem;
    font-size: 0.88rem;
  }

  /* Footer Móvil */
  .site-footer {
    padding: 3.5rem 0 1.5rem 0;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
  }

  .footer-brand-desc {
    font-size: 0.85rem;
    margin: 1rem 0;
  }

  .footer-col h4 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }

  .footer-links-list a {
    font-size: 0.85rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    padding-top: 1.5rem;
    font-size: 0.78rem;
  }

  /* Botón Flotante de WhatsApp Móvil */
  .floating-tooltip {
    display: none !important; /* Nunca mostrar tooltip que pueda causar overflow */
  }

  .floating-whatsapp-btn {
    bottom: 18px;
    right: 18px;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  /* Modal Móvil */
  .modal-overlay {
    padding: 0.75rem;
  }

  .modal-card {
    max-height: 88vh;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-title {
    font-size: 1.05rem;
  }

  .modal-body {
    padding: 1rem;
    gap: 0.85rem;
  }

  .modal-media-wrap {
    height: 160px;
  }

  .modal-desc {
    font-size: 0.85rem;
  }

  .modal-features-title {
    font-size: 0.85rem;
  }

  .modal-features-list li {
    font-size: 0.8rem;
  }

  .modal-actions-row .btn {
    font-size: 0.85rem;
    padding: 0.7rem;
  }
}

/* ==========================================================================
   MÓVILES PEQUEÑOS Y EXTRA PEQUEÑOS (< 480px / 320px - 390px)
   Asegura 0px de desbordamiento horizontal en iPhone SE, Galaxy, Pixel
   ========================================================================== */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .hero-card-showcase img {
    height: 220px;
  }

  .about-image-card img {
    height: 240px;
  }

  .services-grid {
    gap: 0.5rem;
  }

  .service-img-wrap {
    height: 110px;
  }

  .service-body {
    padding: 0.6rem 0.45rem;
  }

  .service-title {
    font-size: 0.8rem;
    height: 2.4em;
  }

  .service-price-tag {
    font-size: 0.7rem;
  }

  .service-card-actions .btn {
    padding: 0.35rem 0.25rem;
    font-size: 0.68rem;
  }

  .process-grid {
    gap: 0.5rem;
  }

  .process-step-card {
    padding: 1rem 0.65rem;
  }

  .stats-grid {
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.85rem 0.4rem;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }
}

/* Pantallas ultra estrechas (320px) */
@media (max-width: 340px) {
  .container {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .brand-logo-img {
    height: 38px;
    max-width: 100px;
  }

  .brand-title-text {
    font-size: 0.95rem;
  }

  .services-grid {
    gap: 0.4rem;
  }

  .service-img-wrap {
    height: 95px;
  }

  .service-body {
    padding: 0.5rem 0.35rem;
  }

  .service-title {
    font-size: 0.75rem;
  }

  .service-card-actions .btn {
    font-size: 0.64rem;
    padding: 0.3rem 0.2rem;
  }
}
