/* CSS Variables based on references */
:root {
    --bg-main: #d1dcda;
    --primary-color: #008779;
    --text-dark: #1a1a1a;
    --white: #ffffff;
    --footer-bg: #111111;
    --border-dark: #000000;
    --shadow-offset: 6px;
    --brutal-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--border-dark);
    --brutal-shadow-hover: 8px 8px 0px 0px var(--border-dark);
    --border-radius: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

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

/* Neo-Brutalism Utility Classes */
.brutal-box {
    border: 3px solid var(--border-dark);
    border-radius: var(--border-radius);
    background-color: var(--white);
    box-shadow: var(--brutal-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brutal-box:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--brutal-shadow-hover);
}

.tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid var(--border-dark);
    margin-right: 5px;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.tag.small {
    font-size: 0.65rem;
    padding: 2px 8px;
}

.meta-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    opacity: 0.7;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 20px;
}

.logo img {
    height: 50px;
}

.header-icons {
    display: flex;
    gap: 15px;
}

.icon-btn {
    background-color: var(--primary-color);
    border: 2px solid var(--border-dark);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 2px 2px 0px 0px var(--border-dark);
    transition: all 0.2s ease;
}

.icon-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.icon-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px 0px var(--border-dark);
}

/* Navigation */
.main-nav {
    margin-bottom: 40px;
}

.nav-list {
    display: flex;
    justify-content: center;
    gap: 40px;
    list-style: none;
    background-color: var(--primary-color);
    padding: 15px;
    color: var(--white);
    font-weight: 600;
}

.nav-list a:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero-section {
    position: relative;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-image-wrapper {
    width: 100%;
    height: 400px;
    overflow: hidden;
    padding: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--border-radius) - 3px);
}

.hero-content {
    position: relative;
    width: 80%;
    margin-top: -80px; /* Overlap effect */
    padding: 30px;
    text-align: center;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2rem;
    margin: 15px 0;
    line-height: 1.2;
}

.meta-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.85rem;
    color: #555;
    font-weight: 600;
}

/* Post Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.post-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.post-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 3px solid var(--border-dark);
    border-radius: calc(var(--border-radius) - 3px) calc(var(--border-radius) - 3px) 0 0;
}

.post-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-body h2 {
    font-size: 1.4rem;
    margin: 10px 0;
    line-height: 1.3;
}

.meta-info.small {
    justify-content: flex-start;
    font-size: 0.75rem;
    margin-bottom: 15px;
    gap: 15px;
}

.excerpt {
    font-size: 0.95rem;
    color: #444;
    margin-top: auto;
}

/* "Ai ratat" Section */
.missed-section {
    background-color: var(--white);
    padding: 0;
    margin-bottom: 60px;
    overflow: hidden;
}

.missed-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-bottom: 3px solid var(--border-dark);
    text-align: center;
}

.missed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.missed-card {
    position: relative;
    height: 150px;
    overflow: hidden;
    padding: 0;
    box-shadow: 4px 4px 0px 0px var(--border-dark);
}

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

.missed-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 15px 10px 10px;
    color: var(--white);
}

.missed-overlay h4 {
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Promo Section */
.promo-section {
    background-color: #e5f6f4;
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 60px;
}

.promo-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.promo-logo {
    margin: 20px 0;
}

.promo-logo img {
    max-width: 200px;
    margin: 0 auto;
}

/* Pre-Footer Welcome Section */
.welcome-section {
    margin-bottom: 60px;
}

.welcome-box {
    padding: 40px;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--white);
}

.welcome-box h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.welcome-box p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Footer */
.main-footer {
    background-color: var(--footer-bg);
    color: var(--white);
    padding-top: 40px;
}

.footer-top {
    display: flex;
    justify-content: center;
    padding-bottom: 30px;
}

.footer-logo {
    height: 60px;
}

