/* ==========================================================================
   1. VARIABLES & REGLAS BASE
   ========================================================================== */
:root {
    --bg: #fbfaf7;
    --paper: #ffffff;
    --text: #121418;
    --muted: #5a616e;
    --line: #e8e3da;

    --wine: #6f0c18;
    --wine-2: #8d1020;
    --honey: #c89b1a;

    --radius: 18px;
    --shadow: 0 18px 40px rgba(18, 20, 24, .14);
    --max: 1200px;

    /* Formulario */
    --form-border: rgba(18, 20, 24, .22);
    --form-border-focus: rgba(200, 155, 26, .85);
    --form-field: #ffffff;
    --form-yellow: #f4b400;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: "Lato", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 22px;
}

/* ==========================================================================
   2. BANNER NOTIFICACIONES
   ========================================================================== */
.bannerino {
 position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: red;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bannerino p {
    font-size: 11px;
    color: #ffffff;
    text-align: center;
    padding: 0 15px;
    line-height: 1.3;
}


/* ==========================================================================
   3. CABECERA & NAVEGACIÓN
   ========================================================================== */


header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(251, 250, 247, .95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}

.nav {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 50px; /* Compensación por el bannerino */
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

/* Navegación Desktop */
.st-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 1rem;
    font-weight: 700;
    margin-left: auto;
}

.st-nav a {
    position: relative;
    padding: 8px 0;
    color: var(--text);
}

.st-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--wine);
    transition: width 0.25s ease;
}

.st-nav a:hover::after {
    width: 100%;
}

/* Botón Hamburguesa */
.hamburger {
    display: none; /* Oculto en PC */
    flex-direction: column;
    justify-content: space-between;
    width: 44px;
    height: 40px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(18, 20, 24, .15);
    background: var(--paper);
    cursor: pointer;
    z-index: 60;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text);
    transition: all 0.3s ease;
}

/* ==========================================================================
   4. HERO (INICIO Y CHI SIAMO)
   ========================================================================== */
.hero {
    min-height:100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: stretch;
    padding-top: 122px; /* Banner + Header */
    overflow: hidden;
}

#home.hero {
    min-height: 100vh;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(18, 20, 24, .58) 0%, rgba(18, 20, 24, .42) 55%, rgba(18, 20, 24, .30) 100%),
        url("/img/hero.jpeg");
    background-size: cover;
    background-position: center;
}

.hero-inner {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 0;
}

.hero-copy {
    width: 100%;
    max-width: 980px;
    text-align: center;
    margin: 0 auto;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .86);
    margin: 0 auto 14px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: var(--honey);
    box-shadow: 0 0 0 6px rgba(200, 155, 26, .20);
}

.hero h1 {
    color: #fff;
    font-size: 56px;
    line-height: 1.04;
    letter-spacing: -.02em;
    margin: 0 auto 14px;
    max-width: 22ch;
}

.hero p {
    color: rgba(255, 255, 255, .86);
    font-size: 16px;
    max-width: 72ch;
    margin: 0 auto 18px;
}

/* Botones Responsive Hero */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px auto 0;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.cta, .ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 15px;
    text-align: center;
    transition: all 0.25s ease;
}

.cta {
    background: linear-gradient(180deg, var(--wine-2), var(--wine));
    color: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 12px 26px rgba(111, 12, 24, .22);
}

.ghost {
    color: #fff;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .22);
}

.ghost:hover {
    background: rgba(255, 255, 255, .18);
}


/* ==========================================================================
   5. SECCIONES GENERALES & TARJETAS
   ========================================================================== */
section {
    padding: 76px 0;
    border-top: 1px solid var(--line);
    background: var(--bg);
}

.section-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 22px;
    text-align: center;
}

.section-head h2 {
    font-size: 28px;
    letter-spacing: -.01em;
}

.divider {
    height: 10px;
    border-radius: 99px;
    background: linear-gradient(90deg,
            rgba(111, 12, 24, .00) 0%,
            rgba(111, 12, 24, .16) 30%,
            rgba(200, 155, 26, .18) 70%,
            rgba(200, 155, 26, .00) 100%);
    margin: 18px 0 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 18px;
}


.card {
    background: var(--paper);
    border: 1px solid rgba(232, 227, 218, .95);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(18, 20, 24, .08);
    display: flex;
    flex-direction: column;
    min-height: 520px;
}

.card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 18px 10px;
}

.icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(111, 12, 24, .08);
    border: 1px solid rgba(111, 12, 24, .14);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.card-title {
    font-weight: 900;
    font-size: 22px;
}

