/* CSS Variables & Fonts */
:root {
    --bg-light: #ffffff;
    --bg-pinkish: #fcf4f2;
    --bg-hero-card: #fcf4f2;
    --text-main: #333333;
    --text-light: #666666;
    --text-heading: #2c3e50;
    --accent: #d2a6a1;
    --border-color: #eaeaea;
    
    --font-ui: 'Space Mono', monospace;
    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', sans-serif;
}

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

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

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

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

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

/* Icons */
.icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
.icon-small {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    opacity: 0.6;
}
.icon-tiny {
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
}
.icon-large {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Top Bar */
.top-bar {
    background-color: var(--bg-pinkish);
    padding: 10px 0;
    font-family: var(--font-ui);
    font-size: 0.85rem;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-links a {
    margin-right: 20px;
    color: var(--text-light);
    transition: color 0.3s ease;
}
.top-links a:hover {
    color: var(--text-heading);
}
.social-icons {
    display: flex;
    gap: 15px;
}

/* Header */
.site-header {
    padding: 40px 0 20px;
}
.logo-area {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.logo-area h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    color: var(--text-heading);
    text-transform: uppercase;
    /* To mimic the outlined style from reference, we can use text-shadow or keep it solid */
    font-weight: 700;
}
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    font-family: var(--font-ui);
    font-size: 0.9rem;
}
.nav-links a:hover {
    color: var(--accent);
}
.search-btn {
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 40px auto;
}
.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
}
.hero-content {
    background-color: var(--bg-hero-card);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.tag {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    padding: 4px 12px;
    border: 1px solid var(--accent);
    border-radius: 20px;
    color: var(--text-light);
}
.post-title {
    font-family: var(--font-ui);
    font-size: 2rem;
    color: var(--text-heading);
    margin-bottom: 20px;
    line-height: 1.3;
}
.list-title {
    font-family: var(--font-ui);
    font-size: 1.4rem;
    color: var(--text-heading);
    margin-bottom: 15px;
    line-height: 1.3;
}
.post-excerpt {
    margin-bottom: 25px;
    color: var(--text-light);
    font-size: 0.95rem;
}
.post-meta {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Articles List */
.articles-list {
    margin-bottom: 60px;
}
.list-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}
.list-item:last-child {
    border-bottom: none;
}
.item-image img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
}
.author {
    font-weight: 600;
    margin-bottom: 10px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
}
.item-content .post-meta {
    margin-bottom: 15px;
}
.comments {
    display: inline-flex;
    align-items: center;
}
.excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
}
.read-more {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
}
.read-more:hover {
    color: var(--accent);
}

/* Welcome Section */
.welcome-section {
    padding: 80px 0;
    text-align: center;
}
.welcome-container {
    max-width: 900px;
}
.welcome-section h2 {
    font-family: var(--font-ui);
    font-size: 2rem;
    color: var(--text-heading);
    margin-bottom: 40px;
    font-weight: 400;
}
.welcome-section p {
    margin-bottom: 30px;
    font-size: 0.95rem;
    color: #444;
    text-align: center;
}

/* Recommendations */
.recommendations {
    text-align: center;
    padding: 40px 0 80px;
    border-bottom: 1px solid var(--border-color);
}
.recommendations h2 {
    font-family: var(--font-ui);
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--text-heading);
}
.sponsor-logo {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}
.sponsor-logo img {
    max-width: 200px;
}
.sponsor-text {
    font-size: 0.9rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* Footer */
.site-footer {
    padding: 60px 0;
    background-color: var(--bg-light);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}
.disclaimer p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.8;
}
.popular-posts h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-heading);
}
.popular-posts ul {
    list-style: none;
}
.popular-posts li {
    margin-bottom: 10px;
}
.popular-posts a {
    font-size: 0.9rem;
    color: #d27263; /* Reddish link color from ref */
    text-decoration: underline;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    right: -350px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 25px;
    z-index: 1000;
    border-radius: 8px 0 0 8px;
    border-left: 4px solid var(--accent);
    transition: right 0.4s ease-in-out;
}
.cookie-modal.show {
    right: 0;
}
.cookie-content h4 {
    margin-bottom: 10px;
    font-family: var(--font-heading);
}
.cookie-content p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
}
.btn-accept {
    background-color: var(--text-heading);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    width: 100%;
    transition: background 0.3s;
}
.btn-accept:hover {
    background-color: var(--accent);
}

