@import url("https://fonts.googleapis.com/css2?family=Allura&display=swap");

:root {
    --green: #174025;
    --green-dark: #174025;
    --green-light: #edf3ed;
    --text: #273129;
    --muted: #68736b;
    --line: #dce3dc;
    --paper: #ffffff;
    --soft: #f5f7f4;
    --max: 1120px;
}

*, *::before, *::after { 
    box-sizing: border-box; 
}

html, body { 
    margin: 0; 
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background: var(--paper); 
    color: var(--text); 
    font-family: Arial, Helvetica, sans-serif; 
    line-height: 1.55; 
    scroll-behavior: smooth;
}

.site-shell {
    width: 100%;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: Georgia, serif;
    color: #174025;
}

input, select, textarea, button {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
}

a { 
    color: inherit; 
    text-decoration: none; 
}

.container {
    width: calc(100% - 40px);
    max-width: var(--max);
    margin-left: auto;
    margin-right: auto;
}

/* 1. Topbar */
.topbar { 
    background: #174025; 
    color: #fff; 
    font-size: .88rem; 
}
.topbar-inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; }
.topbar a:hover { text-decoration: underline; }

/* 2. Header & Branding */
.header { 
    min-height: 116px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 16px; 
}
.brand { 
    display: flex; 
    align-items: center; 
    gap: 16px; 
    min-width: 0; 
    flex-shrink: 0;
}
.brand img, .logo-placeholder { 
    height: 88px; 
    width: auto; 
    max-width: 140px; 
    object-fit: contain; 
    flex: none; 
}
.logo-placeholder { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #174025; font-size: .7rem; }

.brand-text {
    min-width: 0;
}

.club-name {
    font-family: Georgia, serif;
    font-size: clamp(1.65rem, 2.2vw, 2.25rem);
    font-weight: 700;
    color: #174025;
    white-space: nowrap;
    line-height: 1.1;
}
.club-slogan { 
    color: var(--muted); 
    font-size: .9rem; 
    margin-top: 3px; 
    white-space: nowrap;
}

.main-nav { 
    display: flex; 
    align-items: center; 
    gap: 18px; 
    font-size: .94rem; 
    font-weight: 600; 
    white-space: nowrap; 
    flex-shrink: 0;
}
.main-nav a { padding: 8px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: #174025; border-bottom-color: #174025; }

/* 3. Grid-Layout & Hero */
.home-grid { 
    display: grid; 
    grid-template-columns: minmax(0, 1.62fr) minmax(310px, 0.88fr); 
    gap: 26px; 
    align-items: start; 
}
.left-column { min-width: 0; }

.hero-card { position: relative; min-height: 425px; overflow: hidden; background: var(--soft); border-radius: 4px; }
.hero-card > img { display: block; width: 100%; height: 425px; object-fit: cover; }
.hero-caption {
    position: absolute;
    left: 38px;
    top: auto;
    bottom: 28px;
    width: calc(100% - 76px);
    max-width: 650px;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0,0,0,.85), 0 0 10px rgba(0,0,0,.45);
}

.hero-caption::before {
    content: "";
    position: absolute;
    left: -18px;
    right: 35%;
    top: -12px;
    bottom: -12px;
    z-index: -1;
    background: linear-gradient(
        90deg,
        rgba(20,61,34,.34) 0%,
        rgba(20,61,34,.20) 55%,
        rgba(20,61,34,0) 100%
    );
    filter: blur(8px);
    pointer-events: none;
}

.hero-welcome {
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(1.45rem, 2.4vw, 2.15rem);
    font-weight: 700;
    line-height: 1.05;
    margin: 0 0 3px;
}

.hero-name {
    font-family: "Allura", "Segoe Script", "Brush Script MT", cursive;
    font-size: clamp(2.35rem, 3.6vw, 3.35rem);
    font-weight: 400;
    line-height: .92;
    white-space: nowrap;
    margin: 0 0 8px;
}

.hero-caption p {
    margin: 0;
    font-size: clamp(.82rem, 1vw, .98rem);
    line-height: 1.15;
    white-space: nowrap;
}

/* =========================================================
   Rechte Spalte: Karten-Widgets (Termine, Dokumente & Subnav)
========================================================= */
.side-column { 
    display: flex; 
    flex-direction: column; 
    gap: 24px; 
}

.sidebar-card { 
    background: #ffffff; 
    border: 1px solid var(--line); 
    border-radius: 4px;
    padding: 22px 24px 20px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px 0;
    font-family: Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #174025;
}

.widget-icon {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    color: #174025;
    flex: 0 0 20px;
    display: inline-block;
    object-fit: contain;
}

/* Rubrik- / Untermenü-Navigation */
.widget-subnav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.widget-subnav-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 4px;
    color: var(--text);
    font-size: 0.94rem;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.widget-subnav-item a:hover {
    background: var(--soft);
    color: #174025;
}

.widget-subnav-item a.active {
    background: var(--green-light);
    color: #174025;
    font-weight: 700;
}

.widget-subnav-item .subnav-indicator {
    color: #174025;
    font-size: 0.85rem;
    min-width: 14px;
}

/* Termine-Liste Sidebar */
.widget-event-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.widget-event-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.event-date-badge {
    min-width: 48px;
    text-align: center;
    line-height: 1;
    flex-shrink: 0;
}

.event-date-badge .day {
    display: block;
    font-size: 1.85rem;
    font-weight: 800;
    color: #174025;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.event-date-badge .month {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.event-details {
    flex: 1;
    min-width: 0;
}

.event-details strong {
    display: block;
    font-size: 0.94rem;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 2px;
}

.event-details .event-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Dokumente-Liste */
.widget-doc-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.widget-doc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.widget-doc-item:hover strong {
    color: #174025;
    text-decoration: underline;
}

.doc-icon-img {
    width: 28px !important;
    height: 32px !important;
    object-fit: contain;
    flex: 0 0 28px;
    display: block;
}

.doc-details {
    flex: 1;
    min-width: 0;
}

.doc-details strong {
    display: block;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.25;
}

.doc-details span {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
    margin-top: 2px;
}

/* Untere Balken-Buttons */
.widget-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #174025;
    color: #ffffff !important;
    padding: 10px 14px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    margin-top: 20px;
    transition: none;
}

