@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* ─── Palette ─── */
    --navy:       #0D2E4A;
    --navy-mid:   #1a4a6a;
    --blue:       #3d87c4;
    --blue-lt:    #5aa3d8;
    --sky:        #cce0f0;
    --sky-lt:     #e8f3fb;
    --gold:       #C8102E;

    /* ─── Surfaces ─── */
    --bg:         #f4f6f8;
    --surface:    #ffffff;
    --border:     #dde4ea;

    /* ─── Text ─── */
    --text:       #1a1a1a;
    --text-mid:   #4a5a68;
    --text-muted: #7a94a4;

    /* ─── Elevation ─── */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.09), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg:  0 8px 24px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.07);

    /* ─── Shape ─── */
    --radius:     6px;
    --radius-md:  10px;
    --radius-lg:  14px;

    /* ─── Font ─── */
    --font:       'Outfit', 'Segoe UI', Tahoma, sans-serif;

    /* ─── Legacy aliases – inline styles in templates use these ─── */
    --color-primary:       var(--blue);
    --color-primary-dark:  var(--navy);
    --color-primary-light: var(--sky-lt);
    --color-secondary:     #ffffff;
    --color-gold:          var(--gold);
    --color-text-dark:     var(--text);
    --color-text-muted:    var(--text-muted);
    --color-bg-light:      var(--bg);
    --color-border:        var(--border);
    --color-success:       #1a6e40;
    --color-danger:        #a83030;
    --color-warning:       #c49a28;
    --spacing-sm:          0.5rem;
    --spacing-md:          1rem;
    --spacing-lg:          2rem;
    --border-radius:       var(--radius);
    --shadow:              var(--shadow-sm);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ─── Header ─── */
.main-header {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 3px solid var(--gold);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    padding: 0 0.25rem;
    flex-shrink: 0;
}
.logo img { height: 52px; width: auto; }
.logo-name { display: block; font-size: 1.1rem; font-weight: 700; color: rgba(255,255,255,0.78); letter-spacing: 0.4px; line-height: 1.2; }
.logo-sub  { display: block; font-size: 0.7rem;  color: rgba(255,255,255,0.5); letter-spacing: 0.02em; }

.main-nav { display: flex; align-items: stretch; }
.main-nav > ul { display: flex; list-style: none; align-items: stretch; }
.main-nav > ul > li { display: flex; align-items: stretch; }

.main-nav a {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-weight: 500;
    padding: 0 0.85rem;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px; /* compensate for header border-bottom */
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    border-bottom-color: var(--gold);
    background: rgba(255,255,255,0.06);
}

/* ─── Dropdown ─── */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after { content: ' ▾'; font-size: 0.68rem; opacity: 0.65; }

.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    list-style: none;
    padding: 0.4rem;
    min-width: 200px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    border-top: none;
    z-index: 300;
}
.nav-dropdown:hover .dropdown-menu { display: block; }

.nav-dropdown .dropdown-menu li a {
    display: block;
    padding: 0.5rem 0.85rem;
    color: var(--navy) !important;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border-bottom: none;
    background: none;
    margin-bottom: 0;
    transition: background 0.12s;
    white-space: nowrap;
}
.nav-dropdown .dropdown-menu li a:hover {
    background: var(--sky-lt);
    color: var(--blue) !important;
}
.nav-dropdown .dropdown-menu li + li { margin-top: 1px; }

/* ─── Main & Footer ─── */
.main-content { flex: 1; padding: 2.5rem 0; }

.main-footer {
    background: var(--blue);
    color: rgba(255,255,255,0.75);
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 3px solid var(--gold);
}
.footer-nav { margin-top: 0.4rem; }
.footer-nav a { color: rgba(255,255,255,0.8); text-decoration: none; margin: 0 0.75rem; transition: color 0.15s; }
.footer-nav a:hover { color: var(--gold); }

/* ─── Hero (Startseite) ─── */
.site-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}
.site-hero img {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    object-position: center 30%;
}
.site-hero-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 2rem 2.5rem;
    background: linear-gradient(to top, rgba(7,20,35,0.88) 0%, rgba(7,20,35,0.5) 55%, transparent 100%);
}
.site-hero-overlay h1 {
    font-size: 1.9rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    margin-bottom: 0.3rem;
}
.site-hero-overlay p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ─── Intro section (Willkommen) ─── */
.intro-section {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
}
.intro-section h2 { color: var(--navy); font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.intro-section p  { color: var(--text-mid); margin-bottom: 0.55rem; font-size: 0.95rem; }
.intro-section p:last-child { margin-bottom: 0; }
.intro-section a  { color: var(--blue); }

/* ─── Home two-column grid ─── */
.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.home-col-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
}
.home-col-title span { color: var(--blue); }

