/*
Theme Name: mq-blog
Theme URI: https://mikequade.net
Author: Mike & Ursel
Author URI: https://mikequade.net
Description: Custom WordPress Theme für mikequade.net. Läuft auf Magma-Backend 😉
Version: 0.1
License: MIT
Text Domain: mq-blog
*/

/* ─── Reset & Dark Background ────────────────────────────────── */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: #d1d5db;
    background: #131517;
    min-height: 100vh;
    position: relative;
}

/* Animierter Waber-Gradient */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(20, 184, 166, 0.10) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 80% 70%, rgba(20, 184, 166, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(20, 184, 166, 0.04) 0%, transparent 50%);
    animation: waber 20s ease-in-out infinite alternate;
}

@keyframes waber {
    0%   { background-position: 0% 0%, 100% 100%, 50% 50%; }
    33%  { background-position: 30% 20%, 70% 80%, 40% 60%; }
    66%  { background-position: 10% 40%, 90% 60%, 60% 40%; }
    100% { background-position: 25% 15%, 75% 85%, 45% 55%; }
}

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

a {
    color: #14b8a6;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #5eead4;
    text-decoration: underline;
}

/* ─── Container ─────────────────────────────────────────────── */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.layout {
    display: flex;
    gap: 40px;
}

.main-loop, .main-single, .main-page {
    flex: 1;
    min-width: 0;
}

#sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* ─── Header ────────────────────────────────────────────────── */

#site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(19, 21, 23, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(20, 184, 166, 0.15);
    padding: 16px 0;
}

#site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand a {
    font-size: 22px;
    text-decoration: none;
    letter-spacing: -0.3px;
}

.brand-name {
    color: #e5e7eb;
    font-weight: 700;
}

.brand-tld {
    color: #14b8a6;
    font-weight: 400;
}

.brand a:hover .brand-name {
    color: #14b8a6;
}

/* ─── Navigation ────────────────────────────────────────────── */

/* Top-Level Menü immer als Flex-Zeile */
#primary-nav .menu > ul,
#primary-nav > ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

#primary-nav li {
    position: relative;
}

#primary-nav a {
    color: #9ca3af;
    font-size: 16px;
    transition: color 0.2s;
    padding: 8px 0;
    display: block;
}

#primary-nav a:hover {
    color: #14b8a6;
}

#primary-nav .current-menu-item > a {
    color: #14b8a6;
}

/* Dropdown: Kinder-Seiten (wp_list_pages) & Sub-Menüs (wp_nav_menu) */
#primary-nav .children,
#primary-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: rgba(31, 33, 37, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 8px 0;
    flex-direction: column;
    gap: 0;
    z-index: 200;
}

#primary-nav li:hover > .children,
#primary-nav li:hover > .sub-menu {
    display: flex;
}

/* Zweite Ebene */
#primary-nav .children .children,
#primary-nav .sub-menu .sub-menu {
    top: -8px;
    left: 100%;
    margin-left: 4px;
}

#primary-nav .children li,
#primary-nav .sub-menu li {
    width: 100%;
}

#primary-nav .children a,
#primary-nav .sub-menu a {
    padding: 8px 16px;
    font-size: 14px;
    white-space: nowrap;
}

#primary-nav .children a:hover,
#primary-nav .sub-menu a:hover {
    background: rgba(20, 184, 166, 0.08);
}

/* ─── Hero ──────────────────────────────────────────────────── */

.hero {
    padding: 60px 0 40px;
}

.hero h1 {
    font-size: 36px;
    font-weight: 800;
}

.hero p {
    color: #6b7280;
    font-size: 20px;
    margin-top: 8px;
}

/* ─── Post Cards ────────────────────────────────────────────── */

.post-card {
    background: rgba(31, 33, 37, 0.8);
    backdrop-filter: blur(4px);
    padding: 30px;
    margin-bottom: 24px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}

.entry-title {
    font-size: 24px;
    margin-bottom: 8px;
}

.entry-title a {
    color: #e5e7eb;
}

.entry-title a:hover {
    color: #14b8a6;
}

