/*
 * UnterTageTaucher.de
 *
 * Zwei Farbschemata:
 *
 * DUNKEL
 * Header/Footer: Dunkelblau
 * Inhalt: Schwarz / sehr dunkel
 *
 * HELL
 * Header/Footer: Hellblau
 * Inhalt: Weiß
 */


/* =========================================================
   DUNKLES DESIGN – Standard
   ========================================================= */

:root,
html[data-theme="dark"] {

    --page-background: #000000;
    --content-background: #000000;

    --header-background: #07558a;
    --header-background-2: #043a62;

    --nav-background: #032f50;
    --nav-hover: #07558a;

    --footer-background: #043a62;

    --surface: #11161a;
    --surface-alt: #171d21;

    --text: #e9eef1;
    --text-muted: #a5b0b6;

    --heading: #ffffff;

    --border: #293840;

    --link: #45aee8;
    --link-hover: #8bd5ff;

    --accent: #168bd2;
    --accent-hover: #2ca4ed;

    --button-text: #ffffff;

    --input-background: #080c0f;
    --input-text: #ffffff;

    --table-head: #0b3047;
    --table-even: #10171b;

    --shadow: rgba(0, 0, 0, 0.30);

    --max-width: 1200px;
    --wide-width: 1400px;
}


/* =========================================================
   HELLES DESIGN
   ========================================================= */

html[data-theme="light"] {

    --page-background: #ffffff;
    --content-background: #ffffff;

    --header-background: #71c5ef;
    --header-background-2: #55b4e5;

    --nav-background: #45a9dc;
    --nav-hover: #258fc8;

    --footer-background: #71c5ef;

    --surface: #f4f8fa;
    --surface-alt: #eaf2f6;

    --text: #20262a;
    --text-muted: #5d6870;

    --heading: #10171b;

    --border: #ccd9df;

    --link: #006fae;
    --link-hover: #004f7d;

    --accent: #087fbe;
    --accent-hover: #05689d;

    --button-text: #ffffff;

    --input-background: #ffffff;
    --input-text: #20262a;

    --table-head: #b9e2f6;
    --table-even: #f2f7f9;

    --shadow: rgba(0, 55, 85, 0.12);
}


/* =========================================================
   GRUNDEINSTELLUNGEN
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page-background);
}

body {
    margin: 0;

    min-height: 100vh;

    display: flex;
    flex-direction: column;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 16px;
    line-height: 1.65;

    color: var(--text);
    background: var(--content-background);

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    color: var(--link-hover);
    text-decoration: underline;
}

img {
    display: block;

    max-width: 100%;
    height: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    background:
        linear-gradient(
            180deg,
            var(--header-background) 0%,
            var(--header-background-2) 100%
        );

    border-bottom: 1px solid var(--border);

    box-shadow:
        0 4px 18px
        var(--shadow);
}

.header-inner {
    width: min(
        var(--wide-width),
        calc(100% - 40px)
    );

    min-height: 105px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* =========================================================
   LOGO / SEITENTITEL
   ========================================================= */

.site-branding {
    display: flex;
    flex-direction: column;
}

.site-title {
    color: #ffffff;

    font-size: 2.1rem;
    font-weight: 700;

    line-height: 1.15;

    letter-spacing: 0.02em;

    text-decoration: none;

    text-shadow:
        0 2px 5px
        rgba(0, 0, 0, 0.25);
}

.site-title:hover,
.site-title:focus-visible {
    color: #ffffff;
    text-decoration: none;
}

.site-subtitle {
    margin-top: 7px;

    color: rgba(255, 255, 255, 0.85);

    font-size: 0.95rem;

    letter-spacing: 0.04em;
}


/* =========================================================
   BENUTZERBEREICH
   ========================================================= */

.user-area {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    flex-wrap: wrap;

    gap: 10px;

    font-size: 0.92rem;
}

