/*
Theme Name: Tauchschule Intranet
Theme URI: https://example.com
Author: Tauchschule
Author URI: https://example.com
Description: Internes Intranet-Theme für Tauchschulen. Enthält Kurse, Team und Tauchplätze als eigene Bereiche, ein Dashboard als Startseite sowie einen Zugriffsschutz für eingeloggte Nutzer.
Version: 1.6
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: tauchschule-intranet
*/

/* ==========================================================================
   1. Variablen & Grundlagen
   ========================================================================== */
:root {
    --color-deep: #0a3d62;
    --color-ocean: #147d94;
    --color-teal: #1eaeae;
    --color-teal-light: #e4f7f7;
    --color-sand: #f7f5f0;
    --color-white: #ffffff;
    --color-text: #1c2b33;
    --color-text-muted: #5b6d76;
    --color-border: #dbe6e8;
    --color-danger: #c0392b;
    --color-success: #1e8f4e;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(10, 61, 98, 0.08);
    --shadow-hover: 0 6px 20px rgba(10, 61, 98, 0.14);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --max-width: 1180px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--color-sand);
    color: var(--color-text);
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-ocean); text-decoration: none; }
a:hover { color: var(--color-deep); text-decoration: underline; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4 { font-weight: 700; color: var(--color-deep); line-height: 1.25; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--color-ocean);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s ease;
}
.btn:hover { background: var(--color-deep); color: #fff; text-decoration: none; }
.btn-outline {
    background: transparent;
    color: var(--color-ocean);
    border: 1px solid var(--color-ocean);
}
.btn-outline:hover { background: var(--color-teal-light); color: var(--color-deep); }

/* ==========================================================================
   2. Header / Navigation
   ========================================================================== */
.site-header {
    background: var(--color-deep);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.site-branding { display: flex; align-items: center; gap: 10px; }
.site-branding a { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.2rem; }
.site-branding img.custom-logo { max-height: 42px; width: auto; }

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
}
.main-navigation a {
    color: #cfe8ee;
    padding: 10px 14px;
    border-radius: var(--radius);
    display: block;
    text-decoration: none;
    font-size: 0.95rem;
}
.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #cfe8ee;
}
.header-user img.avatar { border-radius: 50%; width: 32px; height: 32px; }
.header-user a { color: #cfe8ee; }
.header-user a:hover { color: #fff; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
}

@media (max-width: 780px) {
    .main-navigation { display: none; width: 100%; }
    .main-navigation.is-open { display: block; }
    .main-navigation ul { flex-direction: column; }
    .site-header .container { flex-wrap: wrap; height: auto; padding: 12px 20px; }
    .nav-toggle { display: block; }
}

/* ==========================================================================
   3. Dashboard (Startseite)
   ========================================================================== */
.dashboard-hero {
    background: linear-gradient(135deg, var(--color-deep), var(--color-ocean));
    color: #fff;
    padding: 48px 0;
}
.dashboard-hero h1 { color: #fff; margin: 0 0 6px; }
.dashboard-hero p { color: #d7eef2; margin: 0; }

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: -32px 0 40px;
}
.quick-link-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    border: 1px solid var(--color-border);
}
.quick-link-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.quick-link-card .icon { font-size: 1.6rem; margin-bottom: 8px; display: block; }
.quick-link-card h3 { margin: 0 0 4px; }
.quick-link-card p { color: var(--color-text-muted); font-size: 0.9rem; margin: 0; }
.quick-link-card a.card-link { position: absolute; inset: 0; }
.quick-link-card { position: relative; }

.dashboard-section { padding: 30px 0; }
.dashboard-section h2 { border-bottom: 2px solid var(--color-teal-light); padding-bottom: 10px; margin-bottom: 20px; }

.announcement-list { display: grid; gap: 16px; }
.announcement-item {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}
.announcement-item .meta { font-size: 0.82rem; color: var(--color-text-muted); margin-bottom: 4px; }
.announcement-item h3 { margin: 0 0 6px; font-size: 1.05rem; }
.announcement-item h3 a { color: var(--color-deep); }

/* ==========================================================================
   4. Karten-Grids (Kurse, Team, Tauchplätze)
   ========================================================================== */
.entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin: 30px 0;
}
.entry-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.entry-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.entry-card .entry-card-thumb { width: 100%; height: 150px; object-fit: cover; background: var(--color-teal-light); }
.entry-card .entry-card-body { padding: 16px 18px; }
.entry-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.entry-card .badge {
    display: inline-block;
    background: var(--color-teal-light);
    color: var(--color-ocean);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}
.entry-card .meta-line { font-size: 0.85rem; color: var(--color-text-muted); margin: 2px 0; }

.page-header-band {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 30px 0;
}
.page-header-band h1 { margin: 0; }
.page-header-band p { color: var(--color-text-muted); margin: 6px 0 0; }

/* ==========================================================================
   5. Einzelansichten
   ========================================================================== */
.single-wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; padding: 36px 0 60px; }
.single-main { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 30px; border: 1px solid var(--color-border); }
.single-sidebar-box {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
    padding: 22px;
    align-self: start;
    position: sticky;
    top: 90px;
}
.single-sidebar-box h3 { margin-top: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-ocean); }
.meta-table { width: 100%; border-collapse: collapse; }
.meta-table td { padding: 8px 0; border-bottom: 1px solid var(--color-border); font-size: 0.92rem; }
.meta-table td:first-child { color: var(--color-text-muted); width: 45%; }

@media (max-width: 860px) {
    .single-wrap { grid-template-columns: 1fr; }
    .single-sidebar-box { position: static; }
}

/* ==========================================================================
   6. Standardinhalte / Blog / Seiten
   ========================================================================== */
.content-wrap { max-width: 760px; margin: 0 auto; padding: 40px 0 60px; }
.content-wrap .single-main { padding: 32px 36px; }
.entry-meta { color: var(--color-text-muted); font-size: 0.88rem; margin-bottom: 18px; }

/* ==========================================================================
   7. Formulare / Kommentare
   ========================================================================== */
input[type="text"], input[type="email"], input[type="url"], textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-family: var(--font);
    font-size: 0.95rem;
}

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer {
    background: var(--color-deep);
    color: #cfe8ee;
    padding: 30px 0;
    margin-top: 40px;
    font-size: 0.88rem;
}
.site-footer a { color: #fff; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   9. Login-Seite Branding
   ========================================================================== */
body.login { background: linear-gradient(135deg, var(--color-deep), var(--color-ocean)); }
.login h1 a {
    background-image: none !important;
    width: auto; height: auto;
    text-indent: 0;
    font-size: 1.6rem;
    color: #fff;
    font-weight: 700;
}
.login form { border-radius: var(--radius); box-shadow: var(--shadow-hover); }
.login #backtoblog a, .login #nav a { color: #fff; }

/* ==========================================================================
   10. Sonstiges
   ========================================================================== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--color-text-muted); }
.pagination-links { display: flex; gap: 8px; justify-content: center; margin: 30px 0; }
.pagination-links a, .pagination-links span {
    padding: 8px 14px; border-radius: 6px; border: 1px solid var(--color-border); color: var(--color-text);
}
.pagination-links .current { background: var(--color-ocean); color: #fff; border-color: var(--color-ocean); }
