/* =====================================================================
   Frankfurt Purple Stars – Bausteine
   Kopfzeile, Menü, Karten, Formulare, Inhaltstypografie, Fußzeile
   ===================================================================== */

/* =====================================================================
   Kopfzeile & Menü
   ===================================================================== */

#header {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(57, 25, 81, 0.06);
}

#header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purple-primary) 0%, var(--orange-accent) 50%, var(--purple-primary) 100%);
    background-size: 200% 100%;
    animation: headerAccent 8s linear infinite;
}

@keyframes headerAccent {
    0%   { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 24px rgba(57, 25, 81, 0.12);
}

#header.scrolled nav {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

#logo {
    height: var(--logo-height, 56px);
    width: auto;
    object-fit: contain;
    max-width: 15rem;
}

#header.scrolled #logo {
    height: calc(var(--logo-height, 56px) * 0.78);
}

@media (max-width: 640px) {
    #logo { height: calc(var(--logo-height, 56px) * 0.8); max-width: 11rem; }
}

.dropdown-menu {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(57, 25, 81, 0.1);
}

.dropdown-item { position: relative; overflow: hidden; }

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--orange-accent);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.dropdown-item:hover::before { transform: scaleY(1); }

.nav-link { position: relative; }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--orange-accent), #ff7733);
    transition: width 0.3s ease;
}

.nav-link:hover::after { width: 100%; }

#mobile-menu {
    max-height: 0;
    overflow: hidden;
    border-top: 0 solid #e5e7eb;
    transition: max-height 0.35s ease;
}

#mobile-menu.show {
    max-height: 80vh;
    overflow-y: auto;
    border-top-width: 1px;
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-dropdown-content.show {
    max-height: 40rem;
    padding-bottom: 0.5rem;
}

/* Auf Touch-Geräten wird das Aufklapp-Menü per Tipp geöffnet (main.js). */
.group.open > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mobile-dropdown-button svg { transition: transform 0.3s ease; }
.mobile-dropdown-button.active svg { transform: rotate(180deg); }

/* =====================================================================
   Karten
   ===================================================================== */

.news-card {
    border: 1px solid rgba(57, 25, 81, 0.06);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px -12px rgba(57, 25, 81, 0.25);
    border-color: rgba(252, 85, 0, 0.25);
}

.news-card img { transition: transform 0.5s ease; }
.news-card:hover img { transform: scale(1.05); }

.team-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(57, 25, 81, 0.28);
}

.team-card img { transition: transform 0.5s ease; }
.team-card:hover img { transform: scale(1.08); }

