/* CSS Variables */
:root {
    --primary-color: #f25a7a;
    --primary-hover: #d94a66;
    --text-dark: #222222;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-light: #fafafa;
    --bg-white: #ffffff;
    --border-color: #eaeaea;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

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

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

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

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

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

/* Buttons */
.btn-outline {
    display: inline-block;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

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

.btn-outline-small {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-gray);
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-solid {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border: none;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

/* Header */
.main-header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 700;
    font-size: 1.5rem;
    color: #000;
}

.logo img {
    height: 40px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.main-nav a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    text-transform: uppercase;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn img {
    width: 24px;
    height: 24px;
}

/* Layout */
.layout-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

/* Masonry Grid (CSS Columns approximation) */
.masonry-grid {
    column-count: 2;
    column-gap: 30px;
}

/* Article Cards */
.post-card {
    background: var(--bg-white);
    margin-bottom: 30px;
    break-inside: avoid;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
    display: inline-block;
    width: 100%;
}

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

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

.post-content {
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-tag {
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.post-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 10px;
    color: #000;
}

.post-author {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.post-excerpt {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 25px;
}

/* Sidebar */
.widget {
    background: var(--bg-white);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
    color: #000;
}

/* Search Widget */
.search-form {
    display: flex;
}

.search-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-right: none;
    font-family: var(--font-body);
    outline: none;
}

.search-form input:focus {
    border-color: var(--primary-color);
}

.search-form button {
    padding: 10px 20px;
}

/* Welcome Widget */
.welcome-widget p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 15px;
    text-align: center;
}

/* Pre-Footer Welcome Section */
.pre-footer-welcome {
    background-color: var(--bg-white);
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.pre-footer-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 20px;
    color: #000;
}

.pre-footer-text {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.8;
}

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

.recommendation-box {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.box-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.box-title::after {
    content: '';
    display: block;
    width: 50%;
    height: 2px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

.box-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.2rem;
    font-family: monospace;
}

.box-logos img {
    height: 30px;
}

.box-text {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.copyright {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    bottom: 20px;
    right: -400px; /* Hidden state */
    width: 350px;
    background: var(--bg-white);
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    padding: 25px;
    z-index: 1000;
    border-left: 4px solid var(--primary-color);
    transition: right 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.cookie-content h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.cookie-content p {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-buttons button {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .layout-container {
        grid-template-columns: 1fr;
    }
    
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .mobile-menu-btn {
        display: block;
    }

    .masonry-grid {
        column-count: 1;
    }
    
    .cookie-modal {
        width: calc(100% - 40px);
        bottom: 20px;
    }
    
    .cookie-modal.show {
        right: 20px;
    }
}
/* Inner page styles */

/* =========================================
   INTERNAL PAGE & ARTICLE STYLES 
   ========================================= */

.single-article {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
}

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

.article-header .category-tag {
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 10px;
}

.article-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #000;
    line-height: 1.2;
    margin-bottom: 15px;
}

.article-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-meta span {
    margin: 0 10px;
    position: relative;
}

.article-meta span:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -12px;
    color: var(--border-color);
}

/* Adaptive Images */
.article-main-image,
.article-inline-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.article-main-image {
    aspect-ratio: 16/9;
    margin-bottom: 40px;
}

.article-inline-image {
    margin: 30px 0;
    aspect-ratio: 16/9;
}

/* Table of Contents */
.article-toc {
    background-color: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 25px;
    margin-bottom: 40px;
    border-radius: 0 8px 8px 0;
}

.toc-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #000;
}

.article-toc ul {
    list-style: none;
    padding-left: 0;
}

.article-toc li {
    margin-bottom: 10px;
}

.article-toc a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

/* Article Typography & Body */
.article-body h1, 
.article-body h2, 
.article-body h3, 
.article-body h4, 
.article-body h5, 
.article-body h6 {
    font-family: var(--font-heading);
    color: #000;
    margin: 35px 0 15px;
    line-height: 1.3;
}

.article-body h2 { font-size: 2rem; }
.article-body h3 { font-size: 1.7rem; }
.article-body h4 { font-size: 1.4rem; }
.article-body h5 { font-size: 1.2rem; }
.article-body h6 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.5px; }

.article-body p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--text-gray);
}

.article-body span {
    font-weight: 600;
    color: var(--primary-color);
}

.article-body a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.3s ease;
}

.article-body a:hover {
    text-decoration-color: var(--primary-color);
}

/* Lists within article */
.article-body ul,
.article-body ol {
    margin: 20px 0 30px 20px;
    color: var(--text-gray);
    font-size: 1.05rem;
}

.article-body li {
    margin-bottom: 10px;
    padding-left: 5px;
}

.article-body ul li::marker {
    color: var(--primary-color);
}

/* Table Styling */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

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

.article-body th {
    background-color: var(--bg-light);
    font-family: var(--font-heading);
    font-weight: 600;
    color: #000;
    font-size: 1.1rem;
}

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

/* Contact Form within Article */
.contact-section {
    background-color: var(--bg-light);
    padding: 40px;
    border-radius: 8px;
    margin-top: 50px;
    border: 1px solid var(--border-color);
}

.contact-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #000;
    text-align: center;
}

.contact-desc {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
}

/* Interlinking / Related Articles */
.section-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 30px;
    color: #000;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.related-articles {
    margin-top: 50px;
}

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

.related-card .post-title {
    font-size: 1.2rem;
}

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

/* Comment Section & Form */
.comments-section {
    margin-top: 60px;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.comment-form-wrapper {
    margin-top: 30px;
}

.comment-form-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.comment-form-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 25px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--bg-light);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    background: var(--bg-white);
    border-color: var(--primary-color);
    outline: none;
}

.comment-form button {
    align-self: flex-start;
}

/* Responsive adjustments for internal page */
@media (max-width: 768px) {
    .single-article {
        padding: 20px;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .comment-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-section {
        padding: 25px 15px;
    }
}
