/* CSS Variables and Reset */
:root {
    --c-bg: #ffffff;
    --c-text-main: #000000;
    --c-text-muted: #666666;
    --c-border: #e0e0e0;
    --c-accent: #111111;
    --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

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

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--c-border);
    padding: 20px 40px;
    position: sticky;
    top: 0;
    background: var(--c-bg);
    z-index: 100;
}

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

.logo a {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.main-nav .nav-list {
    display: flex;
    gap: 30px;
}

.main-nav .nav-list a {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.main-nav .nav-list a:hover {
    color: var(--c-text-muted);
}

.header-actions {
    display: flex;
    gap: 20px;
}

.icon-btn img {
    width: 20px;
    height: 20px;
}

.mobile-menu-toggle {
    display: none;
}

/* Hero Section */
.hero-section {
    max-width: 1600px;
    margin: 0 auto;
    border-bottom: 1px solid var(--c-border);
}

.hero-content {
    display: grid;
    grid-template-columns: 3fr 1fr;
}

.hero-main-article {
    position: relative;
    border-right: 1px solid var(--c-border);
}

.hero-img {
    width: 100%;
    height: 75vh;
    object-fit: cover;
}

.hero-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px 40px 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
}

.category-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    display: block;
}

.hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
    max-width: 900px;
}

/* Hero Sidebar (News) */
.hero-sidebar {
    padding: 30px;
    background: #fdfdfd;
}

.sidebar-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: 0.05em;
}

.news-list li {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 20px;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list a {
    font-size: 1rem;
    line-height: 1.4;
    color: var(--c-text-muted);
    transition: color 0.3s ease;
}

.news-list a:hover {
    color: var(--c-text-main);
}

/* Articles Grid */
.articles-grid {
    max-width: 1600px;
    margin: 40px auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.card-img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--c-text-muted);
}

/* Welcome Section */
.welcome-section {
    max-width: 800px;
    margin: 100px auto;
    padding: 0 40px;
    text-align: center;
}

.welcome-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.welcome-section p {
    font-size: 1.1rem;
    color: var(--c-text-muted);
    line-height: 1.8;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--c-border);
    padding: 60px 40px 40px;
    max-width: 1600px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
    flex-wrap: wrap;
    gap: 40px;
}

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

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

.footer-col ul li a {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--c-text-muted);
    letter-spacing: 0.05em;
}

.footer-col ul li a:hover {
    color: var(--c-text-main);
}

.footer-newsletter h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.newsletter-form {
    display: flex;
    border-bottom: 1px solid var(--c-text-main);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.newsletter-form input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
}

.newsletter-form button {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--c-text-muted);
}

.newsletter-terms {
    font-size: 0.7rem;
    color: var(--c-text-muted);
}

.footer-bottom {
    border-top: 1px solid var(--c-border);
    padding-top: 20px;
}

