/* ============================================================
   Sommerbad Stadensen – Cassiopeia user.css
   Joomla 5 / Cassiopeia Template
   Erstellt: 2026
   ============================================================ */


/* ── 1. Google Fonts ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800&family=Lato:ital,wght@0,300;0,400;0,700;1,300&display=swap');


/* ── 2. CSS-Variablen (Farbpalette) ──────────────────────── */
:root {
    --iso-blau:          #1a6fad;   /* Primärfarbe – Badblau      */
    --iso-blau-dunkel:   #0d4a7a;   /* Hover, aktive Links        */
    --iso-blau-hell:     #7ec8e3;   /* Akzente, Badges            */
    --iso-gelb:          #f0b429;   /* CTA-Buttons – Sonnengelb   */
    --iso-gold:          #e07010;   /* Hover CTA                  */
    --iso-hintergrund:   #f5f9fc;   /* Seitenhintergrund          */
    --iso-text:          #1a2e3b;   /* Haupttext                  */
    --iso-text-weich:    #4a6070;   /* Sekundärtext               */
    --iso-weiss:         #ffffff;
}


/* ── 3. Cassiopeia Kernvariablen überschreiben ────────────── */
:root {
    --cassiopeia-color-primary:     var(--iso-blau);
    --cassiopeia-color-link:        var(--iso-blau);
    --cassiopeia-color-hover:       var(--iso-blau-dunkel);
}


/* ── 4. Basis / Body ──────────────────────────────────────── */
body {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    color: var(--iso-text);
    background-color: var(--iso-hintergrund);
}


/* ── 5. Typografie ────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.page-header h1,
.page-header h2 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    color: var(--iso-text);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: 2rem;    }
h2 { font-size: 1.6rem;  }
h3 { font-size: 1.3rem;  }
h4 { font-size: 1.1rem;  }

p {
    font-weight: 300;
    color: var(--iso-text-weich);
    margin-bottom: 1rem;
}

strong, b {
    font-weight: 700;
    color: var(--iso-text);
}

em, i {
    font-style: italic;
    font-weight: 300;
}


/* ── 6. Links ─────────────────────────────────────────────── */
a {
    color: var(--iso-blau);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--iso-blau-dunkel);
    text-decoration: underline;
}


/* ── 7. Header & Branding ─────────────────────────────────── */
.header {
    background-color: var(--iso-blau);
}

/* Seitenname (Text-Logo) */
.site-name a,
.site-name {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--iso-weiss) !important;
    text-decoration: none;
}

/* Tagline unter dem Logo */
.site-description,
.site-slogan {
    font-family: 'Lato', sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.80);
}


/* ── 8. Hero-Banner (Hintergrundbild) ─────────────────────── */
.container-header {
    position: relative;
    background-image: url('/images/banners/iso-banner.jpg');
    background-size: 100% 100%;   /* Exakt auf Container-Größe strecken */
    background-position: top center;
    background-repeat: no-repeat;
    /*
     * aspect-ratio hält das Seitenverhältnis des Bildes (1268×349) bei
     * jeder Bildschirmbreite automatisch korrekt – kein Abschneiden mehr.
     */
    aspect-ratio: 1268 / 349;
    width: 100%;
    /* min-height als Fallback für ältere Browser ohne aspect-ratio-Support */
    min-height: 200px;
}

/* Blauer Overlay für Lesbarkeit */
.container-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(13, 74, 122, 0.30) 0%,
        rgba(26, 111, 173, 0.20) 60%,
        rgba(126, 200, 227, 0.05) 100%
    );
    z-index: 0;
}

/* Inhalt im Header über dem Overlay */
.container-header > * {
    position: relative;
    z-index: 1;
}

/* Weißer Wellenschnitt unten am Header */
.container-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 5%;               /* Proportional zur Banner-Höhe */
    min-height: 20px;
    max-height: 48px;
    background: var(--iso-hintergrund);
    clip-path: ellipse(55% 100% at 50% 100%);
    z-index: -1;              /* Hinter allem – überlappt keine Dropdowns mehr */
    pointer-events: none;
}

/* Texte im Hero-Bereich weiß */
.container-header .site-name a,
.container-header .site-name,
.container-header .site-description,
.container-header h1,
.container-header h2 {
    color: var(--iso-weiss) !important;
}


/* ── 9. Navigation ────────────────────────────────────────── */

/*
 * Cassiopeia legt die Navbar in einen eigenen Container (#sp-nav / .container-nav).
 * overflow: hidden auf diesen Containern schneidet aufgeklappte Dropdowns ab.
 * overflow: visible erlaubt dem Dropdown, über den Container hinaus sichtbar zu sein.
 */