.footer-bottom {
    background-color: #000;
    padding: 20px 0;
    font-size: 0.85rem;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

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

.disclaimer {
    color: #888;
    text-align: center;
    font-size: 0.75rem;
    border-top: 1px solid #333;
    padding-top: 15px;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 320px;
    padding: 20px;
    z-index: 9999;
    background-color: var(--white);
    transform: translateY(0);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.cookie-modal.hidden {
    transform: translateY(150%);
    opacity: 0;
    pointer-events: none;
}

.cookie-modal h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.cookie-modal p {
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.btn-accept {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--border-dark);
    padding: 8px 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    border-radius: 5px;
    box-shadow: 2px 2px 0px 0px var(--border-dark);
    transition: all 0.2s ease;
}

.btn-accept:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px 0px var(--border-dark);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        width: 90%;
    }
    .footer-flex {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 20px;
    }
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .cookie-modal {
        right: 50%;
        transform: translateX(50%);
        width: 90%;
        bottom: 20px;
    }
    .cookie-modal.hidden {
        transform: translate(50%, 150%);
    }
}

/* Dark mode classes */
body.dark-mode {
    --bg-main: #1a202c;
    --text-dark: #f7fafc;
    --white: #2d3748;
    --border-dark: #cbd5e0;
}
body.dark-mode .tag {
    border-color: var(--border-dark);
}
body.dark-mode .meta-info {
    color: #a0aec0;
}
body.dark-mode .excerpt {
    color: #e2e8f0;
}
body.dark-mode .icon-btn img {
    filter: brightness(0) invert(1);
}
body.dark-mode .missed-header, body.dark-mode .welcome-box {
    border-color: var(--border-dark);
}
/* Inner page styles */
/* ==========================================================================
   SINGLE ARTICLE PAGE STYLES (NEO-BRUTALISM)
   ========================================================================== */

/* Article Wrapper */
.single-article {
    padding-top: 20px;
}

.article-wrapper {
    background-color: var(--white);
    border: 3px solid var(--border-dark);
    border-radius: var(--border-radius);
    box-shadow: var(--brutal-shadow);
    padding: 40px;
    margin-bottom: 60px;
}

.article-header {
    margin-bottom: 30px;
    text-align: center;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 20px 0;
    color: var(--text-dark);
}

.article-meta {
    justify-content: center;
    font-size: 0.95rem;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--border-dark);
}

/* Article Images */
.brutal-image {
    width: 100%;
    height: auto;
    border: 3px solid var(--border-dark);
    border-radius: calc(var(--border-radius) - 4px);
    box-shadow: 6px 6px 0px 0px var(--border-dark);
    margin-bottom: 30px;
    display: block;
    object-fit: cover;
}

.article-main-img {
    max-height: 500px;
}

/* Typography & Text Tags */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #222;
}

.article-body h2, 
.article-body h3, 
.article-body h4, 
.article-body h5, 
.article-body h6 {
    color: var(--text-dark);
    font-weight: 800;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    line-height: 1.3;
}

.article-body h2 { font-size: 2rem; border-bottom: 3px solid var(--primary-color); display: inline-block; padding-bottom: 5px; }
.article-body h3 { font-size: 1.6rem; }
.article-body h4 { font-size: 1.3rem; }

.article-body p {
    margin-bottom: 1.5em;
}

.article-body span.highlight {
    background-color: #ffde59; /* Bright yellow for neo-brutalism highlight */
    padding: 2px 6px;
    font-weight: 700;
    border: 2px solid var(--border-dark);
    border-radius: 4px;
    box-shadow: 2px 2px 0px 0px var(--border-dark);
    color: var(--text-dark);
}

/* Lists (ul, ol) */
.article-body ul, 
.article-body ol {
    margin-bottom: 1.5em;
    padding-left: 25px;
    background-color: #f0f7f6;
    padding: 20px 20px 20px 40px;
    border: 3px solid var(--border-dark);
    border-radius: 8px;
    box-shadow: 4px 4px 0px 0px var(--border-dark);
}

.article-body ul {
    list-style-type: square;
}

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

.article-body li {
    margin-bottom: 10px;
    font-weight: 600;
}

.article-body li::marker {
    color: var(--primary-color);
    font-weight: 800;
}

/* Table of Contents (TOC) */
.toc-box {
    background-color: #e5f6f4;
    padding: 25px;
    margin: 30px 0;
    display: inline-block;
    min-width: 50%;
}

