/* =====================================================
   Schützenverein Dittenheim – Haupt-Stylesheet
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lato:wght@300;400;700&display=swap');

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

:root {
    --blue:      #1e3a5f;
    --blue-mid:  #2a5082;
    --gold:      #c8a44a;
    --gold-light:#e8c96a;
    --dark:      #0f1e30;
    --cream:     #f5f0e8;
    --overlay:   rgba(10, 20, 35, 0.60);
    --card-bg:   rgba(15, 30, 48, 0.75);
    --card-border: rgba(200, 164, 74, 0.30);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    color: var(--cream);
    background-color: var(--dark);
    min-height: 100vh;
}

/* ----- Background ----- */
.site-bg {
    position: fixed;
    inset: 0;
    background-image: url('../assets/images/Gelber-berg.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.site-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--overlay);
    z-index: -1;
}

/* ----- Header / Navbar ----- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 20, 35, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--card-border);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px 6px;
}

.header-wappen {
    height: 70px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    transition: transform 0.2s ease;
}

.header-wappen:hover {
    transform: scale(1.05);
}

.header-title {
    text-align: center;
    flex: 1;
    padding: 0 16px;
}

.header-title h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.1rem, 2.5vw, 1.65rem);
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.header-title .header-subtitle {
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    font-weight: 300;
    color: var(--cream);
    opacity: 0.75;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ----- Navigation ----- */
.site-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 6px 24px 10px;
    border-top: 1px solid rgba(200, 164, 74, 0.15);
}

.site-nav a {
    font-family: 'Lato', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cream);
    text-decoration: none;
    padding: 6px 18px;
    border-radius: 3px;
    transition: color 0.2s, background 0.2s;
    position: relative;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--gold-light);
}

.site-nav a:hover::after,
.site-nav a.active::after {
    transform: scaleX(1);
}

.site-nav a.active {
    background: rgba(200, 164, 74, 0.10);
}

/* ----- Page Wrapper ----- */
.page-content {
    padding-top: 130px; /* height of fixed header */
    min-height: 100vh;
}

/* ----- Hero Section (index only) ----- */
.hero {
    min-height: calc(100vh - 130px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 24px;
}

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 5px 16px;
    border-radius: 2px;
    margin-bottom: 24px;
    opacity: 0.85;
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--cream);
    text-shadow: 0 3px 16px rgba(0,0,0,0.7);
    max-width: 800px;
    margin-bottom: 20px;
}

.hero h2 span {
    color: var(--gold);
}

.hero-divider {
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin: 0 auto 24px;
}

.hero p {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    font-weight: 300;
    color: var(--cream);
    opacity: 0.85;
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 40px;
}

.hero-cta {
    display: inline-flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 13px 32px;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gold);
    color: var(--dark);
    box-shadow: 0 4px 16px rgba(200, 164, 74, 0.35);
}

.btn-primary:hover {
    background: var(--gold-light);
    box-shadow: 0 6px 20px rgba(200, 164, 74, 0.50);
}

.btn-outline {
    background: transparent;
    color: var(--cream);
    border: 1px solid rgba(245, 240, 232, 0.50);
}

.btn-outline:hover {
    background: rgba(245, 240, 232, 0.08);
    border-color: var(--cream);
}

/* ----- Info Cards (index) ----- */
.info-section {
    padding: 60px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--gold);
    text-align: center;
    margin-bottom: 10px;
}

.section-line {
    width: 50px;
    height: 2px;
    background: var(--gold);
    margin: 0 auto 40px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 32px 24px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(4px);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 14px;
    display: block;
}

.card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--gold);
    margin-bottom: 10px;
}

.card p {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--cream);
    opacity: 0.80;
    line-height: 1.65;
}

.card a {
    color: var(--gold);
    text-decoration: none;
}

.card a:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

/* ----- Generic Content Section ----- */
.content-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 50px 24px 80px;
}

.content-section .section-heading {
    text-align: left;
}

.content-section .section-line {
    margin-left: 0;
}

.content-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 36px;
    backdrop-filter: blur(4px);
    line-height: 1.75;
}

.content-box p + p {
    margin-top: 14px;
}

.content-box h3 {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    font-size: 1.2rem;
    margin: 24px 0 10px;
}

