/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #dc0000;
    --secondary-color: #8b0000;
    --accent-color: #ff3333;
    --text-dark: #000000;
    --text-light: #4a4a4a;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
    
    /* Navigation Light Mode (default) */
    --nav-bg: #ffffff;
    --nav-text: #000000;
    --nav-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    
    /* Footer Light Mode (default) */
    --footer-bg: #ffffff;
    --footer-text: #000000;
    --footer-border: rgba(0, 0, 0, 0.1);
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
    :root {
        /* Navigation Dark Mode */
        --nav-bg: #000000;
        --nav-text: #ffffff;
        --nav-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
        
        /* Footer Dark Mode */
        --footer-bg: #000000;
        --footer-text: #ffffff;
        --footer-border: rgba(255, 255, 255, 0.1);
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--nav-bg);
    box-shadow: var(--nav-shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--nav-text);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero {
    margin-top: 70px;
    min-height: 90vh;
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--secondary-color) 50%, var(--primary-color) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--white);
    text-align: center;
    padding: 2rem 1rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: backwards;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: backwards;
    flex-wrap: wrap;
}

/* Hero Animation */
.hero-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.planet {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.planet-1 {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.planet-2 {
    width: 150px;
    height: 150px;
    background: rgba(220, 0, 0, 0.1);
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.planet-3 {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.08);
    bottom: 20%;
    left: 70%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-30px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    min-width: 160px;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(220, 0, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

.btn-small {
    padding: 10px 24px;
    font-size: 0.9rem;
    background: var(--primary-color);
    color: var(--white);
    min-width: 120px;
}

/* Section Styles */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    color: var(--text-dark);
    line-height: 1.3;
    padding: 0 1rem;
}

/* Features Section */
.features {
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
}

.feature-card p {
    color: var(--text-light);
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.6;
}

/* Courses Section */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.course-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-10px);
}

.course-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.course-content {
    padding: 1.5rem;
}

.course-content h3 {
    margin-bottom: 0.5rem;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
}

.course-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.6;
}

.course-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

/* About Section */
.about {
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: start;
    padding: 0 1rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    border-left: 5px solid var(--primary-color);
}

.stat-number {
    font-size: clamp(2rem, 5vw, 3rem);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--secondary-color) 50%, var(--primary-color) 100%);
    color: var(--white);
}

.contact .section-title {
    color: var(--white);
}

.contact p {
    color: var(--white) !important;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 1rem;
    transition: all 0.3s ease;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--footer-text);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.footer-section p {
    color: var(--footer-text);
    opacity: 0.8;
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--footer-text);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.footer-section a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-bottom {
    text-align: center;
    padding: 2rem 1rem 0;
    border-top: 1px solid var(--footer-border);
    opacity: 0.6;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* Responsive Design */

/* Tablets und größere Geräte */
@media (min-width: 769px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile Geräte */
@media (max-width: 768px) {
    .navbar .container {
        padding: 1rem 15px;
    }

    .nav-logo h1 {
        font-size: 1.2rem;
        line-height: 1.3;
        max-width: 70%;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--nav-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 1rem 0;
        width: 100%;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 1rem;
        display: block;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        margin-top: 70px;
        min-height: 80vh;
        padding: 3rem 0;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 0 1rem;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    section {
        padding: 40px 0;
    }

    .features-grid,
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-content {
        gap: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .planet-1,
    .planet-2,
    .planet-3 {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-section {
        text-align: center;
    }
}

/* Sehr kleine Geräte */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .nav-logo h1 {
        font-size: 1rem;
    }

    .feature-card,
    .course-card,
    .stat-card {
        padding: 1.5rem;
    }

    .hero {
        min-height: 70vh;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}

/* Landscape-Modus für Handys */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 2rem 0;
    }

    .nav-menu {
        top: 60px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Touch-Optimierungen */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .feature-card,
    .course-card {
        transition: none;
    }

    .btn:active {
        transform: scale(0.95);
    }
}