.card-sub {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.card-body {
    padding: 0 18px 18px;
    color: var(--muted);
    font-size: 14px;
}



.card-media {
    width: 100%;
    flex: 1 1 auto;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   6. CHI SIAMO (GRID 2 COLUMNAS)
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
}

.about-media {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(18, 20, 24, .08);
    border: 1px solid rgba(232, 227, 218, .95);
    background: var(--paper);
}

.about-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.about-copy h2 {
    font-size: 30px;
    margin-bottom: 12px;
}

.about-copy p {
    color: var(--muted);
    font-size: 15px;
    margin-top: 10px;
}

.about-copy ul {
    margin-top: 14px;
    padding-left: 18px;
    color: var(--muted);
    font-size: 15px;
    display: grid;
    gap: 8px;
}
/* ==========================================================================
   8. FOOTER
   ========================================================================== */
footer {
    border-top: 1px solid var(--line);
    background: #f6f3ec;
    padding: 26px 0;
}

.foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.foot > div {
    width: 100%;
}

.foot a {
    color: var(--muted);
    text-decoration: underline;
}


/* ==========================================================================
   7. FOOTER
   ========================================================================== */
footer {
    border-top: 1px solid var(--line);
    background: #f6f3ec;
    padding: 26px 0;
}

.foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.foot > div {
    width: 100%;
}

.foot a {
    color: var(--muted);
    text-decoration: underline;
}


/* ==========================================================================
   8. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */

@media (max-width: 980px) {
    /* Mostrar el botón hamburguesa */
    .hamburger {
        display: flex;
    }

    /* Ocultar menú normal y convertirlo en desplegable flotante */
    .st-nav {
        display: none; /* Se oculta por defecto en móvil */
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: calc(72px + 50px); /* Debajo del Header + Banner */
        left: 0;
        right: 0;
        background: var(--paper);
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        z-index: 49;
    }

    /* Clase activa que conmuta el JS */
    .st-nav.active {
        display: flex;
    }

    .st-nav a {
        width: 100%;
        font-size: 18px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    /* Disminución de títulos y grillas */
    .hero h1 {
        font-size: 40px;
    }

    .cards {
        grid-template-columns: 1fr; /* Una sola columna en móvil/tablet */
    }
}

@media (max-width: 520px) {
    .bannerino {
        height: 60px;
    }

    .bannerino p {
        font-size: 10px;
    }

    .nav {
        margin-top: 60px;
    }

    .st-nav {
        top: calc(72px + 60px);
    }

    .hero h1 {
        font-size: 30px;
    }

    .cta, .ghost {
        width: 100%;
        text-align: center;
    }
}


/* ==========================================================================
   CABECERA & HAMBURGUESA
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(251, 250, 247, .95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.nav {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 50px; /* Espacio por el bannerino */
    position: relative;
}

.brand img {
    height: 48px;
    width: auto;
}

.st-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 700;
}

.hamburger {
    display: none; /* Oculto en ordenadores */
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    cursor: pointer;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--text, #121418);
    border-radius: 2px;
}


/* ==========================================================================
   RESPONSIVE (MÓVIL Y TABLET)
   ========================================================================== */
@media (max-width: 980px) {
    .hamburger {
        display: flex !important; /* Fuerza la aparición de la hamburguesa */
    }

    .st-nav {
        display: none; /* Oculto en móvil hasta activar */
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 72px; /* Se despliega justo debajo del header */
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 20px;
        gap: 15px;
        border-bottom: 2px solid var(--line, #e8e3da);
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        z-index: 99;
    }

    /* Regla clave que abre el menú */
    .st-nav.active {
        display: flex !important;
    }

    .st-nav a {
        width: 100%;
        padding: 10px 0;
        font-size: 18px;
        border-bottom: 1px solid #f0f0f0;
    }
}


/* ==========================================================================
   ESPACIADO PARA PÁGINAS LEGALES Y TEXTUALES
   ========================================================================== */

/* 1. Margen superior dinámico para evitar que el Header o Banner tapen el texto */
main {
    padding-top: 160px; /* Garantiza espacio libre debajo de la cabecera fija */
}

/* 2. Título principal fluido (se ajusta solo según el ancho de pantalla) */
main h1 {
    font-size: clamp(1.2rem, 3.5vw, 2rem); /* Fluido entre 19px en móvil y 32px en PC */
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 24px;
    text-align: left;
    color: var(--text);
    word-break: break-word;
}

/* 3. Subtítulos con espaciado amplio entre secciones */
main h2 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-top: 40px;    /* Espacio amplio ANTES del punto/sección */
    margin-bottom: 16px; /* Espacio cómodo DESPUÉS del punto */
    line-height: 1.3;
    color: var(--text);
}

main h3 {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--text);
}

/* 4. Párrafos legibles y separados */
main p {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 18px; /* Separación entre párrafos */
    color: var(--muted, #5a616e);
}

/* 5. Listas de puntos espaciadas */
main ul {
    margin-top: 10px;
    margin-bottom: 24px;
    padding-left: 24px;
}

main ul li {
    margin-bottom: 10px; /* Separación entre cada ítem del listado */
    line-height: 1.5;
    color: var(--muted, #5a616e);
}

/* 6. Ajustes de seguridad para pantallas móviles muy estrechas */
@media (max-width: 768px) {
    main {
        padding-top: 175px; /* Da margen extra si el banner rojo ocupa 2 o 3 líneas */
    }
}

