/* ============================================
   CONCALAB-UASD - Estilos Responsive
   ============================================ */

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }

    /* Solución para problemas de fondo fijo en iOS (iPhone/iPad) */
    .hero {
        background-attachment: scroll;
    }

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

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-menu {
        gap: 0.3rem;
    }

    .nav-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.95rem;
    }
}

/* Tablets pequeñas y móviles grandes (481px - 768px) */
@media (max-width: 768px) {
    /* Tipografía responsive */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    /* Header y navegación móvil */
    .header-container {
        padding: 1rem;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-main {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 2rem 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    .nav-main.active {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link {
        width: 100%;
        padding: 1rem;
    }

    /* Dropdown móvil */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
        margin: 0;
        background-color: var(--bg-light);
    }

    .nav-item.dropdown.active .dropdown-menu {
        max-height: 500px;
        padding: 0.5rem 0;
    }

    .dropdown-menu .nav-link {
        padding-left: 2rem;
    }

    /* Buscador móvil */
    .search-container {
        width: 100%;
        margin-top: 1rem;
    }

    .search-input {
        width: 100%;
    }

    .search-input:focus {
        width: 100%;
    }

    /* Hero section móvil */
    .hero {
        padding: 120px 0 80px;
        margin-top: 70px;
    }

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

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

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Grids responsive */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Cards */
    .card {
        padding: 1.5rem;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Logo */
    .logo img {
        height: 50px;
    }

    .logo-title {
        font-size: 1.2rem;
    }

    .logo-subtitle {
        font-size: 0.75rem;
    }
}

/* Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    .section {
        padding: 40px 0;
    }

    .hero {
        padding: 100px 0 60px;
    }

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

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

    .card {
        padding: 1.25rem;
    }

    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .footer {
        padding: 30px 0 15px;
    }

    .logo-text {
        display: none;
    }
}

/* Overlay para menú móvil */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Tablets en orientación landscape */
@media (max-width: 1024px) and (orientation: landscape) {
    .hero {
        padding: 100px 0 60px;
    }

    .section {
        padding: 60px 0;
    }
}

/* Impresión */
@media print {
    .header,
    .footer,
    .search-container,
    .menu-toggle,
    .btn {
        display: none;
    }

    .hero {
        margin-top: 0;
        padding: 2rem 0;
    }

    .section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

