:root {
    --color-base: #f9f9f7;
    --color-acento: #7ed6c2;
    --color-secondary: #232f34;
    --color-acento-dark: #5ebaa7;
    --color-background: #f5f5f5;
    --color-gris: #666666;
    --color-negro: #111111;
    --color-alerta: #e53935;

    --glass-border: rgba(0, 0, 0, 0.8);
}

* {
    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(--color-background);
    color: var(--color-negro);
    font-family: 'Poppins', sans-serif;
}

.main-content {
    flex: 1;
}

/* ==== HEADER (Espacio exterior) ==== */
.header-wrapper {
    position: fixed;
    top: 0;
    background: var(--color-base);
    width: 100%;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.header-wrapper.scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* ==== HEADER (Glass Central) ==== */
.main-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    margin: 10px auto;
}

.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(--color-negro);
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
    transition: color 0.3s ease;
    padding-bottom: 6px;
}

/* Hover */
.nav-menu a:hover {
    color: var(--color-acento);
}

/* Página activa (Inicio default) */
.nav-menu a.active {
    color: var(--color-acento);
    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(--color-secondary);
    border-radius: 2px;
    transition: 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background-color: var(--color-acento);
}

.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-acento);
}

/* ==== FOOTER (Primary) ==== */
.footer-primary {
    background-color: var(--color-secondary);
    color: #e6e6e3;
    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(--color-blanco);
}

.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: #e6e6e3;
    transition: color 0.3s ease;
    white-space: nowrap;
    padding: 0;
    line-height: 1;
}

.footer-items a:hover {
    color: var(--color-acento);
}

.footer-description {
    margin-top: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #bfc7c4;
}

.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(--color-acento);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--color-base);
}

/* ==== 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;
    }
}