/* ============================================================
 * Lapland Trip Planner — site navigation
 * Sticky header, click dropdowns, mega menu, mobile drawer.
 * ============================================================ */

:root {
    --ltp-deep-blue:    #1a2744;
    --ltp-aurora-green: #4ecfa0;
    --ltp-aurora-teal:  #3bb5a0;
    --ltp-warm-orange:  #e8834a;
    --ltp-soft-gold:    #f0c665;
    --ltp-snow:         #f7f5f2;
    --ltp-cream:        #faf8f5;
    --ltp-text:         #1a2744;
    --ltp-text-soft:    #5a6478;
    --ltp-text-light:   #8b93a3;
    --ltp-border:       #e4e0db;
    --ltp-header-h:     68px;
}

/* ---- Skip link (a11y) ---- */
.ltp-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ltp-deep-blue);
    color: #fff;
    padding: 10px 16px;
    z-index: 10000;
}
.ltp-skip:focus { left: 8px; top: 8px; }

/* ---- Site shell ---- */
.ltp-site { background: var(--ltp-cream); }
#content.ltp-content { min-height: 60vh; }

/* ============================================================
 * STICKY HEADER
 * ============================================================ */
.ltp-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--ltp-border);
    font-family: 'DM Sans', system-ui, sans-serif;
}
body.admin-bar .ltp-header { top: 32px; }
@media (max-width: 782px) {
    body.admin-bar .ltp-header { top: 46px; }
}

.ltp-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: var(--ltp-header-h);
    display: flex;
    align-items: center;
    gap: 32px;
}

/* ---- Brand ---- */
.ltp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ltp-deep-blue);
    flex-shrink: 0;
}
.ltp-brand__logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}
.ltp-brand__wordmark {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 20px;
    line-height: 1;
    letter-spacing: 0.2px;
}

/* ============================================================
 * DESKTOP NAV BAR
 * ============================================================ */
.ltp-nav { flex: 1; }
.ltp-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}
.ltp-nav__item {
    position: relative;
}
.ltp-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    padding: 10px 14px;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--ltp-text);
    text-decoration: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.ltp-nav__link:hover {
    background: var(--ltp-snow);
    color: var(--ltp-deep-blue);
}
.ltp-nav__caret {
    transition: transform 0.2s;
}
.ltp-nav__trigger[aria-expanded="true"] .ltp-nav__caret {
    transform: rotate(180deg);
}

/* Active section */
.ltp-nav__item.is-active > .ltp-nav__link {
    color: var(--ltp-aurora-teal);
}
.ltp-nav__item.is-active > .ltp-nav__link::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 6px;
    height: 2px;
    background: var(--ltp-aurora-green);
    border-radius: 2px;
}

/* ---- Dropdown panels ---- */
.ltp-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #fff;
    border: 1px solid var(--ltp-border);
    border-radius: 12px;
    box-shadow: 0 20px 50px -20px rgba(26, 39, 68, 0.25);
    padding: 12px;
    z-index: 110;
}
.ltp-panel[hidden] { display: none; }

/* Flat dropdown */
.ltp-panel--flat {
    min-width: 320px;
}
.ltp-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ltp-panel__item a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--ltp-text);
    transition: background 0.15s;
}
.ltp-panel__item a:hover {
    background: var(--ltp-snow);
}
.ltp-panel__label {
    display: block;
    font-size: 15px;
    font-weight: 500;
}
.ltp-panel__note {
    display: block;
    font-size: 12px;
    color: var(--ltp-text-light);
    margin-top: 2px;
}
.ltp-panel__see-all {
    margin-top: 4px;
    border-top: 1px solid var(--ltp-border);
    padding-top: 6px;
}
.ltp-panel__see-all a {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ltp-aurora-teal);
    text-decoration: none;
    border-radius: 8px;
}
.ltp-panel__see-all a:hover {
    background: var(--ltp-snow);
}

