:root {
    --primary: #1b4332;
    --primary-light: #2d5a27;
    --secondary: #e9ede3;
    --accent: #d4a373;
    --bg: #f9f9f7;
    --white: #ffffff;
    --text: #2d3436;
    --text-muted: #636e72;
    --border: #dfe6e9;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-serif: "Playfair Display", serif;
    --font-sans: "Inter", sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

a {
    text-decoration: underline;
    color: inherit;
    transition: 0.3s;
}

/* Strukturelle Links vom permanenten Unterstrich ausschließen (um hässliche Striche unter Bildern/Abständen zu verhindern) */
.logo,
.main-nav a,
.footer-nav a,
.btn,
.cta-btn,
.post-card a,
.affiliate-card-link {
    text-decoration: none !important;
}

/* Klares Unterstreichen der Textelemente innerhalb von Karten und Listen */
.post-card h3 {
    text-decoration: underline !important;
}

.latest-articles-list a {
    text-decoration: underline !important;
}

/* Hover-Unterstrich und Farbe für strukturelle Links */
.main-nav a:hover,
.footer-nav a:hover,
.post-card:hover h3,
.latest-articles-list a:hover {
    text-decoration: underline !important;
    color: var(--primary-light) !important;
}

/* Header */
.site-header {
    background-color: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    position: -webkit-sticky;
    position: sticky;
    top: -1px;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    font-weight: 500;
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: var(--primary);
}

.search-icon {
    width: 20px;
    height: 20px;
}

/* Main Content Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    padding: 40px 0;
}

@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: var(--white);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.sidebar-widget h3 {
    font-family: var(--font-serif);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.checklist {
    list-style: none;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    flex-shrink: 0;
}

.checkbox.checked {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox svg {
    width: 12px;
    height: 12px;
}

.checklist li:has(.checked) {
    color: var(--text-muted);
    text-decoration: line-through;
}

.promo-widget {
    background: var(--primary);
    color: var(--white);
    text-align: center;
}

.promo-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
}

.promo-widget p {
    font-size: 0.9rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    gap: 10px;
    font-size: 0.9rem;
}

.btn-full {
    width: 100%;
}

.btn-outline {
    border: 1px solid var(--border);
    background: transparent;
}

.btn-white {
    background: var(--white);
    color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

/* Footer */
.site-footer {
    background: var(--secondary);
    padding: 60px 0 30px;
    margin-top: 60px;
    border-top: 1px solid var(--border);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

.footer-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    font-size: 0.9rem;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Article List */
.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--primary);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.post-card-img {
    height: 200px;
    background: #eee;
    position: relative;
}

.post-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-light);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.post-card-content {
    padding: 20px;
}

.post-card-content h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.post-card-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Single Post */
.post-header {
    margin-bottom: 40px;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.post-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    line-height: 1.2;
    color: var(--primary);
}

@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }
}

/* Content Typography & WP Blocks */
.post-content, .category-description {
    font-size: 1.125rem;
    overflow-x: hidden;
    max-width: 100%;
    line-height: 1.7;
    color: var(--text);
    word-break: break-word;
    overflow-wrap: break-word;
}

.post-content p, .category-description p {
    margin-bottom: 1.5rem;
}

.post-content h2, .category-description h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin: 2.5rem 0 1.25rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.post-content h3, .category-description h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--primary-light);
}

.post-content img, .category-description img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

/* WP Alignments */
.alignright {
    float: right;
    margin-left: 2rem !important;
    margin-bottom: 1.5rem !important;
    max-width: 40%;
}

.alignleft {
    float: left;
    margin-right: 2rem !important;
    margin-bottom: 1.5rem !important;
    max-width: 40%;
}

