@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Poppins:wght@400;600;800&display=swap');

:root {
    --primary-red: #c00000;
    --primary-black: #111111;
    --accent-red: #e00000;
    --bg-light: #f4f4f4;
    --bg-white: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #555555;
    --card-bg-white: #ffffff;
    --card-border: #e8e8e8;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-hard: 0 4px 0 rgba(0, 0, 0, 0.15);
}

/* --- Global Styles --- */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
    background-image:
        radial-gradient(circle at 50% 0, rgba(192, 0, 0, 0.06), transparent 40%),
        linear-gradient(0deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.3));
    background-attachment: fixed;
}

h1,
h2,
h3 {
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dark);
}

/* --- Layout --- */
header {
    background: linear-gradient(120deg, var(--primary-black) 0%, var(--primary-black) 40%, var(--primary-red) 100%);
    color: white;
    padding: 40px 20px 80px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: visible;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    z-index: 10;
}

/* Texture overlay */
header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 10px);
    pointer-events: none;
    z-index: 1;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 20;
}

header h1 {
    font-size: 3.5em;
    margin: 0;
    font-weight: 800;
    font-style: italic;
    color: white;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.4);
}

header p {
    font-size: 1.4em;
    margin-top: 10px;
    font-weight: 400;
    color: #e8e8e8;
}

header img,
.logo {
    max-width: 140px;
    height: auto;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease, filter 0.3s ease;
    position: relative;
    z-index: 30;
}

header img:hover {
    transform: scale(1.08) rotate(-3deg);
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

/* --- Navigation --- */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-white);
    border-bottom: 4px solid var(--primary-red);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    margin: 0 5px;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    padding: 18px 20px;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    font-style: italic;
    border-radius: 8px 8px 0 0;
}

nav a:hover,
nav a.active {
    background-color: #f5f5f5;
    color: var(--primary-red);
    border-bottom: 3px solid var(--primary-red);
    border-radius: 8px 8px 0 0;
}

/* --- Hamburger Menu --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 34px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
    margin-left: auto;
}

.menu-toggle span {
    width: 34px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

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

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

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

/* --- Mobile Menu Overlay --- */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 990;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}


/* --- Main Content --- */
main {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

main h2 {
    color: var(--text-dark);
    margin-bottom: 30px;
    font-size: 2.2em;
    position: relative;
    display: inline-block;
    border-bottom: 4px solid var(--primary-red);
    padding-bottom: 5px;
    transform: skewX(-10deg);
}

main p {
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--text-muted);
}

/* --- Footer --- */
footer {
    background-color: var(--primary-black);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 5px solid var(--primary-red);
}

footer p {
    margin: 0;
    font-size: 1em;
    opacity: 0.8;
}

/* --- Components --- */

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    background-color: var(--bg-white);
    color: var(--text-dark);
    box-shadow: var(--shadow-soft);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

th,
td {
    padding: 15px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

th {
    background-color: var(--primary-red);
    color: white;
    text-transform: uppercase;
    font-weight: 700;
}

tr:nth-child(even) {
    background-color: #fafafa;
}

/* Buttons / Links Sporty Style */
.download-buttons a {
    display: inline-block;
    background: var(--primary-red);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    transform: skewX(-10deg);
    transition: all 0.2s ease;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(192, 0, 0, 0.3);
}

.download-buttons a:hover {
    transform: skewX(-10deg) translateY(-3px);
    box-shadow: 0 6px 20px rgba(192, 0, 0, 0.5);
    background-color: var(--accent-red);
}

/* Info Box */
.info-toggle {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 10px 24px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-style: italic;
    transition: all 0.3s ease;
    border-radius: 25px;
}

.info-toggle:hover {
    background-color: var(--accent-red);
}

.info-box {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    margin-top: 15px;
    background-color: #f9f9f9;
    color: var(--text-dark);
    padding: 0 15px;
    border-left: 4px solid var(--primary-red);
    border-radius: 0 12px 12px 0;
}

.info-box.open {
    max-height: 1000px;
    opacity: 1;
    padding: 15px;
}

/* Info wrapper */
.info-wrapper {
    position: relative;
    display: block;
    margin-top: 15px;
}

/* Team/Info images */
.info-image {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
    border: 2px solid var(--card-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    object-fit: cover;
    border-radius: 10px;
}

/* General images and iframes */
iframe,
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* --- Team Grid / Cards (White Background, Dark Text) --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.team-card {
    background: var(--card-bg-white);
    color: var(--text-dark);
    border: 2px solid var(--card-border);
    border-top: 4px solid var(--primary-red);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    box-shadow: var(--shadow-soft);
    border-radius: 16px;
    box-sizing: border-box;
}

.team-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-red);
    box-shadow: 0 12px 30px rgba(192, 0, 0, 0.15);
}

.team-name {
    color: var(--text-dark);
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    text-shadow: none;
    word-break: break-word;
    overflow-wrap: break-word;
}

.team-league {
    color: var(--primary-red);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1em;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
}

.team-card a {
    color: var(--primary-red);
    text-decoration: underline;
}

.team-card strong {
    color: var(--text-dark);
}


/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: transparent;
    color: var(--text-dark);
    padding: 20px 20px;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-style: italic;
    border-bottom: 3px solid transparent;
}

