/*
Theme Name: Dům na Splátky
Theme URI: https://dumnasplatky.cz
Description: Warm & Approachable téma pro odborný portál o financování bydlení
Version: 2.0
Author: DumNaSplatky.cz
Text Domain: dumnasplatky
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Fraunces:wght@700;800;900&display=swap');

:root {
    --primary: #e17055;
    --primary-dark: #d35400;
    --text: #2d3436;
    --text-light: #636e72;
    --text-muted: #b2bec3;
    --bg: #fffcf5;
    --bg-white: #fff;
    --bg-warm: #fff5eb;
    --border: #f0ece4;
    --accent-yellow: #ffeaa7;
    --accent-green: #00b894;
    --dark: #2d3436;
    --max-width: 1140px;
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Fraunces', Georgia, serif;
    line-height: 1.3;
}

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

/* ===== HEADER ===== */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-logo {
    font-family: 'Fraunces', serif;
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--text);
    text-decoration: none;
}

.site-logo span { color: var(--primary); }

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 6px;
    align-items: center;
}

.main-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 100px;
    transition: all 0.2s;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
    color: var(--primary);
}

.main-nav .nav-cta a,
.nav-cta-link {
    background: var(--primary);
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 100px;
    font-weight: 700;
}

.nav-cta-link:hover { background: var(--primary-dark); }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* ===== HERO ===== */
.hero {
    padding: 80px 24px;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: var(--accent-yellow);
    color: #856404;
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero h1 span {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: var(--accent-yellow);
    text-decoration-thickness: 4px;
    text-underline-offset: 4px;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 520px;
    margin: 0 auto 36px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 16px 36px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(225,112,85,0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225,112,85,0.4);
}

.btn-ghost {
    display: inline-block;
    color: var(--text);
    padding: 16px 36px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid #dfe6e9;
    transition: all 0.2s;
}

.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ===== CALCULATOR STRIP ===== */
.calc-strip {
    background: var(--dark);
    padding: 32px 24px;
}

.calc-strip-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.calc-strip label {
    color: rgba(255,255,255,0.5);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 6px;
}

.calc-strip input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    width: 180px;
}

.calc-strip input:focus { outline: none; border-color: var(--primary); }

.calc-strip .result {
    background: var(--primary);
    border-radius: 14px;
    padding: 12px 32px;
    text-align: center;
    margin-left: auto;
}

.calc-strip .result small {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 0.72rem;
}

.calc-strip .result strong {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'Fraunces', serif;
}

/* ===== SECTION STYLES ===== */
.section-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 48px;
}

/* ===== CATEGORY GRID ===== */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cat-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid var(--border);
    text-decoration: none;
    color: inherit;
}

.cat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(225,112,85,0.08);
}

.cat-emoji {
    font-size: 2.2rem;
    min-width: 52px;
    height: 52px;
    background: var(--bg-warm);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.cat-card p { font-size: 0.88rem; color: var(--text-light); margin: 0; }
.cat-count { font-size: 0.75rem; color: var(--text-muted); margin-top: 8px; font-weight: 600; }

/* ===== ARTICLES GRID ===== */
.site-content { padding: 50px 0; }

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--bg);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.article-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.06);
    transform: translateY(-4px);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-body { padding: 24px; }

.article-card .category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.article-card .category::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.article-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-card h2 a {
    color: var(--text);
    text-decoration: none;
}

.article-card h2 a:hover { color: var(--primary); }

.article-card .excerpt {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.article-card .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== SINGLE ARTICLE ===== */
.single-article {
    max-width: 760px;
    margin: 0 auto;
}

.single-article h1 {
    font-size: 2.4rem;
    font-weight: 900;
    margin-bottom: 16px;
}

.single-article .article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.single-article .entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.entry-content h2 {
    font-size: 1.6rem;
    margin: 40px 0 15px;
    color: var(--text);
}

.entry-content h3 {
    font-size: 1.3rem;
    margin: 30px 0 12px;
}

.entry-content p { margin-bottom: 18px; }
.entry-content ul, .entry-content ol { margin: 15px 0 20px 25px; }
.entry-content li { margin-bottom: 8px; }

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 15px 25px;
    margin: 25px 0;
    background: var(--bg-warm);
    border-radius: 0 16px 16px 0;
    font-style: italic;
}

