/* ===================================
   GRUPO SEAL - CSS RESPONSIVO
   ================================= */

/* LARGE SCREENS - 1200px y más */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .hero h1 {
        font-size: 4rem;
    }
    
    .clients-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* DESKTOP - 992px a 1199px */
@media (max-width: 1200px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content {
        max-width: 700px;
    }
}

/* TABLET LANDSCAPE - 768px a 991px */
@media (max-width: 992px) {
    .section {
        padding: 80px 0;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Layout changes */
    .about-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .pillars-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .pillar-box {
        margin-bottom: 30px;
    }
    
    .row {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    /* Timeline adjustments */
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 17px;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Equipment grid */
    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Carrusel para tablet */
    .carousel-nav {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .carousel-prev {
        left: 20px;
    }
    
    .carousel-next {
        right: 20px;
    }
}

/* TABLET PORTRAIT - 768px y menos */
@media (max-width: 768px) {
    /* Header mobile */
    .header-inner {
        height: 70px;
        padding: 0 20px;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: rgba(10, 37, 60, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        transition: var(--transition);
        overflow-y: auto;
        backdrop-filter: blur(10px);
    }
    
    .nav-links.show {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    /* Typography mobile */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 120px 0 80px;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Layout mobile */
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .row {
        gap: 15px;
    }
    
    /* Cards mobile */
    .service-card {
        margin-bottom: 20px;
    }
    
    .service-image {
        height: 200px;
    }
    
    .service-content {
        padding: 20px;
    }
    
    /* Clients grid mobile */
    .clients-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .client-logo {
        height: 120px;
        padding: 20px;
    }
    
    /* Footer mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-contact-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .footer-contact-icon {
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    /* Pillars mobile */
    .pillars-container {
        gap: 15px;
    }
    
    .pillar-box {
        padding: 30px 20px;
    }
    
    .pillar-icon {
        width: 60px;
        height: 60px;
    }
    
    .pillar-icon i {
        font-size: 28px;
    }
    
    /* Timeline mobile */
    .timeline {
        margin: 30px auto;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        margin-bottom: 30px;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 17px;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .timeline-date {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    /* Achievements mobile */
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .achievement-card {
        padding: 20px;
    }
    
    .achievement-icon {
        width: 60px;
        height: 60px;
    }
    
    .achievement-icon i {
        font-size: 28px;
    }
    
    /* About mobile */
    .about-content {
        gap: 20px;
    }
    
    .about-image::before,
    .about-image::after {
        width: 60px;
        height: 60px;
    }
    
    /* Sector boxes mobile */
    .sector-box {
        padding: 25px 20px;
        margin-bottom: 20px;
    }
    
    .sector-icon {
        float: none;
        margin: 0 auto 20px;
    }
    
    .sector-content {
        text-align: center;
    }
    
    .sector-content h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Equipment mobile */
    .equipment-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .equipment-item {
        padding: 20px;
    }
    
    .equipment-image {
        height: 200px;
    }
    
    /* Benefits mobile */
    .benefit-box {
        padding: 25px 20px;
        margin-bottom: 20px;
    }
    
    .benefit-icon {
        width: 60px;
        height: 60px;
    }
    
    .benefit-icon i {
        font-size: 24px;
    }
    
    /* Legal box mobile */
    .legal-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 20px;
    }
    
    .legal-content h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* CTA mobile */
    .cta-section {
        padding: 60px 0;
    }
    
    .cta-section h2 {
        font-size: 1.8rem;
    }
    
    .cta-section p {
        font-size: 1rem;
    }
    
    /* Cert box mobile */
    .cert-box {
        padding: 30px 20px;
    }
    
    .cert-icon {
        width: 60px;
        height: 60px;
    }
    
    .cert-icon i {
        font-size: 28px;
    }
    
    /* ===================================
       CARRUSEL RESPONSIVE MOBILE
       ================================= */
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        display: block;
        margin: 10px auto;
        max-width: 200px;
        text-align: center;
    }
    
    .carousel-nav {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .carousel-prev {
        left: 15px;
    }
    
    .carousel-next {
        right: 15px;
    }
    
    .indicator {
        width: 12px;
        height: 12px;
    }
    
    .carousel-indicators {
        bottom: 25px;
    }
}

/* MOBILE SMALL - 576px y menos */
@media (max-width: 576px) {
    .section {
        padding: 40px 0;
    }
    
    h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .hero {
        min-height: 80vh;
        padding: 100px 0 60px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero h1 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .hero p {
        font-size: 0.9rem;
        margin-bottom: 30px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
        display: block;
        text-align: center;
        margin: 10px 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Service cards very small */
    .service-content {
        padding: 15px;
    }
    
    .service-image {
        height: 180px;
    }
    
    /* Client logos very small */
    .client-logo {
        height: 100px;
        padding: 15px;
    }
    
    /* Pillars very small */
    .pillar-box {
        padding: 25px 15px;
    }
    
    /* Footer very small */
    .footer {
        padding-top: 60px;
    }
    
    .footer-content {
        gap: 25px;
    }
    
    .footer-column h4 {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .footer-links li {
        margin-bottom: 12px;
    }
    
    .footer-contact-item {
        margin-bottom: 15px;
    }
    
    .footer-bottom {
        padding: 15px 0;
        margin-top: 40px;
    }
    
    .footer-bottom p {
        font-size: 14px;
        text-align: center;
    }
    
    /* Back to top mobile */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    /* Timeline very small */
    .timeline-content {
        padding: 15px;
    }
    
    .timeline-content h3 {
        font-size: 1.1rem;
    }
    
    /* Achievements very small */
    .achievement-card {
        padding: 15px;
    }
    
    /* About image adjustments */
    .about-image::before,
    .about-image::after {
        width: 40px;
        height: 40px;
        border-width: 2px;
    }
    
    /* Sector boxes very small */
    .sector-box {
        padding: 20px 15px;
    }
    
    .sector-icon {
        width: 60px;
        height: 60px;
    }
    
    .sector-icon i {
        font-size: 28px;
    }
    
    /* Equipment very small */
    .equipment-item {
        padding: 15px;
    }
    
    .equipment-icon {
        width: 50px;
        height: 50px;
    }
    
    .equipment-icon i {
        font-size: 24px;
    }
    
    /* CTA very small */
    .cta-section {
        padding: 40px 0;
    }
    
    .cta-section h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .cta-section .btn {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    /* ===================================
       CARRUSEL RESPONSIVE MOBILE SMALL
       ================================= */
    .hero h1 {
        font-size: 2rem;
    }
    
    .carousel-nav {
        display: none; /* Ocultar flechas en móviles muy pequeños */
    }
    
    .carousel-indicators {
        bottom: 20px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    /* Hacer el carrusel más fácil de usar en móviles */
    .hero-slide {
        background-attachment: scroll; /* Mejor rendimiento en móviles */
    }
}

/* LANDSCAPE ORIENTATION */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 80px 0 40px;
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    /* Carrusel en landscape */
    .carousel-indicators {
        bottom: 15px;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* PRINT STYLES */
@media print {
    .header,
    .menu-toggle,
    .back-to-top,
    .btn,
    .carousel-nav,
    .carousel-indicators {
        display: none !important;
    }
    
    .hero {
        height: auto;
        padding: 20px 0;
        background: none !important;
    }
    
    .hero-slide {
        display: none;
    }
    
    .section {
        padding: 30px 0;
        page-break-inside: avoid;
    }
    
    .service-card,
    .pillar-box,
    .achievement-card {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .footer {
        page-break-before: always;
    }
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        --shadow-strong: 0 10px 25px rgba(0, 0, 0, 0.4);
    }
    
    .btn {
        border-width: 3px;
    }
    
    .service-card,
    .pillar-box,
    .achievement-card {
        border: 2px solid var(--primary);
    }
    
    .carousel-nav {
        border-width: 3px;
        background-color: rgba(255, 255, 255, 0.3);
    }
    
    .indicator {
        border-width: 3px;
    }
}

/* 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;
    }
    
    .hero-slide {
        transition: none !important;
    }
    
    .carousel-nav,
    .indicator {
        transition: none !important;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===================================
   CARRUSEL - MEJORAS ESPECÍFICAS MOBILE
   ================================= */

/* Optimización para touch devices */
@media (hover: none) and (pointer: coarse) {
    .carousel-nav {
        /* Hacer los botones más grandes para touch */
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .indicator {
        /* Hacer los indicadores más grandes para touch */
        width: 16px;
        height: 16px;
        margin: 0 8px;
    }
    
    /* Mejorar el área de toque */
    .carousel-nav::before {
        content: '';
        position: absolute;
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }
    
    .indicator::before {
        content: '';
        position: absolute;
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }
}

/* Optimización para dispositivos con pantallas de alta densidad */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-slide {
        background-size: cover;
        background-position: center;
        /* Usar imágenes de mayor resolución si están disponibles */
    }
}

/* Mejoras de rendimiento para móviles */
@media (max-width: 768px) {
    .hero-slide {
        /* Optimización de rendimiento */
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000;
    }
    
    .carousel-nav,
    .indicator {
        /* Usar GPU para mejor rendimiento */
        transform: translateZ(0);
    }
}