/* LARGE SCREENS (1440px) */
@media (min-width: 1440px) {
    .container {
        max-width: 1340px;
    }

    .zoom-nav.service-carousel-controls-services{
        bottom: 25px;
    }
}

@media (max-width: 1024px) {
    .service-carousel-container-services{
        height: 320px;
        margin: 0;
    }

    .service-carousel-controls-services{
        bottom: 25px;
    }
}

/* TABLET (768px) */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .container {
        padding: 0 var(--space-md);
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .navbar {
        z-index: 1001;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        box-shadow: var(--shadow-md);
        z-index: 1000;
        width: 100%;
    }
    
    .nav-menu.active {
        max-height: 500px;
        padding: var(--space-md) 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu .nav-link {
        display: block;
        padding: var(--space-md) var(--space-lg);
        border-bottom: 1px solid var(--color-border);
    }

    .nav-menu .nav-link:last-child {
        border-bottom: none;
    }

    .nav-menu .nav-cta {
        margin: var(--space-md) var(--space-lg);
        text-align: center;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu li:last-child .btn {
        display: block;
        margin: var(--space-sm) var(--space-lg);
        padding: var(--space-md);
    }

    /* Language Toggle en móvil */
    .language-toggle {
        margin: var(--space-sm) var(--space-lg);
        justify-content: center;
    }
    
    .hero {
        height: 500px;
        min-height: 500px;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .hero-title {
        font-size: 2rem;
        max-width: 100%;
    }

    .hero-subtitle {
        font-size: 1rem;
        max-width: 100%;
    }

    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-prev {
        left: var(--space-md);
    }

    .carousel-next {
        right: var(--space-md);
    }
    
    .hero-cta .btn {
        width: 100%;
    }

    .services-grid-home {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        max-width: 100%;
        overflow: hidden;
    }
    
    .services-grid,
    .projects-grid,
    .stats-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .project-card {
        height: 250px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form,
    .contact-info {
        padding: var(--space-lg);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .legal-links {
        justify-content: center;
    }
    
    /* About Page Responsive */
    .historia-grid,
    .mision-vision-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-hero h1 {
        font-size: 1.8rem !important;
    }
    
    .contact-hero p {
        font-size: 1rem !important;
    }
    
    .historia-grid img {
        max-height: 300px;
    }
    
    .mision-vision-grid > div {
        padding: 2rem !important;
    }
    
    .mision-vision-grid h2 {
        font-size: 1.5rem !important;
    }
    
    .mision-vision-grid p {
        font-size: 1rem !important;
    }
    
    .section-title {
        font-size: 1.8rem !important;
    }
    
    /* Services Detail Responsive */
    .service-detail,
    .service-detail-reverse {
        grid-template-columns: 1fr;
    }
    
    .service-detail-reverse {
        direction: ltr;
    }
    
    .service-carousel-controls-services {
        bottom: 20px;
        gap: 15px;
    }
    
    .grid-auto-fit {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-buttons .btn {
        width: 100%;
    }
    .service-icon{
        width: 24%;
    }
    
    .service-carousel-container-services {
        height: 480px;
    }
    
    .service-carousel-dot {
        width: 12px;
        height: 12px;
    }

    /* Zoom navigation buttons - tablet/mobile */
    .zoom-nav {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }

    .zoom-nav.prev {
        left: 15px;
    }

    .zoom-nav.next {
        right: 15px;
    }

    .zoom-counter {
        font-size: 0.95rem;
    }

        /* TESTIMONIOS - MOBILE */
    .testimonials-carousel {
        padding: 0;
    }

    .testimonial-card {
        width: 320px;
        height: 480px;
        padding: var(--space-md);
    }

    .stars {
        font-size: 1.2rem;
        margin-bottom: var(--space-sm);
    }

    .testimonial-card p {
        font-size: 0.85rem;
        line-height: 1.6;
        max-height: 300px;
    }

    .testimonial-card strong {
        font-size: 1rem;
    }

    .testimonial-card span {
        font-size: 0.8rem;
    }

    @keyframes scroll-horizontal {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-320px * 3 - var(--space-lg) * 3));
        }
    }

    /* PROJECT MODAL - MOBILE */
    .modal-content {
        width: 100%;
        max-width: 100%;
        height: 81vh;
        margin: 0;
        border-radius: 0;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 1rem;
    }
    .gallery-nav {
        padding: 0 0.5rem;
    }

    .gallery-nav button {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .gallery-thumb {
        border-width: 2px;
    }

    .modal-close {
        font-size: 1.8rem;
        padding: 0.5rem;
    }

    .project-description {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .project-description h4 {
        font-size: 1.1rem;
    }

    .project-description p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* PROCESS TIMELINE - MOBILE */

    .gallery-main {
        max-height: 250px;
        margin-bottom: 0.75rem;
    }

    .gallery-nav {
        padding: 0 0.5rem;
    }

    .gallery-nav button {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .gallery-thumb {
        border-width: 2px;
    }

    .project-description {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .project-description h4 {
        font-size: 1.1rem;
    }

    .project-description p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* PROCESS TIMELINE - MOBILE */
    .process-vertical-timeline {
        padding: 1rem 0;
    }

    .process-vertical-timeline::before {
        left: 20px;
        width: 3px;
    }

    .process-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .process-item:nth-child(even) {
        direction: ltr;
    }

    .process-item:nth-child(even) > * {
        direction: ltr;
    }

    .process-image {
        height: 280px;
        width: 70%;
        margin: auto;
        border-radius: 8px;
        order: -1;
    }

    .process-content {
        margin-left: 105px;
    }

    .process-number-circle {
        position: absolute;
        left: -65px;
        top: -15px;
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .process-content h3 {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
        margin-left: 1.75rem;
    }
    
    .process-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        margin-left: 1.75rem;
    }

    .process-content li {
        font-size: 0.9rem;
        margin: 0.4rem 3rem;
    }
}

/* MOBILE (480px) */
@media (max-width: 480px) {
    body {
        padding-top: 65px;
    }
    
    :root {
        --font-size-base: 14px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .container {
        padding: 0 var(--space-sm);
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .nav-wrapper {
        padding: var(--space-sm) 0;
    }
    
    .logo {
        gap: 0.5rem;
        font-size: 1.25rem;
    }
    
    /* About Page Mobile */
    .contact-hero {
        padding: 3rem 0 !important;
    }
    
    .contact-hero h1 {
        font-size: 1.5rem !important;
    }
    
    .contact-hero p {
        font-size: 0.9rem !important;
    }
    
    .mision-vision-grid > div {
        padding: 1.5rem !important;
    }
    
    .mision-vision-grid .service-icon,
    .mision-vision-grid > div > div:first-child > div:first-child {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }
    
    .mision-vision-grid h2 {
        font-size: 1.3rem !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .featured-projects,
    .stats,
    .services-preview {
        padding: 2rem 0 !important;
    }
    
    .logo img {
        width: 30px;
        height: 30px;
    }
    
    .hero {
        height: 400px;
        min-height: 400px;
    }

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

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

    .hero-content-centered {
        padding: 0 var(--space-sm);
    }

    .carousel-control {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .carousel-prev {
        left: var(--space-sm);
    }

    .carousel-next {
        right: var(--space-sm);
    }

    .carousel-indicators {
        bottom: var(--space-md);
        gap: var(--space-sm);
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .indicator.active {
        width: 24px;
    }
    
    .section-title {
        margin-bottom: var(--space-lg);
        padding-bottom: var(--space-md);
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
    }
    
    .services-grid,
    .stats-grid,
    .testimonials-grid {
        gap: var(--space-lg);
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .btn-services {
        text-align: center;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .project-card {
        height: 200px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    /* PROCESS TIMELINE - TABLET */
    .process-item {
        gap: 2rem;
        margin-bottom: 3.5rem;
    }

    .process-image {
        height: 250px;
    }

    .process-content h3 {
        font-size: 1.5rem;
    }

    .process-content p {
        font-size: 0.95rem;
    }
    
    /* Testimonios en tablet */
    .testimonials-carousel {
        padding: 0 var(--space-md);
    }

    .testimonial-card {
        width: 500px;
        height: 420px;
        padding: var(--space-lg);
    }

    .testimonial-card p {
        font-size: 0.9rem;
        max-height: 250px;
    }

    /* PROJECT MODAL - TABLET */
    .modal-content {
        max-width: 100%;
        margin: 2rem auto;
        height: 81vh;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .gallery-main {
        height: 16em;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.75rem;
    }

    .gallery-nav button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .service-icon{
        width: 46%;
    }

        .process-vertical-timeline::before {
        left: 15px;
        width: 2px;
    }

    .testimonial-card {
        width: 320px;
        height: 360px;
        padding: var(--space-md);
    }

    .process-item {
        gap: 2rem;
        margin-bottom: 2.5rem;
    }

    .process-image {
        height: 220px;
    }

    .process-content {
        margin-left: 55px;
    }

    .process-number-circle {
        position: absolute;
        left: -35px;
        top: -10px;
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
        margin-bottom: 1rem;
        border: 3px solid white;
    }

    .process-content h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .process-content p {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }

    .process-content ul {
        margin: 0;
    }

    .process-content li {
        font-size: 0.85rem;
        margin: 0.3rem 1rem;
        padding-left: 1.2rem;
    }

    .process-content li::before {
        font-size: 0.9rem;
    }

    .service-carousel-container-services {
        height: 265px;
    }

    .service-carousel-controls-services {
        bottom: 40px;
    }

    .zoom-hint {
        font-size: 0.55rem;
    }

}

/* SMALL AND MEDIUM MOBILE (320px - 376px) */
@media (max-width: 376px) {
    .process-vertical-timeline::before {
        left: 12px;
    }

    .process-item {
        margin-bottom: 2rem;
    }

    .process-image {
        height: 200px;
    }

    .process-content {
        margin-left: 50px;
    }

    .process-number-circle {
        left: -30px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .process-content h3 {
        font-size: 1.1rem;
    }

    .process-content p {
        font-size: 0.8rem;
    }

    .process-content li {
        font-size: 0.8rem;
        padding-left: 1rem;
    }

    .service-icon{
        width: 55%;
    }

    .service-carousel-container-services{
        height: 230px;
    }

    /* Zoom navigation buttons - mobile */
    .zoom-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .zoom-nav.prev {
        left: 10px;
    }

    .zoom-nav.next {
        right: 10px;
    }

    .zoom-counter {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* EXTRA SMALL MOBILE (321px) */
@media (max-width: 321px) {
    .service-icon{
        width: 66%;
    }

    .service-carousel-container-services{
        height: 195px;
    }

    /* Zoom navigation buttons - extra small mobile */
    .zoom-nav {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .zoom-nav.prev {
        left: 5px;
    }

    .zoom-nav.next {
        right: 5px;
    }
}