.user-name {
    margin-right: 5px;

    color: #ffffff;

    font-weight: 600;
}

.user-area a {
    padding: 6px 11px;

    color: #ffffff;

    background: rgba(0, 0, 0, 0.14);

    border:
        1px solid
        rgba(255, 255, 255, 0.38);

    border-radius: 4px;

    text-decoration: none;
}

.user-area a:hover,
.user-area a:focus-visible {
    color: #ffffff;

    background: rgba(0, 0, 0, 0.30);

    border-color: #ffffff;

    text-decoration: none;
}


/* =========================================================
   THEME-SCHALTER
   ========================================================= */

.theme-toggle {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 88px;

    padding: 6px 11px;

    color: #ffffff;

    background: rgba(0, 0, 0, 0.14);

    border:
        1px solid
        rgba(255, 255, 255, 0.38);

    border-radius: 4px;

    font-size: 0.92rem;
    font-weight: 600;

    cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    background: rgba(0, 0, 0, 0.30);
    border-color: #ffffff;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.main-navigation {
    background: var(--nav-background);

    border-top:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-bottom:
        1px solid
        var(--border);
}

.navigation-inner {
    width: min(
        var(--wide-width),
        calc(100% - 40px)
    );

    margin: 0 auto;

    display: flex;

    align-items: stretch;
    justify-content: center;

    flex-wrap: wrap;
}

.nav-link {
    position: relative;

    display: flex;
    align-items: center;

    padding: 15px 18px;

    color: #ffffff;

    font-size: 0.95rem;
    font-weight: 600;

    text-decoration: none;

    transition:
        background-color 0.15s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: #ffffff;

    background: var(--nav-hover);

    text-decoration: none;
}

.nav-link.active {
    color: #ffffff;

    background: var(--nav-hover);
}

.nav-link.active::after {
    content: "";

    position: absolute;

    left: 18px;
    right: 18px;
    bottom: 0;

    height: 3px;

    background: #ffffff;
}


/* =========================================================
   HAUPTINHALT
   ========================================================= */

.site-main {
    flex: 1;

    width: 100%;

    background: var(--content-background);
}

.content-container {
    width: min(
        var(--max-width),
        calc(100% - 40px)
    );

    margin: 0 auto;

    padding: 55px 0 75px;
}

.content-container > :first-child {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    color: var(--heading);

    line-height: 1.25;
}

h1 {
    margin: 0 0 28px;

    font-size: clamp(
        2rem,
        5vw,
        3.2rem
    );

    font-weight: 700;
}

h2 {
    margin: 40px 0 18px;

    font-size: 1.75rem;
}

h3 {
    margin: 30px 0 15px;

    font-size: 1.3rem;
}

p {
    margin: 0 0 20px;
}


/* =========================================================
   INHALTSBOXEN
   ========================================================= */

.content-box {
    margin: 30px 0;

    padding: 28px;

    color: var(--text);

    background: var(--surface);

    border:
        1px solid
        var(--border);

    border-radius: 6px;

    box-shadow:
        0 8px 24px
        var(--shadow);
}

.content-box > :first-child {
    margin-top: 0;
}

.content-box > :last-child {
    margin-bottom: 0;
}


/* =========================================================
   TABELLEN
   ========================================================= */

table {
    width: 100%;

    margin: 25px 0;

    border-collapse: collapse;

    color: var(--text);

    background: var(--surface);
}

th,
td {
    padding: 12px 14px;

    text-align: left;
    vertical-align: top;

    border:
        1px solid
        var(--border);
}

th {
    color: var(--text);

    background: var(--table-head);

    font-weight: 600;
}

tr:nth-child(even) td {
    background: var(--table-even);
}


/* =========================================================
   FORMULARE
   ========================================================= */

form {
    max-width: 700px;
}

label {
    display: inline-block;

    margin-bottom: 5px;

    color: var(--heading);

    font-weight: 600;
}

