/*
Theme Name:   Renten-Retter Child
Theme URI:    https://renten-retter.org
Description:  Child-Theme für renten-retter.org – ETF-Sparplan Finanzbildung
Author:       Renten-Retter
Author URI:   https://renten-retter.org
Template:     astra
Version:      1.0.0
License:      GNU General Public License v2 or later
Text Domain:  renten-retter-child
*/

/* ============================================================
   RENTEN-RETTER DESIGN-SYSTEM
   ============================================================ */

:root {
    --rr-blue:       #0B1F3B;
    --rr-blue-light: #122844;
    --rr-teal:       #1FBF9A;
    --rr-teal-dark:  #18a882;
    --rr-teal-bg:    #f0fdf9;
    --rr-white:      #FFFFFF;
    --rr-lightgray:  #F5F7FA;
    --rr-text:       #2d2d2d;
    --rr-muted:      #6b7280;
    --rr-border:     #e5e7eb;
    --rr-warn-bg:    #fffbeb;
    --rr-warn-border:#f59e0b;
    --rr-max-width:  1100px;
    --rr-content-width: 780px;
}

/* ============================================================
   RESET & BASIS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.8;
    color: var(--rr-text);
    background: var(--rr-white);
    margin: 0;
    padding: 0;
}

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

a { color: var(--rr-teal); text-decoration: none; }
a:hover { color: var(--rr-teal-dark); }

/* ============================================================
   HEADER
   ============================================================ */
.rr-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--rr-blue);
    box-shadow: 0 2px 16px rgba(0,0,0,0.22);
}

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

/* Logo */
.rr-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--rr-white);
    text-decoration: none;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}
.rr-logo span { color: var(--rr-teal); }
.rr-logo:hover { color: var(--rr-white); }

/* Navigation */
.rr-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rr-nav a {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
}
.rr-nav a:hover,
.rr-nav .current-menu-item a,
.rr-nav .current_page_item a {
    color: var(--rr-white);
}

/* CTA Button im Header */
.rr-nav .rr-nav-cta a {
    background: var(--rr-teal);
    color: var(--rr-white) !important;
    padding: 9px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}
.rr-nav .rr-nav-cta a:hover {
    background: var(--rr-teal-dark);
}

/* Hamburger */
.rr-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-direction: column;
    gap: 5px;
}
.rr-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--rr-white);
    border-radius: 2px;
    transition: all 0.3s;
}

/* Mobile Nav */
@media (max-width: 720px) {
    .rr-menu-toggle { display: flex; }
    .rr-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0; right: 0;
        background: var(--rr-blue);
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 24px 24px;
        gap: 16px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    }
    .rr-nav.open { display: flex; }
    .rr-nav .rr-nav-cta a { padding: 10px 20px; }
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.rr-main {
    min-height: 60vh;
}

/* ============================================================
   BLOG ARCHIV
   ============================================================ */
.rr-blog-wrap {
    max-width: var(--rr-max-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.rr-blog-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--rr-blue);
    margin-bottom: 8px;
}

.rr-blog-subtitle {
    font-size: 17px;
    color: var(--rr-muted);
    margin-bottom: 40px;
}

/* Blog-Karten Grid */
.rr-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.rr-post-card {
    background: var(--rr-white);
    border: 1px solid var(--rr-border);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.rr-post-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.rr-post-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--rr-lightgray);
}

.rr-post-card-img-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--rr-blue) 0%, #1a3a6b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.rr-post-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rr-post-card-cat {
    display: inline-block;
    background: var(--rr-teal-bg);
    color: var(--rr-teal-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-decoration: none;
}

.rr-post-card-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--rr-blue);
    line-height: 1.3;
    margin-bottom: 10px;
    text-decoration: none;
    display: block;
}
.rr-post-card-title:hover { color: var(--rr-teal); }

.rr-post-card-excerpt {
    font-size: 15px;
    color: var(--rr-muted);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
}

.rr-post-card-meta {
    font-size: 13px;
    color: var(--rr-muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.rr-post-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--rr-teal);
    color: var(--rr-white);
    font-size: 14px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 8px;
    text-decoration: none;
    align-self: flex-start;
}
.rr-post-card-link:hover {
    background: var(--rr-teal-dark);
    color: var(--rr-white);
}

/* Keine Beiträge */
.rr-no-posts {
    text-align: center;
    padding: 60px 24px;
    color: var(--rr-muted);
}

/* ============================================================
   EINZELARTIKEL
   ============================================================ */
.rr-article-wrap {
    max-width: var(--rr-content-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
}

/* Artikel-Meta */
.rr-article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.rr-meta-tag {
    background: var(--rr-teal-bg);
    color: var(--rr-teal-dark);
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}
.rr-meta-info {
    font-size: 14px;
    color: var(--rr-muted);
}

/* Artikel-Titel */
.rr-article-wrap h1.entry-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: var(--rr-blue);
    line-height: 1.2;
    margin-bottom: 28px;
}

/* Überschriften im Artikel */
.rr-article-wrap .entry-content h2 {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    color: var(--rr-blue);
    margin: 48px 0 16px;
    padding-top: 8px;
    border-top: 3px solid var(--rr-teal);
    display: inline-block;
}
.rr-article-wrap .entry-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--rr-blue);
    margin: 28px 0 12px;
}