.kontakt-phone-link {
    color: var(--gold-light);
    text-decoration: underline;
    text-decoration-color: rgba(232, 201, 106, 0.75);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1.5px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.kontakt-phone-link:hover,
.kontakt-phone-link:focus-visible {
    color: var(--cream);
    text-decoration-color: var(--cream);
}

.kontakt-phone-link:focus-visible {
    outline: 2px solid rgba(232, 201, 106, 0.45);
    outline-offset: 3px;
}

/* ----- Gallery Grid (bilder.php) ----- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.gallery-placeholder {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    aspect-ratio: 4/3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--cream);
    opacity: 0.5;
    font-size: 0.85rem;
}

.gallery-placeholder span {
    font-size: 2rem;
}

.gallery-section {
    margin-bottom: 2.5rem;
}

.gallery-section-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--card-border);
}

.gallery-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gallery-trigger {
    appearance: none;
    background: transparent;
    border: 0;
    cursor: zoom-in;
    display: block;
    padding: 0;
    text-align: inherit;
}

.gallery-trigger:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: -2px;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.gallery-trigger:hover img,
.gallery-trigger:focus-visible img {
    transform: scale(1.03);
}

.gallery-caption {
    padding: 0.45rem 0.7rem;
    font-size: 0.8rem;
    color: var(--cream);
    font-style: italic;
    border-top: 1px solid var(--card-border);
}

body.gallery-modal-open {
    overflow: hidden;
}

.gallery-modal {
    align-items: center;
    background: rgba(8, 16, 28, 0.88);
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    padding: 32px;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.22s ease;
    z-index: 250;
}

.gallery-modal[hidden] {
    display: none;
}

.gallery-modal.is-open,
.gallery-modal.is-closing {
    pointer-events: auto;
}

.gallery-modal.is-open {
    opacity: 1;
}

.gallery-modal__backdrop {
    inset: 0;
    position: absolute;
}

.gallery-modal__dialog {
    background: rgba(10, 20, 35, 0.96);
    border: 1px solid rgba(200, 164, 74, 0.4);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    max-height: min(90vh, 960px);
    max-width: min(92vw, 1200px);
    opacity: 0;
    overflow: hidden;
    position: relative;
    transform: translateY(12px) scale(0.98);
    transition: opacity 0.22s ease, transform 0.22s ease;
    width: auto;
    z-index: 1;
}

.gallery-modal.is-open .gallery-modal__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gallery-modal__close {
    align-items: center;
    appearance: none;
    background: rgba(10, 20, 35, 0.72);
    border: 1px solid rgba(200, 164, 74, 0.35);
    border-radius: 999px;
    color: var(--cream);
    cursor: pointer;
    display: inline-flex;
    font-size: 1.8rem;
    height: 42px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: 14px;
    top: 14px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    width: 42px;
    z-index: 2;
}

.gallery-modal__close:hover,
.gallery-modal__close:focus-visible {
    background: rgba(200, 164, 74, 0.2);
    color: var(--gold-light);
    transform: scale(1.05);
}

.gallery-modal__close:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}

.gallery-modal__image {
    display: block;
    height: auto;
    max-height: calc(90vh - 88px);
    max-width: min(92vw, 1200px);
    width: 100%;
}

.gallery-modal__caption {
    border-top: 1px solid rgba(200, 164, 74, 0.2);
    color: var(--cream);
    font-size: 0.92rem;
    font-style: italic;
    line-height: 1.6;
    padding: 16px 20px 18px;
    text-align: center;
}

/* ----- Table (termine.php) ----- */
.termine-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 0.92rem;
}

.termine-table th {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--gold);
    letter-spacing: 0.05em;
}

.termine-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(200, 164, 74, 0.15);
    color: var(--cream);
    opacity: 0.88;
}

.termine-table tr:last-child td {
    border-bottom: none;
}

.termine-table tr:hover td {
    background: rgba(200, 164, 74, 0.06);
}

.termine-table .badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 2px;
    background: rgba(200, 164, 74, 0.20);
    color: var(--gold-light);
    border: 1px solid var(--card-border);
}

/* ----- Artikel List ----- */
.artikel-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
}

.artikel-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 28px 32px;
    backdrop-filter: blur(4px);
    transition: transform 0.2s;
}

.artikel-card:hover {
    transform: translateX(4px);
}

.artikel-meta {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.75;
    margin-bottom: 8px;
}

.artikel-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--cream);
    margin-bottom: 8px;
}

.artikel-card p {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--cream);
    opacity: 0.75;
    line-height: 1.65;
}

/* ----- Footer ----- */
.site-footer {
    background: rgba(10, 20, 35, 0.92);
    border-top: 1px solid var(--card-border);
    padding: 28px 24px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--cream);
    opacity: 0.65;
    letter-spacing: 0.04em;
}

.site-footer a {
    color: var(--gold);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ----- Kontakt Map ----- */
.kontakt-map {
    margin-top: 28px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.kontakt-map iframe {
    display: block;
    width: 100%;
    height: 420px;
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
    .header-top {
        padding: 8px 12px 4px;
    }

    .header-wappen {
        height: 50px;
    }

    .header-title h1 {
        font-size: 0.95rem;
    }

    .header-title .header-subtitle {
        display: none;
    }

    .site-nav {
        gap: 2px;
        padding: 4px 8px 8px;
        flex-wrap: wrap;
    }

    .site-nav a {
        font-size: 0.78rem;
        padding: 5px 10px;
    }

    .page-content {
        padding-top: 110px;
    }

    .content-box {
        padding: 24px 18px;
    }

    .gallery-modal {
        padding: 16px;
    }

    .gallery-modal__dialog {
        max-width: 100%;
    }

    .gallery-modal__close {
        height: 38px;
        right: 10px;
        top: 10px;
        width: 38px;
    }

    .gallery-modal__image {
        max-height: calc(100vh - 110px);
        max-width: calc(100vw - 32px);
    }

    .gallery-modal__caption {
        font-size: 0.86rem;
        padding: 14px 16px 16px;
    }
}