/* Mega menu */
.ltp-panel--mega {
    /* Anchor to nav container, not item, so it spans wider */
    left: auto;
    right: 0;
    min-width: 920px;
    max-width: 92vw;
    padding: 24px;
}
.ltp-mega {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
}
.ltp-mega__col {
    min-width: 0;
}
.ltp-mega__heading {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--ltp-text-light);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ltp-border);
}
.ltp-mega__list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}
.ltp-mega__list li { margin: 0; }
.ltp-mega__list a {
    display: block;
    padding: 6px 8px;
    margin-left: -8px;
    font-size: 14px;
    color: var(--ltp-text);
    text-decoration: none;
    border-radius: 6px;
}
.ltp-mega__list a:hover {
    background: var(--ltp-snow);
    color: var(--ltp-deep-blue);
}
.ltp-mega__see-all {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ltp-aurora-teal);
    text-decoration: none;
    margin-left: -8px;
    padding: 4px 8px;
    border-radius: 6px;
}
.ltp-mega__see-all:hover { background: var(--ltp-snow); }

/* ============================================================
 * MOBILE BURGER + RESPONSIVE
 * ============================================================ */
.ltp-burger {
    display: none;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
}
.ltp-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ltp-deep-blue);
    border-radius: 2px;
    transition: transform 0.2s;
}

@media (max-width: 960px) {
    .ltp-nav { display: none; }
    .ltp-burger { display: flex; }
    .ltp-header__inner { gap: 16px; padding: 0 16px; }
    .ltp-brand__wordmark { font-size: 18px; }
}

/* ============================================================
 * MOBILE DRAWER
 * ============================================================ */
.ltp-drawer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: flex-end;
}
.ltp-drawer[hidden] { display: none; }
body.admin-bar .ltp-drawer { top: 32px; }
@media (max-width: 782px) {
    body.admin-bar .ltp-drawer { top: 46px; }
}

.ltp-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 39, 68, 0.5);
    backdrop-filter: blur(2px);
    animation: ltpFade 0.2s ease-out;
}
.ltp-drawer__panel {
    position: relative;
    width: min(82%, 400px);
    height: 100%;
    background: #fff;
    box-shadow: -20px 0 60px -20px rgba(26, 39, 68, 0.4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: ltpSlideIn 0.25s ease-out;
}
@keyframes ltpFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ltpSlideIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}
.ltp-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--ltp-border);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.ltp-drawer__title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 18px;
    color: var(--ltp-deep-blue);
}
.ltp-drawer__close {
    background: none;
    border: 0;
    padding: 6px;
    color: var(--ltp-text);
    cursor: pointer;
    border-radius: 6px;
}
.ltp-drawer__close:hover { background: var(--ltp-snow); }

.ltp-drawer__list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}
.ltp-drawer__item {
    border-bottom: 1px solid var(--ltp-border);
}
.ltp-drawer__item:last-child { border-bottom: 0; }

.ltp-drawer__link,
.ltp-drawer__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: 0;
    padding: 18px 20px;
    font: inherit;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--ltp-text);
    text-decoration: none;
    cursor: pointer;
    text-align: left;
}
.ltp-drawer__item.is-active > .ltp-drawer__link,
.ltp-drawer__item.is-active > .ltp-drawer__trigger {
    color: var(--ltp-aurora-teal);
}
.ltp-drawer__caret { transition: transform 0.2s; }
.ltp-drawer__trigger[aria-expanded="true"] .ltp-drawer__caret {
    transform: rotate(180deg);
}

.ltp-drawer__sub {
    background: var(--ltp-snow);
    padding: 4px 20px 16px;
}
.ltp-drawer__sub[hidden] { display: none; }
.ltp-drawer__sub ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ltp-drawer__sub li a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    color: var(--ltp-text);
    text-decoration: none;
    border-bottom: 1px solid rgba(228, 224, 219, 0.6);
}
.ltp-drawer__sub li:last-child a { border-bottom: 0; }
.ltp-drawer__see-all a {
    color: var(--ltp-aurora-teal);
    font-weight: 600;
    font-size: 13px;
}

.ltp-drawer__group {
    margin-top: 14px;
}
.ltp-drawer__group:first-child { margin-top: 4px; }
.ltp-drawer__group-heading {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--ltp-text-light);
    margin-bottom: 4px;
}

/* ---- Body scroll lock when drawer open ---- */
html.ltp-drawer-open { overflow: hidden; }

/* ---- Focus styles ---- */
.ltp-nav__link:focus-visible,
.ltp-drawer__link:focus-visible,
.ltp-drawer__trigger:focus-visible,
.ltp-drawer__close:focus-visible,
.ltp-burger:focus-visible,
.ltp-panel a:focus-visible,
.ltp-mega__list a:focus-visible {
    outline: 2px solid var(--ltp-aurora-green);
    outline-offset: 2px;
}