input,
select,
textarea,
button {
    font: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    max-width: 600px;

    padding: 10px 12px;

    color: var(--input-text);

    background: var(--input-background);

    border:
        1px solid
        var(--border);

    border-radius: 4px;

    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);

    box-shadow:
        0 0 0 3px
        rgba(22, 139, 210, 0.18);
}

textarea {
    min-height: 160px;

    resize: vertical;
}

small {
    color: var(--text-muted);
}


/* =========================================================
   SCHALTFLÄCHEN
   ========================================================= */

button,
.button {
    display: inline-block;

    padding: 9px 16px;

    color: var(--button-text);

    background: var(--accent);

    border:
        1px solid
        var(--accent);

    border-radius: 4px;

    font-weight: 600;

    cursor: pointer;

    text-decoration: none;
}

button:hover,
button:focus-visible,
.button:hover,
.button:focus-visible {
    color: var(--button-text);

    background: var(--accent-hover);

    border-color: var(--accent-hover);

    text-decoration: none;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    color: rgba(255, 255, 255, 0.85);

    background: var(--footer-background);

    border-top:
        1px solid
        var(--border);
}

.footer-inner {
    width: min(
        var(--wide-width),
        calc(100% - 40px)
    );

    min-height: 90px;

    margin: 0 auto;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 25px;
}

.footer-navigation {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 20px;
}

.footer-navigation a {
    color: #ffffff;
}

.footer-navigation a:hover,
.footer-navigation a:focus-visible {
    color: #ffffff;

    text-decoration: underline;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .header-inner {
        padding: 25px 0;

        flex-direction: column;
        align-items: flex-start;
    }

    .user-area {
        justify-content: flex-start;
    }

    .navigation-inner {
        justify-content: flex-start;
    }

    .footer-inner {
        padding: 25px 0;

        flex-direction: column;
        align-items: flex-start;

        justify-content: center;
    }
}


@media (max-width: 600px) {

    .header-inner,
    .navigation-inner,
    .content-container,
    .footer-inner {
        width: calc(100% - 24px);
    }

    .site-title {
        font-size: 1.65rem;
    }

    .site-subtitle {
        font-size: 0.85rem;
    }

    .user-area {
        gap: 8px;
    }

    .navigation-inner {
        display: grid;

        grid-template-columns:
            1fr 1fr;
    }

    .nav-link {
        justify-content: center;

        padding: 13px 10px;

        text-align: center;
    }

    .nav-link.active::after {
        left: 10px;
        right: 10px;
    }

    .content-container {
        padding-top: 35px;
        padding-bottom: 50px;
    }

    .content-box {
        padding: 20px;
    }

    table {
        display: block;

        overflow-x: auto;

        white-space: nowrap;
    }
}

/* =========================================================
   STARTSEITE
   ========================================================= */


/* ---------------------------------------------------------
   HERO – großes Hintergrundbild
   --------------------------------------------------------- */

.home-hero {
    position: relative;

    min-height: 620px;

    margin:
        -55px
        calc(50% - 50vw)
        70px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.35),
            rgba(0, 0, 0, 0.55)
        ),
        url("/index.php?bild=background")
        center center / cover
        no-repeat;
}

.home-hero-content {
    width: min(
        900px,
        calc(100% - 40px)
    );

    padding: 60px 20px;

    text-align: center;

    color: #ffffff;

    text-shadow:
        0 2px 8px
        rgba(0, 0, 0, 0.75);
}

.home-hero-content h1 {
    margin-bottom: 20px;

    color: #ffffff;

    font-size: clamp(
        2.8rem,
        7vw,
        5.5rem
    );

    line-height: 1.05;
}

