@import 'fonts.css';

:root {
    --orange-primary: #E67E22;
    --orange-light: #F39C12;
    --orange-dark: #D35400;
    --blue-primary: #2C3E50;
    --blue-accent: #3498DB;
    --blue-light: #5DADE2;
    --cream: #FDF6E3;
    --white: #FFFFFF;
    --gray-light: #F8F9FA;
    --gray-medium: #BDC3C7;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;

    /* Fonts */
    --font-body: 'Nunito', sans-serif;
    --font-heading: 'Quicksand', sans-serif;

    /* Product Branding */
    --brand-kurs: #163374;
    --brand-praes: #e67e22;
    --brand-audio: #2e7d32;
    --brand-forschung: #8e244d;
}

/* Product Badge Links — consistent across all pages */
.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: transform 0.15s, box-shadow 0.15s;
}
.product-badge:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.product-badge .pb-icon { font-size: 1.1em; }

.pb-kurs { background: var(--brand-kurs); color: #fff; }
.pb-praes { background: var(--brand-praes); color: #fff; }
.pb-audio { background: var(--brand-audio); color: #fff; }
.pb-forschung { background: var(--brand-forschung); color: #fff; }

.pb-kurs-outline { background: #fff; color: var(--brand-kurs); border: 2px solid var(--brand-kurs); }
.pb-praes-outline { background: #fff; color: var(--brand-praes); border: 2px solid var(--brand-praes); }
.pb-audio-outline { background: #fff; color: var(--brand-audio); border: 2px solid var(--brand-audio); }
.pb-forschung-outline { background: #fff; color: var(--brand-forschung); border: 2px solid var(--brand-forschung); }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.7;
    background: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Navigation */
nav {
    position: fixed;
    top: 50px;
    width: 100%;
    padding: 0.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.98);
}

nav.scrolled {
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
    padding: 0.3rem 5%;
}

nav.scrolled .nav-logo img {
    height: 80px;
}

.nav-logo img {
    height: 135px;
    padding: 10px 0;
    transition: all 0.4s ease;
}

.nav-logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--orange-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-links li {
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--orange-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    /* Stronger shadow */
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 220px;
    /* Slightly wider */
    list-style: none;
    z-index: 2000;
    /* Higher Z-Index */
    margin-top: 5px;
    /* Slight gap? No, keep tight or use pseudo */
}

/* Bridge to prevent closing */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

.dropdown:hover > .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
    position: relative;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1.5rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: var(--gray-light);
    color: var(--orange-primary);
}

.dropdown-menu a::after {
    display: none;
    /* No underline for dropdown items */
}

/* Nested flyout submenus (level 3+) */
.dropdown-menu .submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -0.5rem;
    margin-left: 0;
    margin-top: 0;
    min-width: 200px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    background: white;
    padding: 0.5rem 0;
    z-index: 2001;
}

.dropdown-menu .submenu::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    width: 10px;
    height: 100%;
    background: transparent;
}

.dropdown-menu li:hover > .submenu {
    display: block;
}

/* Submenu arrow indicator in menu items */
.submenu-arrow {
    float: right;
    margin-left: 0.75rem;
    font-size: 1.1em;
    opacity: 0.5;
}

/* Hide the sub-toggle button on desktop */
.sub-toggle {
    display: none !important;
}

.has-submenu > .nav-item-inner > a {
    padding-right: 0.5rem;
}

/* Navigation Items Layout */
.nav-item-inner {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.dropdown-toggle {
    display: none;
    /* Hidden by default (desktop) */
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-dark);
    padding: 0 0.5rem;
    transition: transform 0.3s ease;
}

/* Desktop Hover Arrow */
/* .dropdown:hover .dropdown-toggle { } */

/* Mobile Menu */
@media (max-width: 768px) {
    .dropdown-menu,
    .dropdown-menu .submenu {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
        display: none;
        background: rgba(0, 0, 0, 0.02);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        left: auto;
        min-width: auto;
    }

    /* Override hover effect on mobile to prevent accidental opens */
    .dropdown:hover > .dropdown-menu,
    .dropdown-menu li:hover > .submenu {
        display: none;
    }

    .dropdown.open > .dropdown-menu,
    .has-submenu.open > .submenu {
        display: block;
        max-height: 500px;
    }

    .dropdown.open > .nav-item-inner > .dropdown-toggle {
        transform: rotate(180deg);
    }

    .has-submenu.open > .nav-item-inner > .sub-toggle {
        transform: rotate(90deg);
    }

    .nav-item-inner {
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-toggle,
    .sub-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.05);
        border-radius: 8px;
    }

    .sub-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* Hide the inline arrow on mobile (button used instead) */
    .submenu-arrow {
        display: none;
    }

    /* Deeper nesting indentation */
    .dropdown-menu .submenu {
        padding-left: 1rem;
    }
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu span {
    width: 28px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--cream) 0%, var(--white) 50%, #E8F6FF 100%);
    position: relative;
    overflow: hidden;
    padding: 12rem 5% 4rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(230, 126, 34, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--blue-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text h1 span {
    color: var(--orange-primary);
    position: relative;
}

.hero-text h1 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(230, 126, 34, 0.2);
    z-index: -1;
    border-radius: 4px;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.badge {
    background: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blue-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-icon {
    width: 20px;
    height: 20px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
    color: var(--white);
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(230, 126, 34, 0.45);
}

.btn-secondary {
    background: var(--white);
    color: var(--blue-primary);
    border: 2px solid var(--blue-primary);
}

.btn-secondary:hover {
    background: var(--blue-primary);
    color: var(--white);
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.floating-element {
    position: absolute;
    background: var(--white);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    animation: floatSmall 4s ease-in-out infinite;
}

.floating-element.fe-1 {
    top: 10%;
    left: -5%;
    animation-delay: -1s;
}

.floating-element.fe-2 {
    bottom: 15%;
    right: -5%;
    animation-delay: -2s;
}

.floating-element span {
    font-size: 2rem;
}

@keyframes floatSmall {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(-15px) rotate(3deg);
    }
}

/* Coming Soon Banner */
.coming-soon-banner {
    background: linear-gradient(90deg, var(--blue-primary), var(--blue-accent));
    color: var(--white);
    text-align: center;
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    overflow: hidden;
    transition: transform 0.4s ease;
}

.coming-soon-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    to {
        transform: translateX(100%);
    }
}

.coming-soon-banner p {
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.coming-soon-banner span {
    background: var(--orange-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-left: 0.5rem;
    font-size: 0.85rem;
}

/* Features Section */
.features {
    padding: 6rem 5%;
    background: var(--white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.1), rgba(243, 156, 18, 0.1));
    color: var(--orange-primary);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--blue-primary);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.15rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: var(--white);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--orange-primary), var(--orange-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--cream), #FEF3E2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.4rem;
    color: var(--blue-primary);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    font-size: 1rem;
}

.feature-tag {
    display: inline-block;
    background: rgba(52, 152, 219, 0.1);
    color: var(--blue-accent);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* Materials Showcase */
.materials {
    padding: 6rem 5%;
    background: linear-gradient(180deg, var(--gray-light) 0%, var(--white) 100%);
}

.materials-content {
    max-width: 1400px;
    margin: 0 auto;
}

.materials-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.material-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.material-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.material-item:hover img {
    transform: scale(1.08);
}

.material-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem;
    background: linear-gradient(transparent, rgba(44, 62, 80, 0.95));
    color: var(--white);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s ease;
}

.material-item:hover .material-overlay {
    transform: translateY(0);
    opacity: 1;
}

.material-overlay h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.material-overlay p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Curriculum Section */
.curriculum {
    padding: 6rem 5%;
    background: var(--white);
}

.curriculum-content {
    max-width: 1200px;
    margin: 0 auto;
}

.curriculum-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.grade-card {
    background: linear-gradient(135deg, var(--white), var(--gray-light));
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.grade-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.05), rgba(52, 152, 219, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grade-card:hover {
    border-color: var(--orange-primary);
    transform: translateY(-5px);
}

.grade-card:hover::before {
    opacity: 1;
}

.grade-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}

.grade-card h4 {
    color: var(--blue-primary);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.grade-card ul {
    list-style: none;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-light);
}

.grade-card li {
    padding: 0.3rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.grade-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--orange-primary);
    font-weight: bold;
}

/* Illustration Section */
.illustration-section {
    padding: 4rem 5%;
    background: linear-gradient(135deg, #FEF3E2 0%, #E8F8F5 100%);
    position: relative;
    overflow: hidden;
}

.illustration-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.illustration-text h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--blue-primary);
    margin-bottom: 1.5rem;
}

.illustration-text p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.illustration-list {
    list-style: none;
}

.illustration-list li {
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.illustration-list li::before {
    content: '🎯';
    position: absolute;
    left: 0;
}

.illustration-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.illustration-gallery img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.illustration-gallery img:hover {
    transform: scale(1.03);
}

.illustration-gallery img:first-child {
    grid-column: span 2;
}

/* Footer */
footer {
    background: var(--blue-primary);
    color: var(--white);
    padding: 4rem 5% 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand img {
    height: 60px;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    max-width: 300px;
}

.footer-section h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--orange-light);
}

.footer-bottom {
    max-width: 1400px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--orange-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    background: var(--orange-dark);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-badges,
    .hero-cta {
        justify-content: center;
    }

    .materials-showcase {
        grid-template-columns: repeat(2, 1fr);
    }

    .curriculum-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .illustration-content {
        grid-template-columns: 1fr;
    }

    .illustration-gallery {
        order: -1;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .materials-showcase {
        grid-template-columns: 1fr;
    }

    .curriculum-grid {
        grid-template-columns: 1fr;
    }

    .illustration-gallery {
        grid-template-columns: 1fr;
    }

    .illustration-gallery img:first-child {
        grid-column: span 1;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        max-width: none;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Animations and Carousel */
.carousel-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.carousel {
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    box-sizing: border-box;
}

.carousel-slide img {
    width: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 16/9;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.5);
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
    color: var(--blue-primary);
    z-index: 10;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.9);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--white);
    transform: scale(1.2);
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0) scale(1) !important;
}

/* Animation Types */
.fade-in {
    transform: translateY(0);
}

/* Default opacity only */
.slide-up {
    transform: translateY(50px);
}

.slide-left {
    transform: translateX(-50px);
}

.slide-right {
    transform: translateX(50px);
}

.zoom-in {
    transform: scale(0.9);
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--blue-primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 0 0 8px 8px;
    z-index: 10001;
    font-weight: bold;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-to-content:focus {
    top: 0;
}

/* Accessibility Toolbar */
.a11y-toolbar {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    transform: none;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
}

.a11y-btn {
    background: var(--blue-primary);
    color: white;
    border: none;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    font-family: var(--font-body);
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
    min-width: 36px;
    text-align: center;
}

.a11y-btn:hover {
    background: var(--blue-accent);
    transform: scale(1.05);
}

.a11y-btn:focus {
    outline: 3px solid var(--orange-primary);
    outline-offset: 2px;
}

.a11y-btn.active {
    background: var(--orange-primary);
}

/* Focus Indicators (enhanced) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--orange-primary);
    outline-offset: 2px;
}

/* High Contrast Mode */
body.high-contrast {
    --cream: #ffffff;
    --gray-light: #ffffff;
    --text-dark: #000000;
    --text-light: #333333;
}

body.high-contrast .feature-card,
body.high-contrast .hero,
body.high-contrast footer {
    border: 2px solid #000 !important;
}

body.high-contrast a {
    text-decoration: underline;
}

body.high-contrast img {
    filter: contrast(1.2);
}

/* Font Size Scale Classes
   Uses a CSS custom property on :root so ALL text scales uniformly.
   No more `* { font-size: inherit }` — that caused compounding em issues
   and the "jumping" bug on toggle. Headings keep their relative ratios
   because they're defined in em elsewhere in the stylesheet. */
body.font-size-small { font-size: 14px !important; }
body.font-size-large { font-size: 20px !important; }
body.font-size-xlarge { font-size: 24px !important; }

/* Reduced Motion */
@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;
    }

    .floating-element {
        animation: none !important;
    }

    .carousel-track {
        transition: none !important;
    }
}