.dropdown:hover .dropbtn {
    color: var(--primary-red);
    border-bottom: 3px solid var(--primary-red);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-white);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    top: 100%;
    left: 0;
    border: 1px solid var(--card-border);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 15px 20px;
    text-decoration: none;
    display: block;
    text-align: left;
    margin: 0;
    border: none;
    font-style: normal;
    border-bottom: 1px solid var(--card-border);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--primary-red);
    color: white;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    header {
        clip-path: none;
        padding: 40px 10px;
    }

    header h1 {
        font-size: 2.2em;
    }

    nav {
        justify-content: flex-end;
        padding: 10px 20px;
    }

    .menu-toggle {
        display: flex;
    }

    /* Fullscreen overlay menu — bleibt dunkel für Kontrast */
    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(160deg, rgba(17, 17, 17, 0.97) 0%, rgba(40, 0, 0, 0.97) 100%);
        padding: 0;
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Staggered fade-in for links */
    .nav-links.active>a,
    .nav-links.active>.dropdown {
        animation: menuFadeIn 0.35s ease forwards;
        opacity: 0;
    }

    /* Im mobilen Menü (dunkel) Links weiß */
    .nav-links.active>a,
    .nav-links.active .dropbtn {
        color: white;
    }

    /* Highlight Startseite (First Link) */
    .nav-links.active>a:first-child {
        background-color: rgba(255, 255, 255, 0.08);
        margin-bottom: 20px;
        font-weight: 800;
        border: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
    }

    .nav-links.active>a:first-child:hover {
        background-color: var(--primary-red);
        border-color: var(--primary-red);
        color: white;
    }

    .nav-links.active>a:first-child::after {
        display: none !important;
    }

    .nav-links.active>a:nth-child(1),
    .nav-links.active>.dropdown:nth-child(1) {
        animation-delay: 0.08s;
    }

    .nav-links.active>a:nth-child(2),
    .nav-links.active>.dropdown:nth-child(2) {
        animation-delay: 0.14s;
    }

    .nav-links.active>a:nth-child(3),
    .nav-links.active>.dropdown:nth-child(3) {
        animation-delay: 0.20s;
    }

    .nav-links.active>a:nth-child(4),
    .nav-links.active>.dropdown:nth-child(4) {
        animation-delay: 0.26s;
    }

    .nav-links.active>a:nth-child(5),
    .nav-links.active>.dropdown:nth-child(5) {
        animation-delay: 0.32s;
    }

    .nav-links.active>a:nth-child(6),
    .nav-links.active>.dropdown:nth-child(6) {
        animation-delay: 0.38s;
    }

    .nav-links.active>a:nth-child(7),
    .nav-links.active>.dropdown:nth-child(7) {
        animation-delay: 0.44s;
    }

    @keyframes menuFadeIn {
        from {
            opacity: 0;
            transform: translateY(12px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    nav a,
    .dropbtn {
        margin: 0;
        width: auto;
        text-align: center;
        padding: 16px 40px;
        font-size: 1.35em;
        letter-spacing: 2px;
        border-bottom: none;
        border-radius: 8px;
        border-left: none;
        position: relative;
        transition: all 0.25s ease;
    }

    /* Subtle separator between items */
    nav .nav-links>a+a,
    nav .nav-links>.dropdown {
        margin-top: 4px;
    }

    nav .nav-links>a::after {
        content: '';
        display: block;
        width: 40px;
        height: 2px;
        background: var(--primary-red);
        margin: 4px auto 0;
        opacity: 0.3;
        border-radius: 2px;
        transition: width 0.25s ease, opacity 0.25s ease;
    }

    nav .nav-links>a:last-child::after {
        display: none;
    }

    nav a:hover,
    nav a.active {
        background-color: rgba(192, 0, 0, 0.2);
        color: var(--accent-red);
        border-radius: 8px;
        border-bottom: none;
        border-left: none;
    }

    nav a:hover::after {
        width: 60px;
        opacity: 0.7;
    }

    .dropdown {
        width: auto;
        text-align: center;
    }

    .dropbtn {
        width: auto;
    }

    .dropdown-content {
        position: static;
        width: auto;
        box-shadow: none;
        background-color: rgba(192, 0, 0, 0.1);
        border-radius: 8px;
        border: none;
        margin-top: 4px;
    }

    .dropdown-content a {
        padding: 12px 30px;
        font-size: 1.05em;
        text-align: center;
        border-left: none;
        border-radius: 6px;
        color: white;
        border-bottom: none;
    }

    .dropdown-content a:hover {
        background-color: rgba(192, 0, 0, 0.25);
        border-left: none;
    }

    /* Body scroll lock when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    /* Ensure hamburger stays above overlay */
    .menu-toggle {
        z-index: 1100;
    }
}

/* --- News Timeline Specific Styles --- */
.news-timeline {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 30px;
}

.timeline-card {
    width: 80%;
    text-align: left;
    padding: 25px;
}

.timeline-left {
    align-self: flex-start;
    margin-right: 20%;
}

.timeline-right {
    align-self: flex-end;
    margin-left: 20%;
    background-color: #f0f0f0;
    border-color: #d0d0d0;
    border-top-color: var(--primary-red);
}

.timeline-image {
    max-width: 60%;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    display: block;
}

/* Ensure Christmas images also align nicely */
.timeline-card .info-image {
    max-width: 60%;
    margin-left: 0;
    margin-right: auto;
}

/* Responsive adjustments for timeline */
@media (max-width: 900px) {
    .timeline-card {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        align-self: flex-start !important;
    }

    .timeline-image,
    .timeline-card .info-image {
        max-width: 80%;
        margin: 15px auto;
    }
}

@media (max-width: 600px) {

    .timeline-image,
    .timeline-card .info-image {
        max-width: 100%;
    }
}

/* --- Floating Back Button --- */
.floating-back-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1.1em;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(192, 0, 0, 0.4);
    z-index: 1000;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.floating-back-btn:hover {
    background-color: var(--accent-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(192, 0, 0, 0.6);
}

@media (max-width: 768px) {
    .floating-back-btn {
        bottom: 20px;
        left: 20px;
        padding: 10px 20px;
        font-size: 1em;
    }
}