.home-hero-kicker {
    margin-bottom: 18px;

    font-size: 1.1rem;
    font-weight: 600;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-hero-text {
    margin:
        0 auto
        35px;

    max-width: 750px;

    font-size: clamp(
        1.15rem,
        2.2vw,
        1.55rem
    );

    line-height: 1.6;
}

.home-hero .button {
    padding: 12px 22px;

    text-shadow: none;
}


/* ---------------------------------------------------------
   ALLGEMEINE STARTSEITEN-BEREICHE
   --------------------------------------------------------- */

.home-section {
    margin: 0 0 80px;
}

.home-section > h2 {
    margin:
        0 0
        35px;

    text-align: center;

    font-size: clamp(
        1.8rem,
        4vw,
        2.5rem
    );
}


/* ---------------------------------------------------------
   WILLKOMMEN / ÜBER UNS
   --------------------------------------------------------- */

.home-about {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(350px, 1fr);

    gap: 55px;

    align-items: center;
}

.home-about-text {
    font-size: 1.05rem;
}

.home-about-text .button {
    margin-top: 10px;
}

.home-about-image {
    overflow: hidden;

    border-radius: 6px;

    box-shadow:
        0 10px 30px
        var(--shadow);
}

.home-about-image img {
    width: 100%;
    height: 430px;

    object-fit: cover;
}


/* ---------------------------------------------------------
   DREI GROSSE BILDKACHELN
   --------------------------------------------------------- */

.home-gallery {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px;
}

.home-gallery-item {
    position: relative;

    min-height: 420px;

    overflow: hidden;

    border-radius: 6px;

    background: #000000;

    box-shadow:
        0 10px 30px
        var(--shadow);

    text-decoration: none;
}

.home-gallery-item img {
    width: 100%;
    height: 420px;

    object-fit: cover;

    transition:
        transform 0.35s ease,
        opacity 0.35s ease;
}

.home-gallery-item::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.05) 25%,
            rgba(0, 0, 0, 0.82) 100%
        );
}

.home-gallery-overlay {
    position: absolute;

    z-index: 2;

    left: 0;
    right: 0;
    bottom: 0;

    padding: 30px;

    color: #ffffff;
}

.home-gallery-overlay h3 {
    margin:
        0 0
        8px;

    color: #ffffff;

    font-size: 1.6rem;
}

.home-gallery-overlay p {
    margin: 0;

    color: #ffffff;

    line-height: 1.5;
}

.home-gallery-item:hover,
.home-gallery-item:focus-visible {
    text-decoration: none;
}

.home-gallery-item:hover img,
.home-gallery-item:focus-visible img {
    transform: scale(1.04);
    opacity: 0.9;
}

.home-gallery-link {
    margin-top: 35px;

    text-align: center;
}


/* ---------------------------------------------------------
   STARTSEITE – TABLET
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .home-hero {
        min-height: 520px;
    }

    .home-about {
        grid-template-columns: 1fr;

        gap: 30px;
    }

    .home-about-image img {
        height: auto;
        max-height: 500px;

        object-fit: cover;
    }

    .home-gallery {
        grid-template-columns: 1fr;
    }

    .home-gallery-item,
    .home-gallery-item img {
        min-height: 360px;
        height: 360px;
    }
}


/* ---------------------------------------------------------
   STARTSEITE – SMARTPHONE
   --------------------------------------------------------- */

@media (max-width: 600px) {

    .home-hero {
        min-height: 480px;

        margin:
            -35px
            calc(50% - 50vw)
            50px;
    }

    .home-hero-content {
        width: calc(100% - 24px);

        padding:
            45px
            12px;
    }

    .home-hero-kicker {
        font-size: 0.85rem;

        letter-spacing: 0.08em;
    }

    .home-hero-text {
        font-size: 1.05rem;
    }

    .home-section {
        margin-bottom: 55px;
    }

    .home-gallery-item,
    .home-gallery-item img {
        min-height: 300px;
        height: 300px;
    }

    .home-gallery-overlay {
        padding: 22px;
    }
}

/* =========================================================
   TEAM
   ========================================================= */
/* ===== TEAM SECTION ===== */

