/* =========================================
   1. VARIABLES Y RESET GENERAL
   ========================================= */
:root {
    --rojo-gromar: #C30000;
    --rojo-oscuro: #990000;
    --azul-marino: #1A2B3C;
    --blanco: #ffffff;
    --gris-fondo: #F4F6F8;
    --texto-oscuro: #333333;
    --sombra: 0 4px 6px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--texto-oscuro);
    background-color: var(--blanco);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* =========================================
   2. CABECERA Y NAVEGACIÓN
   ========================================= */
header {
    background-color: var(--blanco);
    border-bottom: 3px solid var(--rojo-gromar);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.sticky {
    box-shadow: var(--sombra);
    padding: 5px 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo {
    height: 70px;
    transition: height 0.3s;
}

header.sticky .logo {
    height: 55px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--azul-marino);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--rojo-gromar);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--azul-marino);
    transition: 0.3s;
}

/* =========================================
   3. SECCIONES Y TEXTOS
   ========================================= */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--azul-marino);
    margin-bottom: 40px;
}

.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--rojo-gromar);
    margin: 10px auto 0;
}

.fondo-gris {
    background-color: var(--gris-fondo);
}

/* =========================================
   4. PORTADA (HERO PANORÁMICO)
   ========================================= */
.banner-panoramico {
    margin-top: 90px;
    background-image: url('fotos/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 80vh;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 43, 60, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--blanco);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.badge-experiencia {
    background: var(--rojo-gromar);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 20px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(195, 0, 0, 0.4);
}

/* =========================================
   5. BOTONES
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    border: 2px solid transparent;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--rojo-gromar);
    color: var(--blanco);
}

.btn-primary:hover {
    background-color: var(--rojo-oscuro);
}

.btn-secondary {
    background-color: transparent;
    color: var(--blanco);
    border-color: var(--blanco);
}

.btn-secondary:hover {
    background-color: var(--blanco);
    color: var(--azul-marino);
}

/* =========================================
   6. GALERÍA DE INSTALACIONES (MOSAICO)
   ========================================= */
.galeria-proceso {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    grid-auto-rows: 250px;
}

.galeria-proceso .foto-grande {
    grid-column: span 2;
    grid-row: span 2;
}

.item-galeria {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--sombra);
}

.item-galeria img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.item-galeria:hover img {
    transform: scale(1.1);
}

.capa-texto {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(26, 43, 60, 0.9), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.item-galeria:hover .capa-texto {
    transform: translateY(0);
}

.capa-texto h3 {
    margin-bottom: 5px;
    color: var(--blanco);
}

/* =========================================
   7. CATÁLOGO PRODUCTOS (EFECTO NETFLIX)
   ========================================= */
.grid-productos-ampliado {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.tarjeta-producto {
    background: var(--blanco);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: transform 0.3s;
    cursor: pointer;
}

.tarjeta-producto:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.media-container {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #000;
}

.img-producto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
    display: block;
}

.video-producto {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.tarjeta-producto:hover .img-producto {
    opacity: 0;
}

.tarjeta-producto:hover .video-producto {
    opacity: 1;
}

.info-producto {
    padding: 15px;
    text-align: center;
}

.info-producto h3 {
    color: var(--rojo-gromar);
    font-size: 1.2rem;
}

/* =========================================
   8. CONTACTO Y FORMULARIO
   ========================================= */
.flex-row {
    display: flex;
    gap: 40px;
    align-items: stretch;
}

.form-container, .datos-contacto {
    flex: 1;
    background: var(--blanco);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--sombra);
}

form input, form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
}

.w-100 {
    width: 100%;
    cursor: pointer;
}

.info-real h3 {
    color: var(--rojo-gromar);
    margin-bottom: 20px;
}

.info-real p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.info-real a {
    color: var(--azul-marino);
    text-decoration: none;
    font-weight: bold;
}

/* =========================================
   9. FOOTER Y WHATSAPP FLOTANTE
   ========================================= */
footer {
    background-color: var(--azul-marino);
    color: white;
    text-align: center;
    padding: 20px 0;
}

.whatsapp-flotante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.3s;
}

.whatsapp-flotante:hover {
    transform: scale(1.1);
}

/* =========================================
   10. AVISO LEGAL Y COOKIES
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: -150%; 
    left: 0;
    width: 100%;
    background-color: var(--azul-marino);
    color: var(--blanco);
    padding: 20px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.3);
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: bottom 0.5s ease-in-out;
}

.cookie-banner.mostrar {
    bottom: 0;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    max-width: 75%;
}

.cookie-botones {
    display: flex;
    gap: 15px;
    align-items: center;
}

.enlace-cookies {
    color: #ccc;
    text-decoration: underline;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.enlace-cookies:hover {
    color: var(--rojo-gromar);
}

/* =========================================
   11. RESPONSIVE (MÓVILES Y TABLETS)
   ========================================= */
@media (max-width: 768px) {
    .flex-row {
        flex-direction: column;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .galeria-proceso .foto-grande {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    #nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--blanco);
        box-shadow: var(--sombra);
    }
    
    #nav-menu.activo {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    nav ul li {
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    
    nav a {
        display: block;
        padding: 15px;
    }

    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .cookie-banner p {
        max-width: 100%;
    }
}