/*
 * style.css – Dorf-Website Custom Styles
 * Bootstrap lokal als Basis, hier nur Ergänzungen & Anpassungen
 */

/* ── Farben ── */
:root {
    --village-green:     #2d6a4f;
    --village-green-light: #52b788;
    --village-brown:     #6b4226;
    --village-bg:        #f8f5f0;
}

/* ── Allgemein ── */
body {
    background-color: var(--village-bg);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ── Navigation ── */
.bg-village {
    background-color: var(--village-green) !important;
}

.navbar-dark .navbar-nav .nav-link {
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    transition: background 0.15s;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ── Hero-Bereich (Startseite) ── */
.hero-section {
    background: linear-gradient(135deg, var(--village-green) 0%, var(--village-green-light) 100%);
    color: #fff;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ── Section-Titel ── */
.section-title {
    color: var(--village-green);
    border-left: 4px solid var(--village-green-light);
    padding-left: 0.75rem;
}

/* ── Event-Datum-Badge ── */
.event-date-badge {
    background-color: var(--village-green);
    color: #fff;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    min-width: 48px;
    font-size: 0.85rem;
}

/* ── Galerie ── */
.gallery-item {
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── News-Karten ── */
.news-card-img {
    height: 180px;
    object-fit: cover;
}

.news-card-placeholder {
    height: 180px;
    background-color: #e9ecef;
    font-size: 3rem;
}

.news-hero-img {
    max-height: 420px;
    object-fit: cover;
}

.news-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

/* ── Shoutbox ── */
.shoutbox-entry {
    border-left: 3px solid var(--village-green-light) !important;
}

/* ── Footer ── */
.footer-village {
    background-color: var(--village-green);
}

.footer-village a:hover {
    color: var(--village-green-light) !important;
}

/* ── Admin-Sidebar ── */
@media (max-width: 767.98px) {
    .min-vh-100 {
        min-height: auto !important;
    }
}


/* ══════════════════════════════════════════════════════════
   STICKY FOOTER – Footer klebt immer am unteren Rand.
   Bei wenig Content: Footer = Ende des Viewports.
   Bei viel Content:  Footer wandert mit nach unten.
   ══════════════════════════════════════════════════════════ */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* main bekommt den restlichen Platz */
#main-content {
    flex: 1 0 auto;
}

/* Footer darf nicht schrumpfen */
.footer-village {
    flex-shrink: 0;
}

/* ── Card-Header Farbe für Überschriften in card-headers sichern ── */
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5 {
    color: inherit;
}

/* ── bg-village card-header: Text immer weiß ── */
.card-header.bg-village,
.card-header.bg-village * {
    color: #fff;
}

/* ══════════════════════════════════════════════════════════
   SCHNELLBEARBEITEN-BUTTONS (nur für eingeloggte Admins)
   ══════════════════════════════════════════════════════════ */

/* Button direkt in Card-Headern */
.quick-edit-btn {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    line-height: 1.4;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0.92;
    transition: opacity 0.15s, transform 0.1s;
}
.quick-edit-btn:hover {
    opacity: 1;
    transform: scale(1.04);
}
.quick-edit-btn span {
    font-weight: 600;
}

/* Sektion-Banner */
.quick-edit-section {
    border-left: 5px solid #ffc107;
    background: #fff8e1;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Card-Header: Button rechtsbündig ausrichten */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header .h4,
.card-header .h5 {
    margin-bottom: 0;
    flex: 1 1 auto;
}

/* ══════════════════════════════════════════════════════════
   ÜBER MICH – Seiten-Styles
   ══════════════════════════════════════════════════════════ */

/* Zitat-Block */
.uebermich-intro {
    position: relative;
    border-left: 4px solid var(--village-green-light);
    padding: 1rem 1.5rem 1rem 3rem;
    background: rgba(82, 183, 136, 0.07);
    border-radius: 0 8px 8px 0;
    margin-left: 0;
    font-style: italic;
}

.uebermich-intro p {
    margin-bottom: 0;
    color: #2c3e2d;
}

/* Großes dekoratives Anführungszeichen */
.uebermich-quote-icon {
    position: absolute;
    top: 0.4rem;
    left: 0.6rem;
    font-size: 2.2rem;
    color: var(--village-green-light);
    opacity: 0.5;
    line-height: 1;
}

/* Danksagungs-Card */
.uebermich-dank {
    border-left: 5px solid var(--village-green) !important;
    background: linear-gradient(135deg, #f0faf5 0%, #ffffff 60%);
}

/* Icon-Kreis für Danksagung */
.uebermich-dank-icon {
    width: 52px;
    height: 52px;
    background: var(--village-green);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Hervorgehobener Name */
.uebermich-name {
    color: var(--village-green);
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

/* Dunkel-Modus Anpassungen */
html[data-contrast="dk"] .uebermich-intro {
    background: rgba(82, 183, 136, 0.12);
}
html[data-contrast="dk"] .uebermich-intro p {
    color: #c8e6c9;
}
html[data-contrast="dk"] .uebermich-dank {
    background: linear-gradient(135deg, #1a2f1f 0%, #1e1e1e 60%);
}

/* Hoher-Kontrast Anpassungen */
html[data-contrast="hk"] .uebermich-intro {
    background: #fff;
    border-left-color: #000;
}
html[data-contrast="hk"] .uebermich-intro p { color: #000; }
html[data-contrast="hk"] .uebermich-dank { background: #fff; border-left-color: #000 !important; }
html[data-contrast="hk"] .uebermich-dank-icon { background: #000; }
html[data-contrast="hk"] .uebermich-name { color: #000; }

/* ── Galerie: Album-Übersicht ─────────────────────────────────────────────── */
.gallery-album-card {
    transition: transform .18s ease, box-shadow .18s ease;
    overflow: hidden;
}
.gallery-album-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.15) !important;
}
.gallery-album-cover {
    transition: transform .3s ease;
}
.gallery-album-card:hover .gallery-album-cover {
    transform: scale(1.04);
}
.gallery-album-overlay {
    background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 60%);
    border-radius: 0 0 .375rem .375rem;
}

/* ── Galerie: Einzelbild-Grid ─────────────────────────────────────────────── */
.gallery-item {
    cursor: pointer;
    border-radius: .375rem;
    overflow: hidden;
}
.gallery-thumb {
    transition: transform .2s ease, filter .2s ease;
    width: 100%;
    height: 100%;
    border-radius: .375rem;
}
.gallery-item:hover .gallery-thumb {
    transform: scale(1.06);
    filter: brightness(1.08);
}
.gallery-item:focus-visible {
    outline: 3px solid var(--village-green);
    outline-offset: 2px;
}

/* ── Galerie: Breadcrumb-Leiste (Album-Ansicht) ───────────────────────────── */
.galerie-topbar {
    background: rgba(255, 255, 255, 0.92);
    border-radius: .5rem;
    padding: .5rem .875rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    /* min-height damit die Leiste auch ohne Buttons sichtbar bleibt */
    min-height: 2.75rem;
}
/* ── Galerie: Kommentar-Snippet unter Thumbnail ───────────────────────────── */
.gallery-comment-snippet {
    border-top: 1px solid rgba(0,0,0,.07);
    background: rgba(255,255,255,.85);
    border-radius: 0 0 .375rem .375rem;
    line-height: 1.35;
}
.gallery-comment-snippet a:hover {
    text-decoration: underline;
}

/* ── Like-System ──────────────────────────────────────────────────────────── */
.like-btn {
    display:         inline-flex;
    align-items:     center;
    gap:             .3rem;
    color:           #6c757d;
    background:      none;
    border:          1px solid transparent;
    border-radius:   .375rem;
    padding:         .15rem .45rem;
    font-size:       .8rem;
    cursor:          pointer;
    transition:      color .15s, background .15s, border-color .15s;
    vertical-align:  middle;
}
.like-btn:hover:not(:disabled) {
    color:           var(--bs-success);
    background:      rgba(var(--bs-success-rgb),.08);  
    border-color:    rgba(var(--bs-success-rgb),.25);
}
.like-btn.liked {
    color:           var(--bs-success); /* success */
}
.like-btn i { font-size: .85rem; line-height: 1; }
.like-btn:disabled { opacity: .55; cursor: default; }

/* Kleine Variante im Galerie-Snippet */
.like-btn-sm { font-size: .7rem; padding: .1rem .3rem; }
.like-btn-sm i { font-size: .75rem; }

/* Lightbox-Variante (heller Hintergrund) */
.liked-dark {
    color: rgba(255,255,255,.7);
}
.liked-dark:hover:not(:disabled) {
    color: var(--bs-success);
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.2);
}
.liked-dark.liked { color: var(--bs-success); }

/* ── Link-Sammlung ────────────────────────────────────────────────────────── */
.link-card {
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    cursor: pointer;
}
.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .35rem 1rem rgba(0,0,0,.1) !important;
    border-color: var(--village-green) !important;
}
.link-card:hover .link-domain {
    color: var(--village-green) !important;
}
.link-card-icon {
    transition: transform .2s ease;
}
.link-card:hover .link-card-icon {
    transform: scale(1.15);
}

/* ── Trash-Icon-Link (Admin-Schnelllösch-Link im Frontend) ─────────────────── */
.quick-trash-link {
    font-size:      .85rem;
    text-decoration: none;
    transition:     opacity .15s, transform .1s;
    vertical-align: middle;
}
.quick-trash-link:hover {
    opacity:   1 !important;
    transform: scale(1.15);
}
