@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: 768px) {
    .back-to-top {
    bottom: 15px;
    right: 15px;
    width: 38px;
    height: 38px;
    }

    .back-to-top i {
    font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .back-to-top {
    bottom: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    }

    .back-to-top i {
    font-size: 0.9rem;
    }
}

@media (max-width: 900px) {
    .historia-texto {
    column-count: 1; 
    padding: 0;
    }
}

@media (max-width: 900px) {
    .blog-contenido {
    margin: 4rem 1rem;
    padding: 1.5rem;
    }

    .historia h2, .valores h2 {
    text-align: center;
    }

    .historia-texto {
    padding: 0;
    }

    .valores {
    margin-top: 3rem;
    }
}

@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);
    }
}
