/**
 * Bibercare CMS - Startseiten-Styles (Horizontaler & Vertikaler Zeitstrahl)
 * Datei: public/assets/css/pages/home.css
 * 
 * Funktionen:
 * - Horizontaler Zeitstrahl (Desktop ab 769px)
 * - Vertikaler Zeitstrahl (Mobil bis 768px)
 * - Klickbare Marker für Navigation zu Events
 * - Event-Detail-Bereiche mit Banner, Bilder, Galerie
 * - Banner-Bilder (volle Breite, zentriert für Gruppenfotos)
 * - Klickbare Event-Bilder mit Zoom-Hint → Lightbox (lightbox.js / lightbox.css)
 * - Thumbnail-Galerie für zusätzliche Bilder pro Event
 * - Quick-Info Cards und Kontakt-CTA Section
 * - Responsive Design (Desktop → Tablet → Mobil)
 * 
 * Nutzt CSS-Variablen aus: public/assets/css/style.css
 * --primary-color: #2c5aa0
 * --secondary-color: #f8f9fa
 * --accent-color: #e8f2ff
 * --text-dark: #2d3748
 * --text-light: #718096
 * --success-color: #48bb78
 * --border-color: #e2e8f0
 * 
 * Lightbox-Dateien (global geladen via header.php / footer.php):
 * - CSS: public/assets/css/modules/lightbox.css
 * - JS:  public/assets/js/lightbox.js
 * 
 * Pfad: public/assets/css/pages/home.css
 */

/* ==========================================
   PAGE HOME - CONTAINER
   ========================================== */

.page-home {
    width: 100%;
    min-height: 100vh;
    background-color: var(--secondary-color);
}

/* ==========================================
   TIMELINE NAVIGATION (Horizontal, ganz oben)
   Blauer Gradient-Hintergrund mit Titel + Subtitle
   ========================================== */

.timeline-navigation {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e4278 100%);
    color: white;
    padding: 3rem 0 4rem;
    position: relative;
}

.timeline-navigation .container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.timeline-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.timeline-subtitle {
    font-size: 1.125rem;
    text-align: center;
    opacity: 0.9;
    margin-bottom: 3rem;
}

/* ==========================================
   HORIZONTALER ZEITSTRAHL (Desktop)
   Linie mit Markern darauf
   ========================================== */

.timeline-horizontal {
    position: relative;
    padding: 2rem 0;
}

/* Horizontale Linie */
.timeline-line {
    position: absolute;
    left: 5%;
    right: 5%;
    top: 50%;
    height: 3px;
    background: linear-gradient(to right, rgba(255,255,255,0.3), rgba(255,255,255,0.8), rgba(255,255,255,0.3));
    transform: translateY(-50%);
    z-index: 1;
}

/* ==========================================
   TIMELINE MARKERS (auf der Linie)
   ========================================== */

.timeline-markers {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    position: relative;
    z-index: 2;
    max-width: 100%;
    padding: 0 5%;
}

.timeline-marker-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 200px;
}

/* Marker-Kreis */
.timeline-marker {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-width 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    text-decoration: none;
}

.timeline-marker:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-width: 5px;
}

