/*
Theme Name: Guenstig Essen Planer
Theme URI: https://guenstig-essen-planer.de
Author: wabulat
Author URI: https://guenstig-essen-planer.de
Description: SEO-optimiertes WordPress Theme fuer Budget-Rezepte, Stadt-Landingpages und App-Downloads. AdSense-optimiert, DSGVO-konform.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gep
*/

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6; 
    color: #1a1a1a; 
    background: #f8f9fa;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #e63946; text-decoration: none; transition: all 0.2s; }
a:hover { color: #d62839; text-decoration: underline; }
ul, ol { list-style: none; }

/* === LAYOUT === */
.container { 
    width: 100%; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 16px; 
}
.grid { display: grid; gap: 24px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

/* === HEADER === */
.site-header {
    background: #fff;
    border-bottom: 2px solid #e63946;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.header-inner { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 12px 16px;
    min-height: 60px;
}
.site-logo { 
    font-size: 1.25rem; 
    font-weight: 800; 
    color: #e63946; 
    letter-spacing: -0.5px;
}
.site-logo span { color: #1a1a1a; }
.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1a1a1a;
}
.main-nav { display: none; }
.main-nav.active { 
    display: block; 
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 2px solid #e63946;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.main-nav a {
    display: block;
    padding: 12px 0;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    color: #1a1a1a;
}
.main-nav a:hover { color: #e63946; }

/* === ADSENSE CONTAINER === */
.ad-container {
    background: #f1f3f4;
    border: 1px dashed #dadce0;
    text-align: center;
    margin: 20px auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}
.ad-header { min-height: 90px; max-width: 728px; }
.ad-header-mobile { min-height: 50px; max-width: 320px; }
.ad-mid-content { min-height: 250px; max-width: 336px; }
.ad-sidebar { min-height: 600px; max-width: 160px; }
.ad-footer { min-height: 90px; max-width: 728px; }
.ad-label {
    font-size: 0.65rem;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    display: block;
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, #e63946 0%, #f4a261 100%);
    color: #fff;
    padding: 48px 16px;
    text-align: center;
}
.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.hero p {
    font-size: 1.125rem;
    margin-bottom: 24px;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a1a1a;
    color: #fff;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    color: #fff;
    text-decoration: none;
}

/* === APP DOWNLOAD CTA === */
.app-cta-section {
    background: #1a1a1a;
    color: #fff;
    padding: 40px 16px;
    text-align: center;
}
.app-cta-section h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}
.app-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
.app-btn {
    background: #fff;
    color: #1a1a1a;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.app-btn:hover { background: #f1f3f4; color: #1a1a1a; text-decoration: none; }

/* === CONTENT CARDS === */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0;
}
.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e8eaed;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.card-image { 
    width: 100%; 
    height: 200px; 
    background: #e8eaed; 
    object-fit: cover; 
}
.card-body { padding: 20px; }
.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
    line-height: 1.3;
}
.card-meta {
    font-size: 0.875rem;
    color: #5f6368;
    margin-bottom: 12px;
}
.card-excerpt { 
    font-size: 0.9375rem; 
    color: #3c4043; 
    line-height: 1.5; 
}
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid #e8eaed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-red { background: #fce8e8; color: #e63946; }
.badge-green { background: #e6f4ea; color: #1e8e3e; }
.badge-orange { background: #fef3e8; color: #f9ab00; }

/* === REZEPT SINGLE === */
.recipe-header {
    background: #fff;
    padding: 32px 16px;
    border-bottom: 1px solid #e8eaed;
}
.recipe-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}
.recipe-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #5f6368;
    font-size: 0.875rem;
}
.recipe-meta-bar span { display: flex; align-items: center; gap: 4px; }
.recipe-image-main {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin: 24px 0;
}
.ingredients-box {
    background: #f8f9fa;
    border: 2px solid #e8eaed;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
}
.ingredients-box h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ingredients-list {
    display: grid;
    gap: 8px;
}
.ingredient-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e8eaed;
}
.ingredient-check {
    width: 20px;
    height: 20px;
    border: 2px solid #e63946;
    border-radius: 4px;
    flex-shrink: 0;
}
.ingredient-cost {
    margin-left: auto;
    font-weight: 700;
    color: #1e8e3e;
}
.steps-list {
    counter-reset: step;
    list-style: none;
}
.steps-list li {
    position: relative;
    padding-left: 48px;
    margin-bottom: 24px;
    min-height: 40px;
}
.steps-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: #e63946;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}
.nutrition-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.9375rem;
}
.nutrition-table th,
.nutrition-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e8eaed;
}
.nutrition-table th { background: #f8f9fa; font-weight: 700; }
.total-cost {
    background: #e6f4ea;
    border: 2px solid #1e8e3e;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 24px 0;
}
.total-cost .price {
    font-size: 2rem;
    font-weight: 800;
    color: #1e8e3e;
}
.total-cost .per-person {
    font-size: 0.875rem;
    color: #5f6368;
}

/* === STADT LANDINGPAGE === */
.stadt-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #fff;
    padding: 48px 16px;
    text-align: center;
}
.stadt-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.stadt-hero p { font-size: 1.125rem; opacity: 0.9; }
.budget-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.budget-table th {
    background: #e63946;
    color: #fff;
    padding: 16px;
    text-align: left;
    font-weight: 700;
}
.budget-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e8eaed;
}
.budget-table tr:hover { background: #f8f9fa; }
.supermarkt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.supermarkt-card {
    background: #fff;
    border: 2px solid #e8eaed;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}
.supermarkt-card:hover { border-color: #e63946; transform: translateY(-2px); }
.supermarkt-card .name { font-weight: 700; margin-bottom: 4px; }
.supermarkt-card .price { color: #1e8e3e; font-weight: 700; font-size: 1.125rem; }

/* === FAQ SCHEMA === */
.faq-section { margin: 32px 0; }
.faq-item {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-question {
    padding: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}
.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
}
.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
}
.faq-toggle { font-size: 1.25rem; transition: transform 0.2s; }
.faq-item.active .faq-toggle { transform: rotate(45deg); }

/* === AFFILIATE CTA BOX === */
.affiliate-box {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 2px solid #f9ab00;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin: 32px 0;
    position: relative;
    overflow: hidden;
}
.affiliate-box::before {
    content: 'EMPFEHLUNG';
    position: absolute;
    top: 12px;
    right: -30px;
    background: #f9ab00;
    color: #fff;
    padding: 4px 40px;
    font-size: 0.75rem;
    font-weight: 700;
    transform: rotate(45deg);
}
.affiliate-box h3 { font-size: 1.25rem; margin-bottom: 12px; }
.affiliate-btn {
    display: inline-block;
    background: #f9ab00;
    color: #1a1a1a;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    margin-top: 16px;
    box-shadow: 0 4px 15px rgba(249,171,0,0.3);
    transition: all 0.2s;
}
.affiliate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249,171,0,0.4);
    color: #1a1a1a;
    text-decoration: none;
}

/* === SIDEBAR === */
.sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e8eaed;
}
.widget { margin-bottom: 32px; }
.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e63946;
}
.widget-list li { 
    padding: 10px 0; 
    border-bottom: 1px solid #e8eaed; 
}
.widget-list a { color: #3c4043; font-weight: 500; }
.widget-list a:hover { color: #e63946; }

/* === FOOTER === */
.site-footer {
    background: #1a1a1a;
    color: #9aa0a6;
    padding: 48px 16px 24px;
    margin-top: 48px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.footer-section h3 {
    color: #fff;
    font-size: 1.125rem;
    margin-bottom: 16px;
}
.footer-section a { color: #9aa0a6; display: block; padding: 6px 0; }
.footer-section a:hover { color: #e63946; }
.footer-bottom {
    border-top: 1px solid #3c4043;
    padding-top: 24px;
    text-align: center;
    font-size: 0.875rem;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 32px 0;
}
.pagination a,
.pagination span {
    padding: 10px 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e8eaed;
    font-weight: 600;
}
.pagination a:hover { background: #e63946; color: #fff; border-color: #e63946; text-decoration: none; }
.pagination .current { background: #e63946; color: #fff; border-color: #e63946; }

/* === BREADCRUMBS === */
.breadcrumbs {
    font-size: 0.875rem;
    color: #5f6368;
    padding: 16px 0;
}
.breadcrumbs a { color: #5f6368; }
.breadcrumbs a:hover { color: #e63946; }
.breadcrumbs .sep { margin: 0 8px; }

/* === UTILITY === */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* === DSGVO COOKIE BANNER PLACEHOLDER === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 3px solid #e63946;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 9999;
    display: none;
}
.cookie-banner.active { display: block; }
.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}
.cookie-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}
.cookie-accept { background: #e63946; color: #fff; }
.cookie-decline { background: #f1f3f4; color: #5f6368; }

/* === DESKTOP BREAKPOINT === */
@media (min-width: 768px) {
    .mobile-menu-btn { display: none; }
    .main-nav { 
        display: flex; 
        gap: 24px; 
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }
    .main-nav a { 
        border: none; 
        padding: 0; 
        font-size: 0.9375rem;
    }
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1.25rem; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .stadt-hero h1 { font-size: 2.5rem; }
    .recipe-title { font-size: 2.25rem; }
    .recipe-image-main { height: 400px; }
    .content-with-sidebar {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 32px;
    }
}

@media (min-width: 1024px) {
    .card-grid { grid-template-columns: repeat(3, 1fr); }
    .supermarkt-grid { grid-template-columns: repeat(4, 1fr); }
}