/* Absätze */
.rr-article-wrap .entry-content p {
    font-size: 17px;
    line-height: 1.85;
    margin-bottom: 20px;
    color: var(--rr-text);
}

/* Listen */
.rr-article-wrap .entry-content ul,
.rr-article-wrap .entry-content ol {
    margin: 16px 0 20px 24px;
    font-size: 17px;
    line-height: 1.8;
}
.rr-article-wrap .entry-content li { margin-bottom: 8px; }

/* Tabellen */
.rr-article-wrap .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 15px;
}
.rr-article-wrap .entry-content th {
    background: var(--rr-blue);
    color: var(--rr-white);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}
.rr-article-wrap .entry-content td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--rr-border);
    vertical-align: top;
}
.rr-article-wrap .entry-content tr:nth-child(even) td {
    background: var(--rr-lightgray);
}

/* Bilder */
.rr-article-wrap .entry-content img {
    border-radius: 10px;
    margin: 20px 0;
}

/* Blockquote */
.rr-article-wrap .entry-content blockquote {
    border-left: 4px solid var(--rr-teal);
    margin: 28px 0;
    padding: 16px 24px;
    background: var(--rr-teal-bg);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--rr-text);
}

/* Code */
.rr-article-wrap .entry-content code {
    background: var(--rr-lightgray);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--rr-blue);
}

/* Autor-Box */
.rr-author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--rr-lightgray);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 40px 0 32px;
}
.rr-author-avatar {
    width: 56px; height: 56px;
    background: var(--rr-blue);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}
.rr-author-info h4 { font-size: 16px; color: var(--rr-blue); margin: 0 0 4px; font-weight: 700; }
.rr-author-info p  { font-size: 14px; color: var(--rr-muted); margin: 0; }

/* Disclaimer */
.rr-disclaimer {
    background: var(--rr-lightgray);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 32px 0;
    font-size: 13px;
    color: var(--rr-muted);
    line-height: 1.6;
}

/* Interne Links */
.rr-related-links {
    font-size: 15px;
    color: var(--rr-muted);
    border-top: 1px solid var(--rr-border);
    padding-top: 24px;
    margin-top: 8px;
}

/* ============================================================
   SEITEN (pages)
   ============================================================ */
.rr-page-wrap {
    max-width: var(--rr-content-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.rr-page-wrap h1.entry-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--rr-blue);
    margin-bottom: 28px;
}

.rr-page-wrap .entry-content p {
    font-size: 17px;
    line-height: 1.85;
    margin-bottom: 20px;
}

.rr-page-wrap .entry-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--rr-blue);
    margin: 36px 0 14px;
}

.rr-page-wrap .entry-content h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--rr-blue);
    margin: 24px 0 10px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.rr-footer {
    background: var(--rr-blue);
    color: rgba(255,255,255,0.7);
    padding: 48px 24px 32px;
    margin-top: 60px;
}

.rr-footer-inner {
    max-width: var(--rr-max-width);
    margin: 0 auto;
}

.rr-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.rr-footer-logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--rr-white);
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
}
.rr-footer-logo:hover { color: var(--rr-teal); }

.rr-footer-tagline {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
    margin: 0;
}

.rr-footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 14px;
}

.rr-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rr-footer-col ul li { margin-bottom: 8px; }

.rr-footer-col ul li a {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
}
.rr-footer-col ul li a:hover { color: var(--rr-teal); }

.rr-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.rr-footer-copy {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin: 0;
}
.rr-footer-copy a { color: rgba(255,255,255,0.5); }

.rr-footer-disclaimer {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    margin: 0;
}

@media (max-width: 720px) {
    .rr-footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .rr-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   UTILITY: ASTRA STANDARD-ELEMENTE AUSBLENDEN
   ============================================================ */
/* Astra's eigenen Header und Footer ausblenden */
#masthead,
.site-header,
.ast-primary-header-bar,
.main-header-bar,
.site-footer .ast-small-footer,
footer.site-footer .ast-small-footer-wrap {
    display: none !important;
}

/* Astra-Inhaltsbreite aufheben */
.ast-container,
.ast-grid-right-section,
.ast-grid-left-section,
.ast-separate-container .ast-article-single,
.ast-separate-container #primary {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    width: 100% !important;
}

.ast-separate-container .ast-article-single,
.ast-separate-container #primary,
.ast-page-builder-template #primary,
.ast-full-width-layout #primary {
    padding: 0 !important;
}

/* Astra-Sidebar ausblenden */
#secondary,
.widget-area,
.ast-right-sidebar,
.ast-left-sidebar {
    display: none !important;
}

/* Astra-Breadcrumbs ausblenden */
.ast-breadcrumbs-wrapper,
.ast-breadcrumbs { display: none !important; }

/* Kommentarformular-Styling */
.comment-respond {
    max-width: var(--rr-content-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    .rr-posts-grid { grid-template-columns: 1fr; }
    .rr-article-wrap { padding: 32px 16px 60px; }
    .rr-blog-wrap { padding: 32px 16px 60px; }
}
