/* RESET Y CONFIGURACIÓN BASE COMPLETAMENTE RESPONSIVE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-image: url(img/Fondo_bac.avif);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    font-size: clamp(14px, 2vw, 16px);
}

/* HEADER */
header {
    background-color: #004AAD;
    padding: 1rem 0;
    box-shadow: 0 3px 8px rgba(0, 195, 255, 0.822);
    position: sticky;
    z-index: 1000;
    width: 100%;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

.logo1 {
    width: clamp(120px, 15vw, 190px);
    height: auto;
    display: block;
}

/* Botón menú hamburguesa */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    z-index: 1001;
}

.menu-toggle:hover {
    color: #eebe2f;
}

.menu-toggle.active i {
    color: #eebe2f;
}

/* NAVEGACIÓN PRINCIPAL - ESCRITORIO */
nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 2vw, 2rem);
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(12px, 1.5vw, 15px);
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #eebe2f;
}

nav a h2 {
    margin: 0;
    padding: 0;
    font-size: clamp(12px, 1.5vw, 20px);
    line-height: 1.2;
}

/* Clases para página activa */
.selec_ini,
.selec_pro,
.selec_gale,
.selec_qs,
.selec_contac {
    color: #eebe2f;
    text-decoration: underline;
}

/* FOOTER */
footer {
    background-color: #004AAD;
    box-shadow: 0 -3px 8px rgba(0, 195, 255, 0.877);
    color: #eebe2f;
    padding: 3rem 0;
    margin-top: 4rem;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo2 {
    width: clamp(150px, 20vw, 190px);
    height: auto;
    margin-bottom: 1rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    border-bottom: 2px solid #eebe2f;
    padding-bottom: 0.5rem;
    width: 100%;
}

.footer-section h4 {
    margin-bottom: 0.5rem;
    font-weight: normal;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}

.eslogan-footer h4 {
    color: white;
}

/* BOTÓN WHATSAPP */
.btn-wasa {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: clamp(50px, 10vw, 70px);
    height: clamp(50px, 10vw, 70px);
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: clamp(1.5rem, 3vw, 2rem);
    transition: all 0.3s ease;
}

.btn-wasa:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

/* ANIMACIONES */
@keyframes entrada {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== PÁGINA PRODUCTOS ========== */
.nu-pro {
    text-align: center;
    color: #004AAD;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin: 3rem 1rem;
}

.product-section {
    margin: 2rem auto;
    padding: 2rem;
    background-color: #eeeeee;
    border-radius: 1.5rem;
    border-left: 6px solid #004AAD;
    border-right: 6px solid #004AAD;
    animation: entrada 0.8s ease;
    box-shadow: 0 -3px 10px #0084ff;
    transition: all 0.5s ease;
    max-width: 1200px;
    width: calc(100% - 2rem);
}

.product-section:hover {
    transform: translateY(-10px);
}

.product-section h1 {
    color: #004AAD;
    text-align: center;
    margin-bottom: 2rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.product-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
}

.product-img {
    flex: 1 1 300px;
    min-width: 250px;
}

.product-img img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 25px;
    border: 3px solid #004AAD;
    display: block;
    margin: 0 auto;
}

.product-text {
    flex: 2 1 300px;
    min-width: 250px;
}

.product-text p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.6;
    text-align: justify;
    padding: 0;
}

.ver-contacto-countainer {
    display: flex;
    justify-content: center;
    margin: 3rem 1rem;
}

.ver-contacto {
    background-color: #004AAD;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 40px;
    text-align: center;
    transition: all 0.3s ease;
    max-width: 300px;
    width: 100%;
    font-weight: bold;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.ver-contacto:hover {
    background-color: #002952;
    color: #eebe2f;
    transform: translateY(-3px);
}

/* ========== PÁGINA QUIENES SOMOS ========== */
.titu-qs {
    text-align: center;
    color: #004AAD;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin: 3rem 1rem;
}

.mision-vision-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem auto 4rem;
    padding: 0 1rem;
    max-width: 1200px;
}

