@charset "utf-8";

/*==============================================================
  layout.css — Estilos exclusivos de Header, Navegación y Footer
  Extraído de main.css para facilitar el mantenimiento.
  Editando este archivo afectas al menú y footer en todos las páginas.
==============================================================*/

/*--------------------------------------------------------------
# Global Header
--------------------------------------------------------------*/

/* El header se inyecta dentro de #header-placeholder via JS.
   Hacemos sticky al contenedor real para que siempre sea visible. */
#header-placeholder {
    position: sticky;
    top: 0;
    z-index: 997;
}

.header {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.90);
}

/* backdrop-filter se aplica en ::before para NO crear un containing block
   para position:fixed. Si estuviera en .header directamente, Chrome trataría
   .header como containing block del navmenu fijo, haciendo que el menú móvil
   se posicione dentro de la barra del header (~70px) en vez del viewport. */
.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--header-background-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
    pointer-events: none;
}

.header .navmenu a,
.header .navmenu a:focus {
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/*
  En index.html el header es semitransparente (glassmorphism) porque
  se superpone al hero parallax.
  En el resto de páginas usamos fondo blanco sólido para garantizar
  legibilidad sin imagen de fondo detrás.
*/
body:not(.index-page) .header {
    --header-background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.12);
}

/* En páginas no-index el texto del nav puede ser oscuro sin problema */
body:not(.index-page) .header .navmenu a,
body:not(.index-page) .header .navmenu a:focus {
    text-shadow: none;
}


/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Navmenu - Desktop */
@media (min-width: 1200px) {
    .navmenu {
        padding: 0
    }

    .navmenu ul {
        margin: 0;
        padding: 0;
        display: flex;
        list-style: none;
        align-items: center
    }

    .navmenu li {
        position: relative
    }

    .navmenu a,
    .navmenu a:focus {
        color: var(--nav-color);
        padding: 18px 15px;
        font-size: 15px;
        font-family: var(--nav-font);
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: space-between;
        white-space: nowrap;
        transition: 0.3s
    }

    .navmenu a i,
    .navmenu a:focus i {
        font-size: 12px;
        line-height: 0;
        margin-left: 5px;
        transition: 0.3s
    }

    .navmenu li:last-child a {
        padding-right: 0
    }

    .navmenu li:hover>a,
    .navmenu .active,
    .navmenu .active:focus {
        color: var(--nav-hover-color)
    }

    .navmenu .dropdown ul {
        margin: 0;
        padding: 10px 0;
        background: var(--nav-dropdown-background-color);
        display: block;
        position: absolute;
        visibility: hidden;
        left: 14px;
        top: 130%;
        opacity: 0;
        transition: 0.3s;
        border-radius: 4px;
        z-index: 99;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.1)
    }

    .navmenu .dropdown ul li {
        min-width: 200px
    }

    .navmenu .dropdown ul a {
        padding: 10px 20px;
        font-size: 15px;
        text-transform: none;
        color: var(--nav-dropdown-color)
    }

    .navmenu .dropdown ul a i {
        font-size: 12px
    }

    .navmenu .dropdown ul a:hover,
    .navmenu .dropdown ul .active,
    .navmenu .dropdown ul .active:focus,
    .navmenu .dropdown ul .active:hover,
    .navmenu .dropdown ul li:hover>a {
        color: var(--nav-dropdown-hover-color)
    }

    .navmenu .dropdown:hover>ul {
        opacity: 1;
        top: 100%;
        visibility: visible
    }

    .navmenu .dropdown .dropdown ul {
        top: 0;
        left: -90%;
        visibility: hidden
    }

    .navmenu .dropdown .dropdown:hover>ul {
        opacity: 1;
        top: 0;
        left: -100%;
        visibility: visible
    }
}

