/* CSS Variables */
:root {
    --bg-color: #ffffff;
    --text-main: #333333;
    --text-muted: #777777;
    --accent-green: #89a888; /* Pale green from headings */
    --hero-bg: #eef2ed; /* Very pale green box */
    --border-color: #e5e5e5;
    --footer-bg: #111111;
    --footer-text: #cccccc;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Source Sans Pro', sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

a:hover {
    color: var(--accent-green);
}

ul {
    list-style: none;
}

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

/* Header & Nav */
.site-header {
    text-align: center;
    padding-top: 20px;
}

.logo-container a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

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

.logo-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.main-nav {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-top: 20px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-links {
    display: flex;
    gap: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.search-btn .icon {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

/* Hero Section */
.hero-section {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 20px;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.slider-arrow {
    background: #888;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-arrow:hover {
    background: var(--text-main);
}

.slider-arrow img {
    width: 16px;
    filter: brightness(0) invert(1);
}

.hero-content-wrapper {
    display: flex;
    flex: 1;
    background-color: var(--hero-bg);
}

.hero-image {
    flex: 1.2;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 400px;
}

.hero-text-box {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-text-box .meta .category {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-main);
}

.hero-text-box .title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin: 15px 0 20px;
    line-height: 1.2;
    color: #1a2a1c;
}

.hero-text-box .excerpt {
    font-size: 1.05rem;
    color: #444;
}

/* Main Layout */
.main-layout {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: flex;
    gap: 60px;
}

.articles-list {
    flex: 2;
}

/* Article Card */
.post-card {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    align-items: flex-start;
}

.post-image {
    flex: 1;
}

.post-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.post-content {
    flex: 1;
    padding-top: 10px;
}

.meta {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta .category {
    color: var(--accent-green);
}

.post-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.post-excerpt {
    color: #555;
    margin-bottom: 20px;
}

.read-more {
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 1px;
}

.icon-small {
    width: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.pagination .current {
    color: var(--text-main);
}

.pagination a {
    color: var(--text-muted);
}

.pagination a:hover {
    color: var(--text-main);
}

.next-page {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
}

/* Sidebar */
.sidebar {
    flex: 1;
}

.search-widget .widget-title {
    display: block;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.search-input-wrapper {
    display: flex;
    border: 1px solid var(--border-color);
    padding: 10px 15px;
}

.search-input-wrapper input {
    border: none;
    outline: none;
    width: 100%;
    font-family: inherit;
}

.search-input-wrapper button {
    background: none;
    border: none;
    cursor: pointer;
}

.search-input-wrapper button img {
    width: 16px;
    opacity: 0.5;
}

/* Welcome Text (Pre-footer) */
.welcome-section {
    max-width: 800px;
    margin: 60px auto 80px;
    padding: 0 20px;
}

.welcome-box {
    border: 1px dashed var(--accent-green);
    background-color: #fafdf9;
    padding: 40px;
    text-align: center;
    border-radius: 8px;
}

.welcome-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--accent-green);
    margin-bottom: 15px;
}

.welcome-logo {
    width: 40px;
    margin: 0 auto 15px;
    opacity: 0.8;
}

.welcome-text {
    font-size: 0.95rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    border-bottom: 1px solid #333;
    padding-bottom: 40px;
}

.footer-heading {
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 25px;
    color: #ffffff;
    text-transform: uppercase;
}

.footer-text {
    font-size: 0.9rem;
    line-height: 1.7;
}

.disclaimer {
    opacity: 0.8;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    font-size: 0.9rem;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.3s ease;
}

.footer-links a:hover {
    text-decoration-color: var(--footer-text);
}

.footer-bottom {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 20px;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    right: 20px;
    bottom: -150px; /* Hidden by default */
    width: 340px;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 25px;
    border-radius: 8px;
    z-index: 9999;
    border-left: 4px solid var(--accent-green);
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-modal.show {
    bottom: 20px;
}

.cookie-content {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.cookie-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    opacity: 0.8;
}

.cookie-content h4 {
    margin-bottom: 5px;
    font-size: 1rem;
    color: var(--text-main);
}

.cookie-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.btn-accept {
    width: 100%;
    padding: 10px;
    background-color: var(--accent-green);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-accept:hover {
    background-color: #6b8a6a;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content-wrapper {
        flex-direction: column;
    }
    .main-layout {
        flex-direction: column;
    }
    .footer-container {
        grid-template-columns: 1fr;
    }
    .hero-text-box {
        padding: 40px 20px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* simple mobile hide for demo */
    }
    .post-card {
        flex-direction: column;
    }
    .slider-arrow {
        display: none;
    }
    .hero-text-box .title {
        font-size: 2rem;
    }
    .cookie-modal {
        width: calc(100% - 40px);
    }
}

/* Inner page styles */
/* ---------------------------------------
   NEW STYLES FOR THE INTERNAL ARTICLE PAGE
---------------------------------------- */

.article-page {
    margin-top: 40px;
}

.single-article h1 {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    line-height: 1.2;
    color: #1a2a1c;
    margin-top: 15px;
    margin-bottom: 25px;
}

/* Responsive Images */
.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.main-article-img {
    aspect-ratio: 16/9;
    object-fit: cover;
    width: 100%;
}

/* Table of Contents (TOC) */
.toc {
    background-color: #fafdf9;
    border: 1px dashed var(--accent-green);
    padding: 25px 30px;
    margin: 30px 0;
    border-radius: 8px;
}

.toc-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--accent-green);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

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

.toc li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.toc li::before {
    content: "\2192"; /* Right arrow entity */
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
}

.toc a {
    font-weight: 600;
    color: var(--text-main);
    transition: color 0.2s;
}

.toc a:hover {
    color: var(--accent-green);
}

/* Article Text Typography (h1-h6, p, span) */
.article-content h2, 
.article-content h3, 
.article-content h4, 
.article-content h5, 
.article-content h6 {
    font-family: var(--font-heading);
    color: #1a2a1c;
    margin: 40px 0 20px;
    line-height: 1.3;
}

.article-content h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--hero-bg);
    padding-bottom: 10px;
}

.article-content h3 {
    font-size: 1.6rem;
}

.article-content h4 {
    font-size: 1.3rem;
}

.article-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444444;
    margin-bottom: 25px;
}

.article-content span.highlight {
    background-color: var(--hero-bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--accent-green);
}

/* Lists (ul, ol) in Article */
.article-content ul, 
.article-content ol {
    margin: 0 0 30px 20px;
    padding-left: 20px;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: #444444;
    line-height: 1.6;
}

.article-content li::marker {
    color: var(--accent-green);
    font-weight: bold;
}

/* Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    font-size: 1rem;
    border: 1px solid var(--border-color);
}

.article-content th, 
.article-content td {
    padding: 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.article-content th {
    background-color: var(--hero-bg);
    font-weight: 600;
    color: #1a2a1c;
    font-family: var(--font-heading);
}

.article-content tr:nth-child(even) {
    background-color: #fafdf9;
}

.article-content tr:hover {
    background-color: #f0f5ef;
}

/* Form Styles (Shared for Contact and Comments) */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #1a2a1c;
}

.contact-section, 
.comments-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
    width: 100%;
}

.form-group.half-width {
    flex: 1;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.form-input, 
.form-textarea {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #fdfdfd;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

.form-input:focus, 
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(137, 168, 136, 0.2);
    background-color: #ffffff;
}

.submit-btn {
    background-color: var(--accent-green);
    color: #ffffff;
    border: none;
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

.submit-btn:hover {
    background-color: #6b8a6a;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Cross-linking (Related Articles Block) */
.related-articles {
    margin-top: 80px;
    padding: 60px 0;
    background-color: var(--hero-bg);
}

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

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.related-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.related-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.related-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 20px;
    line-height: 1.3;
    color: #1a2a1c;
}

.related-card-content .read-more {
    margin-top: auto;
}

/* Responsive adjustments for internal page */
@media (max-width: 768px) {
    .single-article h1 {
        font-size: 2rem;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .toc {
        padding: 20px;
    }
    .article-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}