.cuadro-somos, .cuadro-mision, .cuadro-vision {
    background-color: #eeeeee;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    border-left: 6px solid #004AAD;
    border-right: 6px solid #004AAD;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s ease;
    animation: entrada 0.8s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cuadro-somos:hover, .cuadro-mision:hover, .cuadro-vision:hover {
    transform: translateY(-10px);
}

.cuadro-somos h1, .cuadro-mision h1, .cuadro-vision h1 {
    color: #004AAD;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.cuadro-somos h1::after, .cuadro-mision h1::after, .cuadro-vision h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #004AAD;
    border-radius: 2px;
}

.cuadro-somos p, .cuadro-mision p, .cuadro-vision p {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.6;
    flex: 1;
}

/* ========== PÁGINA CONTACTO ========== */
.contacto-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.titulo-cs {
    color: #004AAD;
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin: 3rem 1rem 2rem;
}

.contacto-subtitulo {
    text-align: center;
    color: #333;
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 0 auto 3rem;
    max-width: 1200px;
}

.contacto-n, .direccion-n, .redes {
    background: white;
    border-left: 6px solid #004AAD;
    border-right: 6px solid #004AAD;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    animation: entrada 0.8s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.contacto-n:hover, .direccion-n:hover, .redes:hover {
    transform: translateY(-5px);
}

.contacto-n h1, .direccion-n h1, .redes h1 {
    color: #004AAD;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    width: 100%;
}

.contacto-n h2, .direccion-n h2, .redes h2 {
    text-align: center;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin: 1rem 0;
    line-height: 1.6;
    color: #333;
}

.numero-contacto {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: #000000;
    font-weight: bold;
    margin: 1rem 0;
    padding: 0.5rem;
    width: 100%;
    word-break: break-word;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    width: 100%;
}

.facebook, .tiktok {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.facebook a, .tiktok a {
    display: flex;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.facebook a {
    background-color: #004AAD;
    color: white;
}

.tiktok a {
    background-color: #000000;
    color: white;
}

.facebook a:hover {
    background-color: #0400ff;
    transform: scale(1.1);
}

.tiktok a:hover {
    background-color: #ffffff;
    color: #000000;
    transform: scale(1.1);
}

iframe {
    width: 100%;
    height: 250px;
    border: 0;
    border-radius: 10px;
    margin-top: 1rem;
}

/* ========== PÁGINA GALERÍA ========== */
.galeria-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.titulo-g {
    color: #004AAD;
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.5rem);
    padding: 0 1rem;
    margin: 2rem 0 1rem;
    animation: entrada 0.8s ease;
}

.descripcion-galeria {
    text-align: center;
    color: #333;
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    padding: 0 1rem;
}

/* FILTROS DE CATEGORÍAS */
.filtros-categorias {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.filtro-btn {
    background-color: #eeeeee;
    color: #004AAD;
    border: 2px solid #004AAD;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filtro-btn:hover,
.filtro-btn.active {
    background-color: #004AAD;
    color: white;
    transform: translateY(-2px);
}

/* GALERÍA DE IMÁGENES */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
    padding: 0 1rem;
}

.item-galeria {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    aspect-ratio: 4/3;
    background-color: #f5f5f5;
    animation: entrada 0.8s ease;
}

.item-galeria:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 74, 173, 0.2);
}

.galeria-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.item-galeria:hover .galeria-img {
    transform: scale(1.1);
}

/* MODAL PARA VISUALIZACIÓN DE IMÁGENES */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-contenido {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-cerrar {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s ease;
    z-index: 2001;
}

.modal-cerrar:hover {
    color: #eebe2f;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2001;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #eebe2f;
}

.modal-anterior {
    left: 20px;
}

.modal-siguiente {
    right: 20px;
}

.modal-info {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1.1rem;
}

/* ========== MEDIA QUERIES ========== */

/* Tablets y móviles grandes */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #004AAD;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        padding: 80px 1rem 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
    }
    
    nav.active {
        right: 0;
    }
    
    nav.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    nav li {
        width: 100%;
    }
    
    nav a {
        width: 100%;
        padding: 1rem 1.5rem;
        text-align: left;
        border-radius: 8px;
        background-color: rgba(255, 255, 255, 0.1);
        font-size: 1rem;
    }
    
    nav a h2 {
        font-size: 1.1rem;
    }
    
    .top-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo1 {
        width: clamp(100px, 20vw, 150px);
    }
    
    .product-content {
        flex-direction: column;
        text-align: center;
    }
    
    .product-text p {
        text-align: center;
    }
    
    .btn-wasa {
        width: 70px;
        height: 70px;
        bottom: 2rem;
        right: 2rem;
        font-size: 2.5rem;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .modal-anterior {
        left: 10px;
    }
    
    .modal-siguiente {
        right: 10px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .product-section {
        padding: 1.5rem 1rem;
    }
    
    .mision-vision-container,
    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .galeria-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filtros-categorias {
        gap: 0.5rem;
    }
    
    .filtro-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .logo2 {
        width: 160px;
    }
    
    .btn-wasa {
        width: 60px;
        height: 60px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 2rem;
    }
    
    .modal-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .modal-cerrar {
        font-size: 2rem;
        top: -35px;
    }
}

/* Pantallas muy grandes */
@media (min-width: 1200px) {
    .container,
    .footer-container,
    .contacto-container,
    .galeria-container {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .galeria-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}