/* CSS Reset & Variables */
:root {
    --primary-purple: #7600bb;
    --primary-purple-hover: #5a0090;
    --accent-cyan: #00b4b4;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --black: #000000;
    --border-color: #eaeaea;
    --footer-bg: #0a0a0a;
    --footer-text: #cccccc;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

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

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

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

.flex-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Icons */
.ui-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.ui-icon-small {
    width: 14px;
    height: 14px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.list-icon {
    width: 12px;
    height: 12px;
    object-fit: contain;
    margin-right: 8px;
    flex-shrink: 0;
    margin-top: 5px;
}

/* Header */
.main-header {
    background-color: var(--white);
}

.top-bar {
    padding: 20px 0;
    text-align: center;
}

.logo a {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo-icon {
    background-color: #f0e68c;
    color: var(--text-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 16px;
}

.main-nav {
    background-color: var(--primary-purple);
    color: var(--white);
}

.nav-container {
    height: 50px;
}

.nav-links {
    display: flex;
    height: 100%;
}

.nav-item {
    padding: 0 20px;
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    font-weight: 500;
}

.nav-item:first-child {
    border-left: 1px solid rgba(255,255,255,0.1);
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(0,0,0,0.2);
}

.search-btn, .mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 10px;
}

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

/* Breaking News */
.breaking-news {
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.bn-container {
    height: 45px;
    justify-content: flex-start;
}

.bn-label {
    background-color: #444;
    color: var(--white);
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-weight: bold;
    font-size: 14px;
}

.bn-tags {
    display: flex;
    gap: 5px;
    margin: 0 15px;
}

.tag {
    color: var(--white);
    padding: 3px 10px;
    font-size: 12px;
    font-weight: bold;
}

.tag-cyan {
    background-color: var(--accent-cyan);
}

.bn-ticker {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    font-size: 14px;
    color: var(--text-dark);
}

.bn-controls button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: 5px;
}

/* Layout Grid */
.layout-grid {
    display: grid;
    grid-template-columns: 2.3fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

/* Post Cards */
.post-card {
    margin-bottom: 50px;
    border: 1px solid var(--border-color);
    padding-bottom: 25px;
}

.post-image-link img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.post-content {
    padding: 25px 25px 0;
}

.post-title {
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-title a:hover {
    color: var(--primary-purple);
}

.post-meta {
    display: flex;
    gap: 15px;
    color: #888;
    font-size: 13px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: bold;
    color: var(--text-dark);
    transition: background 0.3s;
}

.btn-read-more:hover {
    background-color: #e2e2e2;
}

.pagination {
    margin-top: 30px;
}

.btn-pagination {
    background-color: var(--primary-purple);
    color: var(--white);
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
}

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

/* Sidebar Widgets */
.widget {
    margin-bottom: 40px;
}

.search-form {
    display: flex;
}

.search-form input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    outline: none;
}

.search-form button {
    background-color: #333;
    color: var(--white);
    border: none;
    padding: 0 20px;
    font-weight: bold;
    cursor: pointer;
}

.widget-title {
    background-color: var(--bg-light);
    padding: 10px 15px;
    font-size: 14px;
    color: var(--accent-cyan);
    font-weight: bold;
    border-top: 2px solid var(--accent-cyan);
    margin-bottom: 20px;
}

.recent-posts-list {
    list-style: none;
}

.recent-posts-list li {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.recent-posts-list a {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.4;
}

.recent-posts-list a:hover {
    color: var(--primary-purple);
}

/* Welcome Section */
.welcome-section {
    background-color: var(--bg-light);
    padding: 60px 0;
    text-align: center;
}

.welcome-content {
    max-width: 800px;
    margin: 0 auto 40px;
}

.welcome-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.welcome-content p {
    color: var(--text-light);
    font-size: 16px;
}

.ad-banner-container {
    margin: 0 auto;
    max-width: 600px;
}

.banner-title {
    font-size: 20px;
    margin-bottom: 15px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    background-color: #222;
    color: var(--white);
    padding: 10px 15px;
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: bold;
}

.footer-text {
    font-size: 13px;
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    font-size: 13px;
    color: var(--footer-text);
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    background-color: #111;
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    border-top: 1px solid #222;
}

.disclaimer {
    margin-bottom: 10px;
    color: #888;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    background-color: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-left: 4px solid var(--primary-purple);
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s, visibility 0.3s;
}

.cookie-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.cookie-content {
    padding: 25px;
}

.cookie-content h4 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.cookie-content p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.cookie-content a {
    color: var(--primary-purple);
    text-decoration: underline;
}

.btn-accept {
    background-color: var(--primary-purple);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
}

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

/* Scroll to Top */
#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-purple);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 999;
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-to-top:hover {
    background-color: var(--primary-purple-hover);
}

/* Responsive Design */
@media (max-width: 992px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .bn-label, .bn-tags {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hamburger {
        width: 25px;
        height: 3px;
        background-color: var(--white);
        position: relative;
    }
    .hamburger::before, .hamburger::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 3px;
        background-color: var(--white);
        left: 0;
    }
    .hamburger::before { top: -8px; }
    .hamburger::after { bottom: -8px; }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .cookie-modal {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        width: auto;
        transform: none;
    }
}

/* Inner page styles */
/* --- INTERNAL ARTICLE PAGE STYLES --- */
.article-page {
    background-color: var(--white);
}

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

.article-title {
    font-size: 38px;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-main-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Typography & Text Tags */
.article-body h2 {
    font-size: 28px;
    margin: 40px 0 20px;
    color: var(--primary-purple);
    line-height: 1.3;
}

.article-body h3 {
    font-size: 22px;
    margin: 30px 0 15px;
    color: var(--text-dark);
}

.article-body h4, .article-body h5, .article-body h6 {
    margin: 25px 0 15px;
    color: var(--text-dark);
}

.article-body p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
    color: #444444;
}

.article-body span.highlight {
    background-color: rgba(0, 180, 180, 0.15);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Lists */
.article-body ul, .article-body ol {
    margin: 0 0 25px 20px;
    padding-left: 20px;
}

.article-body ul li, .article-body ol li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.6;
    color: #444444;
}

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

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

/* Table */
.article-table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

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

.article-body th {
    background-color: var(--primary-purple);
    color: var(--white);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}

.article-body tr:nth-child(even) {
    background-color: var(--bg-light);
}

.article-body tr:hover td {
    background-color: rgba(118, 0, 187, 0.03);
}

/* Inline Images */
.article-inline-image {
    width: 100%;
    height: auto;
    margin: 35px 0;
    display: block;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

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

.toc-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-dark);
}

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

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

.toc ul li::before {
    content: '▶';
    font-size: 10px;
    color: var(--accent-cyan);
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
}

.toc ul li a {
    color: var(--primary-purple);
    font-weight: 500;
    font-size: 15px;
}

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

/* Interlinking / Related Articles */
.related-articles {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.related-title {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--text-dark);
}

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

.related-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    margin-bottom: 15px;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.related-card:hover img {
    transform: scale(1.03);
}

.related-card h4 {
    font-size: 15px;
    line-height: 1.4;
}

.related-card h4 a:hover {
    color: var(--primary-purple);
}

/* Forms (Contact & Comments) */
.comments-section {
    margin-top: 50px;
}

.comments-title {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.contact-form {
    background-color: var(--bg-light);
    padding: 35px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #d1d1d1;
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(118, 0, 187, 0.1);
}

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

.btn-submit {
    background-color: var(--primary-purple);
    color: var(--white);
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

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

/* Responsive for Internal Page */
@media (max-width: 768px) {
    .article-title {
        font-size: 28px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .article-body h2 {
        font-size: 24px;
    }
    
    .contact-form {
        padding: 20px;
    }
}