/* Toolbar responsive — collapsible on mobile */
@media (max-width: 768px) {
    /* A11y toolbar: collapse into single round button */
    .a11y-toolbar {
        position: fixed !important;
        left: 0.5rem !important;
        bottom: 0.5rem !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
        flex-direction: row !important;
        padding: 0 !important;
        background: none !important;
        box-shadow: none !important;
        border: none !important;
        gap: 0 !important;
        width: auto !important;
        z-index: 9999 !important;
    }

    .a11y-toolbar .a11y-btn {
        display: none !important;
    }

    .a11y-toolbar .a11y-toggle-mobile {
        display: flex !important;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--blue-primary);
        color: #fff;
        border: none;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    }

    .a11y-toolbar.open {
        flex-direction: column-reverse !important;
        gap: 0.3rem !important;
    }

    .a11y-toolbar.open .a11y-btn {
        display: flex !important;
        background: rgba(255,255,255,0.97) !important;
        color: var(--blue-primary) !important;
        border: 1px solid #ccc !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }

    .a11y-toolbar.open .a11y-btn.active {
        background: var(--orange-primary) !important;
        color: #fff !important;
        border-color: var(--orange-primary) !important;
    }

    /* Banner: hide completely on mobile — it pushes everything down */
    .coming-soon-banner {
        display: none !important;
    }

    /* Navbar: fixed at top, no banner offset */
    nav {
        top: 0 !important;
        padding: 0.3rem 3% !important;
    }

    /* Logo: smaller on mobile */
    .nav-logo img {
        height: 50px !important;
    }

    /* Hero: generous top padding to clear navbar */
    .hero {
        padding-top: 7rem !important;
        min-height: auto !important;
        padding-bottom: 2rem !important;
    }

    /* ALL page hero sections: generous top padding */
    [style*="padding-top: 12rem"],
    [style*="padding-top: 14rem"],
    [style*="padding-top:12rem"],
    [style*="padding-top:14rem"] {
        padding-top: 7rem !important;
        min-height: auto !important;
    }

    /* Section blocks: extra space at top */
    .section-block:first-child {
        padding-top: 1.5rem;
    }

    /* Hero content: stack properly */
    .hero-content {
        gap: 1.5rem !important;
        padding: 0 0.8rem;
    }

    .hero-text h1 {
        font-size: 1.6rem !important;
    }

    .hero-text p {
        font-size: 0.95rem !important;
    }

    /* Hero image: smaller on mobile */
    .hero-image img {
        max-height: 220px !important;
        object-fit: cover;
        border-radius: 12px !important;
    }

    /* Buttons: smaller */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    /* Rating widget: compact */
    #page-rating-widget {
        right: 8px !important;
        bottom: 60px !important;
        padding: 5px 8px !important;
        font-size: 10px !important;
    }

    /* Audio player: compact */
    #page-audio-player {
        right: 8px !important;
        bottom: 100px !important;
        padding: 5px 8px !important;
    }

    /* Admin overlay: hide */
    #admin-rating-overlay {
        display: none !important;
    }
}

/* Mobile toggle button — hidden on desktop */
.a11y-toggle-mobile {
    display: none;
}