:root {
    /* Colors */
    --bg-body: #e9ece9;
    --bg-card: #ffffff;
    --text-main: #2d2d2d;
    --text-muted: #555555;
    --primary-color: #5cb85c;
    --primary-hover: #4cae4c;
    --footer-bg: #302e4d;
    --footer-text: #b8b8d4;
    --footer-border: #444266;
    --pink-bg: #fde8f0;
    --pink-text: #d81b60;
    --border-color: #eaeaea;
    
    /* Typography & Spacing */
    --font-family: 'Inter', sans-serif;
    --radius-large: 20px;
    --radius-medium: 12px;
    --radius-small: 8px;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.03);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
body.dark-theme {
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --text-main: #f0f0f0;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --footer-bg: #1a192b;
    --pink-bg: #3d1c2a;
    --pink-text: #ff80ab;
}

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

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

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

/* Common Card Style */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: background-color var(--transition), box-shadow var(--transition);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius-small);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    text-align: center;
}
.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
}
.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-body);
    transition: var(--transition);
}
.icon-btn:hover { background-color: var(--border-color); }
.icon-btn img { width: 20px; height: 20px; filter: brightness(0) invert(var(--icon-invert, 0)); }
body:not(.dark-theme) .icon-btn img { filter: none; }
body.dark-theme .icon-btn img { filter: brightness(0) invert(1); }

/* Header */
.site-header {
    background-color: var(--bg-card);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
}
.logo-img { height: 30px; }
.main-nav ul {
    display: flex;
    gap: 30px;
    font-weight: 600;
    font-size: 15px;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary-color); }
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Ticker */
.news-ticker-wrapper {
    background-color: var(--bg-body);
    padding: 20px 0;
}
.ticker-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}
.ticker-label {
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-small);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.ticker-content {
    display: flex;
    gap: 20px;
    overflow: hidden;
    flex-grow: 1;
}
.ticker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    padding: 5px 15px 5px 5px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.ticker-item img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.ticker-pause {
    width: 36px;
    height: 36px;
    background: #333;
    border-radius: var(--radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ticker-pause img { width: 16px; height: 16px; filter: brightness(0) invert(1); }

/* Layout Grid */
.layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}
.main-content { display: flex; flex-direction: column; gap: 30px; }

/* Hero Article */
.hero-article {
    display: flex;
    min-height: 350px;
}
.hero-image {
    width: 45%;
    position: relative;
}
.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-info {
    width: 55%;
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.categories { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.cat-pill {
    background-color: var(--pink-bg);
    color: var(--pink-text);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.hero-info h2 { font-size: 24px; margin-bottom: 15px; line-height: 1.3; }
.hero-info p { color: var(--text-muted); font-size: 15px; margin-bottom: 20px; }
.read-more {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}
.read-more img { width: 14px; opacity: 0.7; }
body.dark-theme .read-more img { filter: brightness(0) invert(1); }
.meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}
.slider-btn img { width: 20px; }
.slider-btn.prev { left: 20px; }
.slider-btn.next { right: 20px; }

/* Standard Article */
.standard-article {
    display: flex;
    padding: 20px;
    gap: 30px;
}
.article-image { width: 40%; border-radius: var(--radius-medium); overflow: hidden; }
.article-image img { width: 100%; height: 100%; object-fit: cover; }
.article-info { width: 60%; display: flex; flex-direction: column; justify-content: center; }
.article-info h2 { font-size: 20px; margin-bottom: 10px; }
.article-info p { color: var(--text-muted); font-size: 14px; margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Sidebar */
.widget {
    padding: 30px;
    margin-bottom: 30px;
}
.widget-title {
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.widget-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: var(--border-color);
}
.search-form { display: flex; flex-direction: column; gap: 15px; }
.search-form input {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
}
.search-form input:focus { outline: none; border-color: var(--primary-color); }

/* Sections */
.section-box { padding: 40px; margin-bottom: 40px; }
.section-title {
    font-size: 22px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.section-title::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* Grid 3 (Missed Articles) */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.grid-item {
    position: relative;
    height: 300px;
    border-radius: var(--radius-medium);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: #fff;
}
.grid-item::before {
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}
.item-content { position: relative; z-index: 2; }
.item-content h4 { font-size: 18px; margin: 10px 0; }
.item-content .meta { color: #ddd; font-weight: 400; }

/* About Text */
.text-content p { margin-bottom: 15px; color: var(--text-muted); }

/* Pre-Footer */
.centered-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.pre-footer-logo { margin-bottom: 20px; }
.pre-footer-logo img { height: 60px; }
.welcome-text { max-width: 800px; color: var(--text-muted); line-height: 1.8; }

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
}
.disclaimer-col p {
    font-size: 14px;
    line-height: 1.7;
    padding-right: 40px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 14px; transition: color 0.2s; text-decoration: underline; text-decoration-color: transparent; }
.footer-col a:hover { color: #fff; text-decoration-color: currentcolor; }
.footer-bottom {
    border-top: 1px solid var(--footer-border);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius-medium);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 9999;
    display: none;
    border: 1px solid var(--border-color);
}
.cookie-modal h4 { margin-bottom: 10px; font-size: 16px; }
.cookie-modal p { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }
.cookie-modal .btn { width: 100%; margin-bottom: 10px; }
.cookie-link { display: block; text-align: center; font-size: 12px; color: var(--primary-color); text-decoration: underline; }
.close-cookie {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    opacity: 0.5;
}
.close-cookie:hover { opacity: 1; }
body.dark-theme .close-cookie img { filter: brightness(0) invert(1); }

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(92,184,92,0.4);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}
.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}
.scroll-top:hover { transform: translateY(-5px); background-color: var(--primary-hover); }
.scroll-top img { width: 24px; filter: brightness(0) invert(1); }

/* Responsive */
@media (max-width: 992px) {
    .layout-grid { grid-template-columns: 1fr; }
    .hero-article { flex-direction: column; }
    .hero-image, .hero-info { width: 100%; }
    .hero-image { height: 250px; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .disclaimer-col p { padding-right: 0; }
}
@media (max-width: 768px) {
    .main-nav { display: none; } /* Simplified for template */
    .standard-article { flex-direction: column; }
    .article-image, .article-info { width: 100%; }
    .article-image { height: 200px; }
    .cookie-modal { right: 10px; left: 10px; width: auto; bottom: 10px; }
}
/* Inner page styles */
/* ---------------------------------------
   NEW STYLES FOR INNER PAGE
---------------------------------------- */

/* Single Article Container */
.single-article {
    padding: 40px;
}

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

.article-header h1 {
    font-size: 36px;
    line-height: 1.3;
    margin: 15px 0;
    color: var(--text-main);
    font-weight: 700;
}

/* Article Images */
.article-main-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius-medium);
    margin-bottom: 35px;
    box-shadow: var(--shadow-soft);
}

.article-inline-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-small);
    margin: 30px 0;
    box-shadow: var(--shadow-soft);
}

