/* CSS Variables for Neo-Brutalism Style */
:root {
    --bg-color: #f4f5f5;
    --text-color: #111111;
    --white: #ffffff;
    --black: #000000;
    --yellow: #ffd700;
    --blue: #1b64f2;
    --border-width: 2px;
    --shadow-offset: 4px;
    --border-radius: 8px;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Fraunces', 'Georgia', serif;
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-color: #1a1a1a;
    --text-color: #f4f5f5;
    --white: #2a2a2a;
    --black: #000000;
}

body.dark-mode .brutal-card {
    border-color: #555;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px #000;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

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

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Icons */
.icon {
    width: 24px;
    height: 24px;
    filter: invert(0);
}
.icon-small {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}
body.dark-mode .icon { filter: invert(1); }
body.dark-mode .nav-icons .icon { filter: invert(0); } /* Keep black on yellow nav */

/* Neo-Brutalism Utilities */
.brutal-card {
    background-color: var(--white);
    border: var(--border-width) solid var(--black);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--black);
}

.brutal-btn {
    padding: 8px 16px;
    font-family: var(--font-main);
    font-weight: 600;
    border: var(--border-width) solid var(--black);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 2px 2px 0px var(--black);
}

.brutal-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px var(--black);
}

.btn-yellow { background-color: var(--yellow); color: #000; }
.btn-blue { background-color: var(--blue); color: #fff; }
.btn-outline { background-color: var(--white); color: var(--text-color); }

.brutal-input {
    width: 100%;
    padding: 10px;
    border: var(--border-width) solid var(--black);
    border-radius: 4px;
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--text-color);
}

.brutal-header-yellow {
    background-color: var(--yellow);
    color: #000;
    border: var(--border-width) solid var(--black);
    border-radius: var(--border-radius);
    padding: 10px;
    text-align: center;
    font-weight: bold;
    box-shadow: 2px 2px 0px var(--black);
}

/* Top Marquee */
.top-bar {
    background-color: var(--black);
    color: #fff;
    padding: 8px 0;
    font-size: 0.9rem;
    overflow: hidden;
    white-space: nowrap;
}
.marquee-container p {
    display: inline-block;
    animation: marquee 25s linear infinite;
}
.badge-alert {
    background-color: transparent;
    border: 1px solid #fff;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 10px;
}
@keyframes marquee {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* Header & Logo */
.site-header {
    padding: 30px 0;
    text-align: center;
}
.site-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    color: var(--text-color);
}

/* Navigation */
.main-nav {
    background-color: var(--yellow);
    border-top: var(--border-width) solid var(--black);
    border-bottom: var(--border-width) solid var(--black);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}
.nav-links a {
    color: #000;
    font-weight: 700;
    font-size: 1.1rem;
}
.nav-links a:hover { text-decoration: underline; }
.nav-icons {
    display: flex;
    gap: 15px;
}
.icon-btn {
    background: none;
    border: var(--border-width) solid var(--black);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: transparent;
    transition: transform 0.2s;
}
.icon-btn:hover { transform: scale(1.1); }

/* Hero Section */
.hero {
    margin: 40px auto;
    width: 90%;
    max-width: 1200px;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--black);
}
.hero-image-container {
    height: 500px;
    width: 100%;
    background-color: #ccc;
}
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 700px;
    padding: 40px;
    text-align: center;
}
.hero-title {
    font-size: 2.2rem;
    margin: 15px 0;
    font-family: var(--font-heading);
}

/* Badges & Meta */
.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}
.category-badge {
    background-color: var(--yellow);
    color: #000;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border: 1px solid var(--black);
    border-radius: 20px;
}
.post-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
}
.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Main Content Layout */
.content-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Post Cards */
.posts-column { display: flex; flex-direction: column; gap: 30px; }
.post-card {
    display: flex;
    flex-direction: row;
    padding: 20px;
    gap: 20px;
}
.post-image {
    flex: 0 0 40%;
    border-radius: calc(var(--border-radius) - 4px);
    overflow: hidden;
    border: 1px solid var(--black);
}
.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-details { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.post-details .post-categories { justify-content: flex-start; }
.post-details .post-meta { justify-content: flex-start; margin-bottom: 15px; }
.post-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.post-excerpt {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Sidebar Widgets */
.sidebar { display: flex; flex-direction: column; gap: 30px; }
.widget { padding: 20px; }
.widget-header {
    background-color: var(--yellow);
    color: #000;
    border: var(--border-width) solid var(--black);
    border-radius: var(--border-radius);
    padding: 10px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 2px 2px 0px var(--black);
}
.search-form { display: flex; gap: 10px; }
.recent-posts { display: flex; flex-direction: column; gap: 15px; }
.recent-post-link {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--black);
}
.recent-post-link:last-child { border-bottom: none; padding-bottom: 0; }
.recent-post-link:hover { color: var(--blue); }
body.dark-mode .recent-post-link { border-bottom-color: #555; }

/* Pre-Footer */
.pre-footer {
    margin-bottom: 60px;
}
.welcome-box {
    padding: 40px;
    text-align: center;
}
.welcome-title {
    color: #d4a017;
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}
.welcome-box p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.site-footer {
    background-color: #111;
    color: #fff;
    padding-top: 50px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-heading {
    margin-bottom: 20px;
    display: inline-block;
    padding: 8px 40px;
}
.disclaimer-text { font-size: 0.85rem; opacity: 0.8; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: var(--yellow);
    font-size: 0.9rem;
    text-decoration: underline;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
    background-color: #000;
    text-align: center;
    padding: 15px 0;
    font-size: 0.8rem;
    color: #888;
}

/* Scroll Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none; /* Hidden by default via JS */
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 0;
}
.scroll-top-btn.visible { display: flex; }

/* Cookie Modal (Bottom Right) */
.cookie-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    padding: 20px;
    z-index: 9999;
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cookie-modal.show {
    transform: translateY(0);
}
.cookie-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 700;
}
.cookie-text {
    font-size: 0.85rem;
    margin-bottom: 20px;
    opacity: 0.9;
}
.cookie-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}
.cookie-actions button {
    padding: 6px;
    font-size: 0.75rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .content-layout { grid-template-columns: 1fr; }
    .hero-content { width: 90%; padding: 20px; }
    .post-card { flex-direction: column; }
    .post-image { height: 250px; }
}
@media (max-width: 768px) {
    .nav-container { flex-direction: column; height: auto; padding: 15px 0; gap: 15px; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-image-container { height: 350px; }
    .cookie-modal { width: calc(100% - 40px); bottom: 20px; right: 20px; left: 20px; }
}

/* Inner page styles */
/* === NEW STYLES FOR INTERNAL PAGE === */

/* Single Post Layout */
.single-post-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 15px;
}
.single-article {
    padding: 40px;
    margin-bottom: 50px;
}
.article-header {
    text-align: center;
    margin-bottom: 30px;
}
.article-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin: 15px 0;
    line-height: 1.1;
}

