/* ===========================================================================
   OGV Edling — Custom Theme Styles
   Nature-inspired green theme for Obst- und Gartenbauverein Edling e.V.
   =========================================================================== */

/* ── Prose Typography ─────────────────────────────────────────────────────── */

.prose {
    color: #374151;
    line-height: 1.75;
    max-width: 65ch;
}
.prose.max-w-none { max-width: none; }

/* ── Headings ─────────────────────────────────────────────────────────────── */
.prose h1 { font-size: 2.25em; font-weight: 800; margin-top: 0; margin-bottom: 0.9em; line-height: 1.1; color: #14532d; }
.prose h2 { font-size: 1.5em;  font-weight: 700; margin-top: 2em; margin-bottom: 1em;  line-height: 1.33; color: #14532d; }
.prose h3 { font-size: 1.25em; font-weight: 600; margin-top: 1.6em; margin-bottom: 0.6em; line-height: 1.6; color: #166534; }
.prose h4 { font-size: 1.1em;  font-weight: 600; margin-top: 1.5em; margin-bottom: 0.5em; line-height: 1.5; color: #166534; }

.prose h2 + * { margin-top: 0; }
.prose h3 + * { margin-top: 0; }

/* ── Paragraphs ───────────────────────────────────────────────────────────── */
.prose p { margin-top: 1.25em; margin-bottom: 1.25em; }

/* ── Links ────────────────────────────────────────────────────────────────── */
.prose a { color: #16a34a; text-decoration: underline; text-decoration-color: #bbf7d0; text-underline-offset: 3px; font-weight: 500; transition: color 0.15s, text-decoration-color 0.15s; }
.prose a:hover { color: #15803d; text-decoration-color: #16a34a; }

.prose-green a { color: #16a34a; }
.prose-green a:hover { color: #15803d; }

/* ── Bold / Italic ────────────────────────────────────────────────────────── */
.prose strong { color: #111827; font-weight: 600; }
.prose em { font-style: italic; }

/* ── Lists ────────────────────────────────────────────────────────────────── */
.prose ol { list-style-type: decimal; margin-top: 1.25em; margin-bottom: 1.25em; padding-left: 1.625em; }
.prose ul { list-style-type: disc;    margin-top: 1.25em; margin-bottom: 1.25em; padding-left: 1.625em; }
.prose li { margin-top: 0.5em; margin-bottom: 0.5em; }
.prose ol > li::marker { color: #16a34a; font-weight: 400; }
.prose ul > li::marker { color: #4ade80; }
.prose li p { margin-top: 0.75em; margin-bottom: 0.75em; }

/* ── Blockquotes ──────────────────────────────────────────────────────────── */
.prose blockquote {
    font-weight: 500;
    font-style: italic;
    color: #166534;
    border-left: 4px solid #4ade80;
    padding: 0.5em 0 0.5em 1em;
    margin: 1.6em 0;
    quotes: "\201C""\201D""\2018""\2019";
    background: #f0fdf4;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 1rem 1.25rem;
}
.prose blockquote p:first-of-type::before { content: open-quote; }
.prose blockquote p:last-of-type::after  { content: close-quote; }

/* ── Code ─────────────────────────────────────────────────────────────────── */
.prose code {
    font-size: 0.875em;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    padding: 0.15em 0.35em;
    border-radius: 0.25rem;
    color: #166534;
}
.prose pre {
    background: #14532d;
    color: #dcfce7;
    border-radius: 0.75rem;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.75em 0;
}
.prose pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
}

/* ── Tables ───────────────────────────────────────────────────────────────── */
.prose table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 2em 0; font-size: 0.875em; }
.prose thead th { background: #f0fdf4; color: #14532d; font-weight: 600; padding: 0.75em 1em; text-align: left; border-bottom: 2px solid #86efac; }
.prose tbody td { padding: 0.75em 1em; border-bottom: 1px solid #dcfce7; }
.prose tbody tr:hover { background: #f0fdf4; }

/* ── Images ───────────────────────────────────────────────────────────────── */
.prose img {
    border-radius: 1rem;
    margin: 2em auto;
    max-width: 100%;
    height: auto;
}

/* ── Horizontal Rules ─────────────────────────────────────────────────────── */
.prose hr {
    border: none;
    border-top: 2px solid #dcfce7;
    margin: 3em 0;
}

/* ── Vorstand (Board member) Cards ────────────────────────────────────────── */
.vorstand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.vorstand-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid #dcfce7;
    padding: 1.5rem;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}

.vorstand-card:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.vorstand-card img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    margin: 0 auto 1rem;
    border: 4px solid #dcfce7;
}

.vorstand-card h3 {
    font-size: 1.1em;
    font-weight: 700;
    color: #14532d;
    margin: 0 0 0.25rem;
}

.vorstand-card .role {
    font-size: 0.875em;
    color: #16a34a;
    font-weight: 500;
}

/* ── Smooth scrolling ─────────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

/* ── Selection color ──────────────────────────────────────────────────────── */
::selection {
    background: #bbf7d0;
    color: #14532d;
}

/* ── Focus styles ─────────────────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* ── Photo Gallery ────────────────────────────────────────────────────────── */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 2rem 0;
}
@media (min-width: 640px)  { .gallery { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 0.75rem;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #f0fdf4;
}
.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 1;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
    transition: transform 0.3s;
}
.gallery-item:hover img {
    transform: scale(1.08);
}

/* ── Lightbox Overlay ─────────────────────────────────────────────────────── */
#lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 1rem;
}
#lightbox-overlay.active {
    display: flex;
}
#lightbox-overlay img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    margin: 0;
}
#lightbox-counter {
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    margin-top: 1rem;
    font-weight: 500;
}
.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}
.lightbox-btn:hover, .lightbox-btn:focus-visible {
    background: rgba(255,255,255,0.3);
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}
.lightbox-close:hover, .lightbox-close:focus-visible {
    background: rgba(255,255,255,0.3);
}

/* ── Screen reader only ───────────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