.news-item {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--border);
    margin-bottom: 0.6rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s;
}
.news-item:hover { box-shadow: var(--shadow-md); }
.news-item .date { font-size: 0.73rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.news-item h4    { font-size: 0.92rem; font-weight: 600; color: var(--navy); margin-bottom: 0.3rem; }
.news-item p     { font-size: 0.84rem; color: var(--text-mid); line-height: 1.5; }

.termin-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    margin-bottom: 0.6rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s;
}
.termin-item:hover { box-shadow: var(--shadow-md); }
.termin-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
}
.termin-info strong { font-size: 0.9rem; color: var(--navy); display: block; line-height: 1.3; }
.termin-info span   { font-size: 0.78rem; color: var(--text-muted); }

/* ─── Feature cards (Startseite bottom) ─── */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.feature-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-top: 3px solid var(--blue);
    transition: box-shadow 0.18s, transform 0.18s;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-card .icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.feature-card h3    { color: var(--navy); font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p     { font-size: 0.875rem; color: var(--text-mid); margin-bottom: 1rem; line-height: 1.55; }

/* ─── Cards (allgemein) ─── */
.admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.card {
    background: var(--surface);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: box-shadow 0.18s, transform 0.18s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3    { margin-bottom: 0.5rem; color: var(--navy); font-weight: 600; }
.card p     { font-size: 0.9rem; margin-bottom: 0.25rem; color: var(--text-mid); }

.card details {
    margin-top: 0.6rem;
    text-align: left;
}
.card details summary {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--blue);
    list-style: none;
    text-align: left;
}
.card details summary::-webkit-details-marker { display: none; }
.card details summary::before { content: "▸ "; }
.card details[open] summary::before { content: "▾ "; }
.card details ul {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
    text-align: left;
}
.card details li {
    font-size: 0.82rem;
    color: var(--text-mid);
    line-height: 1.45;
    margin-bottom: 0.35rem;
    text-align: left;
}

/* ─── Forms ─── */
.form-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    max-width: 500px;
    margin: 0 auto;
}
.form-card h3 { margin-bottom: 1.25rem; color: var(--navy); font-weight: 600; font-size: 1.05rem; }
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-mid);
}
.form-control {
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(46,109,164,0.15);
}
textarea.form-control { min-height: 100px; resize: vertical; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.5rem 1.1rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:hover   { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active  { transform: translateY(0); filter: brightness(0.96); }

.btn-primary { background: var(--blue);    color: #fff; box-shadow: 0 2px 6px rgba(46,109,164,0.3); }
.btn-success { background: #1a6e40;        color: #fff; box-shadow: 0 2px 6px rgba(26,110,64,0.25); }
.btn-danger  { background: #a83030;        color: #fff; box-shadow: 0 2px 6px rgba(168,48,48,0.25); }

/* ─── Tables ─── */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}
.admin-table th, .admin-table td {
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.admin-table th {
    background: var(--bg);
    color: var(--navy);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--sky-lt); }

/* ─── Alerts ─── */
.alert-maintenance {
    background: #fffcf0;
    border: 1px solid #e8c84a;
    border-left: 4px solid var(--gold);
    color: #6e5004;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

/* ─── Utility ─── */
.page-title  { margin-bottom: 1.5rem; color: var(--navy); font-weight: 700; font-size: 1.4rem; }
.section-gap { margin-bottom: 2rem; }

/* ─── Hero (generic pages with image) ─── */
.hero-section {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: #fff;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}
.hero-section h2 { font-size: 1.6rem; color: var(--gold); margin-bottom: 0.5rem; font-weight: 700; }
.hero-section p  { color: rgba(255,255,255,0.85); }
.hero-quote {
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    border-left: 3px solid var(--gold);
    font-style: italic;
    color: #ffb3bc;
    font-size: 0.95rem;
    display: inline-block;
    text-align: left;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .home-grid     { grid-template-columns: 1fr; }
    .feature-cards { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .header-wrapper         { height: auto; flex-direction: column; padding: 0.75rem 0; align-items: flex-start; gap: 0; }
    .main-nav > ul          { flex-wrap: wrap; }
    .main-nav a             { padding: 0.5rem 0.65rem; font-size: 0.82rem; border-bottom: none; margin-bottom: 0; }
    .site-hero-overlay h1   { font-size: 1.35rem; }
    .site-hero-overlay      { padding: 1.25rem 1.5rem; }
    .admin-dashboard        { grid-template-columns: 1fr; }
    .intro-section          { padding: 1.25rem 1.25rem; }
}