.timeline-marker i {
    font-size: 1.75rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.timeline-marker:hover i {
    transform: scale(1.1);
}

/* Featured Marker - größer */
.timeline-marker.featured {
    width: 85px;
    height: 85px;
    border-width: 5px;
}

.timeline-marker.featured i {
    font-size: 2rem;
}

/* Active State (beim Scrollen via ScrollSpy) */
.timeline-marker.active {
    transform: scale(1.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-width: 6px;
}

.timeline-marker.active i {
    transform: scale(1.1);
}

/* Marker-Farben */
.timeline-marker.primary {
    border-color: var(--primary-color);
}

.timeline-marker.primary i {
    color: var(--primary-color);
}

.timeline-marker.success {
    border-color: var(--success-color);
}

.timeline-marker.success i {
    color: var(--success-color);
}

.timeline-marker.accent {
    border-color: #f59e0b;
}

.timeline-marker.accent i {
    color: #f59e0b;
}

/* ==========================================
   MARKER LABELS (Datum & Titel)
   ========================================== */

.marker-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
    text-align: center;
}

.marker-date {
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.marker-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

/* ==========================================
   EVENTS SECTION (Details unter dem Zeitstrahl)
   ========================================== */

.events-section {
    padding: 4rem 0;
    background: white;
}

.events-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ==========================================
   EVENT DETAIL (einzelnes Event)
   ========================================== */

.event-detail {
    margin-bottom: 4rem;
    scroll-margin-top: 150px; /* Offset für Scroll-Navigation */
    position: relative;
}

.event-detail:last-child {
    margin-bottom: 0;
}

.event-content-wrapper {
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary-color);
    position: relative;
}

/* Featured Events - hervorgehoben */
.event-detail.featured .event-content-wrapper {
    background: linear-gradient(135deg, var(--accent-color) 0%, #f0f7ff 100%);
    border-left-width: 6px;
    border-left-color: var(--success-color);
}

/* ==========================================
   EVENT BANNER - Volle-Breite Bild
   Für Gruppenfotos/Teambilder (object-position: center)
   JSON-Feld: banner_image
   ========================================== */

.event-banner {
    width: 100%;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    line-height: 0;
}

.event-banner-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Banner bei featured Events etwas höher */
.event-detail.featured .event-banner-img {
    height: 380px;
}

/* Wenn Banner vorhanden → oben keine Rundung am Content-Wrapper */
.event-banner + .event-content-wrapper {
    border-radius: 0 0 16px 16px;
}

/* ==========================================
   EVENT DATE BADGE (Datum-Pill oben links)
   ========================================== */

.event-date-badge {
    position: absolute;
    top: -15px;
    left: 3rem;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.event-date-badge.success {
    background: var(--success-color);
}

.event-date-badge.accent {
    background: #f59e0b;
}

.badge-date {
    font-size: 0.9375rem;
    font-weight: 700;
}

.badge-time {
    font-size: 0.8125rem;
    opacity: 0.9;
}

/* ==========================================
   EVENT CONTENT (Text, Teaser, Volltext)
   ========================================== */

.event-content {
    padding-top: 1.5rem;
}

.event-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.event-subtitle {
    font-size: 1.375rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.event-teaser {
    margin-bottom: 1.5rem;
}

.event-teaser p {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.7;
    margin: 0;
}

.event-full-content {
    margin-bottom: 1.5rem;
}

.event-full-content p {
    font-size: 1.0625rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin: 0;
}

/* ==========================================
   EVENT LOCATION (Ort mit Icon)
   ========================================== */

.event-location {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    margin: 1.5rem 0;
    font-size: 1rem;
    color: var(--text-dark);
}

.event-location i {
    color: var(--primary-color);
    font-size: 1.125rem;
}

/* ==========================================
   EVENT CTA (Call-to-Action Button)
   ========================================== */

.event-cta {
    margin-top: 2rem;
}

.event-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.0625rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.event-detail.featured .event-button {
    background-color: var(--success-color);
}

.event-button:hover {
    background-color: #1e4278;
    transform: translateX(4px);
    color: white;
}

.event-detail.featured .event-button:hover {
    background-color: #38a169;
}

.event-button i {
    transition: transform 0.2s ease;
}

.event-button:hover i {
    transform: translateX(4px);
}

/* ==========================================
   EVENT IMAGE (optionales Bild im Content)
   ========================================== */

.event-image {
    margin-top: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   EVENT IMAGE LINK - Klickbares Bild → Lightbox
   Zoom-Cursor + Lupen-Icon bei Hover
   Benötigt: lightbox.js + lightbox.css (global geladen)
   ========================================== */

.event-image-link {
    display: block;
    position: relative;
    cursor: zoom-in;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-image-link:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(44, 90, 160, 0.2);
}

.event-image-link img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    transition: filter 0.3s ease;
}

.event-image-link:hover img {
    filter: brightness(0.9);
}

/* Zoom-Icon Overlay (erscheint bei Hover) */
.image-zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(44, 90, 160, 0.85);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.event-image-link:hover .image-zoom-hint {
    opacity: 1;
    transform: scale(1.1);
}

/* ==========================================
   EVENT GALLERY - Kleine Thumbnail-Vorschaubilder
   Klickbar → Lightbox, mit optionalem Caption
   JSON-Feld: gallery [{src, alt, caption}]
   ========================================== */

.event-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.event-gallery-item {
    position: relative;
    max-width: 220px;
    flex-shrink: 0;
}

.event-gallery-item .event-image-link {
    border-radius: 10px;
    overflow: hidden;
    display: block;
}

.event-gallery-item .event-image-link:hover {
    transform: scale(1.05);
}

.event-gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    border-radius: 10px 10px 0 0;
}

/* Caption-Label unter dem Bild */
.gallery-caption {
    display: block;
    padding: 0.4rem 0.75rem;
    background: rgba(44, 90, 160, 0.9);
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    transition: background 0.3s ease;
    border-radius: 0 0 10px 10px;
}

.event-image-link:hover .gallery-caption {
    background: rgba(44, 90, 160, 1);
}

/* Zoom-Hint kleiner in Galerie-Thumbnails */
.event-gallery-item .image-zoom-hint {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    bottom: 40px;
    right: 8px;
}

/* ==========================================
   QUICK INFO SECTION (Karten-Grid)
   ========================================== */

.quick-info-section {
    padding: 4rem 0;
    background: var(--accent-color);
}

.quick-info-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.quick-info-section .section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 3rem;
}

.quick-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.quick-info-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.quick-info-card:hover {
    transform: translateY(-4px);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.info-icon i {
    font-size: 1.75rem;
    color: white;
}

.info-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.info-text {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0;
}

/* ==========================================
   KONTAKT CTA SECTION (blauer Gradient)
   ========================================== */

.kontakt-cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e4278 100%);
    color: white;
}

.kontakt-cta-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.kontakt-cta-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.kontakt-cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.kontakt-cta-content p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
}

