/* ========================================
   HEADER / HERO SECTION
   Sección principal con fondo místico
   ======================================== */

.header {
    position: relative;
    background:
        linear-gradient(to bottom,
            rgba(10, 10, 10, 0.3) 0%,
            rgba(74, 26, 74, 0.5) 40%,
            rgba(10, 10, 10, 0.8) 80%,
            #0a0a0a 100%),
        url(../assets/imgs/fondo-header.webp);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    border-top: none;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    color: #f5f5f0;
    overflow: hidden;
    padding: 0 20px;
}

/* Logo de fondo místico */
.hero-bg-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url(../assets/logos/41.png.webp);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0.15;
    width: 70vmin;
    height: 70vmin;
    z-index: 1;
    pointer-events: none;
    border-radius: 50%;
    animation: brillar 4s ease-in-out infinite, rotarLento 60s linear infinite;
}

@keyframes rotarLento {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Contenedor principal */
.header .container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
}

/* Título principal */
.header .title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    font-family: var(--font-titulos);
    letter-spacing: 3px;
    text-shadow:
        2px 2px 10px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(212, 175, 55, 0.4);
    margin-bottom: 20px;
    line-height: 1.2;
    color: #fff;
    animation: aparecer 1s ease-out;
}

/* Subtítulo de contacto */
.header .contact-subtitle {
    text-transform: uppercase;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-family: var(--font-subtitulos);
    color: var(--color-dorado-antiguo);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    backdrop-filter: blur(15px);
    background: linear-gradient(135deg,
            rgba(10, 10, 10, 0.9),
            rgba(74, 26, 74, 0.7));
    z-index: 99;
    padding: 18px 35px;
    border-radius: 12px;
    max-width: 850px;
    margin: 20px auto;
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: var(--shadow-mistica);
    animation: aparecer 1.2s ease-out;
    line-height: 1.5;
}

/* Número de contacto */
.header .numero-contacto {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 25px;
    color: var(--color-dorado-suave);
    text-shadow:
        2px 2px 10px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(244, 208, 63, 0.6);
    font-weight: 700;
    letter-spacing: 2px;
    animation: aparecer 1.4s ease-out;
}

/* Botón CTA del header */
.header .btn-consultar {
    background: linear-gradient(135deg, var(--color-verde-esmeralda) 0%, var(--color-verde-brillante) 100%);
    color: #fff;
    padding: 22px 45px;
    font-weight: 700;
    border-radius: 15px;
    text-decoration: none;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 25px rgba(28, 115, 17, 0.4),
        0 0 30px rgba(30, 188, 90, 0.3);
    animation: aparecer 1.6s ease-out, pulse 3s infinite;
    border: 2px solid rgba(212, 175, 55, 0.4);
}

.header .btn-consultar:hover {
    background: linear-gradient(135deg, var(--color-verde-brillante) 0%, #28d65f 100%);
    transform: translateY(-5px) scale(1.08);
    box-shadow:
        0 12px 35px rgba(28, 115, 17, 0.6),
        0 0 40px rgba(30, 188, 90, 0.5),
        var(--shadow-mistica);
}

/* Efectos de partículas místicas (opcional) */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(74, 26, 74, 0.15) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
    animation: flotar 8s ease-in-out infinite;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 800px) {
    .header {
        min-height: 100vh;
        padding: 40px 20px;
    }

    .header .title {
        font-size: 2.8rem;
        letter-spacing: 2px;
    }

    .header .contact-subtitle {
        font-size: 1.3rem;
        padding: 15px 25px;
        letter-spacing: 1px;
    }

    .hero-bg-logo {
        width: 80vmin;
        height: 80vmin;
        opacity: 0.12;
    }
}

@media (max-width: 500px) {
    .header {
        min-height: 100vh;
        padding: 30px 15px;
    }

    .header .container {
        padding-top: 20px;
        gap: 20px;
    }

    .header .title {
        font-size: 2.3rem;
        letter-spacing: 1.5px;
    }

    .header .contact-subtitle {
        font-size: 1.1rem;
        padding: 12px 20px;
    }

    .header .numero-contacto {
        font-size: 1.6rem;
    }

    .header .btn-consultar {
        padding: 18px 32px;
        font-size: 1rem;
    }
}