/* ========================================
   COMPONENT STYLES
   Reusable UI components (dark canvas + floating light header)
   ======================================== */

/* MARK: - Floating glass header
   Fixed island with margin from viewport; white surface for logo + nav contrast.
   Used by: all PHP templates with .header */
.header {
    position: fixed;
    top: var(--header-float-gap);
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: min(100% - 2 * var(--layout-gutter), var(--layout-max-width));
    padding: 16px var(--section-padding-x);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-floating);
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Stronger separation when content has scrolled under the bar (toggled by js/site.js) */
.header.header--elevated {
    box-shadow: var(--shadow-floating-strong);
    border-color: rgba(15, 23, 42, 0.12);
}

@supports (backdrop-filter: blur(16px)) {
    .header {
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: saturate(180%) blur(18px);
        -webkit-backdrop-filter: saturate(180%) blur(18px);
    }
}

/* Logo link: wraps the logo image in the header,
   removes default link styling */
.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Logo image: teach-logo-navy.svg wordmark (intrinsic 183×39); height scales for header */
.logo-image {
    height: 44px;
    width: auto;
    display: block;
}

/* Hamburger toggle: hidden on desktop, shown on mobile */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-accent-deep);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Navigation: text on light nav surface */
.nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-item {
    padding: 8px 14px;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    color: var(--color-text-inverse-muted);
    border-radius: 8px;
    font-weight: 600;
}

.nav-item:hover {
    color: var(--color-accent);
    background: rgba(0, 113, 173, 0.08);
}

.nav-item.featured {
    font-weight: 700;
    color: var(--color-accent-deep);
    background: rgba(0, 113, 173, 0.1);
}

.nav-item.featured:hover {
    color: var(--color-accent);
    background: rgba(0, 113, 173, 0.16);
}

.nav-item a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.nav-item.active {
    color: var(--color-accent);
    background: rgba(0, 113, 173, 0.12);
}

.nav-item.active a {
    color: inherit;
}

.nav-item.featured.active {
    color: var(--color-accent-deep);
}

.nav-item.disabled {
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.nav-item.disabled:hover {
    color: #94a3b8;
    cursor: not-allowed;
    background: transparent;
}

/* MARK: - Buttons (CTAs on dark canvas: light fill reads as minimal) */
.cta-primary,
.cta-secondary {
    padding: 14px 32px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.cta-primary {
    border: 2px solid #f8fafc;
    background: #f8fafc;
    color: var(--color-accent-deep);
}

.cta-primary:hover {
    background: #e2e8f0;
    border-color: #e2e8f0;
}

.cta-secondary {
    background: transparent;
    color: var(--color-text-primary);
    border: 2px solid rgba(248, 250, 252, 0.85);
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #f8fafc;
}

.cta-primary:focus-visible,
.cta-secondary:focus-visible {
    outline: 2px solid var(--color-link);
    outline-offset: 3px;
}

/* Cards on dark: light floating panels */
.feature-card {
    padding: 32px;
    background: rgba(255, 255, 255, 0.96);
    min-height: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    border-radius: var(--radius-panel);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.feature-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.feature-card .feature-title {
    color: var(--color-accent-deep);
}

.feature-card .feature-title a {
    color: inherit;
}

.feature-card .feature-desc {
    color: var(--color-text-inverse-muted);
}

.step {
    padding: 32px;
    background: rgba(255, 255, 255, 0.96);
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    border-radius: var(--radius-panel);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.step .step-title {
    color: var(--color-accent-deep);
}

.step .step-desc {
    color: var(--color-text-inverse-muted);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(15, 23, 42, 0.2);
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}

.step-number {
    width: 50px;
    height: 50px;
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    margin: 0 auto 20px;
    background: var(--color-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
}

/* Footer */
.footer {
    padding: 24px var(--section-padding-x);
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-column {
    padding: 16px;
    background: transparent;
    min-height: 100px;
}

.footer-bottom {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.95em;
}

.footer-bottom p {
    margin: 0;
}

/* Annotations */
.annotation {
    position: relative;
}

.annotation::before {
    content: attr(data-label);
    position: absolute;
    top: -8px;
    left: 10px;
    background: var(--color-accent-deep);
    color: #fff;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    z-index: 10;
}