.kontakt-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: white;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.kontakt-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
}

.kontakt-button i {
    font-size: 1.25rem;
}

/* ==========================================================================
   RESPONSIVE - TABLET (max 1024px)
   Zeitstrahl bleibt horizontal, Marker etwas kleiner
   ========================================================================== */

@media (max-width: 1024px) {
    .timeline-marker-wrapper {
        max-width: 180px;
    }
}

/* ==========================================================================
   RESPONSIVE - MOBIL (max 768px)
   Zeitstrahl wird VERTIKAL statt horizontal
   ========================================================================== */

@media (max-width: 768px) {

    /* --- Timeline Navigation: kompakter --- */
    .timeline-navigation {
        padding: 2rem 0 2.5rem;
    }

    .timeline-title {
        font-size: 2rem;
    }

    .timeline-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* --- Horizontale Linie → Vertikale Linie --- */
    .timeline-line {
        left: 30px;
        right: auto;
        top: 0;
        bottom: 0;
        width: 3px;
        height: auto;
        transform: none;
        background: linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0.8), rgba(255,255,255,0.3));
    }

    /* --- Markers: vertikal anordnen --- */
    .timeline-markers {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 0 0 0;
        gap: 0;
    }

    .timeline-marker-wrapper {
        flex-direction: row;
        align-items: center;
        flex: none;
        max-width: none;
        width: 100%;
        padding: 0.75rem 0;
        padding-left: 8px;
    }

    /* Marker-Kreis kleiner, auf der Linie positioniert */
    .timeline-marker {
        width: 46px;
        height: 46px;
        flex-shrink: 0;
    }

    .timeline-marker i {
        font-size: 1.25rem;
    }

    .timeline-marker.featured {
        width: 54px;
        height: 54px;
    }

    .timeline-marker.featured i {
        font-size: 1.4rem;
    }

    /* Label rechts neben dem Marker statt darunter */
    .marker-label {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 0;
        margin-left: 1rem;
        text-align: left;
    }

    .marker-date {
        font-size: 0.8125rem;
    }

    .marker-title {
        font-size: 0.9375rem;
    }

    /* --- Events Section: kompakter --- */
    .events-section {
        padding: 3rem 0;
    }

    .event-detail {
        margin-bottom: 3rem;
    }

    .event-content-wrapper {
        padding: 2rem 1.5rem;
    }

    .event-date-badge {
        left: 1.5rem;
        padding: 0.625rem 1.25rem;
    }

    .event-title {
        font-size: 1.75rem;
    }

    .event-subtitle {
        font-size: 1.125rem;
    }

    .event-teaser p {
        font-size: 1rem;
    }

    .event-full-content p {
        font-size: 1rem;
    }

    /* --- Banner kleiner --- */
    .event-banner-img {
        height: 220px;
    }

    .event-detail.featured .event-banner-img {
        height: 260px;
    }

    /* --- Zoom-Hint immer sichtbar (kein Hover auf Touch) --- */
    .image-zoom-hint {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
        bottom: 8px;
        right: 8px;
        opacity: 1;
    }

    /* --- Quick Info & CTA: kompakter --- */
    .quick-info-section {
        padding: 3rem 0;
    }

    .quick-info-section .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .quick-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .quick-info-card {
        padding: 1.5rem;
    }

    .kontakt-cta-section {
        padding: 3rem 0;
    }

    .kontakt-cta-content h2 {
        font-size: 2rem;
    }

    .kontakt-cta-content p {
        font-size: 1rem;
    }
}

