/* ========================================
   deinePrüfung.de – Theme CSS
   Kein Astra, kein Ballast, volle Kontrolle
   ======================================== */

/* === VARIABLEN === */
:root {
    --pw-blue: #003366;
    --pw-blue-light: #004d99;
    --pw-blue-lighter: #e8f0fe;
    --pw-blue-pale: #dce8f3;
    --pw-green: #28a745;
    --pw-orange: #e67e22;
    --pw-text: #2c3e50;
    --pw-text-light: #5a6c7d;
    --pw-bg: #e8eef5;
    --pw-white: #ffffff;
    --pw-border: #dce3ec;
    --pw-radius: 8px;
    --pw-shadow: 0 2px 8px rgba(0,51,102,0.08);
    --pw-shadow-hover: 0 8px 24px rgba(0,51,102,0.12);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--pw-text);
    background: var(--pw-bg);
}
a { color: var(--pw-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--pw-orange); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', Georgia, serif;
    color: var(--pw-blue);
    line-height: 1.3;
    margin-top: 0;
}

/* === LAYOUT === */
.pw-site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.pw-content {
    flex: 1;
}
.pw-main {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 48px;
}
.pw-homepage .pw-main,
.pw-homepage {
    max-width: 100%;
    padding: 0;
}
.pw-homepage .entry-content { max-width: 100%; }

/* === HEADER === */
.pw-header {
    background: var(--pw-blue-pale);
    border-bottom: 3px solid var(--pw-orange);
    box-shadow: 0 1px 6px rgba(0,51,102,0.1);
    position: relative;
    z-index: 1000;
}
.pw-header-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
}

/* Logo */
.pw-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.pw-logo-icon { display: inline-flex; align-items: center; flex-shrink: 0; }
.pw-logo-icon svg { width: 42px; height: 42px; }
.pw-logo-main {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 38px;
    font-weight: 700;
    color: var(--pw-blue);
    white-space: nowrap;
}
.pw-logo-dot {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 22px;
    color: var(--pw-blue);
    margin-left: 1px;
}
.pw-logo:hover .pw-logo-main,
.pw-logo:hover .pw-logo-dot { color: var(--pw-orange); }

/* Navigation */
.pw-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.pw-nav-list li a {
    display: block;
    padding: 12px 20px;
    color: var(--pw-blue);
    font-weight: 600;
    font-size: 18px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.pw-nav-list li a:hover {
    color: var(--pw-orange);
}
.pw-nav-logout {
    font-size: 13px;
    color: #999;
}

/* Mobile menu toggle */
.pw-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--pw-blue);
    padding: 8px;
}

/* === FOOTER === */
.pw-footer {
    background: var(--pw-blue);
    text-align: center;
    padding: 24px;
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    border-top: 3px solid var(--pw-orange);
    position: relative;
    z-index: 10;
}
.pw-footer a {
    color: #fff;
    font-weight: 600;
}
.pw-footer a:hover { color: var(--pw-orange); }
.pw-cookie-link {
    color: rgba(255,255,255,0.7);
    font-weight: 400;
    cursor: pointer;
    text-decoration: underline;
}
.pw-cookie-link:hover {
    color: #fff;
}

/* === HERO (Homepage) === */
.pw-hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.pw-hero-bg {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?w=1600&h=900&fit=crop&crop=faces') center/cover no-repeat;
}
.pw-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(0,40,80,0.92) 0%, rgba(0,60,120,0.82) 50%, rgba(0,77,153,0.7) 100%);
}
.pw-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 50px 24px 40px;
    max-width: 720px;
    width: 100%;
}
.pw-hero-tagline {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--pw-orange);
    font-weight: 700;
    margin: 0 0 8px;
}
.pw-hero-content h1 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 48px;
    font-weight: 900;
    color: var(--pw-white);
    margin: 0 0 16px;
    line-height: 1.15;
}
.pw-hero-accent { color: var(--pw-orange); }
.pw-hero-sub {
    font-size: 20px;
    color: rgba(255,255,255,0.95);
    margin: 0 0 28px;
    line-height: 1.6;
}