.aligncenter {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Float and clear parent anchors of floated content images properly to avoid collapse */
.post-content a:has(> img.alignright),
.category-description a:has(> img.alignright) {
    float: right;
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    max-width: 40%;
    display: inline-block;
    text-decoration: none !important;
}

.post-content a:has(> img.alignleft),
.category-description a:has(> img.alignleft) {
    float: left;
    margin-right: 2rem;
    margin-bottom: 1.5rem;
    max-width: 40%;
    display: inline-block;
    text-decoration: none !important;
}

.post-content a:has(> img.alignright) img.alignright,
.category-description a:has(> img.alignright) img.alignright,
.post-content a:has(> img.alignleft) img.alignleft,
.category-description a:has(> img.alignleft) img.alignleft {
    float: none !important;
    max-width: 100% !important;
    margin: 0 !important;
}

@media (max-width: 600px) {
    .alignright, .alignleft {
        float: none;
        max-width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .post-content a:has(> img.alignright),
    .category-description a:has(> img.alignright),
    .post-content a:has(> img.alignleft),
    .category-description a:has(> img.alignleft) {
        float: none;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        display: block;
    }
}

/* Lists */
.post-content ul, .post-content ol, 
.category-description ul, .category-description ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content li, .category-description li {
    margin-bottom: 0.75rem;
}

/* Tables */
.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.wp-block-table th, .wp-block-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.wp-block-table th {
    background-color: var(--secondary);
    color: var(--primary);
    font-weight: 700;
}

.wp-block-table tr:last-child td {
    border-bottom: none;
}

.wp-block-table tr:nth-child(even) {
    background-color: #fdfdfd;
}

/* Separators */
hr.wp-block-separator {
    border: none;
    border-top: 2px solid var(--border);
    margin: 3rem 0;
    width: 100px;
    margin-left: 0;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.text-center {
    text-align: center;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Interactive Content Images */
.post-content img, .category-description img {
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-content img:hover, .category-description img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Custom CTA Buttons */
.cta-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 3rem 0;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-sans);
    color: #ffffff !important;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 70%);
    background-size: 200% 100%;
    z-index: -1;
    transition: all 0.5s ease;
    background-position: 100% 0;
}

.cta-btn:hover::before {
    background-position: 0 0;
}

.cta-btn:hover {
    transform: translateY(-5px) scale(1.03);
}

.cta-amazon {
    background: linear-gradient(135deg, #ff9900 0%, #e68a00 100%);
    box-shadow: 0 8px 20px rgba(255, 153, 0, 0.3), 0 3px 6px rgba(255, 153, 0, 0.2);
}

.cta-amazon:hover {
    box-shadow: 0 14px 28px rgba(255, 153, 0, 0.45), 0 5px 12px rgba(255, 153, 0, 0.25);
    background: linear-gradient(135deg, #ffa62b 0%, #ff9900 100%);
}

.cta-otto {
    background: linear-gradient(135deg, #e3000f 0%, #b3000b 100%);
    box-shadow: 0 8px 20px rgba(227, 0, 15, 0.3), 0 3px 6px rgba(227, 0, 15, 0.2);
}

.cta-otto:hover {
    box-shadow: 0 14px 28px rgba(227, 0, 15, 0.45), 0 5px 12px rgba(227, 0, 15, 0.25);
    background: linear-gradient(135deg, #f51624 0%, #cc000d 100%);
}

/* CTA Mobile */
@media (max-width: 600px) {
    .cta-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .cta-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 320px;
    }
}

/* Affiliate Product Grid */
.affiliate-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 3rem 0;
}

.affiliate-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.affiliate-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.affiliate-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.affiliate-img-wrapper {
    background: #fff;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    border-bottom: 1px solid var(--border);
}

.affiliate-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    box-shadow: none !important;
}

.affiliate-card:hover .affiliate-img-wrapper img {
    transform: scale(1.08);
}

.affiliate-title {
    padding: 20px;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.affiliate-cta-wrapper {
    padding: 0 20px 25px;
    text-align: center;
    margin-top: auto;
}

/* Mobile Menu */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block !important;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        z-index: 1000;
    }
    
    .main-nav.active {
        max-height: 400px;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 10px 20px 20px;
    }
    
    .main-nav ul li {
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }
    
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    
    .main-nav ul li a {
        display: block;
        width: 100%;
        font-size: 1.1rem;
    }
}

/* Search Overlay with Glassmorphism */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 30, 18, 0.85); /* brand matching dark green tint */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scale(1.05);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
}

.search-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.search-overlay-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
    line-height: 1;
}

.search-overlay-close:hover {
    transform: rotate(90deg);
    color: var(--primary-light);
}

.search-overlay-content {
    width: 90%;
    max-width: 750px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

#search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 18px 50px 18px 24px;
    font-size: 1.25rem;
    color: var(--white);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#search-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 15px rgba(106, 176, 76, 0.3);
}

.search-clear {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.8rem;
    cursor: pointer;
    display: none;
    transition: color 0.2s ease;
}

.search-clear:hover {
    color: var(--white);
}

.search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom Scrollbar for results */
.search-results::-webkit-scrollbar {
    width: 6px;
}
.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.search-result-item {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    text-decoration: none !important;
}

.search-result-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.search-result-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-result-category {
    font-size: 0.75rem;
    color: var(--primary-light);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.search-result-title {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.search-result-excerpt {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .search-overlay-close {
        top: 20px;
        right: 20px;
        font-size: 2rem;
    }
    .search-overlay {
        padding-top: 80px;
    }
    .search-result-item {
        gap: 12px;
        padding: 12px;
    }
    .search-result-item img {
        width: 60px;
        height: 60px;
    }
}


/* Global Mobile Fixes */
@media (max-width: 768px) {
    .wp-block-columns {
        flex-direction: column !important;
        display: block !important;
    }
    .wp-block-column {
        flex-basis: 100% !important;
        width: 100% !important;
        margin-bottom: 20px;
    }
    .wp-block-table {
        overflow-x: auto !important;
        display: block;
        width: 100%;
    }
    body, html {
        overflow-x: hidden;
    }
}