/* Navmenu - Mobile */
@media (max-width: 1199px) {

    /* ── Logo responsivo en móvil (evita desbordamiento horizontal) ── */
    .logo svg#LOGO {
        width: auto;
        max-width: 180px;
        height: 42px;
    }

    /* ── Hamburger button ── */
    .mobile-nav-toggle {
        color: var(--nav-color);
        font-size: 26px;
        line-height: 0;
        margin-right: 8px;
        cursor: pointer;
        transition: color 0.3s;
        z-index: 9999;
        position: relative;
    }

    /* ── Navmenu wrapper (becomes full-screen backdrop) ── */
    .navmenu {
        padding: 0;
        z-index: 9997;
    }

    /* ── Side-drawer panel ── */
    .navmenu ul {
        list-style: none;
        margin: 0;
        padding: 0;

        /* Drawer starts off-screen to the right */
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 85vw);
        z-index: 9998;

        background: #0f1923;
        border-left: 1px solid rgba(84, 254, 12, 0.15);
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6);

        display: flex;
        flex-direction: column;
        overflow-y: auto;
         padding-top: 70px; /* space for the × button */

        /* Hidden by default — slide in via transform */
        transform: translateX(110%);
        visibility: hidden;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.35s;
    }

    /* ── First-level links ── */
    .navmenu a,
    .navmenu a:focus {
        color: rgba(255, 255, 255, 0.85);
        padding: 13px 24px;
        font-family: var(--nav-font);
        font-size: 15px;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: space-between;
        white-space: nowrap;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        transition: color 0.25s, background 0.25s;
        letter-spacing: 0.02em;
    }

    .navmenu a:hover,
    .navmenu .active,
    .navmenu .active:focus {
        color: #54FE0C;
        background: rgba(84, 254, 12, 0.06);
    }

    /* ── Chevron icon inside links ── */
    .navmenu a i,
    .navmenu a:focus i {
        font-size: 11px;
        line-height: 0;
        margin-left: 6px;
        width: 28px;
        height: 28px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.15);
        transition: transform 0.3s, background 0.3s, border-color 0.3s;
    }

    .navmenu a i:hover,
    .navmenu a:focus i:hover {
        background: rgba(84, 254, 12, 0.15);
        border-color: #54FE0C;
        color: #54FE0C;
    }

    /* Rotate chevron when submenu is open */
    .navmenu .active > a i,
    .navmenu .active > a:focus i {
        transform: rotate(180deg);
        background: rgba(84, 254, 12, 0.15);
        border-color: #54FE0C;
        color: #54FE0C;
    }

    /* ── Submenu (dropdown ul) ── */
    .navmenu .dropdown ul {
        position: static;
        display: none;
        padding: 4px 0;
        margin: 0;
        width: auto;
        /* .navmenu ul sets transform/visibility for the drawer animation.
           Those rules also match these nested uls (same selector).
           Reset them here so submenus are fully visible when opened. */
        transform: none;
        visibility: visible;
        box-shadow: none;
        transition: none;
        /* Visual style */
        background: rgba(0, 0, 0, 0.25);
        border-top: 1px solid rgba(84, 254, 12, 0.1);
        border-bottom: 1px solid rgba(84, 254, 12, 0.1);
    }

    .navmenu .dropdown ul a {
        padding: 10px 24px 10px 40px;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.65);
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .navmenu .dropdown ul a:hover {
        color: #54FE0C;
        background: rgba(84, 254, 12, 0.05);
    }

    /* ── Nested sub-submenu ── */
    .navmenu .dropdown ul ul {
        background: rgba(0, 0, 0, 0.2);
    }

    .navmenu .dropdown ul ul a {
        padding-left: 56px;
    }

    /* Reveal submenu when parent has .dropdown-active */
    .navmenu .dropdown > .dropdown-active {
        display: block;
    }

    /* ── Active state: drawer slides in ── */
    .mobile-nav-active {
        overflow: hidden;
    }

    /* Dim backdrop */
    .mobile-nav-active .navmenu {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    /* Slide the <ul> panel in */
    .mobile-nav-active .navmenu > ul {
        transform: translateX(0);
        visibility: visible;
    }

    /* × close button repositioned to sit inside the drawer */
    .mobile-nav-active .mobile-nav-toggle {
        color: rgba(255, 255, 255, 0.75);
        position: fixed;
        font-size: 24px;
        top: 16px;
        right: calc(min(320px, 85vw) - 44px);
        margin-right: 0;
        z-index: 9999;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: color 0.25s, border-color 0.25s, background 0.25s;
    }

    .mobile-nav-active .mobile-nav-toggle:hover {
        color: #54FE0C;
        border-color: #54FE0C;
        background: rgba(84, 254, 12, 0.1);
    }

    /* Brand bar at the top of the drawer */
    .mobile-nav-active .navmenu > ul::before {
        content: 'Menu';
        text-align: center;
        display: block;
        position: absolute;
        /* move the label a bit lower so it doesn’t sit behind the × button
           (you can tweak the value as needed or even center it with translate) */
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        line-height: 60px;
        padding: 0 24px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        color: rgba(84, 254, 12, 0.7);
        border-bottom: 1px solid rgba(84, 254, 12, 0.15);
        pointer-events: none;
    }
}