/* Hero Search */
.pw-hero-search { position: relative; max-width: 560px; margin: 0 auto 28px; }
.pw-hero-search-inner {
    display: flex;
    align-items: center;
    background: var(--pw-white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.pw-hero-search-inner:focus-within { border-color: var(--pw-orange); }
.pw-hero-search-icon { padding: 0 4px 0 16px; font-size: 20px; }
#pw-hero-search-input {
    flex: 1;
    padding: 16px 16px 16px 8px;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: 'Source Sans 3', sans-serif;
    color: var(--pw-text);
    background: transparent;
    box-shadow: none;
}
.pw-hero-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--pw-white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
}
.pw-hero-sr-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--pw-text);
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}
.pw-hero-sr-item:hover { background: var(--pw-blue-lighter); }
.pw-hero-sr-item:last-child { border-bottom: none; }
.pw-hero-sr-title { font-weight: 600; font-size: 15px; }
.pw-hero-sr-meta { font-size: 13px; color: var(--pw-text-light); }
.pw-hero-sr-empty { padding: 16px 20px; color: var(--pw-text-light); font-size: 14px; text-align: center; }

/* Hero Stats */
.pw-hero-stats { display: flex; justify-content: center; align-items: center; gap: 24px; }
.pw-hero-stat { text-align: center; }
.pw-hero-stat-num { display: block; font-size: 28px; font-weight: 700; color: var(--pw-white); line-height: 1.1; }
.pw-hero-stat-label { display: block; font-size: 15px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 1px; line-height: 1.1; margin: 2px 0 0; }
.pw-hero-stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.4); }
.pw-hero-browse {
    font-size: 17px;
    color: rgba(255,255,255,0.8);
    display: block;
    margin-bottom: 24px;
    transition: color 0.2s;
}
.pw-hero-browse:hover { color: var(--pw-white); }

/* === BENEFITS === */
.pw-benefits { background: var(--pw-blue-pale); padding: 36px 24px; border-bottom: 1px solid var(--pw-border); }
.pw-container { max-width: 100%; margin: 0 auto; }
.pw-benefits-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px; }
.pw-benefit { text-align: center; padding: 36px 24px; }
.pw-benefit-icon { font-size: 54px; margin-bottom: 12px; }
.pw-benefit h3 { font-size: 26px; font-weight: 700; color: var(--pw-blue); margin: 0 0 8px; }
.pw-benefit p { font-size: 18px; color: var(--pw-text); margin: 0; line-height: 1.5; }

/* === EXAM HERO (Prüfungsseiten) === */
.pw-exam-hero {
    position: relative;
    min-height: 280px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    border-radius: 0 0 var(--pw-radius) var(--pw-radius);
    overflow: hidden;
    margin-bottom: 32px;
}
.pw-exam-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,51,102,0.72) 0%, rgba(0,51,102,0.24) 100%);
}
.pw-exam-hero-content { position: relative; z-index: 1; padding: 32px; width: 100%; }
.pw-exam-hero-content h1 {
    font-family: 'Merriweather', Georgia, serif;
    color: var(--pw-orange);
    font-size: 32px;
    margin: 8px 0 12px;
}
.pw-exam-hero-cats { display: none; }
.pw-exam-header-cat {
    background: rgba(255,255,255,0.2);
    color: var(--pw-white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.pw-exam-hero-desc { color: rgba(255,255,255,0.9); font-size: 18px; line-height: 1.5; margin: 4px 0 12px; max-width: 700px; }
.pw-exam-hero-meta { display: flex; gap: 14px; color: rgba(255,255,255,0.8); font-size: 14px; flex-wrap: wrap; margin-top: 10px; }
.pw-exam-hero-meta br { display: none; }

/* === PAGES (Impressum, Datenschutz) === */
.pw-page-content {
    padding-top: 32px;
    padding-bottom: 48px;
}
/* Page Hero (wie Katalog-Header) */
.pw-page-hero {
    background: var(--pw-blue);
    color: #fff;
    padding: 48px;
    text-align: center;
}
.pw-page-hero h1 {
    color: #fff;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 8px;
}
.pw-page-hero p {
    color: var(--pw-orange);
    font-size: 18px;
    margin: 0;
    max-width: 700px;
    margin: 0 auto;
}
@media (max-width: 544px) {
    .pw-page-hero { padding: 32px 16px; }
    .pw-page-hero h1 { font-size: 26px; }
    .pw-page-hero p { font-size: 16px; }
}
.pw-page-content .entry-content { font-size: 17px; line-height: 1.7; }
.pw-page-content .entry-content h2 {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 8px;
    padding-top: 28px;
    border-top: 1px solid var(--pw-border);
}
.pw-page-content .entry-content h2:first-child,
.pw-page-content .entry-content h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.pw-page-content .entry-content h2 + p {
    margin-top: 0;
}
.pw-page-content .entry-content h3 { font-size: 20px; }

/* === EXAM PAGE === */
.pw-exam-page { padding: 0 48px; }
.pw-exam-page .entry-title { display: none; }
.pw-exam-page .entry-content > * {
    margin-top: 0;
    margin-bottom: 12px;
}
.pw-exam-page .entry-content > .pw-exam-hero {
    margin-bottom: 16px;
}
.pw-exam-page .entry-content > :last-child {
    margin-bottom: 0;
}
#pw-quiz-app {
    margin: 0;
    padding: 0;
}

/* Aufklappbare Beschreibung */
.pw-exam-description {
    margin: 0 0 12px;
    border: 1px solid var(--pw-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,51,102,0.06);
    overflow: hidden;
}
.pw-exam-description summary {
    cursor: pointer;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--pw-blue);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pw-exam-description summary::-webkit-details-marker { display: none; }
.pw-exam-description summary:hover { color: var(--pw-orange); }
.pw-exam-description .pw-desc-inner { padding: 0 20px 20px; }

/* === ARCHIVE === */
.pw-archive { padding-top: 0; max-width: 100%; }
.pw-archive-header {
    background: var(--pw-blue);
    color: #fff;
    padding: 48px;
}
.pw-archive-header h1 {
    color: #fff;
    font-family: 'Merriweather', serif;
    font-size: 36px;
    margin: 0 0 8px;
}
.pw-archive-header p {
    color: var(--pw-orange);
    font-size: 18px;
    margin: 0;
}
.pw-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 32px 48px;
}
.pw-exam-card {
    background: #fff;
    border: 1px solid var(--pw-border);
    border-top: 4px solid var(--pw-blue);
    border-radius: 10px;
    padding: 24px;
    box-shadow: var(--pw-shadow);
    transition: all 0.25s;
    text-decoration: none;
    display: block;
}
.pw-exam-card:hover {
    box-shadow: var(--pw-shadow-hover);
    transform: translateY(-3px);
    border-top-color: var(--pw-orange);
}
.pw-exam-card h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--pw-blue);
    margin: 0 0 8px;
    line-height: 1.3;
    font-family: 'Source Sans 3', sans-serif;
}
.pw-exam-card p {
    color: var(--pw-text-light);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}
