/* ============================================
   RESPONSIVE DESIGN - ELISAY CODE
   Media queries adicionales y ajustes responsive globales
   ============================================ */

/* ========== Large Desktops (1400px+) ========== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    section {
        padding: 12rem 10% 6rem;
    }
}

/* ========== Desktops (1200px - 1399px) ========== */
@media (max-width: 1399px) {
    html {
        font-size: 58%;
    }
}

/* ========== Large Tablets & Small Desktops (992px - 1199px) ========== */
@media (max-width: 1199px) {
    html {
        font-size: 55%;
    }
    
    section {
        padding: 10rem 5% 5rem;
    }
    
    .header {
        padding: 2rem 5%;
    }
}

/* ========== Tablets (768px - 991px) ========== */
@media (max-width: 991px) {
    html {
        font-size: 52%;
    }
    
    .header {
        padding: 2rem 3%;
    }
    
    section {
        padding: 10rem 3% 5rem;
    }
    
    /* Ajuste general de grids a 1 columna */
    .mision-content,
    .vision-content,
    .contacto-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    /* Títulos centrados en mobile */
    .mision-text h2,
    .vision-text h2 {
        text-align: center;
    }
}

/* ========== Mobile Landscape & Large Phones (576px - 767px) ========== */
@media (max-width: 767px) {
    html {
        font-size: 50%;
    }
    
    /* Botones full-width en mobile */
    .btn-group {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Grids de servicios y proyectos */
    .servicios-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }
    
    .proyectos-container {
        grid-template-columns: 1fr;
    }
    
    /* Footer a 1 columna */
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ========== Small Phones (320px - 575px) ========== */
@media (max-width: 575px) {
    html {
        font-size: 48%;
    }
    
    section {
        padding: 8rem 5% 4rem;
    }
}

/* ========== Extra Small Phones (450px and below) ========== */
@media (max-width: 450px) {
    html {
        font-size: 45%;
    }
    
    /* Logo más pequeño */
    .logo img {
        height: 100px;
    }
    
    /* Home adjustments */
    .home-img img {
        max-width: 80vw;
    }
    
    .home-content h1 {
        font-size: 3.5rem;
    }
    
    .home-content h3 {
        font-size: 2.4rem;
    }
    
    /* Social media wrap */
    .social-media {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Grid de servicios a 1 columna */
    .servicios-container {
        grid-template-columns: 1fr;
    }
    
    /* Iconos más pequeños en misión/visión */
    .mision-img i,
    .vision-img i {
        font-size: 10rem;
    }
    
    /* Scroll to top button más pequeño */
    .scroll-top {
        bottom: 2rem;
        right: 2rem;
        width: 4rem;
        height: 4rem;
        font-size: 2rem;
    }
    
    /* Footer social centered */
    .footer-social {
        justify-content: center;
    }
}

/* ========== Very Small Devices (320px and below) ========== */
@media (max-width: 320px) {
    html {
        font-size: 42%;
    }
    
    .home-content h1 {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* ========== Landscape Orientation ========== */
@media (max-height: 600px) and (orientation: landscape) {
    section {
        min-height: auto;
        padding: 8rem 9% 5rem;
    }
    
    .home {
        min-height: auto;
    }
    
    .home-img img {
        max-width: 30vw;
    }
}

/* ========== Print Styles ========== */
@media print {
    .header,
    .social-media,
    .btn,
    .btn-group,
    .scroll-top,
    .footer,
    #menu-icon {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    section {
        page-break-inside: avoid;
        min-height: auto;
    }
    
    .section-title {
        color: black;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* ========== High Resolution Displays (Retina) ========== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimizaciones para pantallas retina si es necesario */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ========== 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;
    }
    
    .float,
    .pulse,
    .rotate {
        animation: none !important;
    }
}

/* ========== Dark Mode (System Preference) ========== */
@media (prefers-color-scheme: dark) {
    /* Ya estamos en dark mode por defecto, pero podemos ajustar si es necesario */
}

/* ========== Light Mode (Si se implementa toggle) ========== */
@media (prefers-color-scheme: light) {
    [data-theme="light"] {
        /* Variables ya definidas en variables.css */
    }
}