/* Back to Top */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    z-index: 999;
    transition: all 0.3s;
}
#back-to-top:hover {
    border-color: var(--accent);
    background-color: var(--bg-pinkish);
}

/* Responsive Design */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .list-item {
        grid-template-columns: 1fr;
    }
    .item-image img {
        aspect-ratio: 16/9;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .top-bar-inner {
        flex-direction: column;
        gap: 10px;
    }
    .main-nav {
        flex-direction: column;
        gap: 20px;
    }
    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .hero-content {
        padding: 30px 20px;
    }
    .post-title, .welcome-section h2 {
        font-size: 1.5rem;
    }
    .cookie-modal {
        width: 100%;
        bottom: 0;
        top: auto;
        right: 0;
        transform: translateY(100%);
        border-radius: 12px 12px 0 0;
        border-left: none;
        border-top: 4px solid var(--accent);
    }
    .cookie-modal.show {
        transform: translateY(0);
    }
}
/* Inner page styles */
/* SINGLE POST STYLES */

.single-article {
    max-width: 850px;
    margin: 60px auto;
}

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

.article-header .tags {
    justify-content: center;
    margin-bottom: 25px;
}

.article-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--text-heading);
    line-height: 1.2;
    margin-bottom: 25px;
}

.post-meta.justify-center {
    justify-content: center;
}

/* Images */
.article-featured-image img {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 16/9;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 50px;
}

.article-image-inline {
    margin: 40px 0;
    text-align: center;
}

.article-image-inline img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
}

.image-caption {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 12px;
    font-style: italic;
}

/* Article Typography */
.article-content {
    font-size: 1.1rem;
    color: #4a4a4a;
}

.article-content h1, 
.article-content h2, 
.article-content h3, 
.article-content h4, 
.article-content h5, 
.article-content h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    margin: 40px 0 20px;
    line-height: 1.3;
}

.article-content h2 {
    font-size: 2rem;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
    padding-bottom: 8px;
}

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

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

.article-content p {
    margin-bottom: 25px;
    line-height: 1.8;
}

.article-content span.highlight {
    background-color: var(--bg-pinkish);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--text-heading);
}

/* Lists */
.article-content ul, 
.article-content ol {
    margin-bottom: 30px;
    padding-left: 25px;
    line-height: 1.8;
}

.article-content li {
    margin-bottom: 12px;
}

.article-content ul li::marker {
    color: var(--accent);
}

/* Table */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    background-color: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

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

.article-content th {
    background-color: var(--bg-pinkish);
    font-family: var(--font-ui);
    color: var(--text-heading);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
}

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

/* Table of Contents */
.toc-box {
    background-color: var(--bg-pinkish);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--accent);
    margin-bottom: 40px;
}

.toc-title {
    font-family: var(--font-ui);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 20px;
    text-transform: uppercase;
}

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

.toc-box ul li {
    margin-bottom: 12px;
}

.toc-box ul li a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.toc-box ul li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* Forms Common Styles */
.form-group {
    margin-bottom: 20px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 10px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--bg-light);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(210, 166, 161, 0.2);
}

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

.btn-submit {
    background-color: var(--text-heading);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-submit:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
}

/* Contact Form Block */
.article-contact-block {
    background-color: #fafafa;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 50px 0;
}

.article-contact-block h3 {
    margin-top: 0;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.article-contact-block p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 25px;
}

/* Comments Section */
.comments-section {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 2px solid var(--border-color);
}

.comments-section h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-heading);
    margin-bottom: 30px;
}

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

.related-articles h3 {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--text-heading);
    margin-bottom: 50px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

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

.related-card-content .tags {
    margin-bottom: 15px;
}

.related-card-title {
    font-family: var(--font-ui);
    font-size: 1.2rem;
    color: var(--text-heading);
    line-height: 1.4;
    margin-bottom: 20px;
    flex-grow: 1;
}

.related-card-content .post-meta {
    margin-top: auto;
}

/* Inner Page Responsive */
@media (max-width: 900px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2.2rem;
    }
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .article-contact-block {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.8rem;
    }
    .post-meta.justify-center {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .article-content h2 {
        font-size: 1.6rem;
    }
    .article-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}