.pw-archive-badges { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.pw-archive-cat { background: var(--pw-blue-lighter); color: var(--pw-blue); padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.pw-archive-qcount { background: #f0f7ed; color: #2d7a2d; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }

/* === QUIZ OVERRIDES === */
.pw-mode-btn { border-color: var(--pw-blue); color: var(--pw-blue); }
.pw-mode-btn:hover, .pw-mode-btn.active { background: var(--pw-orange); color: var(--pw-white); }
.pw-btn-primary { background: var(--pw-blue); }
.pw-btn-primary:hover { background: var(--pw-blue-light); }
.pw-progress-fill { background: var(--pw-blue); }
.pw-option.selected .pw-option-letter { background: var(--pw-orange); }
.pw-option.selected { border-color: var(--pw-orange); background: rgba(230,126,34,0.08); }
.pw-option:hover { border-color: var(--pw-orange); background: rgba(230,126,34,0.05); }
.pw-explanation { border-left-color: var(--pw-blue); }
.pw-question-topic { background: var(--pw-blue-lighter); color: var(--pw-blue); }
.pw-result-score.pass { color: var(--pw-green); }
.pw-login-hint { background: var(--pw-blue-lighter); border-color: #b3cce6; }
.pw-login-hint a { color: var(--pw-blue); }

/* === HOVER EFFECTS (replaces pw-hover.php) === */
.pw-diff-btn:hover,
.pw-start-section:hover,
.pw-book-card:hover {
    border-color: var(--pw-orange);
    box-shadow: 0 4px 16px rgba(230,126,34,0.15);
    transform: translateY(-2px);
}
.pw-btn-explanation:hover { background: var(--pw-orange); color: #fff; }

/* === HIDE FEEDBACK BUTTON === */
#pw-feedback-btn { display: none; }

/* === RESPONSIVE: TABLET (max 921px) === */
@media (max-width: 921px) {
    .pw-header-inner { padding: 0 16px; min-height: 56px; }
    .pw-logo-icon svg { width: 28px; height: 28px; }
    .pw-logo-main { font-size: 22px; }
    .pw-logo-dot { font-size: 14px; }
    .pw-logo { gap: 6px; }

    .pw-menu-toggle { display: block; }
    .pw-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 3px solid var(--pw-orange);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 999;
        padding: 10px 12px;
    }
    .pw-nav.pw-nav-open { display: block; }
    .pw-nav-list {
        flex-direction: column;
        gap: 8px;
    }
    .pw-nav-list li { width: 100%; }
    .pw-nav-list li a {
        display: block;
        text-align: center;
        background: var(--pw-blue-pale);
        border: 1px solid #c0d0e0;
        border-radius: 10px;
        padding: 12px 20px;
        font-size: 16px;
    }
    .pw-nav-list li a:hover { border-color: var(--pw-orange); }

    .pw-main { padding: 0 16px; }
    .pw-exam-page { padding: 0 16px; }
    .pw-archive-grid { grid-template-columns: repeat(2, 1fr); padding: 24px 16px; }
    .pw-archive-header { padding: 24px; }

    .pw-hero { min-height: 420px; }
    .pw-hero-content { padding: 32px 20px; max-width: 100%; }
    .pw-hero-content h1 { font-size: 30px; }
    .pw-hero-sub { font-size: 16px; }
    .pw-hero-tagline { font-size: 14px; }
    .pw-hero-stats { gap: 16px; }
    .pw-hero-stat-num { font-size: 24px; }
    .pw-hero-stat-label { font-size: 13px; }
    .pw-benefits { padding: 24px 16px; }
    .pw-benefits-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .pw-benefit { padding: 16px 12px; }
    .pw-benefit-icon { font-size: 36px; }
    .pw-benefit h3 { font-size: 18px; }
    .pw-benefit p { font-size: 14px; }
    .pw-exam-hero { min-height: 180px; }
    .pw-exam-hero-content h1 { font-size: 22px; margin: 4px 0 6px; }
    .pw-exam-hero-content { padding: 16px; }
    .pw-exam-hero-meta { flex-direction: column; gap: 3px; font-size: 13px; margin-top: 8px; }
    .pw-exam-hero-desc { font-size: 14px; margin: 2px 0 6px; line-height: 1.4; }
    .pw-exam-hero-cats { gap: 4px; }
    .pw-exam-header-cat { font-size: 11px; padding: 2px 8px; }
}

/* === RESPONSIVE: HANDY (max 544px) === */
@media (max-width: 544px) {
    .pw-header-inner { padding: 0 12px; min-height: 50px; }
    .pw-logo-icon svg { width: 24px; height: 24px; }
    .pw-logo-main { font-size: 18px; }
    .pw-logo-dot { font-size: 12px; }
    .pw-logo { gap: 5px; }

    .pw-main { padding: 0 12px; }
    .pw-exam-page { padding: 0 12px; }
    .pw-archive-grid { grid-template-columns: 1fr; }
    .pw-page-content { padding-top: 20px; }
    .pw-page-title { font-size: 24px; }

    .pw-hero { min-height: 360px; }
    .pw-hero-content h1 { font-size: 24px; }
    .pw-hero-content { padding: 24px 16px; }
    .pw-hero-sub { font-size: 14px; margin-bottom: 20px; }
    .pw-hero-tagline { font-size: 12px; letter-spacing: 1px; }
    .pw-hero-stats { gap: 0; }
    .pw-hero-stat { flex: 1; }
    .pw-hero-stat-divider { width: 1px; height: 30px; margin: 0; flex-shrink: 0; }
    .pw-hero-stat-num { font-size: 20px; }
    .pw-hero-stat-label { font-size: 12px; letter-spacing: 0.5px; }
    #pw-hero-search-input { font-size: 14px; padding: 12px 12px 12px 6px; }
    .pw-benefits-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .pw-benefit { padding: 12px 8px; }
    .pw-benefit-icon { font-size: 28px; margin-bottom: 6px; }
    .pw-benefit h3 { font-size: 15px; }
    .pw-benefit p { font-size: 13px; }
    .pw-exam-hero { min-height: auto; }
    .pw-exam-hero-content h1 { font-size: 19px; margin: 2px 0 4px; }
    .pw-exam-hero-content { padding: 12px; }
    .pw-exam-hero-meta { flex-direction: column; gap: 2px; font-size: 12px; margin-top: 6px; }
    .pw-exam-hero-desc { font-size: 13px; margin: 2px 0 4px; }
    .pw-exam-header-cat { font-size: 10px; padding: 2px 6px; }
}