.entry-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.entry-content img { max-width: 100%; height: auto; border-radius: 16px; margin: 20px 0; }

.entry-content table { width: 100%; border-collapse: collapse; margin: 25px 0; border-radius: 12px; overflow: hidden; }
.entry-content th, .entry-content td { padding: 12px 15px; border: 1px solid var(--border); text-align: left; }
.entry-content th { background: var(--bg-warm); font-weight: 700; font-family: 'Fraunces', serif; }

/* ===== INFO BOX (Affiliate CTA) ===== */
.info-box {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    border: none;
    border-radius: 20px;
    padding: 28px 32px;
    margin: 30px 0;
}

.info-box h4 {
    font-family: 'Fraunces', serif;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.info-box .cta-btn {
    display: inline-block;
    background: var(--dark);
    color: #fff;
    padding: 12px 28px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 10px;
    transition: all 0.2s;
}

.info-box .cta-btn:hover { background: #000; }

/* ===== CTA BANNER ===== */
.cta-banner {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 24px;
    padding: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 40px 0;
}

.cta-banner h2 {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.cta-banner p { color: var(--text-light); max-width: 400px; }

.btn-dark {
    display: inline-block;
    background: var(--dark);
    color: #fff;
    padding: 16px 36px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-dark:hover { background: #000; }

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    padding: 15px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs a { color: var(--primary); text-decoration: none; }
.breadcrumbs span { margin: 0 8px; }

/* ===== SIDEBAR ===== */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.sidebar .widget {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.sidebar .widget h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text);
}

.sidebar .widget ul { list-style: none; }
.sidebar .widget li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--text); text-decoration: none; font-size: 0.9rem; }
.sidebar .widget a:hover { color: var(--primary); }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}

.pagination .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.5);
    padding: 50px 0 25px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 30px;
}

.footer-col h4 {
    color: #fff;
    font-family: 'Fraunces', serif;
    margin-bottom: 16px;
    font-size: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary); }
.footer-col p { font-size: 0.9rem; line-height: 1.6; }

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.8rem;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ===== SEARCH ===== */
.search-form input[type="search"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 100px;
    font-size: 1rem;
    font-family: inherit;
}

.search-form input[type="search"]:focus { outline: none; border-color: var(--primary); }

/* ===== 404 ===== */
.error-404 { text-align: center; padding: 80px 24px; }
.error-404 h1 { font-size: 5rem; color: var(--primary); margin-bottom: 16px; }

/* ===== TABLE OF CONTENTS ===== */
.toc-box {
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 24px 28px;
    margin: 24px 0;
}

.toc-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li {
    margin-bottom: 6px;
}

.toc-list li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    display: block;
    padding: 4px 0;
}

.toc-list li a:hover { color: var(--primary); }
.toc-list .toc-sub { padding-left: 20px; }
.toc-list .toc-sub a { font-size: 0.85rem; }

/* ===== RELATED POSTS ===== */
.related-posts {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--border);
}

.related-posts h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.related-item {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.related-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(225,112,85,0.08);
}

.related-cat {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.related-title {
    display: block;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
}

/* ===== LAST UPDATED ===== */
.last-updated {
    background: var(--accent-yellow);
    color: #856404;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .main-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg);
        padding: 16px 24px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    }

    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; gap: 4px; }
    .main-nav a { display: block; padding: 12px 16px; }

    .hero { padding: 50px 24px; }
    .hero h1 { font-size: 2.2rem; }

    .calc-strip-inner { flex-direction: column; align-items: stretch; }
    .calc-strip input { width: 100%; }
    .calc-strip .result { margin-left: 0; }

    .cat-grid { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: 1fr; }
    .content-with-sidebar { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

    .cta-banner { flex-direction: column; text-align: center; gap: 24px; padding: 36px 24px; }

    .single-article h1 { font-size: 1.8rem; }
}
