/*@media (max-width: 480px) {
    .modal-content {
        width: 92%;
        padding: 1rem;
        border-radius: 10px;
        max-height: 85vh;
        &::-webkit-scrollbar {
            width: 0;
            height: 0;
        }
        &::-webkit-scrollbar-thumb,
        &::-webkit-scrollbar-track {
            background: transparent;
        }
    }

    #modalBody h2 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }

    #modalBody p {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .modal-gallery.collage {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .modal-gallery.collage img {
        height: 120px;
    }

    .modal-video {
        aspect-ratio: 16 / 9;
    }

    .btn-whatsapp-footer {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .btn-whatsapp-footer i {
        font-size: 1rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .modal-content {
        width: 85%;
        padding: 1.5rem;
        border-radius: 12px;
        max-height: 88vh;
    }

    #modalBody h2 {
        font-size: 1.6rem;
    }

    #modalBody p {
        font-size: 1rem;
    }

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

    .modal-gallery.collage img {
        height: 150px;
    }
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.25rem;
    }

    .modal-content {
        max-width: 80%;
        padding: 2rem;
    }

    .special-collage {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 1.2rem;
        text-align: center;
    }

    .service-icon {
        margin: 0 auto 1rem;
        width: 64px;
        height: 64px;
    }

    .btn-modal {
        width: 100%;
    }

    .modal-content {
        width: 92%;
        padding: 1.5rem;
    }

    .modal-gallery.collage {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .special-collage {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .btn-whatsapp-icon {
        width: 48px;
        height: 48px;
        bottom: 1rem;
        right: 1rem;
    }

    .btn-whatsapp-icon .btn-label {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .service-icon {
        width: 56px;
        height: 56px;
    }

    .service-card {
        padding: 1rem;
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
    }

    .modal-gallery.collage img {
        height: 140px;
    }

    .special-collage {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }

    .collage-overlay {
        font-size: 0.8rem;
        padding: 0.4rem;
    }

    .btn-modal {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .btn-whatsapp-icon {
        width: 44px;
        height: 44px;
        bottom: 0.75rem;
        right: 0.75rem;
    }

    .btn-whatsapp-icon i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    body.dark-mode .service-card {
        border-color: #333;
    }

    body.dark-mode .modal-content {
        background-color: #121212;
        color: #e0e0e0;
    }
}

@media (max-width: 768px) {
    .partners-track img {
    height: 50px;
    }
}

@media (max-width: 768px) {
    .map-title {
    font-size: 1rem;
    }

    .map-container {
    height: 300px;
    }
}


@media (max-width: 968px) {
    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--color-background);
        border-bottom: 1px solid var(--color-border);
        padding: var(--spacing-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }
    
    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .hamburger {
        display: flex;
    }
    
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .services-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .logo-text {
        display: none;
    }
}

@media (max-width: 900px) {
    .btn-login-desktop {
    display: none;
    }

    .nav-login-mobile {
    display: block;
    margin-top: 15px;
    }

    .logo-img {
    width: 200px;
    }

    .logo-img-dark {
        width: 200px;
    }

    .nav-login-mobile .btn-login {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background-color: var(--color-primary);
    }
}

@media (max-width: 1024px) {
    .blog-history-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .blog-history-image {
        order: -1;
    }

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

    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .blog-posts-section .blog-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .blog-hero {
        padding: 8rem 0 3.5rem;
    }

    .blog-hero-title {
        font-size: 1.6rem;
    }

    .blog-hero-subtitle {
        font-size: 1rem;
    }

    .blog-section-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }

    .blog-values-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .blog-value-card {
        padding: 1.5rem 1rem;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .blog-filter-buttons {
        justify-content: center;
    }

    .blog-filter-btn {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }
}

/* Teléfonos pequeños */
@media (max-width: 480px) {
    .blog-hero {
        padding: 7rem 0 2rem;
    }

    .blog-hero-title {
        font-size: 1.4rem;
    }

    .blog-hero-subtitle {
        font-size: 0.95rem;
    }

    .blog-history-content {
        gap: 2rem;
    }

    .blog-values-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .blog-value-card h3 {
        font-size: 1rem;
    }

    .blog-value-card p {
        font-size: 0.85rem;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .blog-post-card {
        border-radius: 10px;
    }

    .blog-load-more-btn {
        width: 100%;
        font-size: 0.95rem;
        padding: 0.6rem 1rem;
    }
}

@media (max-width: 768px) {
    .contenedor-politica {
    padding: 1.5rem;
    }
}

@media (max-width: 900px) {
    .hseq-content {
    grid-template-columns: 1fr;
    }

    .hseq-video iframe {
    height: 250px;
    }

    .hseq {
    padding: 7rem 1rem;
    }
}

@media (max-width: 768px) {
    .form-check {
    align-items: center;
    }

    .form-check label {
    font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .trabaje-description {
    padding: 1rem;
    text-align: left;
    }

    .trabaje-section {
    padding: 7rem 1rem;
    }
}

@media (max-width: 600px) {
    .custom-file label {
    display: block;
    text-align: center;
    width: 100%;
    }

    .file-name {
    display: block;
    margin: 0.5rem 0 0;
    text-align: center;
    }
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .hero-background {
        background-attachment: scroll !important; 
    }
}

@media (max-width: 768px) {
    .hero-background {
        background-size: cover;
        background-position: center center;
        transform: scale(1.05);
    }
}

@media (max-width: 768px) {
    .horario-section {
        padding: 120px 15px;
        background-size: cover;
        background-position: center 55%; 
    }

    .horario-card {
        width: 90%;
        padding: 30px 20px;
        border-radius: 20px;
    }

    .icon-container {
        width: 70px;
        height: 70px;
    }

    .icon-container i {
        font-size: 2rem;
    }

    .horario-card h2 {
        font-size: 1.2rem;
    }

    .horario-item span {
        font-size: 0.85rem;
    }

    .horario-item strong {
        font-size: 0.95rem;
    }

    .contacto {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .horario-section {
        padding: 100px 10px;
        background-position: center 65%;
    }

    .horario-card {
        padding: 25px 18px;
    }
}

@media (max-width: 768px) {
    body.dark-mode .horario-section {
        padding: 120px 15px;
        background-size: cover;
        background-position: center 55%;
    }
}

@media (max-width: 480px) {
    body.dark-mode .horario-section {
        padding: 100px 10px;
        background-position: center 65%;
    }
}

@media (max-width: 768px) {
    .wa-button { bottom: 110px; width: 52px; height: 52px; }
    .wa-button i { font-size: 1.8rem; }
    .wa-modal { bottom: 200px; }
    .back-to-top { bottom: 25px; width: 44px; height: 44px; }
}

@media (max-width: 480px) {
    .wa-button { bottom: 90px; width: 46px; height:46px; }
    .wa-button i { font-size: 1.9rem; }
    .wa-modal { bottom: 170px; }
    .back-to-top { bottom: 25px; width: 46px; height: 46px; }
}

@media (max-width: 1200px) {
    .hero-logo {
    width: 260px;
        }
    .hero-title {
        font-size: 4rem;
    }
    .hero-subtitle2 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
        max-width: 600px;
    }
    .hero-buttons .btn {
        padding: 0.8rem 1.8rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 992px) {
    .hero {
        text-align: center;
        justify-content: center;
        padding: 0 1.5rem;
    }

    .hero-content {
        align-items: center;
    }

    .hero-logo {
        width: 230px;
        margin-bottom: 0.7rem;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .hero-subtitle2 {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 1rem;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .hero-logo {
        width: 180px;
        margin-bottom: 0.6rem;
    }

    .hero-title {
        font-size: 2.4rem;
        letter-spacing: -1px;
    }

    .hero-subtitle2 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }

    .btn {
        width: 100%;
        font-size: 0.95rem;
        padding: 0.8rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 80px;
    }

    .hero-logo {
        width: 150px;
    }

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

    .hero-subtitle2 {
        font-size: 0.9rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        max-width: 90%;
    }

    .btn {
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .scroll-indicator {
        bottom: 1.5rem;
    }
    .scroll-arrow {
        width: 24px;
        height: 40px;
    }
}

@media (max-width: 992px) {
    .service-card {
        padding: 1.4rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon i,
    .service-icon svg {
        font-size: 28px;
    }

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

    .service-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .btn-modal {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* MÓVIL */
@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-card {
        padding: 1.2rem;
        text-align: center;
    }

    .service-icon {
        margin: 0 auto 0.8rem;
    }

    .service-title {
        display: block;
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .service-description {
        font-size: 0.9rem;
        text-align: justify;
        line-height: 1.6;
    }

    .btn-modal {
        width: 100%;
        padding: 0.6rem;
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   FIX DEFINTIVO: BUG DE CLIC FANTASMA EN WHATSAPP Y MODALES
   ========================================================================== */

/* 1. Desactivar interacciones en el modal de WhatsApp cuando está cerrado */
.wa-modal {
    pointer-events: none !important; /* Ignora toques cuando está invisible */
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

/* 2. Activar interacciones ÚNICAMENTE cuando el modal tiene la clase 'active' o 'show' */
.wa-modal.active,
.wa-modal.show,
.wa-modal.open {
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 3. Delimitar estrictamente el botón flotante de WhatsApp */
.wa-button,
.btn-whatsapp-icon {
    width: 52px !important;
    height: 52px !important;
    max-width: 52px !important;
    max-height: 52px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    position: fixed !important;
    z-index: 999 !important;
    pointer-events: auto !important;
    overflow: hidden !important; /* Corta cualquier área sobrante */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 4. Asegurar que la flecha 'Back to top' no se pise con el botón de WhatsApp */
@media (max-width: 768px) {
    .wa-button { 
        bottom: 85px !important; 
        right: 18px !important; 
    }
    .back-to-top { 
        bottom: 20px !important; 
        right: 18px !important; 
    }
}