:root {
    --goh-yellow: #e5ca10;
    --goh-dark: #3b2f2f;
    --goh-white: #ffffff;
}

.landing-page > header {
    height: calc(60px + 2rem);
    margin-bottom: 4%;
}

.page-wrapper {
    margin-left: 4%;
    margin-right: 4%;
    padding-bottom: 4%;
    border-radius: 24px;
    border: 2px solid #000;
    background-color: var(--goh-white);
    overflow: hidden;
}

.card-nav-container {
    position: fixed;
    top: 2rem;
    left: 4%;
    right: 4%;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 1001;
    box-sizing: border-box;
}

.card-nav {
    display: block;
    height: 60px;
    padding: 0;
    background-color: #ffffff;
    border: 2px solid #000;
    border-radius: 24px;
    min-width: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    will-change: height;
    transition: height 0.35s ease, box-shadow 0.3s ease;
}

.card-nav-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem 0.55rem 1.1rem;
    z-index: 2;
}

.hamburger-menu {
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #000;
    background: transparent;
    border: none;
    border-radius: 999px;
    padding: 0;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.hamburger-icon {
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.hamburger-menu:hover,
.hamburger-menu:focus-visible {
    background-color: rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.hamburger-menu:focus-visible {
    outline: 2px solid var(--goh-yellow);
    outline-offset: 2px;
}

.hamburger-menu.open .hamburger-icon {
    transform: rotate(90deg);
}

.logo-container {
    display: flex;
    align-items: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.logo {
    height: 28px;
}

.card-nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

.card-nav-cta-button {
    background-color: #111;
    color: #ffffff;
    border: none;
    border-radius: calc(0.75rem - 0.35rem);
    padding: 0 1rem;
    height: 100%;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.card-nav-cta-button:hover {
    background-color: #333;
    transform: translateY(-1px);
}

.card-nav-login-button {
    background-color: var(--primary, #ff6b00);
    color: #ffffff;
    border: none;
    border-radius: calc(0.75rem - 0.35rem);
    padding: 0 1rem;
    height: 100%;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.card-nav-login-button:hover {
    background-color: var(--primary-dark, #e65100);
    transform: translateY(-1px);
}

.card-nav-content {
    position: absolute;
    left: 0;
    right: 0;
    top: 60px;
    bottom: 0;
    padding: 0.5rem;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
}

.card-nav.open .card-nav-content {
    visibility: visible;
    pointer-events: auto;
}

.nav-card {
    height: 100%;
    flex: 1 1 0;
    min-width: 0;
    border-radius: calc(0.75rem - 0.2rem);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    gap: 8px;
    user-select: none;
}

.nav-card-primary {
    background: #111827;
    color: #f9fafb;
}

.nav-card-accent {
    background: var(--primary);
    color: var(--goh-dark);
}

.nav-card-light {
    background: #f3f4f6;
    color: #111827;
}

.nav-card-label {
    font-weight: 500;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

.nav-card-links {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-card-link {
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.25s ease, opacity 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-card-link:hover {
    opacity: 0.9;
}

.nav-card-primary .nav-card-link:hover {
    color: var(--primary);
}

.nav-card-accent .nav-card-link:hover {
    color: #f9fafb;
}

.nav-card-light .nav-card-link:hover {
    color: var(--primary);
}

.nav-card-link.nav-card-link-disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.nav-card-link-icon {
    font-size: 1rem;
}

.card-nav-scrolled {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

@media (max-width: 768px) {
    .landing-page > header {
        height: calc(60px + 1rem);
        margin-bottom: 2%;
    }

    .page-wrapper {
        margin-left: 3%;
        margin-right: 3%;
        padding-bottom: 6%;
    }

    /* Nav container: full width con padding mínimo, sin el doble margen del desktop */
    .card-nav-container {
        top: 1rem;
        left: 0;
        right: 0;
        padding: 0 0.75rem;
        margin-bottom: 2.5rem;
    }

    .card-nav-top {
        padding: 0.5rem 1rem;
        justify-content: space-between;
    }

    /* Hamburger va a la derecha */
    .hamburger-menu {
        order: 3;
    }

    /* Logo a la izquierda */
    .logo-container {
        position: static;
        transform: none;
        order: 1;
    }

    .card-nav-actions {
        display: none;
    }

    .card-nav-cta-button,
    .card-nav-login-button {
        display: none;
    }

    .card-nav-content {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 0.5rem;
        bottom: 0;
        justify-content: flex-start;
    }

    .nav-card {
        height: auto;
        min-height: 60px;
        flex: 1 1 auto;
        max-height: none;
    }

    .nav-card-label {
        font-size: 1.1rem;
    }

    .nav-card-link {
        font-size: 0.9rem;
    }
}