.copyright {
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--c-text-muted);
    line-height: 1.5;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    background-color: var(--c-bg);
    border: 1px solid var(--c-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cookie-content {
    padding: 30px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 1;
}

.close-btn img {
    width: 14px;
    height: 14px;
}

.cookie-content h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

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

.btn-primary {
    background-color: var(--c-accent);
    color: var(--c-bg);
    padding: 12px 20px;
    width: 100%;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #333;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-nav { display: none; } /* Simplified for template: hide nav on tablet/mobile, assume menu toggle logic opens a modal */
    .mobile-menu-toggle { display: block; }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-main-article {
        border-right: none;
        border-bottom: 1px solid var(--c-border);
    }
    
    .footer-links-grid {
        gap: 30px;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .site-header { padding: 15px 20px; }
    .hero-text-overlay { padding: 30px 20px 20px; }
    .hero-title { font-size: 1.8rem; }
    .articles-grid { grid-template-columns: 1fr; padding: 0 20px; gap: 30px; }
    .welcome-section { padding: 0 20px; margin: 60px auto; }
    .site-footer { padding: 40px 20px 20px; }
    .footer-top { flex-direction: column; }
    .cookie-modal { bottom: 0; right: 0; width: 100%; border-radius: 0; }
}
/* Inner page styles */
/* --- NEW STYLES FOR INTERNAL ARTICLE PAGE --- */

/* Page Layout */
.page-main {
    background-color: var(--c-bg);
}

.single-article {
    max-width: 1600px;
    margin: 0 auto;
}

/* Article Header */
.article-header {
    padding: 60px 40px 40px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.black-tag {
    color: var(--c-bg);
    background-color: var(--c-accent);
    padding: 6px 12px;
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.article-title {
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 25px;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--c-text-muted);
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.article-meta strong {
    color: var(--c-text-main);
}

.meta-date::before {
    content: "|";
    margin-right: 15px;
    color: var(--c-border);
}

/* Images */
.article-main-image {
    width: 100%;
    margin-bottom: 60px;
}

.article-main-image img {
    width: 100%;
    max-height: 80vh;
    object-fit: cover;
    display: block;
}

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

.article-inline-image img {
    width: 100%;
    height: auto;
    display: block;
}

figcaption {
    font-size: 0.8rem;
    color: var(--c-text-muted);
    text-align: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--c-border);
}

/* Layout with Sidebar */
.article-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 60px;
}

/* Table of Contents & Sidebar */
.article-sidebar {
    position: relative;
}

.table-of-contents {
    position: sticky;
    top: 100px;
    background: #fdfdfd;
    padding: 25px;
    border: 1px solid var(--c-border);
}

.toc-header {
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
}

.toc-list {
    list-style: decimal inside;
    font-size: 0.9rem;
    color: var(--c-text-muted);
    line-height: 1.6;
}

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

.toc-list a {
    transition: color 0.2s;
}

.toc-list a:hover {
    color: var(--c-text-main);
}

.toc-list ul {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
    font-size: 0.85rem;
}

.toc-list ul li::before {
    content: "— ";
}

.share-block {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--c-border);
}

.share-title {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: var(--c-text-muted);
}

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

.share-icons img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.share-icons a:hover img {
    opacity: 1;
}

/* Article Typography */
.article-body {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #222;
    padding-bottom: 60px;
}

.article-body h2, 
.article-body h3, 
.article-body h4, 
.article-body h5, 
.article-body h6 {
    color: var(--c-text-main);
    margin-top: 2em;
    margin-bottom: 0.8em;
    font-weight: 600;
}

.article-body h2 {
    font-size: 2rem;
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 10px;
}

.article-body h3 {
    font-size: 1.5rem;
}

.article-body h4 {
    font-size: 1.2rem;
}

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

.article-body .lead {
    font-size: 1.35rem;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 2em;
}

.article-body .highlight-text {
    background-color: #f4f4f4;
    padding: 0 4px;
    font-weight: 500;
    color: var(--c-accent);
}

/* Lists in Article */
.article-body ul, 
.article-body ol {
    margin-bottom: 1.5em;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 0.5em;
}

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

/* Data Table */
.table-wrapper {
    overflow-x: auto;
    margin: 2em 0;
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

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

.article-table th {
    background-color: #fdfdfd;
    font-weight: 600;
    color: var(--c-text-main);
    white-space: nowrap;
}

.article-table tbody tr:hover {
    background-color: #fcfcfc;
}

/* Forms Section (Contact & Comments) */
.forms-container {
    max-width: 800px;
    margin: 0 auto 80px;
    padding: 0 40px;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.section-desc {
    color: var(--c-text-muted);
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.contact-author-section {
    background-color: #fdfdfd;
    padding: 40px;
    border: 1px solid var(--c-border);
    margin-bottom: 60px;
}

/* Form Styles */
.pragmata-contact-form, 
.pragmata-comment-form {
    display: grid;
    gap: 20px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-field {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--c-border);
    background-color: var(--c-bg);
    font-family: inherit;
    font-size: 1rem;
    color: var(--c-text-main);
    transition: border-color 0.3s;
    outline: none;
}

.input-field:focus {
    border-color: var(--c-accent);
}

.textarea-field {
    resize: vertical;
    min-height: 120px;
}

.btn-solid, .btn-outline {
    padding: 15px 30px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    justify-self: start;
    transition: all 0.3s ease;
}

.btn-solid {
    background-color: var(--c-accent);
    color: var(--c-bg);
    border: 1px solid var(--c-accent);
}

.btn-solid:hover {
    background-color: #333;
    border-color: #333;
}

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

.btn-outline:hover {
    background-color: var(--c-accent);
    color: var(--c-bg);
}

/* Comments List */
.comments-section {
    border-top: 1px solid var(--c-border);
    padding-top: 60px;
}

.comments-list {
    margin-bottom: 50px;
}

.comment-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.comment-item.reply {
    margin-left: 60px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    color: var(--c-text-muted);
    flex-shrink: 0;
}

.comment-meta {
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    margin-right: 10px;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--c-text-muted);
}

.comment-content p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.comment-form-box {
    background: #fdfdfd;
    padding: 30px;
    border: 1px solid var(--c-border);
}

.form-box-title {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.form-box-note {
    font-size: 0.8rem;
    color: var(--c-text-muted);
    margin-bottom: 25px;
}

/* Related Articles */
.related-articles {
    max-width: 1600px;
    margin: 0 auto;
    padding: 60px 40px;
    border-top: 1px solid var(--c-border);
}

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

.related-grid {
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 0;
}

/* Responsive Design for Internal Page */
@media (max-width: 1024px) {
    .article-title {
        font-size: 2.5rem;
    }
    .article-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .article-sidebar {
        order: -1;
    }
    .table-of-contents {
        position: static;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .article-header {
        padding: 40px 20px 20px;
    }
    .article-title {
        font-size: 2rem;
    }
    .article-layout {
        padding: 0 20px;
    }
    .article-body {
        font-size: 1.05rem;
    }
    .forms-container {
        padding: 0 20px;
    }
    .contact-author-section {
        padding: 30px 20px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .comment-item.reply {
        margin-left: 20px;
    }
    .related-articles {
        padding: 40px 20px;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .article-table th, .article-table td {
        padding: 10px;
        font-size: 0.85rem;
    }
}
.article-layout.no-sidebar {
    display: block;
    max-width: 900px;
    margin: 0 auto;
}

.article-layout.no-sidebar .article-body {
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
}