/* Site header + footer (client's Canva design), on every frontend.layouts.app page.
   The mega-menu panels keep their own styles in frontend/partials/header.blade.php. */
:root {
    --site-header-h: 76px;
    --sc-green: #004238;
    --sc-deep: #01372f;
    --sc-accent: #D5D52B;
    --sc-cream: #F5F3EB;
    --sc-ink: #0c1f1a;
}
@media (max-width: 991px) { :root { --site-header-h: 64px; } }

/* ---------- header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(245, 243, 235, 0.92);
    border-bottom: 1px solid rgba(12, 31, 26, 0.08);
    transition: background-color .2s ease, box-shadow .2s ease;
}
/* custom.js adds .sticky once the page is scrolled: see-through with a blur */
.site-header.sticky {
    background: rgba(245, 243, 235, 0.72);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    backdrop-filter: blur(16px) saturate(170%);
    box-shadow: 0 8px 24px -18px rgba(12, 31, 26, 0.45);
}
@media (prefers-reduced-transparency: reduce) {
    .site-header, .site-header.sticky { background: var(--sc-cream); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.site-header-inner {
    position: relative; /* the mega-menu panels span this width */
    max-width: 1240px;
    height: var(--site-header-h);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 28px;
}
.site-logo { display: flex; align-items: center; flex: none; }
.site-logo img { height: 40px; width: auto; display: block; }

.site-nav { display: flex; align-items: center; gap: 28px; margin: 0 auto; height: 100%; }
.site-nav .theme-header-1__dropdown { height: 100%; display: flex; align-items: center; }
.site-nav .subject-toggle, .site-nav .courses-toggle, .site-nav .degrees-toggle {
    color: var(--sc-ink) !important;
    font-size: 15.5px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
}
.site-nav .subject-toggle:focus-visible, .site-nav .courses-toggle:focus-visible, .site-nav .degrees-toggle:focus-visible { outline: 2px solid var(--sc-green); outline-offset: 4px; }
.site-nav .subject-toggle.active, .site-nav .courses-toggle.active, .site-nav .degrees-toggle.active { color: var(--sc-green) !important; border-bottom-color: var(--sc-green); }
.site-nav .subject-toggle.active svg, .site-nav .courses-toggle.active svg, .site-nav .degrees-toggle.active svg { color: var(--sc-green) !important; }
/* the panels open just under the bar */
.site-header .mega-dropdown.active, .site-header .courses-dropdown.active, .site-header .degrees-dropdown.active { top: calc(100% + 6px); }

.site-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.site-signin { color: var(--sc-ink) !important; font-size: 15px; font-weight: 600; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.site-signin:hover { background: rgba(0, 66, 56, 0.06); }
.site-join { background: var(--sc-green); color: #fff !important; font-size: 15px; font-weight: 600; padding: 11px 20px; border-radius: 10px; white-space: nowrap; text-decoration: none; transition: background-color .15s, transform .1s ease-out; }
.site-join:hover { background: var(--sc-deep); }
.site-join:active { transform: scale(.97); }
.site-icon { position: relative; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--sc-green) !important; font-size: 17px; background: transparent; border: 0; cursor: pointer; text-decoration: none; }
.site-icon:hover { background: rgba(0, 66, 56, 0.07); }
.site-badge { position: absolute; top: 2px; right: 0; background: var(--sc-accent); color: var(--sc-deep); border-radius: 999px; font-size: 10px; font-weight: 700; padding: 1px 5px; line-height: 1.4; }
.site-user { display: inline-flex; align-items: center; gap: 8px; color: var(--sc-ink) !important; font-weight: 600; font-size: 14.5px; padding: 4px 10px 4px 4px; border-radius: 99px; text-decoration: none; }
.site-user:hover { background: rgba(0, 66, 56, 0.07); }
.site-logout { margin: 0; display: inline-flex; }

.site-burger { display: none; width: 44px; height: 44px; border: 1.5px solid #D8D6CA; border-radius: 10px; background: #fff; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0; }
.site-burger span { width: 18px; height: 2px; border-radius: 2px; background: var(--sc-green); transition: transform .2s ease, opacity .2s ease; }
.site-burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-burger.is-open span:nth-child(2) { opacity: 0; }
.site-burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-mobile { border-top: 1px solid rgba(12, 31, 26, 0.08); padding: 6px 16px 18px; max-height: calc(100vh - var(--site-header-h)); overflow-y: auto; background: var(--sc-cream); }
.site-mobile[hidden] { display: none; }
.site-mobile-group { border-bottom: 1px solid #E3E1D6; }
.site-mobile-group summary { list-style: none; cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 16px; color: var(--sc-ink); display: flex; justify-content: space-between; }
.site-mobile-group summary::-webkit-details-marker { display: none; }
.site-mobile-group summary::after { content: "+"; color: var(--sc-green); font-size: 20px; line-height: 1; }
.site-mobile-group[open] summary::after { content: "−"; }
.site-mobile-group ul { list-style: none; margin: 0; padding: 0 0 12px; }
.site-mobile-group li a { display: block; padding: 9px 0; color: #3E4C44 !important; text-decoration: none; font-size: 15px; }
.site-mobile-group .site-mobile-all { color: var(--sc-green) !important; font-weight: 600; }
.site-mobile-actions { display: flex; gap: 10px; padding-top: 16px; }
.site-mobile-actions a { flex: 1; text-align: center; }
.site-mobile-actions .site-signin { border: 1.5px solid #CFCDBF; background: #fff; }

@media (max-width: 991px) {
    .site-header-inner { padding: 0 16px; gap: 12px; }
    .site-logo img { height: 32px; }
    .site-nav, .site-actions > .site-signin, .site-user span { display: none; }
    .site-actions { margin-left: auto; }
    .site-burger { display: inline-flex; }
}
@media (max-width: 420px) {
    .site-actions > .site-join { display: none; } /* it's in the menu panel */
}

/* ---------- footer ---------- */
.site-footer { background: #13352B; color: #DCE5DF; font-size: 15px; line-height: 1.5; }
.site-footer a { color: #DCE5DF; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.sf-wrap { max-width: 1240px; margin: 0 auto; padding: 72px 32px 32px; display: flex; flex-direction: column; gap: 48px; }

.sf-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 48px; border-bottom: 1px solid #2B5143; }
.sf-band h2 { margin: 0 0 8px; color: #fff; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; letter-spacing: -0.015em; font-weight: 500; }
.sf-band p { margin: 0; color: #C9D6CD; font-size: 15px; }
.site-footer .sf-btn { display: inline-flex; align-items: center; gap: 18px; padding: 15px 24px; border-radius: 8px; background: #D9EE86; color: #13352B; font-weight: 600; font-size: 15px; white-space: nowrap; transition: transform .1s ease-out, background-color .15s; }
.site-footer .sf-btn:hover { background: #E4F4A2; color: #13352B; text-decoration: none; }
.site-footer .sf-btn:active { transform: scale(.97); }

.sf-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1.45fr; gap: 32px; }
.sf-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; font-size: 15px; }
.sf-brand img { height: 40px; width: auto; display: block; }
.sf-social { display: flex; gap: 10px; margin-top: 6px; }
.site-footer .sf-social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #2B5143; display: inline-flex; align-items: center; justify-content: center; color: #DCE5DF; font-size: 15px; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s; }
.site-footer .sf-social a:hover { background: #D9EE86; border-color: #D9EE86; color: #13352B; }
.sf-cols nav { display: flex; flex-direction: column; gap: 14px; font-size: 14.5px; }
.sf-cols nav a { color: #C9D6CD; }
.sf-cols h3 { margin: 0 0 4px; color: #fff; font-size: 15px; font-weight: 600; }
/* Contact us: icon + line (address, phones, email) */
.sf-cols nav a.sf-contact { display: flex; align-items: flex-start; gap: 12px; line-height: 1.45; }
.sf-contact svg { width: 20px; height: 20px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sf-cols nav a.sf-contact:hover { color: #fff; }

.sf-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-top: 24px; font-size: 12.5px; color: #C9D6CD; }
.sf-legal { display: flex; gap: 28px; flex-wrap: wrap; }
.sf-legal a { color: #C9D6CD; }

@media (max-width: 991px) {
    .sf-cols { grid-template-columns: repeat(4, 1fr); }
    .sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .sf-wrap { padding: 56px 16px 28px; gap: 36px; }
    .sf-band .sf-btn { width: 100%; justify-content: space-between; }
    .sf-cols { grid-template-columns: 1fr 1fr; }
    .sf-bottom { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .site-header, .site-join, .site-burger span, .site-footer .sf-btn, .site-footer .sf-social a { transition: none; }
}
