/**
 * Header & Footer Styles
 *
 * @package LMSTheme
 * @since   1.0.0
 */

/* ── Header ─────────────────────────────────────────────────────────────── */
.lms-header {
    position:         fixed;
    top:              0;
    left:             0;
    right:            0;
    z-index:          1000;
    background:       rgba(27, 42, 74, 0.95);
    backdrop-filter:  blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom:    1px solid rgba(255,255,255,.08);
    transition:       background .2s, box-shadow .2s;
    font-family:      'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.lms-header--scrolled {
    background:  rgba(27,42,74,.98);
    box-shadow:  0 4px 24px rgba(0,0,0,.3);
}
.lms-header__inner {
    max-width:       1280px;
    margin:          0 auto;
    padding:         0 32px;
    height:          68px;
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             32px;
}

/* Logo */
.lms-header__logo {
    display:         flex;
    align-items:     center;
    gap:             10px;
    text-decoration: none;
    flex-shrink:     0;
}
.lms-header__logo-icon { flex-shrink:0; }
.lms-header__logo-text {
    font-size:   18px;
    font-weight: 800;
    color:       #fff;
    letter-spacing: -.02em;
    white-space: nowrap;
}

/* Nav */
.lms-nav { flex:1; }
.lms-nav__list {
    display:     flex;
    align-items: center;
    gap:         4px;
    list-style:  none;
    margin:      0;
    padding:     0;
}
.lms-nav__link {
    display:         block;
    padding:         8px 14px;
    font-size:       14px;
    font-weight:     600;
    color:           rgba(255,255,255,.7);
    text-decoration: none;
    border-radius:   8px;
    transition:      color .15s, background .15s;
    white-space:     nowrap;
}
.lms-nav__link:hover { color:#fff;background:rgba(255,255,255,.08); }
.lms-nav__link--active { color:#fff;background:rgba(45,107,228,.2); }

/* Right side actions */
.lms-header__actions {
    display:     flex;
    align-items: center;
    gap:         10px;
    flex-shrink: 0;
}
.lms-header__login {
    padding:         8px 16px;
    font-size:       14px;
    font-weight:     600;
    color:           rgba(255,255,255,.8);
    text-decoration: none;
    border-radius:   8px;
    transition:      color .15s, background .15s;
}
.lms-header__login:hover { color:#fff;background:rgba(255,255,255,.08); }
.lms-header__register {
    padding:         8px 18px;
    font-size:       14px;
    font-weight:     700;
    color:           #fff;
    text-decoration: none;
    background:      linear-gradient(135deg,#2D6BE4,#5B35C5);
    border-radius:   8px;
    transition:      opacity .15s, transform .15s;
    white-space:     nowrap;
}
.lms-header__register:hover { opacity:.9;transform:translateY(-1px);color:#fff; }

/* User menu */
.lms-header__user {
    display:     flex;
    align-items: center;
    gap:         8px;
    cursor:      pointer;
    padding:     6px 10px 6px 6px;
    border-radius: 10px;
    border:      1px solid rgba(255,255,255,.12);
    position:    relative;
    transition:  background .15s;
    user-select: none;
}
.lms-header__user:hover { background:rgba(255,255,255,.08); }
.lms-header__avatar {
    width:         34px;
    height:        34px;
    border-radius: 50%;
    border:        2px solid rgba(255,255,255,.2);
    object-fit:    cover;
    flex-shrink:   0;
}
.lms-header__username {
    font-size:   14px;
    font-weight: 600;
    color:       #fff;
    max-width:   120px;
    overflow:    hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lms-header__chevron { color:rgba(255,255,255,.5);transition:transform .2s; }
.lms-header__user:hover .lms-header__chevron { color:rgba(255,255,255,.8); }

/* Dropdown */
.lms-header__dropdown {
    position:      absolute;
    top:           calc(100% + 8px);
    right:         0;
    background:    #fff;
    border:        1px solid #E9ECEF;
    border-radius: 12px;
    box-shadow:    0 8px 32px rgba(0,0,0,.15);
    min-width:     200px;
    padding:       6px;
    opacity:       0;
    visibility:    hidden;
    transform:     translateY(-8px);
    transition:    opacity .15s, transform .15s, visibility .15s;
    z-index:       100;
}
.lms-header__dropdown--open {
    opacity:    1;
    visibility: visible;
    transform:  translateY(0);
}
.lms-header__dropdown-item {
    display:         flex;
    align-items:     center;
    gap:             10px;
    padding:         9px 12px;
    font-size:       14px;
    font-weight:     500;
    color:           #343A40;
    text-decoration: none;
    border-radius:   8px;
    transition:      background .1s;
}
.lms-header__dropdown-item:hover { background:#F8F9FA;color:#1B2A4A; }
.lms-header__dropdown-item svg   { color:#6C757D;flex-shrink:0; }
.lms-header__dropdown-item--danger { color:#B02020; }
.lms-header__dropdown-item--danger:hover { background:#FAE0E0;color:#B02020; }
.lms-header__dropdown-item--danger svg { color:#B02020; }
.lms-header__dropdown-divider {
    height:     1px;
    background: #E9ECEF;
    margin:     4px 0;
}

/* Mobile toggle */
.lms-header__mobile-toggle {
    display:        none;
    flex-direction: column;
    gap:            5px;
    background:     none;
    border:         none;
    cursor:         pointer;
    padding:        6px;
}
.lms-header__mobile-toggle span {
    display:       block;
    width:         22px;
    height:        2px;
    background:    rgba(255,255,255,.8);
    border-radius: 2px;
    transition:    transform .2s, opacity .2s;
}
.lms-header__mobile-toggle--open span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.lms-header__mobile-toggle--open span:nth-child(2) { opacity:0; }
.lms-header__mobile-toggle--open span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.lms-mobile-nav {
    display:    none;
    background: rgba(27,42,74,.98);
    border-top: 1px solid rgba(255,255,255,.08);
    padding:    12px 16px 16px;
}
.lms-mobile-nav--open { display:block; }
.lms-mobile-nav__list { list-style:none;margin:0;padding:0; }
.lms-mobile-nav__link {
    display:         block;
    padding:         12px 16px;
    font-size:       15px;
    font-weight:     600;
    color:           rgba(255,255,255,.8);
    text-decoration: none;
    border-radius:   8px;
    transition:      background .1s;
}
.lms-mobile-nav__link:hover { background:rgba(255,255,255,.08);color:#fff; }
.lms-mobile-nav__link--cta {
    background:  linear-gradient(135deg,#2D6BE4,#5B35C5);
    color:       #fff !important;
    margin-top:  8px;
    text-align:  center;
}

/* Page wrap — adds top padding so content is not hidden under fixed header */
#lms-page-wrap { padding-top: 68px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.lms-footer {
    background:  #1B2A4A;
    color:       rgba(255,255,255,.7);
    font-family: 'Inter', -apple-system, sans-serif;
    margin-top:  auto;
}
.lms-footer__inner {
    max-width:   1280px;
    margin:      0 auto;
    padding:     60px 32px 40px;
    display:     grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap:         48px;
}

/* Brand col */
.lms-footer__logo {
    display:         flex;
    align-items:     center;
    gap:             10px;
    text-decoration: none;
    margin-bottom:   16px;
}
.lms-footer__logo span {
    font-size:   18px;
    font-weight: 800;
    color:       #fff;
    font-family: 'Sora', sans-serif;
}
.lms-footer__tagline {
    font-size:   14px;
    line-height: 1.6;
    color:       rgba(255,255,255,.5);
    max-width:   260px;
    margin:      0;
}

/* Footer columns */
.lms-footer__heading {
    font-size:     12px;
    font-weight:   700;
    color:         rgba(255,255,255,.4);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin:        0 0 16px;
    font-family:   'Sora', sans-serif;
}
.lms-footer__links {
    list-style: none;
    margin:     0;
    padding:    0;
    display:    flex;
    flex-direction: column;
    gap:        10px;
}
.lms-footer__links a {
    font-size:       14px;
    color:           rgba(255,255,255,.55);
    text-decoration: none;
    transition:      color .15s;
}
.lms-footer__links a:hover { color:#fff; }

/* Footer bottom bar */
.lms-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding:    20px 32px;
}
.lms-footer__bottom-inner {
    max-width:       1280px;
    margin:          0 auto;
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             16px;
    flex-wrap:       wrap;
}
.lms-footer__copy  { font-size:13px;color:rgba(255,255,255,.4); }
.lms-footer__built {
    display:     flex;
    align-items: center;
    gap:         5px;
    font-size:   13px;
    color:       rgba(255,255,255,.3);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .lms-footer__inner { grid-template-columns:1fr 1fr;gap:32px; }
    .lms-footer__brand { grid-column:1/-1; }
}
@media (max-width: 768px) {
    .lms-header__inner { padding:0 16px; }
    .lms-nav           { display:none; }
    .lms-header__login,
    .lms-header__register { display:none; }
    .lms-header__username  { display:none; }
    .lms-header__mobile-toggle { display:flex; }
    .lms-footer__inner { grid-template-columns:1fr 1fr;padding:40px 20px 28px; }
    .lms-footer__bottom { padding:16px 20px; }
    .lms-footer__bottom-inner { flex-direction:column;text-align:center; }
}
@media (max-width: 480px) {
    .lms-footer__inner { grid-template-columns:1fr; }
}
