/* ==========================================
   RESPONSIVE.CSS - Media Queries
   ========================================== */

/* ==========================================
   TABLET (1024px)
   ========================================== */

@media (max-width: 1024px) {
    .header-main-container {
        flex-direction: column;
    }
    
    .logo-independent,
    .content-independent {
        width: 100%;
    }
    
    .logo-independent {
        border-right: 0;
        border-bottom: 2px solid var(--accent);
        padding: 0.75rem;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .logo-independent .contact-btn {
        min-width: unset !important;
        max-width: 100%;
        width: 100%;
        font-size: 0.85rem;
        padding: 0.6rem 0.9rem;
        white-space: normal !important;
        line-height: 1.3;
        box-sizing: border-box;
    }
    
    /* En tablet, reducir tamaño y permitir ajuste */
    .logo-independent .contact-btn span {
        font-size: 0.75rem;
        display: inline-block;
        word-break: break-word;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-social-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .navbar-container {
        width: 100%;
        justify-content: center;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .social-icons {
        order: 2;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }
    
    .social-icons a {
        min-width: 45px;
    }
    
    .social-count {
        font-size: 0.65rem;
    }
    
    .social-text {
        font-size: 0.55rem;
    }
    
    nav ul {
        flex-direction: column;
        text-align: center;
    }

    /* Content */
    .content-slider,
    .offices-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-content-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   MOBILE (768px)
   ========================================== */

@media (max-width: 768px) {
    html { 
        font-size: 14px; 
    }

    /* Header */
    .logo-independent {
        padding: 0.5rem;
    }
    
    .logo-independent .contact-btn {
        width: 100% !important;
        min-width: unset !important;
        max-width: 100% !important;
        font-size: 0.75rem;
        padding: 0.5rem 0.6rem;
        white-space: normal !important;
        line-height: 1.2;
        text-align: center;
        flex-wrap: wrap;
        word-break: break-all;
    }
    
    /* En móvil, ocultar "Consulta" y mostrar solo el número usando CSS */
    .logo-independent .contact-btn span {
        font-size: 0;
        position: relative;
    }
    
    .logo-independent .contact-btn span::before {
        content: '509-927-3840';
        font-size: 0.7rem;
        display: inline;
    }
    
    /* Asegurar que el icono también se ajuste */
    .logo-independent .contact-btn i {
        flex-shrink: 0;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }

    .location-bar {
        padding: 0.3rem 0;
        gap: 0.6rem;
        flex-direction: column;
    }

    /* Navigation */
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    /* Submenus */
    .submenu {
        position: static;
        box-shadow: none;
        border-radius: 0;
    }

    /* Hero */
    .hero.hero-static {
        margin-top: 242px; /* 142px + 100px para bajar el banner */
        min-height: 60vh;
    }

    /* Content */
    .content-slider,
    .offices-content {
        grid-template-columns: 1fr;
    }

    .offices-img {
        height: 180px;
    }

    /* Contact */
    .contact-content {
        flex-direction: column;
    }

    /* Stats */
    .stats-title,
    .stats-cta {
        border: none;
        text-align: center;
    }
}

/* ==========================================
   SMALL MOBILE (480px)
   ========================================== */

@media (max-width: 480px) {
    .hero.hero-static {
        margin-top: 234px; /* 134px + 100px para bajar el banner */
        min-height: 50vh;
    }

    /* Botón de contacto en pantallas muy pequeñas */
    .logo-independent {
        padding: 0.4rem;
    }
    
    .logo-independent .contact-btn {
        width: 100% !important;
        min-width: unset !important;
        max-width: 100% !important;
        font-size: 0.65rem;
        padding: 0.4rem 0.5rem;
        white-space: normal !important;
        line-height: 1.1;
        text-align: center;
        flex-wrap: wrap;
        word-break: break-all;
    }
    
    /* En pantallas muy pequeñas, mostrar solo el número */
    .logo-independent .contact-btn span {
        font-size: 0;
    }
    
    .logo-independent .contact-btn span::before {
        content: '509-927-3840';
        font-size: 0.6rem;
        display: inline;
    }
    
    /* Asegurar que el icono se mantenga visible */
    .logo-independent .contact-btn i {
        flex-shrink: 0;
        font-size: 0.8rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .update-card,
    .service-card {
        min-height: 350px;
    }

    /* Ticker */
    .ticker-title {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .ticker-list li {
        font-size: 0.85rem;
        margin: 0 1rem;
    }

    /* Modal */
    .media-modal-content {
        width: 95%;
    }

    .media-close-modal {
        font-size: 24px;
        top: -35px;
    }
}

/* ==========================================
   LARGE SCREENS (1920px+)
   ========================================== */

@media (min-width: 1920px) {
    .header-main-container,
    .hero {
        max-width: 2560px;
        margin: 0 auto;
    }

    .container {
        max-width: 1400px;
    }
}

/* ==========================================
   ACCESSIBILITY - Reduced Motion
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    header,
    footer,
    .social-icons,
    .contact-btn,
    .ticker-wrapper,
    nav,
    .hero {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .page {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}