﻿/* Modern CSS for Schachklub Markdorf */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #27ae60;
    --accent-color: #e67e22;
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --text-color: #333;
    --header-height: 90px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 60px;
    max-height: 60px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hamburger Menu - Hidden on desktop */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    z-index: 1001;
}

.hamburger-menu span {
    width: 28px;
    height: 3px;
    background-color: var(--white);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

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

/* Main Content */
main {
    margin-top: var(--header-height);
    padding: 40px 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../gifs/Banner_Schachklub_4.png');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 120px 20px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.hero-small {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../gifs/banner_Kalender.jpeg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 40px;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.link-list {
    list-style: none;
    padding: 0;
}

.link-list li {
    margin: 8px 0;
}

.link-list a {
    color: var(--primary-color);
    text-decoration: none;
}

.link-list a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.info-block {
    margin: 20px 0;
}

.info-block h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

/* Sidebar / News */
.sidebar .news-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.sidebar .news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-size: 0.85rem;
    color: #777;
    display: block;
    margin-bottom: 5px;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

footer a {
    color: var(--white);
    text-decoration: underline;
}

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

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--primary-color);
    min-width: 160px;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    z-index: 1;
    top: 100%;
    left: 0;
    border-radius: 0 0 4px 4px;
}

.dropdown-content a {
    color: var(--white);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

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

.dropdown:hover .dropbtn {
    color: var(--accent-color);
}

/* Mobile-only menu items - Hidden by default on desktop */
.mobile-only {
    display: none !important;
}

/* Main Content News Items */
.main-content .news-item {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.main-content .news-item:last-of-type {
    border-bottom: none;
}

.main-content .news-item h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.main-content .news-date {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 10px;
    display: block;
}

.more-news {
    text-align: right;
    margin-top: 10px;
}

.more-news a {
    color: var(--secondary-color);
    font-weight: bold;
    text-decoration: none;
}

.more-news a:hover {
    text-decoration: underline;
}

/* Calendar Styles */
.calendar-container {
    max-width: 900px;
    margin: 0 auto;
}

.month-separator {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--secondary-color);
}

.calendar-event {
    background: var(--white);
    border-left: 4px solid #ddd;
    padding: 15px 20px;
    margin-bottom: 12px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: transform 0.2s, box-shadow 0.2s;
}

.calendar-event:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.event-date {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 120px;
    font-size: 1rem;
}

.event-day {
    color: #777;
    font-weight: normal;
    font-size: 0.9rem;
    margin-left: 5px;
}

.event-description {
    flex: 1;
    color: var(--text-color);
    line-height: 1.6;
}

/* Event Type Colors */
.event-type-league {
    border-left-color: #f4d03f;
    background: #fffef5;
}

.event-type-club {
    border-left-color: #5dade2;
    background: #f0f8ff;
}

.event-type-holiday {
    border-left-color: #95a5a6;
    background: #f5f5f5;
}

.event-type-league:hover {
    background: #fffce6;
}

.event-type-club:hover {
    background: #e6f4ff;
}

.event-type-holiday:hover {
    background: #ececec;
}

/* Jugend Page Grids */
.training-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: start;
}

.why-chess-grid {
    display: grid;
    grid-template-columns: 1fr 256px;
    gap: 20px;
    align-items: start;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE OPTIMIZATIONS
   ======================================== */

/* Tablet and Mobile */
@media (max-width: 1024px) {

    /* Hero Section - Fix text overflow */
    .hero h1 {
        font-size: 1.7rem;
        line-height: 1.25;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .hero {
        padding: 45px 12px;
    }

    .hero-small {
        padding: 35px 12px;
    }

    .hero-small h1 {
        font-size: 1.5rem;
        line-height: 1.25;
    }

    /* Navigation - Hamburger menu */
    header {
        padding: 0 15px;
    }

    .navbar {
        flex-direction: row;
        height: auto;
        padding: 12px 0;
        justify-content: space-between;
    }

    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: flex;
    }

    .logo {
        font-size: 1rem;
        gap: 6px;
    }

    .logo-img {
        height: 38px;
        max-height: 38px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        text-align: center;
        gap: 0;
        padding: 10px 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.active {
        display: flex;
        max-height: 600px;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 12px;
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Show mobile-only items in the dropdown links (as block) */
    .mobile-only {
        display: block !important;
        background-color: rgba(0,0,0,0.2) !important; /* Slightly darker to distinguish */
        font-weight: bold;
    }
    
    /* Dropdown adjustments for mobile */
    .dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.2);
        margin-top: 0;
        border-radius: 0;
        width: 100%;
    }

    .dropdown-content a {
        padding: 10px 20px;
        font-size: 0.85rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

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

    /* Content grid - single column */
    .content-grid {
        grid-template-columns: 1fr;
    }

    /* Main content adjustments */
    main {
        padding: 12px 10px;
        margin-top: 80px;
    }

    /* Card spacing */
    .card {
        padding: 14px;
        margin-bottom: 14px;
    }

    .card h2 {
        font-size: 1.2rem;
    }

    /* Calendar responsive */
    .calendar-event {
        flex-direction: column;
        gap: 8px;
        padding: 12px 14px;
    }

    .event-date {
        min-width: auto;
        font-size: 0.9rem;
    }

    .event-description {
        font-size: 0.9rem;
    }

    .month-separator {
        font-size: 1.35rem;
        margin: 25px 0 12px 0;
    }

    /* Jugend Page Mobile Grids */
    .training-grid,
    .why-chess-grid {
        grid-template-columns: 1fr;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.45rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 0.88rem;
        line-height: 1.35;
    }

    .hero {
        padding: 38px 10px;
    }

    .hero-small {
        padding: 30px 10px;
    }

    .hero-small h1 {
        font-size: 1.3rem;
    }

    .logo {
        font-size: 0.95rem;
    }

    .logo-img {
        height: 32px;
        max-height: 32px;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 10px;
    }

    main {
        padding: 10px 8px;
        margin-top: 70px;
    }

    .card {
        padding: 12px;
    }

    .card h2 {
        font-size: 1.1rem;
    }

    .month-separator {
        font-size: 1.2rem;
    }

    .event-date {
        font-size: 0.85rem;
    }

    .event-description {
        font-size: 0.85rem;
    }
}

/* Add visual indicator for dropdowns on mobile */
.dropdown .dropbtn::after {
    content: ' ▼';
    font-size: 0.7em;
    margin-left: 5px;
}