.widget-btn:hover,
.widget-btn:focus,
.widget-btn:active {
    background: #174025 !important;
    color: #ffffff !important;
    text-decoration: none;
}

.empty-hint {
    color: var(--muted);
    font-size: 0.86rem;
    margin: 4px 0;
}

/* =========================================================
   Termin-Übersicht Hauptseite (/termine)
========================================================= */
.events-main-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 24px;
}

.event-main-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: border-color 0.15s ease;
}

.event-main-card:hover {
    border-color: #174025;
}

.event-main-date-badge {
    min-width: 54px;
    text-align: center;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 8px 4px;
    flex-shrink: 0;
    line-height: 1;
}

.event-main-date-badge .main-day {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #174025;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.event-main-date-badge .main-month {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    margin-top: 3px;
    letter-spacing: 0.5px;
}

.event-main-body {
    flex: 1;
    min-width: 0;
}

.event-main-meta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 4px;
}

.event-main-title {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #174025;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.event-main-description {
    font-size: 0.92rem;
    color: #4b5563;
    line-height: 1.5;
}

/* =========================================================
   News, Schnellzugriff & Content
========================================================= */
.section-kicker {
    font-family: Georgia, serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #174025;
}

.text-link { display: inline-block; color: #174025; font-weight: 700; font-size: .9rem; }

.news-section { padding: 48px 0 38px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 20px; }
.section-heading h2 { 
    margin: 2px 0 0; 
    font-family: Georgia, serif;
    font-size: clamp(1.45rem, 2vw, 1.75rem); 
    font-weight: 700;
    line-height: 1.25;
    color: #174025; 
}

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: hidden; }
.news-image { 
    width: 100%; 
    aspect-ratio: 16 / 9; 
    object-fit: cover; 
    display: block; 
}
.image-placeholder { display: grid; place-items: center; background: var(--green-light); color: #7d8b80; }
.news-body { padding: 20px 21px 23px; }
.news-body time { color: #174025; font-size: .76rem; font-weight: 700; }
.news-body h3 { margin: 6px 0 7px; font: 700 1.2rem Georgia, serif; color: #174025; }
.news-body p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Schnellzugriff Kacheln (6 Kacheln) */
.nav-images-section {
    padding: 0 0 45px;
}

.nav-images {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.nav-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transition: transform .18s ease;
}

.nav-image:hover {
    transform: translateY(-4px);
}

.nav-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

.intro-section { background: var(--soft); padding: 60px 0; }
.intro-inner { max-width: 900px; text-align: center; }
.intro-inner h2 { margin: 8px 0 16px; font: 700 clamp(1.8rem, 2.5vw, 2.3rem) Georgia, serif; color: #174025; }
.intro-line {
    display: block;
    width: min(300px, 55%);
    max-width: 300px;
    height: auto;
    margin: 0 auto 18px;
}

.intro-inner p {
    max-width: 780px;
    margin: auto;
    color: #526057;
    font-size: 1.04rem;
}

/* =========================================================
   4 Werte-Bereich Footer (Gemeinschaft, Natur, Verantwortung, Tradition)
========================================================= */
.values-section {
    width: 100%;
    background: #174025;
    padding: 22px 0 26px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    max-width: var(--max);
    margin: 0 auto;
    align-items: center;
}

.value-item {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-right: 1px solid rgba(255,255,255,.14);
}

.value-item:last-child {
    border-right: 0;
}

.value-item img {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    object-fit: contain;
}

.footer { background: #174025; color: #dfe8e1; }
.footer-inner { min-height: 110px; display: flex; align-items: center; justify-content: space-between; gap: 30px; font-size: .86rem; }
.footer strong {
    color: #fff;
    font-family: Georgia, serif;
    font-size: 1.12rem;
    font-weight: 700;
}

/* Inhaltsseiten (page.php) & Text-Layout */
.page-article { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.page-header-image { width: 100%; height: 220px; object-fit: cover; display: block; border-bottom: 1px solid var(--line); }
.page-article-content { padding: 28px 36px 36px 36px; }

.page-article h1 { 
    font-family: Georgia, serif; 
    color: #174025; 
    margin: 0 0 14px 0; 
    font-size: clamp(1.45rem, 2vw, 1.75rem); 
    line-height: 1.25;
}

.page-content-text {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text); 
    font-size: 1rem; 
    line-height: 1.6;
    text-align: justify;
}
.page-content-text h2 {
    font-family: Georgia, serif;
    font-size: 1.25rem;
    color: #174025;
    margin-top: 22px;
    margin-bottom: 10px;
}
.page-content-text h3 {
    font-family: Georgia, serif;
    font-size: 1.1rem;
    color: #174025;
    margin-top: 18px;
    margin-bottom: 8px;
}
.page-content-text h4 {
    font-family: Georgia, serif;
    font-size: 1rem;
    color: #174025;
    margin-top: 14px;
    margin-bottom: 6px;
}
.page-content-text p, 
.page-content-text li, 
.page-content-text td, 
.page-content-text span {
    font-family: Arial, Helvetica, sans-serif;
}

.page-content-text::after { content: ""; display: table; clear: both; }
.page-content-text img { max-width: 100%; height: auto; }
.page-content-text img[style*="float: right"], .page-content-text p img[style*="float: right"] { float: right; margin: 0 0 1rem 1.5rem; }
.page-content-text img[style*="float: left"], .page-content-text p img[style*="float: left"] { float: left; margin: 0 1.5rem 1rem 0; }
.page-content-text img.aligncenter { display: block; margin: 0 auto; }

/* Kontaktformular Button */
.btn-submit {
    display: inline-block;
    padding: 12px 24px;
    background: #174025;
    color: #ffffff;
    border: none;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: none;
}
.btn-submit:hover,
.btn-submit:focus {
    background: #174025;
    color: #ffffff;
}

/* =========================================================
   Dokumenten-Styles & Downloads (2-Spalten-Raster)
========================================================= */
.doc-category-box {
    margin-top: 28px;
    margin-bottom: 28px;
}

.doc-category-title {
    font-family: Georgia, serif;
    font-size: 1.25rem;
    color: var(--green-dark, #174025);
    margin: 0 0 14px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--soft, #edf4ee);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.doc-category-count {
    font-size: 0.8rem;
    font-family: Arial, sans-serif;
    font-weight: normal;
    color: var(--muted, #68736b);
    background: var(--soft, #edf4ee);
    padding: 2px 8px;
    border-radius: 12px;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Hier wird der weiße Hintergrund erzwungen */
.doc-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff !important;
    border: 1px solid var(--line, #dce3dc);
    border-radius: 6px;
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

/* Hover-Effekt: Hellgrüner Hintergrund */
.doc-card-item:hover {
    transform: translateY(-2px);
    border-color: #174025;
    background: var(--soft, #edf4ee) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.doc-card-icon {
    width: 28px;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain;
}

.doc-card-info {
    flex: 1;
    min-width: 0;
}

.doc-card-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text, #273129);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-card-meta {
    display: block;
    font-size: 0.78rem;
    color: var(--muted, #68736b);
    margin-top: 2px;
}

.doc-card-action {
    color: #174025;
    font-size: 1.1rem;
    font-weight: bold;
    padding-left: 4px;
    transition: transform 0.15s ease;
}

.doc-card-item:hover .doc-card-action {
    transform: translate(2px, -2px);
}

/* PDF Links im regulären Textbereich (ausgeschlossen sind die Kacheln: :not(.doc-card-item)) */
.page-content-text a[href*=".pdf"]:not(.doc-card-item) { display: inline-flex; align-items: center; color: #174025; font-weight: 600; text-decoration: none; background: var(--soft); padding: 6px 12px; border: 1px solid var(--line); border-radius: 4px; margin: 6px 0; transition: background 0.2s; font-size: 0.95rem; }
.page-content-text a[href*=".pdf"]:not(.doc-card-item):hover { background: #e2ede5; text-decoration: underline; }
.page-content-text a[href*=".pdf"]:not(.doc-card-item)::before { content: ""; display: inline-block; width: 22px; height: 26px; margin-right: 10px; background-image: url('images/pdf.png'); background-size: contain; background-repeat: no-repeat; background-position: center; }

/* Responsive Breakpoints */
@media (max-width: 980px) {
    .header { flex-direction: column; align-items: flex-start; padding: 20px 0; gap: 14px; }
    .brand { width: 100%; }
    .club-name { white-space: normal; }
    .main-nav { width: 100%; flex-wrap: wrap; gap: 10px 18px; }
    .home-grid { grid-template-columns: 1fr; }
    .side-column { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .hero-card, .hero-card > img { min-height: 400px; height: 400px; }
    .news-grid { grid-template-columns: 1fr 1fr; }
    .news-card:last-child { grid-column: 1 / -1; }
    .values-grid { width: calc(100% - 36px); }
    .values-section { grid-template-columns: 1fr 1fr; gap: 24px 0; }
    .value-item:nth-child(2) { border-right: 0; }
}

@media (max-width: 760px) {
    .container { width: calc(100% - 28px); }
    .side-column { display: flex; flex-direction: column; }
    .values-grid { grid-template-columns: 1fr 1fr; }
    .value-item:nth-child(2) { border-right: 0; }
    .value-item:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.14); }
    .nav-images { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
    .event-main-card { flex-direction: column; gap: 12px; }
    .page-article-content { padding: 20px 16px; }
}

@media (max-width: 650px) {
    .topbar-inner { min-height: 34px; font-size: 0.8rem; }
    .brand { gap: 10px; }
    .brand img, .logo-placeholder { 
        height: 54px; 
        width: auto; 
        max-width: 70px; 
    }
    .club-name { 
        font-size: 1.28rem; 
        white-space: normal; 
        line-height: 1.15;
    }
    .club-slogan { 
        font-size: .78rem; 
        white-space: normal;
        margin-top: 2px;
    }
    .main-nav { 
        width: 100%; 
        gap: 8px 14px; 
        font-size: .84rem; 
    }
    .hero-card, .hero-card > img { min-height: 320px; height: 320px; }
    .hero-caption {
        left: 18px;
        bottom: 18px;
        width: calc(100% - 36px);
        max-width: none;
    }
    .hero-welcome { font-size: 1.15rem; }
    .hero-name { font-size: 2.1rem; }
    .hero-caption p { font-size: .8rem; white-space: normal; }
    
    .doc-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner { flex-direction: column; align-items: flex-start; justify-content: center; padding: 24px 0; }
}

@media (max-width: 560px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-card:last-child { grid-column: auto; }
    .nav-images { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .values-grid { grid-template-columns: 1fr; width: calc(100% - 28px); }
    .value-item, .value-item:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.14);
    }
    .value-item:last-child { border-bottom: 0; }
    .value-item img { max-width: 240px; }
    .intro-line { width: 220px; max-width: 70%; }
}