/* ==========================================================================
   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;
}

* {
    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;
}

/* ==========================================================================
   DESACOPLAMIENTO DE BANNERS / CORRECCIÓN SUPERPOSICIÓN IUBENDA
   ========================================================================== */
main.legal-page {
    padding-top: 150px;
    padding-bottom: 60px;
    min-height: calc(100vh - 120px);
}

main.legal-page .wrap {
    max-width: 1100px; /* Ancho optimizado para lectura cómoda */
}

/* Marco elegante tipo tarjeta */
.iubenda-frame-wrapper {
    width: 100%;
    height: 80vh; /* Ocupa el 80% del alto útil de la pantalla */
    min-height: 700px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e8e3da;
    box-shadow: 0 12px 32px rgba(18, 20, 24, 0.06);
    overflow: hidden;
    position: relative;
}

/* Iframe sin bordes con renderizado suave */
.iubenda-frame-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #ffffff;
}

/* RESPONSIVE */
@media (max-width: 980px) {
    main.legal-page {
        padding-top: 165px;
    }

    .iubenda-frame-wrapper {
        height: 75vh;
        min-height: 550px;
        border-radius: 14px;
    }
}

@media (max-width: 520px) {
    main.legal-page {
        padding-top: 180px;
        padding-bottom: 30px;
    }

    .iubenda-frame-wrapper {
        height: 70vh;
        min-height: 480px;
    }
}

/* ==========================================================================
   2. BANNER NOTIFICACIONES
   ========================================================================== */
.bannerino {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #d90429;
    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: 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; /* Compensación por el bannerino */
    position: relative;
}

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

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

.st-nav a {
    position: relative;
    padding: 6px 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%;
}

.hamburger {
    display: none;
    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);
    border-radius: 2px;
}

/* ==========================================================================
   4. ESTRUCTURA PÁGINA LEGAL & EMBEBIDO IUBENDA
   ========================================================================== */
main {
    padding-top: 160px; /* Evita que la cabecera fija tape el contenido */
    min-height: calc(100vh - 120px);
}

main h1 {
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    margin-bottom: 24px;
    color: var(--text);
}

.iubenda-container {
    background: var(--paper);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

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

.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;
}

/* ==========================================================================
   6. RESPONSIVE MÓVIL
   ========================================================================== */
@media (max-width: 980px) {
    .hamburger {
        display: flex !important;
    }

    .st-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 20px;
        gap: 15px;
        border-bottom: 2px solid var(--line);
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        z-index: 99;
    }

    .st-nav.active {
        display: flex !important;
    }

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

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

    .nav {
        margin-top: 60px;
    }

    main {
        padding-top: 175px;
    }
}
