/**
 * FRIO SERVICIOS L.S. - Responsive Stylesheet
 * Optimizaciones precisas desde 320px hasta 1920px
 */

/* ==========================================================================
   Tablet, iPad & Small Desktops (max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  /* Clean Navigation - Hide cluttered inline links, show drawer button */
  .main-nav {
    display: none !important;
  }

  .nav-toggle-btn {
    display: inline-flex !important;
  }

  .site-header .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .site-header .header-cta-btn {
    display: inline-flex !important;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    min-height: 36px;
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.12);
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .services-grid-main {
    grid-template-columns: repeat(2, 1fr);
  }

  .b2b-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }

  .problem-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* ==========================================================================
   Mobile Devices (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {

  body {
    padding-bottom: 0;
  }

  /* Site Header Mobile - Transparent over hero background */
  .site-header {
    height: 56px;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--color-border-light);
    box-shadow: 0 4px 16px rgba(10, 37, 64, 0.05);
  }

  .brand-logo-img {
    height: 36px;
    width: auto;
  }

  .site-header .header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .site-header .header-cta-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    height: 33px;
    min-height: 33px;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 7px;
    background: #0a2540;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(10, 37, 64, 0.15);
  }

  .nav-toggle-btn {
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(10, 37, 64, 0.12);
  }

  /* Floating WhatsApp pure circular button */
  .floating-whatsapp {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    right: 18px !important;
    width: 56px !important;
    height: 56px !important;
  }

  .floating-whatsapp-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .mobile-sticky-bar {
    display: none !important;
  }

  /* Hero Mobile: Centered Symmetrical Layout with Technician Below */
  .hero-section {
    min-height: 100svh;
    display: flex;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    background-color: #f8fafc;
  }

  .hero-bg-picture,
  .hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
  }

  /* Smooth vertical gradient: clean white in top 35%, reveals crisp technician below */
  .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.93) 36%,
      rgba(255, 255, 255, 0.42) 58%,
      rgba(255, 255, 255, 0.05) 78%,
      rgba(255, 255, 255, 0) 100%
    );
  }

  .hero-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: calc(56px + clamp(1rem, 3.5vh, 2rem));
    padding-bottom: 2rem;
  }

  .hero-content {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-eyebrow {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 auto 6px;
    color: var(--color-brand-blue, #0077b6);
    justify-content: center;
    text-align: center;
  }

  .hero-title {
    font-size: clamp(32px, 8.5vw, 38px);
    line-height: 1.05;
    font-weight: 800;
    color: #0a2540;
    margin: 0 auto 8px;
    text-align: center;
    letter-spacing: -0.03em;
    max-width: 100%;
  }

  .hero-subtitle {
    font-size: 14.5px;
    line-height: 1.45;
    color: #334155;
    margin: 0 auto 14px;
    text-align: center;
    max-width: 90%;
  }

  .hero-actions {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto 12px;
  }

  .hero-actions .btn-primary {
    width: auto;
    min-width: 220px;
    height: 48px;
    min-height: 48px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 9px;
    background: #0a2540;
    box-shadow: 0 4px 14px rgba(10, 37, 64, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
  }

  .hero-actions .btn-hero-secondary {
    display: none;
  }

  .hero-trust-line {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0 auto;
    text-align: center;
  }

  .hero-trust-icon {
    color: var(--color-brand-blue, #0077b6);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: 1px;
  }

  .hero-trust-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-trust-bold {
    font-size: 13px;
    font-weight: 700;
    color: #0a2540;
    display: block;
    line-height: 1.2;
  }

  .hero-trust-sub {
    font-size: 11.5px;
    font-weight: 500;
    color: #64748b;
    display: block;
    line-height: 1.2;
  }


  /* Services Mobile */
  .services-grid-main {
    grid-template-columns: 1fr;
  }

  .service-card-secondary {
    flex-direction: column;
    align-items: flex-start;
  }

  .service-card-secondary .btn {
    width: 100%;
  }

  /* B2B Mobile */
  .b2b-grid {
    grid-template-columns: 1fr;
  }

  .b2b-bottom-banner {
    flex-direction: column;
    text-align: center;
  }

  .b2b-bottom-banner .btn {
    width: 100%;
  }

  
  /* BTU Calculator Mobile */
  .btu-calc-box {
    grid-template-columns: 1fr !important;
    padding: 1.15rem !important;
    gap: 1.25rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .btu-options-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .btu-toggle-btn {
    flex: 1 1 calc(50% - 4px) !important;
    min-width: 120px !important;
    padding: 8px 10px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }

  .btu-result-card {
    width: 100% !important;
    padding: 1.25rem 1rem !important;
    box-sizing: border-box !important;
  }

  .btu-result-btn {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Gallery Mobile */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    flex-shrink: 0;
  }

  /* Why Grid */
  .why-grid {
    grid-template-columns: 1fr;
  }

  /* Reviews Grid */
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  /* Form */
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  /* CTA Final */
  .final-cta-actions {
    flex-direction: column;
    width: 100%;
  }

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

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

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

  /* Floating WhatsApp hidden on mobile in favor of sticky bottom bar */
  .floating-whatsapp {
    display: none;
  }

  /* Mobile Sticky Conversion Bar Visible */
  .mobile-sticky-bar {
    display: block;
  }
}

/* ==========================================================================
   Small Mobile Phones (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .trust-item {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: var(--space-3);
  }

  .issue-chips-grid {
    flex-direction: column;
  }

  .issue-chip {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 14px;
  }

  .form-card {
    padding: 1.25rem;
  }

  .service-modal-dialog {
    padding: 1.25rem 1rem;
  }

  .modal-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Ultra-small Devices (320px - 360px)
   ========================================================================== */
@media (max-width: 360px) {
  .brand-logo-img {
    height: 32px;
  }

  .btn {
    padding: 0.65rem 1rem;
    font-size: 13px;
  }
}
