/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #10b981;
    --accent-color: #22c55e;
    --bg-color: #f0fdf4;
    --bg-dark: #0f172a;
    --text-color: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --border-color: #d1fae5;
    --shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
    --shadow-hover: 0 20px 40px rgba(16, 185, 129, 0.2);
}

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

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

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1002;
    backdrop-filter: blur(10px);
}

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

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

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

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

.admin-link {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white) !important;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
}

.admin-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* Hamburger Menu Button - versteckt auf Desktop */
.burger-menu {
    display: none !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    color: var(--white);
    padding: 6rem 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 3rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.2;
}

.floating-icon:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-icon:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* Sections */
.articles-section,
.contest-section,
.about-section {
    padding: 5rem 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Articles Grid - Newspaper Style */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

/* First article (Lead Story) - Full width */
.article-card:first-child {
    grid-column: span 12;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--primary-color);
}

.article-card:first-child .article-image,
.article-card:first-child .article-youtube {
    height: 100%;
    min-height: 350px;
}

.article-card:first-child .article-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-card:first-child .article-title {
    font-size: 2.2rem;
    line-height: 1.2;
    font-family: Georgia, 'Times New Roman', serif;
    margin-bottom: 1rem;
}

.article-card:first-child .article-excerpt {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Second and third articles - Half width each */
.article-card:nth-child(2),
.article-card:nth-child(3) {
    grid-column: span 6;
}

/* Other articles - Third width */
.article-card:nth-child(n+4) {
    grid-column: span 4;
}

.article-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-bottom-color: var(--primary-color);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
}

.article-youtube {
    position: relative;
    width: 100%;
    height: 200px;
    cursor: pointer;
    overflow: hidden;
}

.article-youtube img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-youtube:hover img {
    transform: scale(1.1);
}

.article-youtube::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--white);
    background: rgba(0, 0, 0, 0.6);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding-left: 5px;
}

.article-content {
    padding: 1.5rem;
}

.article-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.3;
}

.article-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Contest Cards */
.contests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.contest-card {
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    color: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.contest-card::before {
    content: '🎉';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 8rem;
    opacity: 0.1;
}

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

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

.contest-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contest-prize {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.contest-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    opacity: 0.9;
}

.contest-deadline {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.contest-participate {
    background: var(--white);
    color: var(--primary-color);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.contest-participate:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

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

.about-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.about-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* No Content Message */
.no-content {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem 20px;
    margin-top: 4rem;
}

.footer-small {
    margin-top: 0.5rem;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
    z-index: 10;
}

.modal-close:hover {
    color: var(--text-color);
}

/* Contest Participation Form */
.contest-form {
    margin-top: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile-First Responsive Design */

/* Base: Mobile Styles (default) */
@media (max-width: 768px) {
    /* Body when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    /* Navigation Bar */
    .navbar {
        padding: 0;
    }

    .navbar .container {
        flex-wrap: wrap;
        padding: 1rem 1rem 0 1rem;
        min-height: auto;
    }

    .nav-brand {
        padding: 0.5rem 0;
    }

    .nav-brand h1 {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    /* ========== MOBILE MENU - SCHIEBT CONTENT NACH UNTEN ========== */
    .nav-menu {
        display: none;
        flex-direction: column;
        flex-basis: 100%;
        order: 3;
        background: #ffffff;
        padding: 1rem 0;
        gap: 0.5rem;
        border-top: 1px solid #e2e8f0;
        margin-top: 0.5rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu .nav-link {
        display: block;
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        font-weight: 600;
        color: #1e293b;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        text-align: left;
        text-decoration: none;
    }

    .nav-menu .nav-link:active {
        background: #3b82f6;
        color: #ffffff;
        border-color: #3b82f6;
    }

    .nav-menu .nav-link::after {
        display: none;
    }

    .nav-menu .admin-link {
        background: #3b82f6;
        color: #ffffff !important;
        border-color: #3b82f6;
    }

    /* ========== HAMBURGER BUTTON ========== */
    .burger-menu {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        cursor: pointer;
        background: #3b82f6;
        border: none;
        border-radius: 8px;
        padding: 10px;
    }

    .burger-menu span {
        display: block;
        width: 20px;
        height: 2px;
        background: #ffffff;
        border-radius: 2px;
        margin: 2px 0;
        transition: all 0.3s ease;
    }

    /* Hamburger -> X wenn aktiv */
    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }

    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }

    /* Hero Section */
    .hero {
        padding: 3rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    /* Sections */
    .articles-section,
    .contest-section,
    .about-section {
        padding: 3rem 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* Articles Grid - Mobile (Single Column) */
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* First article - Stack vertically on mobile */
    .article-card:first-child {
        grid-column: span 1;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .article-card:first-child .article-image,
    .article-card:first-child .article-youtube {
        width: 100%;
        height: 220px;
        min-height: 220px;
        flex-shrink: 0;
    }

    .article-card:first-child .article-content {
        padding: 1.5rem;
        background: var(--white);
        position: relative;
        z-index: 1;
    }

    .article-card:first-child .article-title {
        font-size: 1.5rem;
    }

    .article-card:first-child .article-excerpt {
        font-size: 1rem;
    }

    /* All other articles - Full width on mobile */
    .article-card:nth-child(2),
    .article-card:nth-child(3),
    .article-card:nth-child(n+4) {
        grid-column: span 1;
    }

    .article-title {
        font-size: 1.3rem;
    }

    /* Contest Grid */
    .contests-grid {
        grid-template-columns: 1fr;
    }

    .contest-card {
        padding: 1.5rem;
    }

    /* Buttons - Larger for touch */
    .btn {
        padding: 1rem 2rem;
        font-size: 1.05rem;
        min-height: 48px;
    }

    .contest-participate {
        padding: 1rem 2rem;
        min-height: 48px;
    }

    /* Modal */
    .modal {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 0;
        border-radius: 15px;
    }

    /* Form Inputs - Larger for touch */
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(12, 1fr);
    }

    .article-card:first-child {
        grid-column: span 12;
    }

    .article-card:nth-child(2),
    .article-card:nth-child(3) {
        grid-column: span 6;
    }

    .article-card:nth-child(n+4) {
        grid-column: span 6;
    }
}

/* Desktop Styles */
@media (min-width: 1025px) {
    /* Already defined above */
}

/* Success/Error Messages */
.success-message,
.error-message {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: center;
}

.success-message {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}
