/**
 * KLASSEN-PAGES.CSS
 * Shared styles for all Klassen pages (klassen3-4, klassen5-6, klassen7-8, klassen9-10)
 * Uses Custom CSS System with CSS Custom Properties
 */

/* ============================================
   ANIMATIONS & EASING FUNCTIONS
   ============================================ */

/* Easing Functions - Natural Movement (Based on Anthropic Design Principles) */
:root {
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955);
    --ease-anthropic: cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Reduced Motion Support (Accessibility) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   FOCUS & ACCESSIBILITY
   ============================================ */

/* Modern Focus Visible (Only keyboard navigation) */
:focus-visible {
    outline: 2px solid var(--penn-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Remove outline for mouse clicks */
:focus:not(:focus-visible) {
    outline: none;
}

/* Skip to Main Content (Keyboard Users) */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--penn-blue);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

.skip-to-main:focus {
    top: 0;
}

/* ===== CONTAINER CONSTRAINT (Klassen-Pages) ===== */
/* .container global = 1920px, viel zu breit für Text-Content */

.section-spacing-xl .container {
    max-width: 1200px;
}

/* ===== GRID SYSTEMS ===== */

.grid-2-equal {
    display: grid;
    gap: var(--space-xl);
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .grid-2-equal {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== FEATURE BOXES ===== */

.feature-box {
    background: var(--seasalt);
    border-radius: 8px;
    padding: var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    transition: transform 0.3s var(--ease-out-expo),
                box-shadow 0.3s var(--ease-out-expo);
}

.feature-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-icon {
    background: var(--penn-blue);
    border-radius: 50%;
    padding: var(--space-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

/* ===== LEGAL BOX ===== */

.legal-box {
    background: var(--seasalt);
    border-radius: 12px;
    padding: var(--space-xl);
    border: 1px solid var(--timberwolf);
}

.legal-item {
    background: white;
    border-radius: 8px;
    padding: var(--space-md);
    transition: box-shadow 0.3s var(--ease-out-quad);
}

.legal-item:hover {
    box-shadow: var(--shadow-sm);
}

/* ===== INFO CARDS ===== */

.info-card {
    background: white;
    border-radius: 12px;
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--ease-out-expo);
}

.info-card:hover {
    box-shadow: var(--shadow-md);
}

/* ===== NOTE BOX (Warning/Info Box) ===== */

.note-box {
    background: #fff4e6;
    border: 1px solid var(--rusty-orange);
    border-radius: 8px;
    padding: var(--space-lg);
}

/* ===== NOTE PHASES ===== */

.note-phase {
    background: var(--seasalt);
    border-radius: 8px;
    padding: var(--space-md);
}

/* ===== SUBJECT CARDS ===== */

.subject-card {
    background: white;
    border-radius: 12px;
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease-out-expo),
                box-shadow 0.3s var(--ease-out-expo);
}

.subject-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.subject-card-blue {
    border-top: 4px solid var(--penn-blue);
}

.subject-card-green {
    border-top: 4px solid var(--olivine);
}

.subject-icon {
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--space-md);
    flex-shrink: 0;
}

.subject-icon-blue {
    background: var(--penn-blue);
    color: white;
}

.subject-icon-green {
    background: var(--olivine);
    color: white;
}

/* ===== COMPACT CARDS (ETH-Style) ===== */

.compact-card {
    background: white;
    padding: var(--space-lg);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    opacity: 1;
    transition: transform 0.3s var(--ease-out-expo),
                box-shadow 0.3s var(--ease-out-expo),
                opacity 0.3s var(--ease-out-quad);
}

.compact-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

/* Hover Dimming Effect (Focus on hovered card) */
.icon-grid-3:hover .compact-card:not(:hover),
.icon-grid-4:hover .compact-card:not(:hover) {
    opacity: 0.65;
}

.compact-card .material-icons-outlined,
.compact-card .feather {
    display: block;
    margin: 0 auto var(--space-md);
}

.compact-card h3 {
    color: var(--penn-blue);
    margin-bottom: var(--space-xs);
    font-size: 1.25rem;
}

.compact-card p {
    color: var(--cadet-gray);
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
}

.compact-card strong {
    color: var(--penn-blue);
    font-size: 1rem;
}

/* ===== ASYMMETRIC GRIDS (Stripe-Style) ===== */

.grid-2-1 {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: var(--space-lg);
    align-items: start;
}

@media (max-width: 968px) {
    .grid-2-1 {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

.grid-1-2 {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: var(--space-lg);
    align-items: start;
}

@media (max-width: 968px) {
    .grid-1-2 {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

/* ===== SIDEBAR BOX (Stripe-Style Sticky Sidebar) ===== */

.sidebar-box {
    background: var(--seasalt);
    padding: var(--space-lg);
    border-radius: 8px;
    border: 1px solid var(--timberwolf);
    position: sticky;
    top: 80px;
}

.sidebar-box h4 {
    color: var(--penn-blue);
    margin-bottom: var(--space-md);
    font-size: 1rem;
    font-weight: 600;
}

.sidebar-box time {
    display: block;
    color: var(--rusty-orange);
    font-weight: 600;
    margin-bottom: var(--space-2xs);
}

.sidebar-box p {
    color: var(--cadet-gray);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
}

/* ===== CHECKLIST (Apple/Stripe-Style) ===== */

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist li {
    display: flex;
    align-items: start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.checklist li:last-child {
    margin-bottom: 0;
}

.checklist .material-icons-outlined,
.checklist .feather {
    color: var(--olivine);
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.checklist strong {
    color: var(--penn-blue);
}

/* ===== ICON GRIDS ===== */

.icon-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.icon-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 968px) {
    .icon-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .icon-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ===== SECTION SPACING (Apple-Style) ===== */

.section-spacing-xl {
    padding: 48px 0;
}

@media (max-width: 768px) {
    .section-spacing-xl {
        padding: 36px 0;
    }
}

/* ===== SMOOTH INTERACTIONS ===== */

/* Smooth Link Hovers */
a {
    transition: color 0.2s var(--ease-out-quad),
                opacity 0.2s var(--ease-out-quad);
}

/* Button Transitions */
.btn,
button {
    transition: transform 0.2s var(--ease-out-quad),
                background-color 0.2s var(--ease-out-quad),
                box-shadow 0.2s var(--ease-out-quad);
}

.btn:hover,
button:hover {
    transform: translateY(-1px);
}

.btn:active,
button:active {
    transform: translateY(0);
}

/* ===== RESPONSIVE UTILITIES ===== */

@media (max-width: 768px) {
    .subject-icon {
        width: 48px;
        height: 48px;
    }

    .subject-icon span {
        font-size: 1.5rem !important;
    }

    .feature-box {
        flex-direction: column;
        text-align: center;
    }

    .feature-icon {
        margin: 0 auto;
    }

    .sidebar-box {
        position: static;
    }

    .icon-grid-3 {
        grid-template-columns: 1fr;
    }
}