/* Article Typography */
.article-body {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 25px;
}

.article-body h2, 
.article-body h3, 
.article-body h4, 
.article-body h5, 
.article-body h6 {
    color: var(--text-main);
    margin: 40px 0 20px 0;
    font-weight: 700;
    line-height: 1.4;
}

.article-body h2 { font-size: 28px; }
.article-body h3 { font-size: 24px; }
.article-body h4 { font-size: 20px; }
.article-body h5 { font-size: 18px; }
.article-body h6 { font-size: 16px; text-transform: uppercase; }

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

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

.article-body ul li {
    list-style-type: disc;
    margin-bottom: 10px;
}

.article-body ol li {
    list-style-type: decimal;
    margin-bottom: 10px;
}

.article-body li strong {
    color: var(--text-main);
}

/* Table Styles */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 35px 0;
    border-radius: var(--radius-small);
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--border-color);
}

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

.article-body th {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-weight: 600;
}

.article-body tr:last-child td {
    border-bottom: none;
}

body.dark-theme .article-body table {
    background-color: #1a1a1a;
}

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

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

.form-row {
    display: flex;
    gap: 20px;
}

.half-width {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.1);
}

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

.btn-full {
    width: 100%;
}

/* TOC Widget */
.toc-widget .toc-nav ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toc-widget .toc-nav a {
    display: block;
    color: var(--text-muted);
    font-size: 15px;
    transition: var(--transition);
    position: relative;
    padding-left: 15px;
}

.toc-widget .toc-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background-color: var(--border-color);
    border-radius: 50%;
    transition: var(--transition);
}

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

.toc-widget .toc-nav a:hover::before {
    background-color: var(--primary-color);
}

/* Contact Widget */
.widget-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Stretched link for related articles */
.stretched-link::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 10;
}

/* Responsive adjustments for inner page */
@media (max-width: 768px) {
    .single-article, .comments-section {
        padding: 25px;
    }
    
    .article-header h1 {
        font-size: 28px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .article-body table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}