/* Header in the home page style (lessons, guides, material gratis).
   Source file: tools/lessons/header.css → public/css/header.css and css/lessons.css */
/* =====================================================================
   HEADER — same style as the home page (index.html)
   ===================================================================== */
.lh {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #E3E9F5;
    font-family: 'Nunito', system-ui, sans-serif;
}
.lh-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 76px;
}
.lh-logo { flex: none; }
.lh-logo img { height: 52px; width: auto; display: block; }
.lh-nav { display: flex; gap: 4px; margin-left: auto; }
.lh-nav a {
    text-decoration: none;
    font-weight: 700;
    color: #4A5672;
    padding: 8px 12px;
    border-radius: 999px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.lh-nav a:hover { background: #F2F6FF; color: #1A6DFF; }
.lh-actions { flex: none; display: flex; align-items: center; gap: 12px; }
.lh-student {
    white-space: nowrap;
    font-weight: 800;
    text-decoration: none;
    color: #1F2A44;
    padding: 10px 16px;
    border-radius: 999px;
    border: 2px solid #E3E9F5;
}
.lh-student:hover { border-color: #1A6DFF; color: #1A6DFF; }
.lh-free {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 12px 22px;
    border-radius: 999px;
    background: #15A34A;
    color: #fff !important;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 5px 0 #118A3E;
    transition: transform 0.2s, box-shadow 0.2s;
}
.lh-free:hover { transform: translateY(-1px); }
.lh-free:active { transform: translateY(3px); box-shadow: 0 2px 0 #118A3E; }
.lh-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.lh-burger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #1F2A44;
    border-radius: 2px;
    margin: 5px 0;
    transition: 0.3s;
}
.lh-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.lh-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.lh-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.lh-menu { display: none; }

@media (max-width: 1240px) { .lh-student { display: none; } }
@media (max-width: 1060px) {
    .lh-nav { display: none; }
    .lh-actions { margin-left: auto; }
    .lh-burger { display: block; }
    .lh-menu {
        position: fixed;
        inset: 76px 0 auto 0;
        background: #fff;
        border-bottom: 1px solid #E3E9F5;
        box-shadow: 0 24px 60px rgba(22, 32, 58, 0.18);
        padding: 12px 24px 24px;
        flex-direction: column;
        gap: 4px;
        z-index: 49;
        font-family: 'Nunito', system-ui, sans-serif;
    }
    .lh-menu.open { display: flex; }
    .lh-menu a {
        text-decoration: none;
        font-weight: 800;
        font-size: 1.1rem;
        color: #16203A;
        padding: 12px 6px;
        border-bottom: 1px solid #E3E9F5;
    }
    .lh-menu a.lh-menu-student { border: 0; color: #1A6DFF; }
}
@media (max-width: 560px) {
    .lh-wrap { height: 68px; padding: 0 16px; gap: 12px; }
    .lh-logo img { height: 44px; }
    .lh-free { padding: 10px 16px; font-size: 0.95rem; }
    .lh-menu { top: 68px; }
}
.lh-nav a[aria-current="page"] { background: #F2F6FF; color: #1A6DFF; }

/* Material icons in the menu (same as the app's side menu) */
.lh-nav a, .lh-menu a { display: inline-flex; align-items: center; gap: 0.5rem; }
.lh-nav .mi { width: 19px; height: 19px; opacity: 0.85; }
.lh-student { display: inline-flex; align-items: center; gap: 0.4rem; }

/* Phones / tablets: menu button on the LEFT and a drawer from the left,
   like the app. */
@media (max-width: 1060px) {
    .lh-burger { display: block; order: -1; margin: 0 -4px 0 -8px; }
    .lh-actions { margin-left: auto; }
    .lh-menu {
        display: flex;
        position: fixed;
        inset: 0 auto 0 0;
        width: min(320px, 85vw);
        padding: 18px 14px 24px;
        border: 0;
        border-radius: 0 22px 22px 0;
        box-shadow: 8px 0 40px rgba(22, 32, 58, 0.25);
        transform: translateX(-105%);
        transition: transform 0.28s ease;
        z-index: 60;
        overflow-y: auto;
    }
    .lh-menu.open { transform: translateX(0); }
    .lh-menu a {
        gap: 0.9rem;
        padding: 13px 12px;
        border: 0;
        border-radius: 14px;
        font-size: 1.12rem;
        font-weight: 700;
    }
    .lh-menu a:hover, .lh-menu a[aria-current="page"] { background: #F2F6FF; color: #1A6DFF; }
    .lh-menu .mi { width: 24px; height: 24px; color: #4A5672; flex: none; }
    .lh-menu a:hover .mi, .lh-menu a[aria-current="page"] .mi { color: #1A6DFF; }
    .lh-menu .lh-menu-logo { padding: 4px 8px 14px; margin-bottom: 6px; border-bottom: 1px solid #E3E9F5; border-radius: 0; }
    .lh-menu .lh-menu-logo:hover { background: none; }
    .lh-menu .lh-menu-logo img { height: 46px; width: auto; }
    .lh-menu a.lh-menu-student { margin-top: 10px; border-top: 1px solid #E3E9F5; border-radius: 0 0 14px 14px; color: #1A6DFF; }
    .lh-menu a.lh-menu-student .mi { color: #1A6DFF; }
    .lh-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 55;
        opacity: 0;
        transition: opacity 0.28s ease;
    }
    .lh-overlay.open { opacity: 1; }
}
@media (min-width: 1061px) {
    .lh-menu, .lh-overlay { display: none !important; }
}

/* Less in the bar: no "Soy estudiante" button (it's a menu link), and no
   logo when the drawer exists (the drawer shows it). */
.lh-student { display: none !important; }
.lh-nav { gap: 2px; }
.lh-nav a { padding: 8px 10px; }
@media (max-width: 1060px) {
    .lh-logo { display: none; }
}

/* Drawer logo: bigger and centered */
@media (max-width: 1060px) {
    .lh-menu .lh-menu-logo { justify-content: center; padding: 6px 8px 16px; }
    .lh-menu .lh-menu-logo img { height: auto; width: 210px; max-width: 80%; }
}
