﻿/* ===========================================
   ASOGROVALLE - Estilos Responsivos
   =========================================== */

/* Dispositivos grandes (laptops, 992px y más) */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
        padding: 0 15px;
    }
    
    .display-4 {
        font-size: 3rem;
    }
}

/* Tablets (768px a 991px) */
@media (max-width: 991.98px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .hero-section {
        padding: 80px 0;
    }
    
    .navbar-nav {
        padding-top: 15px;
        text-align: center;
    }
    
    .nav-link {
        margin: 5px 0;
        display: inline-block;
    }
    
    #themeToggle {
        margin-top: 10px;
        width: 100%;
    }
}

/* Tablets pequeñas (576px a 767px) */
@media (max-width: 767.98px) {
    .display-4 {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-lg {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Tablas responsivas */
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 10px 8px;
    }
    
    /* Equipo en columna única */
    .team-card {
        margin-bottom: 30px;
    }
    
    /* Formulario de contacto */
    .contact-info {
        margin-bottom: 30px;
    }
}

/* Teléfonos (menos de 576px) */
@media (max-width: 575.98px) {
    body {
        padding-top: 70px;
    }
    
    .display-4 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-title::after {
        width: 60px;
    }
    
    .hero-section {
        padding: 50px 0;
    }
    
    .brand-text {
        font-size: 1.2rem;
    }
    
    .logo-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .logo-placeholder i {
        font-size: 1.4rem;
    }
    
    /* Tarjetas más compactas */
    .card {
        margin-bottom: 20px;
    }
    
    .icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .icon-wrapper i {
        font-size: 2rem !important;
    }
    
    /* Tabla scroll horizontal */
    .table-responsive {
        margin: 0 -15px;
        width: calc(100% + 30px);
    }
    
    /* Footer ajustado */
    .footer {
        text-align: center;
    }
    
    .social-links {
        margin-top: 15px;
    }
    
    .social-links a {
        margin: 0 10px;
    }
    
    /* Botones más pequeños */
    .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Teléfonos muy pequeños (menos de 400px) */
@media (max-width: 400px) {
    .display-4 {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .img-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .img-placeholder i {
        font-size: 2.5rem;
    }
}

/* Orientación landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0;
        min-height: auto;
    }
    
    .display-4 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .lead {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .navbar {
        padding: 10px 0;
    }
}

/* Alturas específicas para hero */
@media (max-height: 700px) {
    .hero-section {
        min-height: 100vh;
        display: flex;
        align-items: center;
    }
}

/* Impresión */
@media print {
    .navbar,
    .footer,
    .btn,
    #themeToggle,
    .hero-image,
    .social-links {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        color: #000;
        background: white !important;
    }
    
    .container {
        max-width: 100%;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .table {
        break-inside: avoid;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    .hero-section {
        background: white !important;
        color: #000 !important;
        padding: 20px 0 !important;
    }
    
    .text-highlight {
        color: #000 !important;
    }
    
    .text-highlight::after {
        display: none;
    }
}

/* Modo alta contrast */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #004400;
        --secondary-color: #006600;
        --accent-color: #cc6600;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
    
    .nav-link {
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
}

/* Modo reducido de movimiento */
@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-image {
        animation: none !important;
    }
    
    .card:hover {
        transform: none !important;
    }
}

/* Pantallas 4K y grandes */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .display-4 {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .lead {
        font-size: 1.3rem;
    }
    
    .card-text {
        font-size: 1.1rem;
    }
}

/* Ajustes específicos para iPad Pro */
@media (width: 1024px) and (height: 1366px) {
    .hero-section {
        padding: 120px 0;
    }
    
    .display-4 {
        font-size: 3.5rem;
    }
}

/* Ajustes para Surface Duo y dispositivos plegables */
@media (width: 540px) and (height: 720px) {
    .hero-section {
        padding: 80px 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

/* Soporte para grid en navegadores antiguos */
@supports not (display: grid) {
    .row {
        display: flex;
        flex-wrap: wrap;
    }
    
    .col-md-4 {
        width: 33.333%;
        padding: 15px;
    }
    
    @media (max-width: 768px) {
        .col-md-4 {
            width: 100%;
        }
    }
}