.entry-meta {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

.entry-meta a {
    color: #6b7280;
}

.entry-meta a:hover {
    color: #14b8a6;
}

.entry-summary {
    color: #9ca3af;
}

/* ─── Single Post ───────────────────────────────────────────── */

.main-single article {
    background: rgba(31, 33, 37, 0.8);
    backdrop-filter: blur(4px);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}

.main-single .entry-title {
    font-size: 32px;
    line-height: 1.3;
    color: #e5e7eb;
}

.entry-content {
    margin-top: 24px;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2 {
    font-size: 26px;
    margin: 40px 0 16px;
    color: #e5e7eb;
}

.entry-content h3 {
    font-size: 22px;
    margin: 32px 0 12px;
    color: #e5e7eb;
}

/* ─── Archive ───────────────────────────────────────────────── */

.archive-header {
    padding: 40px 0 24px;
}

.archive-header h1 {
    font-size: 28px;
}

/* ─── 404 ───────────────────────────────────────────────────── */

.error-404 {
    text-align: center;
    padding: 100px 0;
}

.error-404 h1 {
    font-size: 80px;
    color: #d1d5db;
}

/* ─── Pagination ────────────────────────────────────────────── */

.pagination {
    margin: 40px 0;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 2px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    background: rgba(31, 33, 37, 0.8);
    color: #9ca3af;
}

.pagination .current {
    background: #14b8a6;
    color: #fff;
    border-color: #14b8a6;
}

.pagination a:hover {
    border-color: #14b8a6;
    color: #14b8a6;
}

/* ─── Footer ────────────────────────────────────────────────── */

#site-footer {
    text-align: center;
    padding: 40px 0;
    color: #525252;
    font-size: 14px;
}

/* ─── Sidebar ───────────────────────────────────────────────── */

.widget {
    background: rgba(31, 33, 37, 0.8);
    backdrop-filter: blur(4px);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #e5e7eb;
}

/* ─── Hero (Dark) ───────────────────────────────────────────── */

.hero h1 {
    color: #e5e7eb;
}

.hero p {
    color: #6b7280;
}

/* ─── 404 (Dark) ────────────────────────────────────────────── */

.error-404 h1 {
    color: #374151;
}

/* ─── Archive (Dark) ────────────────────────────────────────── */

.archive-header h1 {
    color: #e5e7eb;
}

/* ─── Homepage: Hero + Cards ────────────────────────────────── */

.hp-content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ── Hero (erster Artikel, 2-Spalten) ── */
.hp-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 0;
    padding-bottom: 40px;
    border-bottom: 1px dashed rgba(100, 184, 176, 0.10);
    min-height: 0;
}

.hp-after-hero {
    height: 40px;
}

.hp-hero-content {
    padding: 32px 28px 32px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hp-kicker {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #14b8a6;
    font-weight: 600;
    margin-bottom: 10px;
}

.hp-hero-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}

.hp-hero-title a {
    color: #e5e7eb;
    text-decoration: none;
    transition: color 0.2s;
}

.hp-hero-title a:hover {
    color: #14b8a6;
}

.hp-hero-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: #9ca3af;
    margin-bottom: 18px;
    max-width: 480px;
}

.hp-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.hp-meta .sep {
    color: #374151;
}

.hp-hero-image {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
}

.hp-hero-image::before {
    content: '';
    display: block;
    padding-bottom: 75%; /* 4:3 Aspect Ratio */
}

.hp-hero-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hp-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #4b5563;
    font-size: 12px;
}

.hp-img-placeholder svg {
    opacity: 0.4;
}

/* ── 3 Cards ── */
.hp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-bottom: 40px;
    border-bottom: 1px dashed rgba(100, 184, 176, 0.10);
}

.hp-card {
    padding: 0;
    background: none;
    margin: 0;
    border-radius: 0;
}

.hp-card-image {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.02);
    position: relative;
}

.hp-card-image::before {
    content: '';
    display: block;
    padding-bottom: 75%; /* 4:3 Aspect Ratio */
}

.hp-card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hp-tag {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255,255,255,0.04);
    color: #9ca3af;
    padding: 2px 7px;
    border-radius: 3px;
    margin-bottom: 8px;
}

.hp-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}

.hp-card-title a {
    color: #e5e7eb;
    text-decoration: none;
    transition: color 0.2s;
}

.hp-card-title a:hover {
    color: #14b8a6;
}

.hp-card-excerpt {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.6;
}

.hp-card-meta {
    font-size: 11px;
    color: #6b7280;
    margin-top: 8px;
    display: flex;
    gap: 6px;
}

.hp-card-meta .sep {
    color: #374151;
}

/* ── Ältere Posts (Loop) ── */
.hp-loop {
    /* padding kommt von .hp-grid + .hp-loop-item, kein extra margin nötig */
}

.hp-loop-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 40px 0;
    border-bottom: 1px dashed rgba(100, 184, 176, 0.10);
    margin: 0;
    border-radius: 0;
    background: none;
}

.hp-loop-content {
    flex: 1;
}

.hp-loop-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.hp-loop-title a {
    color: #e5e7eb;
    text-decoration: none;
}

.hp-loop-title a:hover {
    color: #14b8a6;
}

.hp-loop-meta {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.hp-loop-meta .sep {
    color: #374151;
}

.hp-loop-meta a {
    color: #14b8a6;
    text-decoration: none;
}

.hp-loop-excerpt {
    font-size: 15px;
    color: #9ca3af;
    line-height: 1.6;
}

.hp-loop-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
}

.hp-loop-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hp-pagination {
    margin-top: 40px;
    text-align: center;
}

.hp-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    color: #9ca3af;
    font-size: 13px;
    text-decoration: none;
    border: 0.5px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    transition: all 0.2s;
}

.hp-pagination .page-numbers:hover,
.hp-pagination .page-numbers.current {
    color: #14b8a6;
    border-color: #14b8a6;
}

.hp-empty {
    text-align: center;
    padding: 60px 0;
    color: #6b7280;
    font-size: 16px;
}

/* ── HP Responsive ── */

@media (max-width: 900px) {
    .hp-hero {
        grid-template-columns: 1fr;
    }
    .hp-hero-image {
        display: none;
    }
    .hp-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
    }

    #site-header .container {
        flex-direction: column;
        gap: 12px;
    }

    .post-card {
        padding: 20px;
    }

    .main-single article {
        padding: 20px;
    }
}