.team-card-overlay {
    background: linear-gradient(to top, rgba(42, 15, 61, 0.95) 0%, rgba(42, 15, 61, 0.35) 55%, transparent 100%);
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.partner-logo {
    filter: grayscale(100%);
    opacity: 0.75;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.group:hover .partner-logo,
.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* =====================================================================
   Filter- und Blätter-Buttons
   ===================================================================== */

.filter-btn {
    display: inline-block;
    padding: 0.5rem 1.4rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 2px solid var(--purple-primary);
    background-color: transparent;
    color: var(--purple-primary);
    text-decoration: none;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--purple-primary);
    color: #fff;
}

/* =====================================================================
   Formulare
   ===================================================================== */

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.6rem;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 4px rgba(57, 25, 81, 0.08);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* =====================================================================
   Inhaltstypografie (Seiten & News)
   ===================================================================== */

.page-content { color: #4b5563; font-size: 1.02rem; }

.page-content > *:first-child { margin-top: 0; }
.page-content > *:last-child { margin-bottom: 0; }

.page-content h1,
.page-content h2 {
    color: var(--purple-primary);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 3px solid var(--orange-accent);
}

.page-content h3 {
    color: var(--purple-primary);
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 0.6rem;
}

.page-content h4 {
    color: var(--purple-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: 0.4rem;
}

.page-content p { line-height: 1.8; margin-bottom: 1.15rem; }

.page-content ul,
.page-content ol {
    margin: 0 0 1.5rem 1.4rem;
    padding-left: 0.25rem;
}

.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li { margin-bottom: 0.45rem; line-height: 1.7; }

.page-content strong { color: var(--purple-primary); font-weight: 700; }

.page-content a {
    color: var(--orange-accent);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(252, 85, 0, 0.3);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.page-content a:hover {
    color: var(--purple-primary);
    border-color: var(--purple-primary);
}

.page-content blockquote {
    border-left: 4px solid var(--orange-accent);
    padding: 0.25rem 0 0.25rem 1.5rem;
    font-style: italic;
    color: #6b7280;
    margin: 2rem 0;
}

.page-content img {
    border-radius: 0.9rem;
    margin: 1.5rem 0;
    height: auto;
}

.page-content hr { border: 0; border-top: 1px solid #e5e7eb; margin: 2.5rem 0; }

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.page-content th,
.page-content td {
    border: 1px solid #e5e7eb;
    padding: 0.7rem 0.9rem;
    text-align: left;
}

.page-content th { background: #f8f9fa; color: var(--purple-primary); font-weight: 700; }

/* Ansprechpartner-Block auf der Kontaktseite */
.contact-persons h3 {
    color: var(--purple-primary);
    font-weight: 700;
    font-size: 1rem;
    margin-top: 1.1rem;
    margin-bottom: 0.15rem;
}

.contact-persons h3:first-child { margin-top: 0; }
.contact-persons p { color: #4b5563; line-height: 1.6; margin-bottom: 0.35rem; }
.contact-persons a { color: var(--orange-accent); text-decoration: none; }
.contact-persons a:hover { text-decoration: underline; }

/* =====================================================================
   Fußzeile
   ===================================================================== */

.footer-purple {
    position: relative;
    background-color: var(--purple-primary);
    background-image: linear-gradient(160deg, var(--purple-deep) 0%, var(--purple-primary) 55%, #4a1a6b 100%);
    background-size: cover;
    background-position: center;
}

.footer-purple > .footer-inner { position: relative; z-index: 1; }

/* Das Hintergrundbild bringt die Farbe bereits mit – nur eine leichte
   Abdunklung nach unten, damit sich die Fusszeile vom Inhalt darueber absetzt. */
.footer-purple[style] > .footer-inner {
    background: linear-gradient(180deg, rgba(42, 15, 61, 0.10) 0%, rgba(42, 15, 61, 0.30) 100%);
}

.footer-purple h2 { color: #fff; }

/* =====================================================================
   Nach-oben-Button
   ===================================================================== */

#scroll-to-top.show { opacity: 1; visibility: visible; }
#scroll-to-top:hover { transform: translateY(-3px); }


/* =====================================================================
   Korrekturen aus der Responsive-Pruefung
   ===================================================================== */

/* Ohne Hover (Handy, Tablet) gibt es keinen Zustand, in dem der Hinweis
   "Mehr erfahren" je sichtbar wuerde – dort dauerhaft anzeigen. */
@media (hover: none), (max-width: 1023px) {
    .team-card .team-card-hint { opacity: 1; }
}

/* Lange E-Mail-Adressen im Ansprechpartner-Block sprengten die Karte.
   Der Inhalt kommt aus dem CMS, die Laenge ist also nicht vorhersehbar. */
.contact-persons a,
.contact-persons p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Tabellen aus dem Texteditor koennen breiter sein als die Inhaltskarte.
   Sie bekommen deshalb einen eigenen waagerechten Rollbereich, statt den
   Seitenrahmen zu sprengen. */
.page-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Sehr lange Kategorienamen haben die Datumsangabe aus der Karte gedrueckt. */
.news-card .category-badge {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fusszeilen-Logo: feste Hoehe bei schmaler Spalte liess oben und unten
   toten Raum entstehen. Jetzt schrumpft es mit der Spalte mit. */
.footer-logo {
    height: auto;
    width: auto;
    max-width: 100%;
}

/* Der Nach-oben-Knopf lag ueber der Copyright-Zeile. Er verschwindet jetzt,
   sobald die Fusszeile im Blick ist (main.js) – zusaetzlich etwas Luft. */
@media (max-width: 640px) {
    .footer-bottom { padding-bottom: 3.5rem; }
}