.toc-box h3 {
    margin-top: 0;
    font-size: 1.4rem;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-dark);
    padding-bottom: 10px;
}

.toc-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.toc-box li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-box a {
    text-decoration: none;
    font-weight: 700;
    color: var(--text-dark);
    transition: color 0.2s;
}

.toc-box a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Table Styles */
.brutal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    background-color: var(--white);
    border: 3px solid var(--border-dark);
    box-shadow: 6px 6px 0px 0px var(--border-dark);
}

.brutal-table th, 
.brutal-table td {
    border: 3px solid var(--border-dark);
    padding: 15px;
    text-align: left;
}

.brutal-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 1.1rem;
    text-transform: uppercase;
}

.brutal-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.brutal-table tr:hover td {
    background-color: #ffde59;
    color: var(--text-dark);
    font-weight: 600;
}

/* Forms (Contact & Comments) */
.article-contact {
    background-color: #ffde59;
    padding: 30px;
    margin: 50px 0;
}

.contact-header h3 {
    margin-top: 0;
    font-size: 1.8rem;
}

.contact-header p {
    margin-bottom: 25px;
    font-weight: 600;
}

.comments-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 4px solid var(--border-dark);
}

.comments-section h2 {
    font-size: 2rem;
    margin-bottom: 25px;
}

.comment-form {
    padding: 30px;
    background-color: #f4f4f4;
}

.brutal-form-group {
    margin-bottom: 20px;
}

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

.form-row .brutal-form-group {
    flex: 1;
}

.brutal-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
    font-size: 0.95rem;
}

.brutal-input {
    width: 100%;
    padding: 14px;
    border: 3px solid var(--border-dark);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--white);
    box-shadow: 4px 4px 0px 0px var(--border-dark);
    transition: transform 0.2s, box-shadow 0.2s;
}

.brutal-input:focus {
    outline: none;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px var(--border-dark);
    border-color: var(--primary-color);
}

.brutal-btn {
    background-color: var(--primary-color);
    color: var(--white);
    font-family: inherit;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 14px 28px;
    border: 3px solid var(--border-dark);
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 4px 4px 0px 0px var(--border-dark);
    transition: all 0.2s ease;
}

.brutal-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px var(--border-dark);
    background-color: #00665b;
}

.brutal-btn .meta-icon {
    filter: brightness(0) invert(1);
}

/* Related Posts Section */
.related-posts-section {
    margin-bottom: 60px;
}

.section-title-box {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 30px;
    display: inline-block;
    margin-bottom: 30px;
}

.section-title-box h2 {
    margin: 0;
    font-size: 1.5rem;
}

.read-more-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background-color: var(--white);
    color: var(--text-dark);
    font-weight: 700;
    border: 2px solid var(--border-dark);
    border-radius: 4px;
    box-shadow: 2px 2px 0px 0px var(--border-dark);
    transition: all 0.2s;
}

.post-card:hover .read-more-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Responsive for Article Page */
@media (max-width: 768px) {
    .article-wrapper {
        padding: 20px;
    }
    .article-title {
        font-size: 1.8rem;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .toc-box {
        width: 100%;
    }
    .brutal-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Dark Mode Additions for Internal Page */
body.dark-mode .article-wrapper,
body.dark-mode .toc-box,
body.dark-mode .comment-form {
    background-color: var(--white);
    border-color: var(--border-dark);
}
body.dark-mode .article-title,
body.dark-mode .article-body h2,
body.dark-mode .article-body h3,
body.dark-mode .article-body h4,
body.dark-mode .article-body h5,
body.dark-mode .article-body h6 {
    color: var(--text-dark);
}
body.dark-mode .article-body p,
body.dark-mode .article-body li {
    color: #e2e8f0;
}
body.dark-mode .article-body ul,
body.dark-mode .article-body ol {
    background-color: #2d3748;
}
body.dark-mode .brutal-table th, 
body.dark-mode .brutal-table td {
    color: var(--text-dark);
}
body.dark-mode .brutal-table tr:nth-child(even) {
    background-color: #1a202c;
}
body.dark-mode .brutal-input {
    background-color: #1a202c;
    color: var(--text-dark);
}
body.dark-mode .article-contact {
    background-color: #746200;
}