/* Menú hamburguesa + sidebar móvil (hub, kids, admin) */

.skip-link {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 200;
    padding: 10px 16px;
    background: #161d1b;
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-160%);
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
    outline: 3px solid #00d4b1;
    outline-offset: 3px;
}

.hamburger {
    --hamburger-bar: currentColor;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--hamburger-bar);
    transform-origin: center;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.hamburger:hover,
.hamburger:focus-visible {
    background: rgba(66, 72, 214, 0.08);
    outline: none;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.4);
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 1024px) {
    .hamburger--site {
        display: none;
    }
}

@media (min-width: 1024px) {
    .hamburger--play {
        display: none;
    }
}

@media (max-width: 1023px) {
    .k-nav__links,
    .p-nav__links {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .hamburger--admin {
        display: none;
    }
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.32s ease, visibility 0.32s ease;
}

.drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.drawer {
    --drawer-accent: #4248d6;
    --drawer-accent-soft: rgba(66, 72, 214, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 80;
    width: min(20.5rem, 88vw);
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 16px 0 40px rgba(15, 23, 42, 0.12);
    transform: translate3d(-104%, 0, 0);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s;
    overflow: auto;
}

.drawer.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
}

.drawer--play {
    --drawer-accent: #005f56;
    --drawer-accent-soft: rgba(0, 229, 194, 0.16);
}

.drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.1rem 1rem 1rem 1.15rem;
    border-bottom: 1px solid #eef2f0;
}

.drawer__brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.drawer__brand img {
    height: 36px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
}

.drawer__close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: #f4f6f5;
    color: #3b4a45;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.drawer__close:hover,
.drawer__close:focus-visible {
    background: var(--drawer-accent-soft);
    color: var(--drawer-accent);
    outline: none;
}

.drawer__nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 0.85rem 1rem;
    flex: 1;
}

.drawer__nav a,
.drawer__nav button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 0.9rem;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #161d1b;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.drawer__nav a .material-symbols-outlined,
.drawer__nav button .material-symbols-outlined {
    font-size: 1.35rem;
    color: #6b7280;
}

.drawer__nav a:hover,
.drawer__nav button:hover,
.drawer__nav a.is-active {
    background: var(--drawer-accent-soft);
    color: var(--drawer-accent);
}

.drawer__nav a.is-active .material-symbols-outlined,
.drawer__nav a:hover .material-symbols-outlined,
.drawer__nav button:hover .material-symbols-outlined {
    color: var(--drawer-accent);
}

.drawer__foot {
    margin-top: auto;
    padding: 0.85rem 0.85rem 1.25rem;
    border-top: 1px solid #eef2f0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.drawer__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    border: 0;
    cursor: pointer;
}

.drawer__cta--primary {
    background: var(--drawer-accent);
    color: #fff;
}

.drawer__cta--ghost {
    background: transparent;
    color: var(--drawer-accent);
}

body.has-drawer {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .drawer,
    .drawer-overlay,
    .hamburger span {
        transition: none;
    }
}

.admin-topbar {
    display: none;
}

@media (max-width: 767.98px) {
    .admin-topbar {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        margin: -0.35rem 0 1.25rem;
    }

    .admin-topbar__title {
        font-size: 1.05rem;
        font-weight: 700;
        letter-spacing: -0.02em;
    }
}