.team {
    background-color: var(--surface-alt);
}

.team-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text);
}

.team-members {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.team-members:has(.team-member:only-child) {
    grid-template-columns: minmax(300px, 400px);
    justify-content: center;
}

.team-members:has(.team-member:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(300px, 400px));
    justify-content: center;
}

.team-member {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px var(--shadow);
    transition: transform 0.3s;
}

.team-member:hover {
    transform: translateY(-5px);
}

.member-img {
    height: 250px;
    position: relative;
    overflow: hidden;
}

.member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Team Badges */

.experience-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f39c12;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.7rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.level-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #1a5276;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.level-badge.intro-to-cave-diver {
    background: #e67e22;
}

.level-badge.full-cave-diver {
    background: #27ae60;
}

.member-info {
    padding: 1.5rem;
}

.member-info h3 {
    color: var(--link);
    margin-bottom: 0.5rem;
}

.member-info p {
    color: var(--text);
    margin-bottom: 1rem;
}


/* Team Stats */

.member-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--surface-alt);
    border-radius: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-weight: bold;
    color: var(--link);
    font-size: 1.1rem;
}


/* Spezialisierung und Zertifizierungen */

.specialization {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(
        135deg,
        var(--header-background-2),
        var(--accent)
    );
    color: white;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
}

.experience-level {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--surface-alt);
    border-radius: 8px;
    border-left: 4px solid var(--accent);
}

.level-tag {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    margin-left: 0.5rem;
}

.level-tag.intro-to-cave-diver {
    background: #e67e22;
}

.level-tag.full-cave-diver {
    background: #27ae60;
}

.certifications {
    margin: 1.5rem 0;
}

.cert-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cert-badge {
    background: var(--accent);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.member-description {
    line-height: 1.7;
    margin: 1.5rem 0;
    color: var(--text);
}

.member-details {
    background: var(--surface-alt);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
}

.detail-item {
    margin-bottom: 0.5rem;
}

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


/* Team-Statistiken */

.team-stats {
    margin-top: 4rem;
    padding: 3rem;
    background: var(--surface-alt);
    border-radius: 12px;
    text-align: center;
}

.team-stats h3 {
    color: var(--link);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

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

.stat-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--link);
    margin-bottom: 0.5rem;
}


/* Erfahrungsstufen */

.experience-explanation {
    margin-top: 4rem;
    padding: 2rem;
    background: var(--surface-alt);
    border-radius: 12px;
}

.experience-explanation h3 {
    color: var(--link);
    margin-bottom: 1.5rem;
    text-align: center;
}

.experience-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.level-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow);
}

.level-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.level-dot.intro-to-cave-diver {
    background: #e67e22;
}

.level-dot.full-cave-diver {
    background: #27ae60;
}

.level-info strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.level-info p {
    margin: 0;
    color: var(--text);
    line-height: 1.5;
}


/* Responsive */