#sp-nav,
.container-nav,
.nav-wrapper,
#sp-navbar {
    overflow: visible !important;
}

.navbar,
nav.navbar {
    background-color: var(--iso-blau) !important;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    position: relative;
    z-index: 100;
    overflow: visible !important;  /* Dropdowns dürfen die Navbar-Box verlassen */
}

/* Navbar-Liste auf Stretch setzen damit <li> und <a> gleich hoch sind */
.navbar-nav,
ul.metismenu {
    display: flex !important;
    align-items: stretch !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 3rem;   /* ← BALKENHÖHE: hier anpassen (z.B. 2.5rem, 3.5rem, 4rem) */
}

/* Alle Level-1 <li> auf volle Höhe strecken */
.metismenu-item.level-1 {
    display: flex !important;
    align-items: stretch !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Alle Level-1 Links: einheitliches Padding, volle Höhe */
.metismenu-item.level-1 > a {
    display: flex !important;
    align-items: center !important;
    color: rgba(255, 255, 255, 0.90) !important;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    padding: 0 1rem !important;   /* ← ABSTAND LINKS/RECHTS (alle Punkte): hier anpassen */
    margin: 0 !important;
    border-radius: 0 !important;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.metismenu-item.level-1 > a:hover,
.metismenu-item.level-1 > a:focus {
    color: var(--iso-weiss) !important;
    background-color: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

/* Aktiver Menüpunkt: Sonnengelb, volle Balkenhöhe */
.metismenu-item.active.level-1 > a,
.metismenu-item.current.level-1 > a {
    color: var(--iso-weiss) !important;
    background-color: var(--iso-gelb) !important;
    padding: 0 1.1rem !important;  /* ← ABSTAND LINKS/RECHTS (aktiver Punkt): hier anpassen */
}

/* Hamburger-Button (mobil) */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.50);
}
.navbar-toggler-icon {
    filter: invert(1);
}

/* Dropdown-Menüs */
.dropdown-menu {
    background-color: var(--iso-blau-dunkel);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 6px;
    z-index: 9999 !important;  /* Immer über allen Header-Overlays */
    position: absolute;        /* Verhindert, dass Eltern-z-index greift */
}

.dropdown-item {
    font-family: 'Nunito', sans-serif;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.90) !important;
    border-radius: 6px;
    padding: 7px 14px;
    transition: background 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--iso-weiss) !important;
}


