/* ============================================
   PALETA Y VARIABLES GLOBALES
   ============================================ */
:root {
    /* Colores principales de la paleta estándar */
    --color-vino: #9C1836;
    --color-rojo: #9C1836;
    --color-blanco: #FAF9FA;
    --color-negro: #000000;

    /* Grises */
    --color-gris-claro: #FAF9FA;
    /* Gris de fondo del header */
    --color-gris-medio: #B2AEAF;
    --color-gris-oscuro: #4A4A4A;
    --color-gris-tecla: #B2AEAF;
    --color-beige: #FAF9FA;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* FORMATO GLOBAL DE TEXTO */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    font-size: 16px;
    color: var(--color-negro);
    background-color: var(--color-blanco);
    overflow-x: hidden;
}


/* 🚀 Header con efecto glassmorphism - TEMA CLARO */
.header {
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;

    /* Fondo principal es GRIS CLARO con opacidad (Glassmorphism) */
    background: var(--color-gris-claro);
    opacity: 0.95;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease;
}

/* Capas de fondo y shimmer */
.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-gris-claro);
    z-index: -2;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(156, 24, 54, 0.05) 0%,
            transparent 50%,
            rgba(156, 24, 54, 0.05) 100%);
    pointer-events: none;
    animation: shimmer 3s infinite;
    z-index: -1;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.header-bg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: var(--color-gris-claro) !important;
    z-index: -3 !important;
}

/* Container específico del header */
.header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Disposición horizontal del logo y navegación */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    position: relative;
    z-index: 1;
}

/* 🔴 LÍNEA ROJA INFERIOR 🔴 */
.header-content::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 3px;
    background: var(--color-vino);
    z-index: 10;
}

/* 📌 ESTILOS DEL LOGO (MARCOS) */
.header .logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-negro);
    font-size: 1.6rem;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
}

.header .logo a i {
    font-size: 2rem;
    color: var(--color-rojo);
    animation: rotate 4s linear infinite;
    filter: drop-shadow(0 0 10px rgba(156, 24, 54, 0.5));
}

.header .logo-text {
    background: linear-gradient(135deg, var(--color-negro) 0%, var(--color-vino) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes rotate {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

/* ============================================
   NAVEGACIÓN PRINCIPAL Y HOVER
   ============================================ */
.header .nav-list {
    display: flex;
    list-style: none;
    gap: 1.2rem;
    align-items: center;
}

.header .nav-item a {
    color: var(--color-negro);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.05rem 1rem;
    white-space: nowrap;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
    overflow: hidden;
    border: 2px solid transparent;
    outline: none;
}

.header .nav-item a:hover {
    background: var(--color-blanco);
    color: var(--color-rojo);
    transform: translateY(-2px);
    border: 2px solid var(--color-rojo);
    box-shadow: 0 0 10px rgba(156, 24, 54, 0.8);
    outline: none;
}

.header .nav-item a i {
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--color-negro);
}

.header .nav-item a:hover i {
    transform: scale(1.2);
    color: var(--color-rojo);
}

/* ============================================
   DROPDOWN MENU
   ============================================ */
.header .dropdown {
    position: relative;
}

.header .dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: linear-gradient(135deg,
            var(--color-blanco) 0%,
            var(--color-beige) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 250px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 2px solid var(--color-rojo);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    list-style: none;
    padding: 0.8rem 0;
    z-index: 100;
}

.header .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.header .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.9rem 1.5rem;
    color: var(--color-negro);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
    border-radius: 8px;
    overflow: hidden;
}

.header .dropdown-menu a:hover {
    background: linear-gradient(90deg,
            rgba(156, 24, 54, 0.15) 0%,
            var(--color-beige) 100%);
    border: 1px solid var(--color-rojo);
    box-shadow: 0 0 8px rgba(156, 24, 54, 0.7);
    color: var(--color-rojo);
    padding-left: 2rem;
}

.header .dropdown-menu a i {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

/* ============================================
   BOTÓN MENÚ MÓVIL (HAMBURGER)
   ============================================ */
.header .menu-toggle {
    display: none;
    background: linear-gradient(135deg, var(--color-blanco) 0%, var(--color-beige) 100%);
    border: 2px solid var(--color-vino);
    border-radius: 8px;
    cursor: pointer;
    padding: 0.6rem;
    width: 50px;
    height: 50px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(156, 24, 54, 0.2);
}

.header .menu-toggle:hover {
    background: linear-gradient(135deg, var(--color-vino) 0%, var(--color-rojo) 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(156, 24, 54, 0.5);
}

.header .hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-negro);
    margin: 5px auto;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.header .menu-toggle:hover .hamburger {
    background: var(--color-blanco);
}

/* ... (resto de animaciones de menú móvil) ... */

.header .menu-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.header .menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.header .menu-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ============================================
   RESPONSIVE — TABLET Y MÓVIL
   ============================================ */

@media (max-width: 900px) {
    .header .nav-list {
        gap: 0.5rem;
    }

    .header .nav-item a {
        font-size: 0.85rem;
        padding: 0.05rem 0.6rem;
    }
}

@media (max-width: 768px) {

    /* Mostrar botón hamburger */
    .header .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Nav oculto por defecto en móvil */
    .header nav#nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--color-blanco);
        padding: 1rem;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
        z-index: 9998;
        overflow-y: auto;
        max-height: calc(100vh - 70px);
    }

    /* Nav visible cuando está abierto */
    .header nav#nav-menu.nav-open {
        display: block;
    }

    /* Lista vertical */
    .header .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
    }

    /* Links full-width */
    .header .nav-item a {
        font-size: 1rem;
        padding: 0.8rem 1rem;
        border-radius: 8px;
        justify-content: space-between;
        white-space: normal;
    }

    /* Dropdown estático en móvil */
    .header .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 3px solid var(--color-rojo) !important;
        border-radius: 0 !important;
        margin-top: 0.3rem;
        margin-left: 1rem;
        padding: 0.3rem 0;
        background: rgba(156, 24, 54, 0.04) !important;
        display: none;
        min-width: unset;
    }

    /* Dropdown se muestra al hacer hover/click en móvil */
    .header .dropdown:hover .dropdown-menu,
    .header .dropdown.open .dropdown-menu {
        display: block;
    }

    .header .dropdown-menu a {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .header .container {
        padding: 0 1rem;
    }

    .header-content {
        padding: 0.8rem 0;
    }

    .header .logo a {
        font-size: 1.2rem;
        gap: 8px;
    }

    .header .logo a img {
        max-height: 40px;
    }

    .header .menu-toggle {
        width: 42px;
        height: 42px;
    }

    .header nav#nav-menu {
        top: 60px;
        max-height: calc(100vh - 60px);
    }
}