/*--------------------------------------------------------------
# Global Footer
--------------------------------------------------------------*/
.footer {
    color: var(--default-color);
    background-color: var(--background-color);
    font-size: 14px;
    padding-bottom: 50px;
    position: relative
}

.footer .footer-newsletter {
    background-color: color-mix(in srgb, var(--accent-color), transparent 96%);
    padding: 50px 0
}

.footer .footer-newsletter h4 {
    font-size: 24px
}

.footer .footer-newsletter .newsletter-form {
    margin-top: 30px;
    margin-bottom: 15px;
    padding: 6px 8px;
    position: relative;
    background-color: var(--surface-color);
    border: 1px solid color-mix(in srgb, var(--accent-color), transparent 80%);
    box-shadow: 0 2px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    transition: 0.3s;
    border-radius: 4px
}

.footer .footer-newsletter .newsletter-form:focus-within {
    border-color: var(--accent-color)
}

.footer .footer-newsletter .newsletter-form input[type=email] {
    border: 0;
    padding: 4px;
    width: 100%;
    background-color: var(--surface-color);
    color: var(--default-color)
}

.footer .footer-newsletter .newsletter-form input[type=email]:focus-visible {
    outline: none
}

.footer .footer-newsletter .newsletter-form input[type=submit] {
    border: 0;
    font-size: 16px;
    padding: 0 20px;
    margin: -7px -8px -7px 0;
    background: var(--accent-color);
    color: #fff;
    transition: 0.3s;
    border-radius: 0 4px 4px 0
}

.footer .footer-newsletter .newsletter-form input[type=submit]:hover {
    background: color-mix(in srgb, var(--accent-green), transparent 20%)
}

.footer .footer-top {
    padding-top: 50px
}

.footer .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid color-mix(in srgb, var(--default-color), transparent 50%);
    font-size: 16px;
    color: color-mix(in srgb, var(--default-color), transparent 20%);
    margin-right: 10px;
    transition: 0.3s
}

.footer .social-links a:hover {
    color: var(--accent-green);
    border-color: var(--accent-green)
}

.footer h4 {
    font-size: 16px;
    font-weight: bold;
    position: relative;
    padding-bottom: 12px
}

.footer .footer-links {
    margin-bottom: 30px
}

.footer .footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0
}

.footer .footer-links ul i {
    margin-right: 3px;
    font-size: 12px;
    line-height: 0;
    color: var(--accent-color)
}

.footer .footer-links ul li {
    padding: 10px 0;
    display: flex;
    align-items: center
}

.footer .footer-links ul li:first-child {
    padding-top: 0
}

.footer .footer-links ul a {
    display: inline-block;
    color: color-mix(in srgb, var(--default-color), transparent 20%);
    line-height: 1
}

.footer .footer-links ul a:hover {
    color: var(--accent-green)
}

.footer .footer-about .sitename {
    color: var(--heading-color);
    font-size: 24px;
    font-weight: 600;
    font-family: var(--heading-font)
}

.footer .footer-contact p {
    margin-bottom: 5px
}

.footer .copyright {
    padding-top: 25px;
    padding-bottom: 25px;
    border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%)
}

.footer .copyright p {
    margin-bottom: 0
}

.footer .credits {
    margin-top: 6px;
    font-size: 13px
}