/* style.css - Integriertes Design */

/* --- Allgemeine Stile (Basierend auf kms_style.css und vorhandenem) --- */
body {
    font-family: tahoma, Arial, sans-serif; /* Aus kms_style.css*/
    font-size: 12px; /* Angepasst an plaintext in kms_style.css*/
    line-height: 1.6;
    color: #000000; /* Standardtextfarbe aus kms_style.css*/
    background-color: #f8f9fa; /* Beibehalten, da kein klarer Body-Hintergrund in Quellen */
    margin: 0;
    padding: 20px;

    /* Automatische Worttrennung für Deutsch */
    -webkit-hyphens: auto; /* Für WebKit-Browser (Chrome, Safari) */
    -ms-hyphens: auto;     /* Für Internet Explorer/Edge */
    hyphens: auto;         /* Standard-Eigenschaft */
    word-break: break-word; /* Fallback und Unterstützung für die Trennung von langen Wörtern */
    overflow-wrap: break-word; /* Ersetzt word-wrap, sorgt für Zeilenumbruch bei langen Wörtern */
}

.container {
    max-width: 900px; /* Beibehalten */
    margin: 0 auto;
}

/* --- Header Stile --- */
.header {
    border-bottom: 1px solid #CCC; /* Leichterer Border, ähnlich manchen Trennern */
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.header h1 {
    font-family: tahoma, Arial, sans-serif; /* Aus kms_style.css*/
    font-size: 24px; /* Angepasst, da 'title' 14px ist*/
    font-weight: bold;
    color: #000033; /* Aus kms_style.css*/
    text-decoration: none;
    background-color: transparent; /* Entfernt den Hintergrund aus kms_style.css .title*/
}

/* --- NEU: Stile für den Block "Die nächsten drei Veranstaltungen" --- */
.next-events-preview {
    background-color: #E4E9F1; /* Ähnlich Akkordeon-Header-Hintergrund */
    border: 1px solid #D2E0F2;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.next-events-preview h2 {
    font-family: tahoma, Arial, sans-serif;
    font-size: 1.3em; /* Etwas kleiner als Haupt-H1 */
    color: #000033;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px dashed #D2E0F2; /* Gekachelte Linie */
}

.next-events-preview ul {
    list-style: none; /* Keine Standard-Listenpunkte */
    padding: 0;
    margin: 0;
}

.next-events-preview li {
    margin-bottom: 15px;
    padding-left: 15px; /* Einrückung */
    border-left: 3px solid #003366; /* Vertikale Linie links */
    line-height: 1.4;
}

.next-events-preview li:last-child {
    margin-bottom: 0; /* Kein Margin beim letzten Element */
}

.next-events-preview .next-event-link {
    font-family: tahoma, Arial, sans-serif;
    font-size: 1.1em; /* Etwas größer als Normaltext */
    font-weight: bold;
    color: #003366; /* Dunkelblau, ähnlicher wie plaintext3 */
    text-decoration: none;
    transition: color 0.2s;
}

.next-events-preview .next-event-link:hover {
    color: #B31B34; /* Roter Ton beim Hover */
    text-decoration: underline;
}

.next-events-preview .event-meta-line {
    font-family: tahoma, Arial, sans-serif;
    font-size: 0.95em;
    color: #666666; /* Grau */
    display: block; /* Sorgt dafür, dass es in einer neuen Zeile steht */
    margin-top: 5px;
}


/* --- Filter-Navigation Stile --- */
.filter-nav {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 100%;
    box-sizing: border-box;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.filter-group strong {
    font-family: tahoma, Arial, sans-serif;
    font-size: 12px; /* Angepasst an plaintext*/
    color: #000033; /* Aus kms_style.css*/
    margin-right: 5px;
}

.filter-nav a {
    display: inline-block;
    text-decoration: none;
    padding: 4px 15px;
    background-color: #D2E0F2; /* Ähnlich navitable Hintergrund*/
    color: #003366; /* Ähnlich plaintext3*/
    border-radius: 4px; /* Leichte Abrundung */
    font-size: 0.9em;
    transition: background-color 0.2s, color 0.2s;
}

.filter-nav a.active {
    background-color: #B31B34 !important; /* Roter Ton aus opencms-special.css für aktive Elemente*/
    color: #fff;
}

.filter-nav a:hover:not(.active) {
    background-color: #C8D5E4; /* Ähnlich mainborder Farbe*/
    color: #000033; /* Dunklerer Ton beim Hover*/
}

	.filter-nav {
		/* Behalte bestehende Basis-Stile bei, falls sie sinnvoll sind */
		margin-bottom: 20px; /* Abstand unter den Filtern */
		background-color: #f8f9fa; /* Heller Hintergrund für den Filterbereich */
		border: 1px solid #e9ecef;
		border-radius: 8px;
		padding: 15px;
	}

	.filter-table {
		display: flex;
		flex-direction: column; /* Stapelt die Zeilen vertikal */
	}

	.filter-row {
		display: flex; /* Macht jede Reihe zu einem Flex-Container */
		align-items: center; /* Zentriert Inhalte vertikal in der Reihe */
		margin-bottom: 20px; /* Abstand zwischen den Reihen */
	}

	.filter-row:last-child {
		margin-bottom: 0; /* Kein Abstand unter der letzten Reihe */
	}

	.filter-label {
		/* Flexible Breite, aber mit einer minimalen Basis, damit die Labels Platz haben */
		flex: 0 0 65px; /* flex-grow, flex-shrink, flex-basis: Fixe Breite von 100px */
		padding-right: 15px; /* Abstand zwischen Label und Buttons */
		text-align: right; /* Labels rechtsbündig ausrichten */
		font-weight: bold;
		color: #333; /* Dunklere Farbe für die Labels */
	}

	.filter-buttons {
		flex-grow: 1; /* Nimmt den restlichen verfügbaren Platz ein */
		display: flex; /* Macht die Buttons in dieser Spalte auch zu Flex-Items */
		flex-wrap: wrap; /* Erlaubt den Buttons, in die nächste Zeile umzubrechen, wenn der Platz nicht reicht */
		gap: 8px; /* Abstand zwischen den einzelnen Buttons */
	}

	/* Bestehende Stile für die Filter-Buttons (<a> Tags) */
	.filter-buttons a {
		display: inline-block; /* Wichtig, damit Padding/Margin funktionieren */
		padding: 6px 12px;
		text-decoration: none;
		color: #fff;
		background-color: #47627f;
		transition: all 0.3s ease; /* Sanfter Übergang bei Hover/Active */
		white-space: nowrap; /* Verhindert Zeilenumbruch innerhalb eines Buttons */
	}

	.filter-buttons a:hover {
		background-color: #007bff;
		color: #fff;
	}

	.filter-buttons a.active {
		background-color: #003366; /* Aktiver Zustand (dunkelblau, passend zu deinem Schema) */
		color: #fff;
		border-color: #003366;
}


/* --- Akkordeon-Stile --- */
.accordion-item {
    background-color: #fff;
    border: 1px solid #C8D5E4; /* Ähnlich mainborder*/
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Beibehalten für Leichtigkeit */
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.accordion-header {
    padding: 0px 10px 6px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #e4e9f1; /* Ähnlich title Hintergrund*/
    border-bottom: 1px solid #D2E0F2; /* Ähnlich navitable Border*/
    transition: background-color 0.3s ease;
}

/* Erster div-Kind des accordion-header soll den gesamten Platz einnehmen */
.accordion-header > div:first-of-type {
    flex-grow: 1;
}

.accordion-header:hover {
    background-color: #D2E0F2; /* Hellerer Hover-Effekt*/
}

.accordion-header.active {
    background-color: #e4e9f1 !important; /* Aktiver Hintergrund*/
    border-bottom: 1px solid #C8D5E4;
}

.accordion-header h2 {
    font-family: tahoma, Arial, sans-serif;
    font-size: 1.1em; /* Etwas größer als Normaltext */
    font-weight: bold;
    color: #003366; /* Dunkelblau, ähnlicher wie plaintext3 */
    text-decoration: none;
    transition: color 0.2s;
}

.accordion-header .event-short-info {
    font-family: tahoma, Arial, sans-serif;
    font-size: 11px; /* Angepasst an plaintextmini*/
    color: #666666; /* Aus kms_style.css*/
    text-align: right;
}

.accordion-header .arrow {
    margin-left: 15px;
    transition: transform 0.3s ease;
    font-size: 1.2em;
    line-height: 1;
    color: ##003366; /* Angepasst*/
}

.accordion-header.active .arrow {
    transform: rotate(90deg);
}

.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background-color: #ffffff; /* Sicherstellen, dass Inhalt weißen Hintergrund hat */
}

.accordion-content.open {
    max-height: 1000px;
    padding: 20px;
    transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}

.event-logo-header {
    max-width: 150px;
    height: auto;
    margin-left: 20px;
}

.event-short-description {
    margin-top: 5px;
    font-family: tahoma, Arial, sans-serif;
    font-size: 11px; /* Angepasst an plaintextmini*/
    color: #666666; /* Aus kms_style.css*/
    background-color: #ffffff; /* Hintergrund auf weiß setzen */
    padding: 5px 10px !important; /* Optional: Etwas Polsterung hinzufügen, damit es sich abhebt */
    border-radius: 3px; /* Optional: Leichte Abrundung */
    display: block; /* Macht das Element block-level, nimmt die volle Breite ein */
    margin-bottom: 0; /* Ggf. unnötigen unteren Margin entfernen */
}

.event-header-full {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #D2E0F2; /* Ähnlich navitable Border*/
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.event-title-full {
    font-family: tahoma, Arial, sans-serif; /* Aus kms_style.css*/
    color: #000033; /* Aus kms_style.css*/
    margin: 0;
}

.event-logo-full {
    max-width: 200px;
    max-height: 50px;
}

.event-meta {
    font-family: tahoma, Arial, sans-serif; /* Aus kms_style.css*/
    font-size: 12px; /* Angepasst an plaintext*/
    display: grid;
    grid-template-columns: 25px 1fr;
    gap: 10px 15px;
    margin-bottom: 15px;
    color: #000000; /* Standardtextfarbe */
}

.event-meta span {
    display: inline-block;
}

.event-content-full {
    font-family: tahoma, Arial, sans-serif;
    font-size: 12px; /* Angepasst an plaintext*/
    color: #000000; /* Standardtextfarbe */
    margin-bottom: 20px;
}

.event-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- Button Stile (Basierend auf opencms-special.css input.cformbutton) --- */
.btn {
    font-family: Verdana, Arial, Helvetica, sans-serif; /* Aus opencms-special.css*/
    font-size: 12px; /* Aus opencms-special.css*/
    letter-spacing: 1pt; /* Aus opencms-special.css*/
    color: White; /* Aus opencms-special.css*/
    text-decoration: none;
    text-align: center;
    background-color: #B31B34; /* Aus opencms-special.css*/
    border-style: none; /* Aus opencms-special.css*/
    padding: 10px 18px;
    border-radius: 5px; /* Beibehalten für moderne Optik */
    font-weight: bold; /* Beibehalten */
    cursor: pointer;
}

.btn-register {
    background-color: #B31B34; /* Primärer Button, roter Ton*/
}

.btn-calendar {
    background-color: #003082; /* Dunkelblau aus a.header in opencms-special.css*/
}

.btn:hover {
    opacity: 0.85; /* Beibehalten */
}

.no-events {
    text-align: center;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #D2E0F2; /* Angepasst*/
    font-family: tahoma, Arial, sans-serif;
    color: #000000;
}

/* Zusätzliches CSS für den Druck-Button in der Hauptseite */
.btn-print {
    display: inline-block;
    background-color: #666666; /* Dunkelgrau aus plaintextmini*/
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    text-align: center;
    transition: background-color 0.2s;
    font-family: tahoma, Arial, sans-serif;
}

.btn-print:hover {
    background-color: #333333; /* Dunklerer Hover */
}

/* NEU: Container für den Druckbutton am unteren Ende */
.bottom-button-container {
    text-align: center;
    margin-top: 40px; /* Abstand nach oben */
    margin-bottom: 20px; /* Abstand nach unten zum Seitenende */
}


/* --- Spezifische Stile für die Druckansicht (print.php) --- */
/* Diese überschreiben ggf. allgemeine Stile für .container etc. */
.print-container {
    max-width: 800px; /* Hier die maximale Breite für die Bildschirmansicht der Druckseite */
    margin: 0 auto;
    color: #000000; /* Standardtextfarbe */
}

.print-header {
    border-bottom: 1px solid #999; /* Ähnlich Border-Styles */
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.print-header h1 {
    font-family: tahoma, Arial, sans-serif; /* Aus kms_style.css*/
    color: #000033; /* Aus kms_style.css*/
    text-align: center;
}

.event-print-mode {
    border: 1px solid #C8D5E4; /* Ähnlich mainborder*/
    border-radius: 5px;
    margin-bottom: 20px;
    padding: 15px;
    page-break-inside: avoid;
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff;
    font-family: tahoma, Arial, sans-serif;
    font-size: 12px;
    color: #000000;
}

.event-header-print {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #D2E0F2; /* Angepasst*/
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.event-title-print {
    font-family: tahoma, Arial, sans-serif; /* Aus kms_style.css*/
    font-size: 1.3em;
    color: #000033; /* Aus kms_style.css*/
    margin: 0;
}

.event-logo-print {
    max-width: 150px;
    height: auto;
}

.event-meta-print {
    font-family: tahoma, Arial, sans-serif;
    font-size: 11px; /* Angepasst an plaintextmini*/
    display: grid;
    grid-template-columns: 25px 1fr;
    gap: 5px 10px;
    margin-bottom: 10px;
    color: #666666; /* Aus kms_style.css*/
}

.event-content-print {
    font-family: tahoma, Arial, sans-serif;
    font-size: 12px;
    color: #000000;
    margin-bottom: 15px;
}

.event-footer-print {
    font-family: tahoma, Arial, sans-serif;
    font-size: 0.9em;
    color: #666666; /* Angepasst*/
}

	/* Zusätzliche Styles für die event-short-info */
    .event-short-info {
        display: flex; /* Macht die Spans nebeneinander */
        gap: 15px; /* Abstand zwischen Datum, Uhrzeit und Drucklink */
        align-items: center; /* Vertikale Ausrichtung in der Mitte */
        margin-top: 5px; /* Kleiner Abstand unter dem Titel */
        font-size: 0.95em; /* Etwas kleinere Schriftgröße für die Info-Zeile */
    }
    .event-short-info span {
        white-space: nowrap; /* Verhindert Zeilenumbruch für Datum/Uhrzeit */
    }
    .event-short-info a {
        text-decoration: none; /* Keine Unterstreichung standardmäßig */
    }
    .event-short-info a:hover {
        text-decoration: underline; /* Unterstreichung beim Hover */
    }
	
    /* NEU: Styles für das Modal (Overlay) */
    .modal {
        display: none; /* Standardmäßig versteckt */
        position: fixed; /* Über allem anderen */
        z-index: 1000; /* Ganz nach oben */
        left: 0;
        top: 0;
        width: 100%; /* Volle Breite */
        height: 100%; /* Volle Höhe */
        overflow: auto; /* Scrollen, wenn Inhalt zu groß */
        background-color: rgba(0,0,0,0.6); /* Schwarzer Hintergrund mit Transparenz */
        backdrop-filter: blur(2px); /* Optional: leichter Weichzeichner im Hintergrund */
        -webkit-backdrop-filter: blur(2px); /* Für Safari */
    }

    .modal-content {
        background-color: #fefefe;
        margin: 15% auto; /* 15% von oben, zentriert horizontal */
        padding: 20px;
        border: 1px solid #888;
        width: 80%; /* Breite des Modal-Fensters */
        max-width: 500px; /* Maximale Breite */
        box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
        animation-name: animatetop;
        animation-duration: 0.4s;
        position: relative; /* Für den Close-Button */
        border-radius: 8px; /* Abgerundete Ecken */
    }

    /* Animation für das Modal */
    @keyframes animatetop {
        from {top: -300px; opacity: 0}
        to {top: 0; opacity: 1}
    }

    .close-button {
        color: #aaa;
        float: right;
        font-size: 28px;
        font-weight: bold;
        position: absolute;
        top: 10px;
        right: 15px;
        cursor: pointer;
    }

    .close-button:hover,
    .close-button:focus {
        color: black;
        text-decoration: none;
    }

    #directLinkUrl {
        width: calc(100% - 22px); /* Breite anpassen, um Padding/Border zu berücksichtigen */
        padding: 10px;
        margin: 15px 0;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 1em;
        background-color: #eee; /* Leicht gedimmter Hintergrund, da readonly */
    }

    #copyLinkButton {
		width: 250px;
		border: 0px solid #aaa;
		border-radius: 3px;
		background: #47627f;
		display: inline-block;
		text-align: center;
		text-decoration: none;
		color: #ffffff;
		margin-right: 10px;
		vertical-align: middle;
		padding: 5px;
}
    }

    #copyLinkButton:hover {
        background-color: #0056b3;
    }

    .copy-feedback {
        margin-left: 10px;
        color: green;
        font-weight: bold;
    }

    /* Style für das klickbare Span im event-short-info */
    .open-direct-link-modal {
        cursor: pointer;
        /* margin-left: 15px; /* Abstand zum vorherigen Element */
        white-space: nowrap;
        color: #b31b34;
		text-decoration: none;
    }
    .open-direct-link-modal:hover {
        text-decoration: underline;
    }
    .open-direct-link-modal .direct-link-icon {
        font-size: 0.9em; /* Etwas kleiner als der Text */
    }	


/* Anpassungen für den ECHTEN DRUCK */
@media print {
    body {
        background-color: #fff;
        color: #000;
        font-size: 10pt;
        padding: 0;
    }

    .container, .print-container {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .header, .print-header {
        border-bottom: 1px solid #999;
        margin-bottom: 15px;
        padding-bottom: 5px;
    }

    .header h1, .print-header h1 {
        text-align: left;
        color: #000;
        font-size: 1.5em;
    }

    .filter-nav, .btn-print {
        display: none;
    }

    /* Diese Regel betrifft NUR Buttons im Druckmodus */
    .btn {
        display: none;
    }

    .accordion-item, .event-print-mode {
        border: 1px solid #ddd;
        box-shadow: none;
        margin-bottom: 15px;
    }
    
    .accordion-header, .accordion-content {
        padding: 10px 15px;
        background-color: #fff;
        border-bottom: none;
    }
    .accordion-header h2 {
        font-size: 1.1em;
    }
    .accordion-header .event-short-info,
    .accordion-header .arrow {
        display: none;
    }
    .accordion-content {
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
    }

    .event-logo-header, .event-logo-full, .event-logo-print {
        max-width: 80px;
        height: auto;
    }

    a {
        text-decoration: none;
        color: #000;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 8pt;
        word-break: break-all;
    }

    a.btn[href]:after {
        content: "";
    }
	

	
}