/* Hobbiton Brushhand font */
@font-face {
    font-family: 'HobbitonBrushhand';
    src: url('/fonts/HobbitonBrushhandhobbitonBrush-WygA.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Bootstrap theme — watercolour floral palette */
:root {
    --bs-primary:               #9fb989;
    --bs-primary-rgb:           159, 185, 137;
    --bs-secondary:             #c4beaa;
    --bs-secondary-rgb:         196, 190, 170;
    --bs-body-bg:               #faf8f6;
    --bs-body-color:            #68685a;
    --bs-link-color:            #c87878;
    --bs-link-color-rgb:        200, 120, 120;
    --bs-link-hover-color:      #a85050;
    --bs-link-hover-color-rgb:  168, 80, 80;
    --bs-border-color:          #d8d9cc;
    --bs-primary-bg-subtle:     #edf3e8;
    --bs-primary-border-subtle: #bbd49b;
    --bs-primary-text-emphasis: #68685a;
    --bs-danger:                #dcb4b4;
    --bs-danger-rgb:            220, 180, 180;
    --bs-warning:               #f0dc28;
    --bs-warning-rgb:           240, 220, 40;
    --bs-danger-bg-subtle:      #f9eded;
    --bs-warning-bg-subtle:     #fdf9e0;
}

/* Alpine.js: hide x-cloak elements until Alpine initialises */
[x-cloak] { display: none !important; }

/* Smooth scroll with offset for fixed navbar */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

a {
    text-decoration: none;
}

/* Hero section */
.hero {
    background-image: url('/img/SavethedateBlumenrahmen.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    width: 100%;
    aspect-ratio: 876 / 613;
    color: #333;
    padding: 0;
    margin-top: 56px;
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero h1 {
    font-family: 'HobbitonBrushhand', cursive;
    font-size: calc(0.3rem + 5.74vw);
    font-weight: normal;
    margin-bottom: 0.5vw;
    color: #333;
}

.hero p {
    font-family: 'HobbitonBrushhand', cursive;
    font-size: 2.37vw;
    margin-top: 0.5vw;
}

.hero .btn {

}

/* Section spacing */
section {
    padding: 60px 0;
}

section:nth-of-type(even) {
    background-color: #e3e5da;
}

/* Navbar */
.navbar {
    background-color: inherit;
}

/* Navbar active link highlighting */
.navbar-nav .nav-link.active {
    font-weight: bold;
    color: #939f83 !important;
}

/* Form styling */
.form-control:focus,
.form-select:focus {
    border-color: #9fb989;
    box-shadow: 0 0 0 0.25rem rgba(159, 185, 137, 0.25);
}

.btn-primary {
    background-color: #9fb989;
    border-color: #9fb989;
    color: #fff;
}

.btn-primary:hover {
    background-color: #939f83;
    border-color: #939f83;
    color: #fff;
}

/* Timeline cards */
.timeline-card {
    transition: transform 0.2s;
}

.timeline-card:hover {
    transform: translateY(-5px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    section {
        padding: 40px 0;
    }
}

/* Form Validation - Bouncer.js + Bootstrap 5 Integration */
/* Bootstrap 5 liefert bereits .is-invalid, .invalid-feedback, .is-valid */
/* Wir fügen nur kleine Ergänzungen hinzu */

/* Erfolg-Icon für valide Felder (Bootstrap Standard) */
.form-control.is-valid:focus,
.form-select.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Fehler-Icon für invalide Felder (Bootstrap Standard) */
.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Fehlermeldung etwas mehr Abstand */
.invalid-feedback {
    margin-top: 0.35rem;
}

/* Timeline component (bsb-timeline-4, adapted from bs-brain@2.0.4) */
.bsb-timeline-4 {
    --bsb-tl-color: var(--bs-primary-bg-subtle);
    --bsb-tl-circle-color: var(--bs-light);
    --bsb-tl-circle-border-color: var(--bs-primary);
    --bsb-tl-circle-size: 16px;
    --bsb-tl-circle-border-size: 2px;
    --bsb-tl-circle-offset: 8px;
    --bsb-tl-indicator-color: var(--bs-white);
}

.bsb-timeline-4 .timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.bsb-timeline-4 .timeline::after {
    background-color: var(--bsb-tl-color);
    bottom: 0;
    content: "";
    left: 0;
    margin-left: -1px;
    position: absolute;
    top: 0;
    width: 2px;
}

@media (min-width: 768px) {
    .bsb-timeline-4 .timeline::after {
        left: 50%;
    }
}

.bsb-timeline-4 .timeline > .timeline-item {
    margin: 0;
    padding: 0;
    position: relative;
}

.bsb-timeline-4 .timeline > .timeline-item::after {
    background: var(--bsb-tl-circle-color);
    border: var(--bsb-tl-circle-border-size) solid var(--bsb-tl-circle-border-color);
    border-radius: 50%;
    content: "";
    height: var(--bsb-tl-circle-size);
    left: calc(var(--bsb-tl-circle-offset) * -1);
    position: absolute;
    top: calc(50% - var(--bsb-tl-circle-offset));
    width: var(--bsb-tl-circle-size);
    z-index: 1;
}

.bsb-timeline-4 .timeline > .timeline-item .timeline-body {
    margin: 0;
    padding: 0;
    position: relative;
}

.bsb-timeline-4 .timeline > .timeline-item .timeline-meta {
    padding: 2.5rem 0 1rem 2.5rem;
}

.bsb-timeline-4 .timeline > .timeline-item .timeline-content {
    padding: 0 0 2.5rem 2.5rem;
    position: relative;
}

@media (min-width: 768px) {
    .bsb-timeline-4 .timeline > .timeline-item {
        width: 50%;
    }

    .bsb-timeline-4 .timeline > .timeline-item .timeline-meta {
        margin-bottom: 0;
        position: absolute;
        top: calc(50% - 17px);
        width: 100%;
        z-index: 1;
    }

    .bsb-timeline-4 .timeline > .timeline-item .timeline-content {
        padding: 2.5rem;
    }

    .bsb-timeline-4 .timeline > .timeline-item .timeline-indicator {
        position: relative;
    }

    .bsb-timeline-4 .timeline > .timeline-item .timeline-indicator::after {
        border: 10px solid var(--bsb-tl-indicator-color);
        border-color: transparent var(--bsb-tl-indicator-color) transparent transparent;
        border-left-width: 0;
        content: "";
        left: calc(2.5rem - 10px);
        position: absolute;
        top: calc(50% - var(--bsb-tl-circle-offset));
        z-index: 2;
    }

    .bsb-timeline-4 .timeline > .timeline-item.left {
        left: 0;
    }

    .bsb-timeline-4 .timeline > .timeline-item.left::after {
        left: auto;
        right: calc(var(--bsb-tl-circle-offset) * -1);
    }

    .bsb-timeline-4 .timeline > .timeline-item.left .timeline-meta {
        padding: 0 0 0 2.5rem;
        right: -100%;
    }

    .bsb-timeline-4 .timeline > .timeline-item.left .timeline-indicator::after {
        border: 10px solid var(--bsb-tl-indicator-color);
        border-color: transparent transparent transparent var(--bsb-tl-indicator-color);
        border-right-width: 0;
        left: auto;
        right: calc(2.5rem - 10px);
    }

    .bsb-timeline-4 .timeline > .timeline-item.right {
        left: 50%;
    }

    .bsb-timeline-4 .timeline > .timeline-item.right .timeline-meta {
        display: flex;
        justify-content: flex-end;
        left: -100%;
        padding: 0 2.5rem 0 0;
    }
}

/* Floral divider */
.floral-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    height: 8rem;
}

.floral-divider__left,
.floral-divider__right {
    height: 200px;
    width: auto;
    flex-shrink: 0;
}

.floral-divider__left {
    transform: rotate(90deg);
    transform-origin: center center;
}

.floral-divider__right {
    transform: rotate(-90deg);
    transform-origin: center center;
}

/* Honeypot field - hide from users but keep accessible to bots */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Photo upload section */
#fotos .filepond--root {
    font-family: inherit;
}

/* Admin photo gallery */
.gallery-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-thumbnail:hover {
    transform: scale(1.02);
}

.gallery-item {
    overflow: hidden;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #fff;
    font-size: 1.5rem;
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Anmeldung form — event section cards */
.event-section {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    transition: border-color 0.2s ease;
}

.event-section:focus-within {
    border-color: #667eea;
}

/* Radio toggle button group full-width */
.btn-group.attendance-group .btn {
    flex: 1;
}

/* Backend — stat cards with colored top-border accent */
.stat-card {
    border-top: 3px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.stat-card.stat-success  { border-top-color: var(--bs-success); }
.stat-card.stat-danger   { border-top-color: var(--bs-danger); }
.stat-card.stat-primary  { border-top-color: var(--bs-primary); }
.stat-card.stat-secondary { border-top-color: var(--bs-secondary); }

.stat-card.stat-secondary .card-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Backend — sticky table header (accounts for fixed navbar height) */
#rsvp-table thead th {
    position: sticky;
    background-color: var(--bs-body-bg);
    z-index: 10;
    box-shadow: 0 1px 0 var(--bs-border-color);
}

/* Backend — photo gallery square thumbnails */
.gallery-thumbnail-square {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
    border-radius: var(--bs-border-radius);
}

.gallery-thumbnail-square:hover {
    transform: scale(1.03);
}
