/* =====================================================
   Musikkapelle Schleching - Stylesheet
   Farben: #860200 Rot, #fbf5eb Beige, #d7cbb5 Rahmen
   ===================================================== */

/* Reset & Basis */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    background-color: #fbf5eb;
    color: #333;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #860200;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #a01000;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4 {
    font-family: Georgia, serif;
    color: #860200;
    margin-bottom: 0.5em;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; border-bottom: 2px solid #d7cbb5; padding-bottom: 0.3em; margin-bottom: 1em; }
h3 { font-size: 1.2rem; }

p {
    margin-bottom: 1em;
}

/* =====================================================
   Header
   ===================================================== */
.site-header {
    background: linear-gradient(135deg, #860200, #a01000, #860200);
    padding: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-logo {
    display: none;
    width: auto;
    height: 100px;
}

.schriftzug {
    height: 90px;
    width: auto;
    display: block;
}

@media (min-width: 992px) {
    .header-logo {
        display: block;
    }
}

/* Admin-Link (rechts im Header) */
.admin-link {
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fbf5eb;
    font-size: 1.1rem;
    text-decoration: none;
    background: rgba(251, 245, 235, 0.12);
}

.admin-link:hover {
    background: rgba(251, 245, 235, 0.25);
    color: #fff;
    text-decoration: none;
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0;
}

.main-nav a {
    display: block;
    color: #fbf5eb;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 4px;
    min-width: 104px;
    text-align: center;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: rgba(251, 245, 235, 0.2);
    color: #fff;
    text-decoration: none;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 35px;
    height: 35px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #fbf5eb;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

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

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

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

/* =====================================================
   Content
   ===================================================== */
.content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
    width: 100%;
}

.page-box {
    background: #fff;
    border: 1px solid #d7cbb5;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* =====================================================
   Startseite / Hero
   ===================================================== */
.hero {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero img {
    width: 100%;
    display: block;
    border-radius: 8px;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(134, 2, 0, 0.85));
    color: #fbf5eb;
    padding: 2rem 1.5rem 1.5rem;
}

.hero-overlay h2 {
    color: #fbf5eb;
    border: none;
    font-size: 1.6rem;
    margin-bottom: 0.3em;
}

.hero-overlay p {
    margin: 0;
    font-size: 1.05rem;
}

/* Nächste Termine auf Startseite */
.upcoming-events {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.event-card {
    background: #fff;
    border: 1px solid #d7cbb5;
    border-left: 4px solid #860200;
    border-radius: 6px;
    padding: 1rem 1.2rem;
    transition: box-shadow 0.2s;
}

.event-card:hover {
    box-shadow: 0 4px 12px rgba(134, 2, 0, 0.15);
}

.event-date {
    font-weight: bold;
    color: #860200;
    font-size: 0.9rem;
}

.event-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0.3em 0;
}

.event-location {
    color: #666;
    font-size: 0.9rem;
}

/* =====================================================
   Termine
   ===================================================== */
.termine-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.termine-table th {
    background: linear-gradient(135deg, #860200, #a01000);
    color: #fbf5eb;
    padding: 0.8rem 1rem;
    text-align: left;
    font-size: 0.95rem;
}

.termine-table td {
    padding: 0.45rem 1rem;
    border-bottom: 1px solid #d7cbb5;
    vertical-align: top;
    line-height: 1.35;
}

.termine-table tr:nth-child(even) {
    background-color: rgba(215, 203, 181, 0.15);
}

.termine-table tr:hover {
    background-color: rgba(134, 2, 0, 0.05);
}

.termin-vergangen td {
    color: #999;
}

.termin-abgesagt td {
    text-decoration: line-through;
    color: #c00;
}

.termin-abgesagt td::after {
    content: '';
}

.badge-abgesagt {
    display: inline-block;
    background: #c00;
    color: #fff;
    font-size: 0.7rem;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    margin-left: 0.5em;
    text-decoration: none;
    font-weight: bold;
    vertical-align: middle;
}

.termine-filter {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.termine-filter .btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.google-calendar-wrapper {
    margin-top: 2rem;
}

.google-calendar-wrapper iframe {
    width: 100%;
    height: 600px;
    border: 1px solid #d7cbb5;
    border-radius: 8px;
}

/* =====================================================
   Musikanten
   ===================================================== */
.instrument-section {
    margin-bottom: 2.5rem;
}

.instrument-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #d7cbb5;
}

.instrument-header img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.instrument-header h3 {
    color: #860200;
    font-size: 1.3rem;
    margin: 0;
}

.musikanten-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
    list-style: none;
}

.musikant-item {
    background: #fff;
    border: 1px solid #d7cbb5;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.musikant-item .name {
    display: block;
    width: 100%;
    font-weight: bold;
}

.musikant-item .zusatz {
    display: block;
    width: 100%;
    font-size: 0.85rem;
    color: #666;
    margin-left: 0;
    margin-top: 0.1rem;
}

/* =====================================================
   Über uns
   ===================================================== */
.about-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.about-images img {
    border-radius: 8px;
    border: 2px solid #d7cbb5;
    width: 100%;
    object-fit: cover;
}

/* =====================================================
   Kontakt
   ===================================================== */
.contact-form {
    max-width: 600px;
}

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

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: #860200;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #d7cbb5;
    border-radius: 4px;
    font-family: Georgia, serif;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #860200;
    box-shadow: 0 0 0 2px rgba(134, 2, 0, 0.15);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #860200, #a01000);
    color: #fbf5eb;
    border: none;
    border-radius: 4px;
    font-family: Georgia, serif;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.btn:hover {
    background: linear-gradient(135deg, #a01000, #c01500);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #d7cbb5;
    color: #333;
}

.btn-secondary:hover {
    background: #c4b89e;
    color: #333;
}

.btn-danger {
    background: #c00;
}

.btn-danger:hover {
    background: #e00;
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
}

/* =====================================================
   Anwesenheit / Rückmeldung
   ===================================================== */
.attendance-form {
    max-width: 700px;
}

.attendance-radios {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.attendance-radios label {
    display: grid !important;
    grid-template-columns: 22px auto;
    align-items: center;
    justify-content: flex-start !important;
    column-gap: 0.5rem;
    width: 100% !important;
    line-height: 1.2;
    text-align: left;
}

.attendance-radios label span {
    white-space: nowrap;
}

.attendance-radios input[type="radio"] {
    margin: 0;
    justify-self: start;
}

.attendance-group {
    margin-bottom: 1.2rem;
}

.attendance-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.5rem;
}

.attendance-list li {
    border: 1px solid #d7cbb5;
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
}

.attendance-badge {
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    white-space: nowrap;
    font-weight: bold;
}

.status-dabei { background: #d4edda; color: #155724; }
.status-vielleicht { background: #fff3cd; color: #856404; }
.status-nein { background: #f8d7da; color: #721c24; }
.status-offen { background: #e2e3e5; color: #495057; }

/* =====================================================
   Impressum
   ===================================================== */
.impressum-section {
    margin-bottom: 1.5rem;
}

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
    background: linear-gradient(135deg, #860200, #a01000, #860200);
    color: #fbf5eb;
    padding: 1.5rem 1rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-logo {
    height: 60px;
    width: auto;
    filter: brightness(1.1);
    transition: transform 0.2s;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-text {
    font-size: 0.85rem;
    opacity: 0.9;
}

.footer-text a {
    color: #fbf5eb;
    text-decoration: underline;
}

.footer-text a:hover {
    color: #fff;
}

/* =====================================================
   Alerts / Messages
   ===================================================== */
.alert {
    padding: 1rem 1.2rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(180deg, #860200, #6a0100);
        transition: right 0.3s ease;
        z-index: 999;
        padding-top: 70px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    }

    .main-nav.open {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(251, 245, 235, 0.1);
        border-radius: 0;
        font-size: 1.1rem;
    }

    .hero-overlay h2 {
        font-size: 1.2rem;
    }

    .hero-overlay p {
        font-size: 0.9rem;
    }

    .content {
        padding: 1rem 0.8rem;
    }

    .page-box {
        padding: 1.2rem;
    }

    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.2rem; }

    .upcoming-events {
        grid-template-columns: 1fr;
    }

    .musikanten-list {
        grid-template-columns: 1fr;
    }

    /* Termine Tabelle responsiv */
    .termine-table thead {
        display: none;
    }

    .termine-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #d7cbb5;
        border-radius: 6px;
        padding: 0.8rem;
        background: #fff;
    }

    .termine-table td {
        display: block;
        padding: 0.2rem 0;
        border: none;
    }

    .termine-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #860200;
        display: inline;
        margin-right: 0.5rem;
    }

    .google-calendar-wrapper iframe {
        height: 400px;
    }

    .footer-logos {
        gap: 1rem;
    }

    .footer-logo {
        height: 45px;
    }

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

}

@media (max-width: 480px) {
    .schriftzug {
        height: 35px;
    }

    .header-inner {
        padding: 0.4rem 0.6rem;
    }

    .page-box {
        padding: 0.8rem;
    }
}

/* =====================================================
   Utility
   ===================================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