/* ── 10. Buttons ──────────────────────────────────────────── */
.btn-primary,
a.btn-primary {
    background-color: var(--iso-blau);
    border-color: var(--iso-blau);
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    border-radius: 8px;
    padding: 10px 22px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover,
a.btn-primary:hover {
    background-color: var(--iso-blau-dunkel);
    border-color: var(--iso-blau-dunkel);
    transform: translateY(-1px);
}

/* CTA-Button (Gelb / Sonnengelb) */
.btn-warning,
a.btn-warning,
.btn-cta,
a.btn-cta {
    background-color: var(--iso-gelb);
    border-color: var(--iso-gelb);
    color: #5a3500 !important;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    border-radius: 8px;
    padding: 10px 22px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-warning:hover,
a.btn-warning:hover,
.btn-cta:hover {
    background-color: var(--iso-gold);
    border-color: var(--iso-gold);
    color: #3d2200 !important;
    transform: translateY(-1px);
}

.btn-outline-primary,
a.btn-outline-primary {
    color: var(--iso-blau);
    border-color: var(--iso-blau);
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    border-radius: 8px;
    padding: 9px 22px;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover,
a.btn-outline-primary:hover {
    background-color: var(--iso-blau);
    border-color: var(--iso-blau);
    color: var(--iso-weiss);
    transform: translateY(-1px);
}


/* ── 11. Content-Bereich ──────────────────────────────────── */
main,
#sp-main-body,
.container-component {
    background-color: var(--iso-weiss);
    padding-top: 2rem;
    padding-bottom: 2.5rem;
}

/* Beitrags-Karten */
.blog .item,
.items-row .item {
    background-color: var(--iso-weiss);
    border: 1px solid #e0ecf4;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.blog .item:hover,
.items-row .item:hover {
    box-shadow: 0 4px 16px rgba(26, 111, 173, 0.10);
}

/* Artikel-Überschrift */
.item-title a,
.blog-item .item-title a {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    color: var(--iso-text) !important;
    text-decoration: none;
    font-size: 1.2rem;
}

.item-title a:hover,
.blog-item .item-title a:hover {
    color: var(--iso-blau) !important;
}

/* Metadaten (Datum, Autor) */
.article-info,
.item-meta,
dl.article-info {
    font-size: 0.8rem;
    color: var(--iso-text-weich);
    font-weight: 300;
    margin-bottom: 0.5rem;
}

/* "Weiterlesen"-Link */
.readmore a,
a.readmore,
.read-more a {
    display: inline-block;
    background-color: var(--iso-blau);
    color: var(--iso-weiss) !important;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 0.5rem;
    transition: background 0.2s ease;
}

.readmore a:hover,
a.readmore:hover {
    background-color: var(--iso-blau-dunkel);
    text-decoration: none;
}


/* ── 12. Kategorien-Tags ──────────────────────────────────── */
.category-name,
.item-category a,
.tag-list a {
    display: inline-block;
    background-color: #daeef8;
    color: #1a5e8a;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-decoration: none;
    margin-right: 4px;
    margin-bottom: 4px;
    transition: background 0.2s ease;
}

.category-name:hover,
.item-category a:hover {
    background-color: var(--iso-blau);
    color: var(--iso-weiss);
}


/* ── 13. Sidebar / Module ─────────────────────────────────── */
aside,
#sp-aside,
#sp-right,
.sidebar {
    font-size: 0.9rem;
}

.sidebar .module,
aside .module {
    background-color: var(--iso-weiss);
    border: 1px solid #e0ecf4;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

/* Modul-Überschrift */
.module-title,
h3.module-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: var(--iso-blau);
    border-bottom: 2px solid var(--iso-blau-hell);
    padding-bottom: 0.4rem;
    margin-bottom: 0.75rem;
}

/* Listen in der Sidebar */
.sidebar ul,
aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li,
aside ul li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f6fa;
}

.sidebar ul li:last-child,
aside ul li:last-child {
    border-bottom: none;
}

.sidebar ul li a,
aside ul li a {
    color: var(--iso-text-weich);
    font-weight: 400;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.sidebar ul li a:hover,
aside ul li a:hover {
    color: var(--iso-blau);
    padding-left: 4px;
    text-decoration: none;
}


/* ── 14. Footer ───────────────────────────────────────────── */
footer,
.footer,
#sp-footer {
    background-color: var(--iso-blau-dunkel);
    color: rgba(255, 255, 255, 0.80);
    font-size: 0.875rem;
    font-weight: 300;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer a,
.footer a {
    color: var(--iso-blau-hell);
    text-decoration: none;
}

footer a:hover,
.footer a:hover {
    color: var(--iso-weiss);
    text-decoration: underline;
}

footer h4,
.footer h4 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    color: var(--iso-weiss);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}


/* ── 15. Breadcrumbs ──────────────────────────────────────── */
.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

.breadcrumb-item a {
    color: var(--iso-blau);
}

.breadcrumb-item.active {
    color: var(--iso-text-weich);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--iso-text-weich);
    content: "›";
}


/* ── 16. Tabellen ─────────────────────────────────────────── */
table.category,
table.contenttable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

table.category th,
table.contenttable th {
    background-color: var(--iso-blau);
    color: var(--iso-weiss);
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    padding: 10px 14px;
    text-align: left;
}

table.category td,
table.contenttable td {
    padding: 9px 14px;
    border-bottom: 1px solid #e0ecf4;
    color: var(--iso-text-weich);
}

table.category tr:nth-child(even) td,
table.contenttable tr:nth-child(even) td {
    background-color: #f0f8ff;
}

table.category tr:hover td,
table.contenttable tr:hover td {
    background-color: #daeef8;
}


/* ── 17. Formulare ────────────────────────────────────────── */
.contact-form .control-label,
label {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--iso-text);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    border: 1.5px solid #c8dce8;
    border-radius: 8px;
    padding: 9px 14px;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    color: var(--iso-text);
    background-color: var(--iso-weiss);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--iso-blau);
    box-shadow: 0 0 0 3px rgba(26, 111, 173, 0.15);
}


/* ── 18. Seitentrennlinien & Abstände ─────────────────────── */
hr {
    border: none;
    border-top: 1.5px solid #e0ecf4;
    margin: 2rem 0;
}

.section-divider {
    border-top: 3px solid var(--iso-blau-hell);
    width: 48px;
    margin: 0 0 1rem 0;
}


/* ── 19. Responsive Anpassungen ───────────────────────────── */
@media (max-width: 768px) {
    /* aspect-ratio übernimmt die Banner-Höhe automatisch –
       kein min-height-Override nötig */

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }

    .blog .item,
    .items-row .item {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .container-header {
        min-height: 160px;
    }

    body {
        font-size: 15px;
    }
}