@media (max-width: 768px) {

    .team-members {
        grid-template-columns: 1fr;
    }

    .member-stats {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .team-stats {
        padding: 2rem 1rem;
    }

    .experience-levels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {

    .member-stats {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .experience-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .level-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

.team .section-title {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* =========================================================
   Tauchplätze
   ========================================================= */

.dive-sites-intro {
    color: var(--text-muted);
    max-width: 800px;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.dive-site-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.dive-site-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px var(--shadow);
    display: flex;
    flex-direction: column;
}

.dive-site-card-image {
    height: 210px;
    overflow: hidden;
    background: var(--surface-alt);
}

.dive-site-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dive-site-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(
            145deg,
            var(--header-background),
            var(--nav-background) 60%,
            var(--surface)
        );
    color: var(--text);
    font-weight: 600;
}

.dive-site-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dive-site-card-body h2 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
}

.dive-site-location {
    color: var(--text-muted);
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.dive-site-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dive-site-tags span {
    background: var(--nav-background);
    border: 1px solid var(--accent);
    border-radius: 20px;
    padding: 0.2rem 0.7rem;
    font-size: 0.85rem;
}

.dive-site-card-body > p:last-child {
    margin-top: auto;
    padding-top: 0.75rem;
}


/* Tauchplätze – Tablet */

@media (max-width: 850px) {

    .dive-site-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* Tauchplätze – Smartphone */

@media (max-width: 560px) {

    .dive-site-cards {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   Tauchplatz – Detailansicht
   ========================================================= */

.dive-site-back {
    margin-bottom: 1.25rem;
}

.dive-site-back a {
    color: #fff;
    text-decoration: none;
}

.dive-site-back a:hover {
    color: fff;
}


/* Titelbereich */

.dive-site-detail-hero {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            var(--header-background),
            var(--nav-background) 60%,
            var(--surface)
        );
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.dive-site-detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.85),
            rgba(0, 0, 0, 0.05) 70%
        );
}

.dive-site-detail-hero-overlay {
    position: relative;
    z-index: 1;
    padding: 2rem;
    color: #fff;
}

.dive-site-detail-hero-overlay h1 {
    margin: 0;
    color: #fff;
    font-size: 2.2rem;
}

.dive-site-detail-hero-overlay p {
    margin: 0.25rem 0 0;
    color: #e9eef1;
}

/* Vollständiges Titelbild unter dem Hero */
.dive-site-detail-image {
    margin-bottom: 1.5rem;
}

.dive-site-detail-image a {
    display: block;
    width: 100%;
}

.dive-site-detail-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Kurzdaten */

.dive-site-facts {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.dive-site-fact {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 1rem;
}

.dive-site-fact span {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}

.dive-site-fact strong {
    color: var(--heading);
    font-size: 1.05rem;
}


/* Inhalt */

.dive-site-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr);
    gap: 1.5rem;
}

.dive-site-detail-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.4rem;
    margin-bottom: 1.25rem;
}

.dive-site-detail-box h2 {
    margin-top: 0;
    font-size: 1.35rem;
}

.dive-site-detail-box p:last-child {
    margin-bottom: 0;
}


/* Spätere Karte */

.dive-site-map-placeholder {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    border-radius: 6px;
    background: var(--surface-alt);
    color: var(--text);
}

.dive-site-map-placeholder small {
    color: var(--text-muted);
}


/* Tablet */

@media (max-width: 850px) {

    .dive-site-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dive-site-detail-grid {
        grid-template-columns: 1fr;
    }

}


/* Smartphone */

@media (max-width: 560px) {

    .dive-site-detail-hero-overlay {
        padding: 1.25rem;
    }

    .dive-site-detail-hero-overlay h1 {
        font-size: 1.7rem;
    }

    .dive-site-facts {
        grid-template-columns: 1fr;
    }

}

/* Aktionsbuttons */
.action-button {
    display: inline-block;
    padding: 0.45rem 0.8rem;
    border: 1px solid #777;
    border-radius: 4px;
    background: #f2f2f2;
    color: #222;
    text-decoration: none;
    font: inherit;
    line-height: 1.2;
    cursor: pointer;
}

.action-button:hover {
    background: #e2e2e2;
    color: #111;
    text-decoration: none;
}

/* Gefährliche Aktionen: Löschen */
.action-button-danger {
    border-color: #b42318;
    background: #b42318;
    color: #fff;
}

.action-button-danger:hover {
    border-color: #8f1c13;
    background: #8f1c13;
    color: #fff;
}

/* Abstand zwischen Aktionsbuttons in Tabellen */
td .action-button {
    margin: 0.2rem 0.25rem 0.2rem 0;
}

td form[style*="display:inline"] {
    display: inline-block !important;
    margin: 0.2rem 0.25rem 0.2rem 0;
}

/* Primäre Aktion: Blau */
.action-button-blue {
    border-color: #006fa6;
    background: #006fa6;
    color: #fff;
}

.action-button-blue:hover {
    border-color: #005780;
    background: #005780;
    color: #fff;
}

/* Zurück / Abbrechen: Grün */
.action-button-green {
    border-color: #287a3e;
    background: #287a3e;
    color: #fff;
}

.action-button-green:hover {
    border-color: #1f6031;
    background: #1f6031;
    color: #fff;
}

/* Bildvorschau im Tauchplatz-Editor */
.image-preview {
    margin: 1rem 0;
}

.image-preview img {
    display: block;
    width: auto;
    height: auto;
    max-width: 400px;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
}

/* Datenschutz – automatische Abschnittsnummerierung */
.datenschutz-abschnitte {
    list-style: none;
    counter-reset: datenschutz;
    padding-left: 0;
}

.datenschutz-abschnitte > li {
    counter-increment: datenschutz;
}

.datenschutz-abschnitte > li > h2::before {
    content: counter(datenschutz) ". ";
}

/* =========================================================
   Bilder in Tauchgangsnotizen
   ========================================================= */

.dive-notes .dive-log-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 8px;
}

/*
 * Alte DIVElogs-Bilder stecken teilweise noch in Links.
 * Die lokale Bilddarstellung soll dadurch nicht verändert
 * werden.
 */
.dive-notes a:has(.dive-log-image) {
    display: inline-block;
    max-width: 100%;
}

/* =========================================================
   Großansicht der Logbuchbilder
   ========================================================= */

.dive-log-image {
    cursor: zoom-in;
}

.dive-image-lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    inset: 0;
    background: rgba(0, 0, 0, 0.90);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.dive-image-lightbox.is-open {
    display: flex;
}

.dive-image-lightbox img {
    display: block;
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.dive-image-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
}

/* =========================================================
   GALERIE
   ========================================================= */

.gallery-intro {
    max-width: 800px;
    margin-bottom: 2rem;

    color: var(--text-muted);

    font-size: 1.05rem;
}


.gallery-albums {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 2rem;
}


.gallery-album-card {
    overflow: hidden;

    display: flex;
    flex-direction: column;

    background: var(--surface);

    border:
        1px solid
        var(--border);

    border-radius: 8px;

    box-shadow:
        0 3px 10px
        var(--shadow);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.gallery-album-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 8px 24px
        var(--shadow);
}


.gallery-album-image {
    display: block;

    height: 240px;

    overflow: hidden;

    background: var(--surface-alt);

    text-decoration: none;
}


.gallery-album-image:hover {
    text-decoration: none;
}


.gallery-album-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.3s ease;
}


.gallery-album-card:hover
.gallery-album-image img {
    transform: scale(1.03);
}


.gallery-album-placeholder {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 1rem;

    background:
        linear-gradient(
            145deg,
            var(--header-background),
            var(--nav-background) 60%,
            var(--surface)
        );

    color: var(--text);

    font-weight: 600;

    text-align: center;
}


.gallery-album-body {
    display: flex;
    flex: 1;
    flex-direction: column;

    padding: 1.25rem;
}


.gallery-album-body h2 {
    margin:
        0 0
        0.75rem;

    font-size: 1.35rem;
}


.gallery-album-body h2 a {
    text-decoration: none;
}


.gallery-album-body h2 a:hover {
    text-decoration: underline;
}


.gallery-album-description {
    margin-bottom: 1rem;
}


.gallery-album-meta {
    margin-top: auto;
    padding-top: 0.75rem;

    color: var(--text-muted);

    font-size: 0.9rem;

    border-top:
        1px solid
        var(--border);
}


/* Galerie – Tablet */

@media (max-width: 850px) {

    .gallery-albums {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* Galerie – Smartphone */

@media (max-width: 560px) {

    .gallery-albums {
        grid-template-columns: 1fr;
    }

    .gallery-album-image {
        height: 220px;
    }

}


