:root {
    /* Backgrounds */
    --bg-main: #F6F6F6;
    --bg-soft: #ECECEC;
    --bg-strong: #DADADA;
    --bg-white: #FFFFFF;

    /* Text */
    --text-primary: #1E1E1E;
    --text-secondary: #5F5F5F;
    --text-muted: #8A8A8A;

    /* Accent */
    --accent-primary: #4DB6AC;
    --accent-soft: #CFEDEA;
    --accent-hover: #3A9D94;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glas-border: rgba(77, 182, 172, 0.25);
    --glass-blur: blur(12px);

    /* States */
    --color-error: #D64545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}

.main-content {
    flex: 1;
}

/* ==== HEADER (Espacio exterior) ==== */
.header-wrapper {
    position: fixed;
    top: 0;
    background: var(--bg-white);
    width: 100%;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.header-wrapper.scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 2px solid var(--glas-border);
}

/* ==== HEADER (Glass Central) ==== */
.main-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 70px;
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 35px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
    transition: color 0.3s ease;
    padding-bottom: 6px;
}

/* Hover */
.nav-menu a:hover {
    color: var(--accent-primary);
}

/* Página activa (Inicio default) */
.nav-menu a.active {
    color: var(--accent-primary);
    font-weight: 600;
}

.nav-menu a.active::after {
    content: '';
    display: block;
    height: 2px;
    width: 100%;
    background-color: transparent;
}

/* Hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background-color: var(--color-error);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background-color: var(--color-error);
}

/* ==== FOOTER (Primary) ==== */
.footer-primary {
    background-color: #243532;
    color: var(--bg-white);
    padding: 50px 5%;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
    align-items: start;
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-weight: 600;
    color: var(--bg-white);
}

.footer-logo {
    display: block;
    margin: 0 auto;
    height: 130px;
}

/* ENLACES (línea separadora) */
.footer-links .footer-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 40px;
    font-size: 0.95rem;
}

.footer-links .footer-items a:nth-child(odd) {
    text-align: center;
}

.footer-links .footer-items a:nth-child(even) {
    text-align: center;
}

.footer-items {
    flex-direction: column;
}

.footer-items a {
    display: inline-block;
    text-decoration: none;
    color: #CFC7B3;
    transition: color 0.3s ease;
    white-space: nowrap;
    padding: 0;
    line-height: 1;
}

.footer-items a:hover {
    color: var(--accent-soft);
}

.footer-description {
    margin-top: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #CFC7B3;
}

.footer-legal {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: center;
    gap: 25px;
    font-size: 0.85rem;
}

.footer-legal a {
    color: var(--accent-soft);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--accent-primary);
}

/* Cookies */
.cookie-banner {
    position: fixed;
    bottom: -150px;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    color: var(--bg-white);
    padding: 1rem 2rem;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: bottom 0.5s ease;
    z-index: 9999;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-banner p {
    margin: 0;
    flex: 1;
}

.cookie-banner button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background-color: #C46A5A;
    color: var(--bg-white);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.cookie-banner button:hover {
    background-color: #B56C4F;
}

/* Legal pages */
.title-legal {
    font-size: 2.6rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
}

.title-legal:after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin: 1.5rem auto 0;
    background-color: var(--accent-primary);
    opacity: 0.4;
}

.subtitle-legal {
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1.4rem;
    text-align: justify;
    color: var(--text-muted);
}

.legal-content {
    flex: 1;
    background-color: #ffffff;
    max-width: 900px;
    margin: 5rem auto;
    border-radius: 0 0 20px 20px;
    padding: 100px 5%;
}

/* ==== TABLET ==== */
@media (max-width: 1024px) {
    .main-header {
        width: 94%;
        margin: 9 3%;
        padding: 14px 25px;
    }

    .nav-menu {
        gap: 20px;
        margin-right: 35px;
    }
}

/* ==== MÓVIL ==== */
@media (max-width: 780px) {
    .header-wrapper {
        top: 0;
    }

    .main-header {
        width: 100%;
        margin: 0;
        border-radius: 0;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding-left: 20px;
        padding: 25px 0;

        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);

        border-bottom: 1px solid var(--glass-border);

        display: none;
    }

    .nav-menu.open {
        display: flex;
    }

    .menu-toggle {
        display: flex;
        margin-right: 20px;
    }

    .footer-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .footer-col {
        width: 100%;
        text-align: center;
    }

    .footer-links .footer-items {
        grid-template-columns: 1fr;
    }

    .legal-content  {
        margin: 3rem auto;
        padding: 60px 7%;
        border-radius: 0;
    }
}