/* ==========================================================================
   RESPONSIVE - KLEIN MOBIL (max 480px)
   Alles noch kompakter
   ========================================================================== */

@media (max-width: 480px) {

    .timeline-navigation .container-wide {
        padding: 0 1rem;
    }

    .timeline-title {
        font-size: 1.75rem;
    }

    /* Vertikale Linie weiter links */
    .timeline-line {
        left: 22px;
    }

    .timeline-marker-wrapper {
        padding-left: 2px;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
    }

    .timeline-marker i {
        font-size: 1.1rem;
    }

    .timeline-marker.featured {
        width: 46px;
        height: 46px;
    }

    .timeline-marker.featured i {
        font-size: 1.25rem;
    }

    .marker-date {
        font-size: 0.75rem;
    }

    .marker-title {
        font-size: 0.875rem;
    }

    /* Events */
    .events-section {
        padding: 2.5rem 0;
    }

    .event-content-wrapper {
        padding: 1.5rem 1rem;
    }

    .event-date-badge {
        left: 1rem;
        padding: 0.5rem 1rem;
    }

    .badge-date {
        font-size: 0.875rem;
    }

    .badge-time {
        font-size: 0.75rem;
    }

    .event-title {
        font-size: 1.5rem;
    }

    .event-subtitle {
        font-size: 1rem;
    }

    .event-button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* Banner */
    .event-banner-img {
        height: 180px;
    }

    .event-detail.featured .event-banner-img {
        height: 200px;
    }

    .event-banner {
        border-radius: 12px 12px 0 0;
    }

    /* Galerie-Thumbnails kleiner */
    .event-gallery-item {
        max-width: 160px;
    }

    .event-gallery-item img {
        height: 110px;
    }

    /* Quick Info & CTA */
    .quick-info-section {
        padding: 2.5rem 0;
    }

    .quick-info-grid {
        grid-template-columns: 1fr;
    }

    .kontakt-cta-section {
        padding: 2.5rem 0;
    }

    .kontakt-cta-content h2 {
        font-size: 1.75rem;
    }

    .kontakt-button {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
}