/* Images */
.main-article-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border: var(--border-width) solid var(--black);
    border-radius: var(--border-radius);
    margin-bottom: 40px;
}
.in-article-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 30px 0;
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--black);
    border-radius: var(--border-radius);
}

/* Post Content Typography */
.post-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color);
}
.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 {
    font-family: var(--font-heading);
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--black);
}
.post-content h2 { font-size: 2.2rem; border-bottom: 3px solid var(--black); padding-bottom: 10px; }
.post-content h3 { font-size: 1.8rem; }
.post-content h4 { font-size: 1.5rem; }
.post-content p {
    margin-bottom: 25px;
}
.brutal-highlight {
    background-color: var(--yellow);
    padding: 2px 6px;
    border: 1px solid var(--black);
    font-weight: 700;
    color: #000;
}

/* Table of Contents */
.toc {
    background-color: var(--bg-color);
    padding: 25px;
    margin: 30px 0 40px;
}
.toc-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.toc ul li {
    margin-bottom: 10px;
    font-weight: 600;
}
.toc ul li::before {
    content: '➔';
    margin-right: 10px;
    color: var(--blue);
}
.toc ul li a:hover {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* Lists within article */
.post-content ul, .post-content ol {
    margin-bottom: 25px;
    padding-left: 30px;
}
.post-content li {
    margin-bottom: 10px;
}
.post-content ul {
    list-style-type: square;
}
.post-content ol {
    list-style-type: decimal-leading-zero;
    font-weight: 600;
}
.post-content ol li span { font-weight: normal; }

/* Table Styling */
.brutal-table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
}
.brutal-table {
    width: 100%;
    border-collapse: collapse;
    border: var(--border-width) solid var(--black);
    background-color: var(--white);
}
.brutal-table th, .brutal-table td {
    border: var(--border-width) solid var(--black);
    padding: 15px;
    text-align: left;
}
.brutal-table th {
    background-color: var(--yellow);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #000;
}
.brutal-table tbody tr:nth-child(even) {
    background-color: var(--bg-color);
}

/* Forms Styling */
.brutal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}
.form-row {
    display: flex;
    gap: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.half-width { width: 50%; }
.brutal-label {
    font-weight: 700;
    font-size: 0.95rem;
}
.brutal-textarea {
    width: 100%;
    padding: 15px;
    border: var(--border-width) solid var(--black);
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 1rem;
    min-height: 150px;
    resize: vertical;
    background-color: var(--white);
    color: var(--text-color);
}
.brutal-textarea:focus, .brutal-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(27, 100, 242, 0.3);
    border-color: var(--blue);
}

/* Comments Section */
.comments-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 4px solid var(--black);
}
.comment-form-wrapper {
    padding: 30px;
    margin-top: 30px;
    background-color: #f9f9f9;
}
body.dark-mode .comment-form-wrapper { background-color: #222; }

/* Related Articles Grid */
.related-articles-section {
    margin: 60px 0;
}
.section-heading {
    margin-bottom: 30px;
    display: inline-block;
}
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}
.related-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s;
}
.related-card:hover {
    transform: translateY(-5px);
}
.related-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: var(--border-width) solid var(--black);
}
.related-card-content {
    padding: 15px;
}
.related-card-content h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 0;
}

/* Contact Section */
.contact-section {
    padding: 40px;
    margin: 60px 0;
    background-color: var(--yellow);
    color: #000;
}
.contact-section .brutal-header-yellow { display: none; }
.contact-section .brutal-label { color: #000; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .single-article {
        padding: 20px;
    }
    .article-title {
        font-size: 2rem;
    }
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    .half-width {
        width: 100%;
    }
    .contact-section {
        padding: 20px;
    }
}
