:root {
    --primary-blue: #0044cc;
    --accent-yellow: #ffc107;
    --accent-hover: #e0a800;
    --text-dark: #222;
    --text-gray: #666;
    --bg-main: #ffffff;
    --bg-light: #f4f6f8;
    --bg-footer: #111111;
    --border-color: #eaeaea;
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.dark-mode {
    --text-dark: #f0f0f0;
    --text-gray: #bbbbbb;
    --bg-main: #1a1a1a;
    --bg-light: #2a2a2a;
    --border-color: #333333;
}

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

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

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

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

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

/* Top Bar */
.top-bar {
    background-color: #111;
    color: #fff;
    font-size: 0.8rem;
    padding: 5px 0;
}

/* Header */
.site-header {
    background-color: var(--bg-main);
    padding: 20px 0;
    text-align: center;
}
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.logo-img {
    height: 40px;
}
.logo h1 {
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Navigation */
.main-nav {
    background-color: var(--primary-blue);
    color: #fff;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}
.nav-links a {
    display: block;
    padding: 15px 10px;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: background 0.3s;
}
.nav-links a:hover {
    background-color: rgba(255,255,255,0.1);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.icon-btn img {
    height: 20px;
    width: 20px;
    filter: brightness(0) invert(1);
}
.btn-subscribe {
    background-color: var(--accent-yellow);
    color: #111;
    padding: 8px 20px;
    font-weight: bold;
    border-radius: 3px;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: background 0.3s;
}
.btn-subscribe:hover {
    background-color: var(--accent-hover);
}

/* News Ticker */
.news-ticker {
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}
.ticker-flex {
    display: flex;
    align-items: center;
}
.ticker-label {
    background-color: #e53935;
    color: white;
    padding: 10px 20px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
}
.ticker-content {
    display: flex;
    gap: 30px;
    padding: 0 20px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Main Content Sections */
main section {
    margin-top: 30px;
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent-yellow);
    margin-bottom: 20px;
    padding-bottom: 10px;
}
.section-header h3 {
    text-transform: uppercase;
    font-size: 1.2rem;
}
.slider-nav button {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    cursor: pointer;
    padding: 5px;
    margin-left: 5px;
}
.slider-nav button img {
    width: 15px;
    height: 15px;
}

/* Tags & Meta */
.tag {
    background-color: var(--accent-yellow);
    color: #111;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}
.meta {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: 5px;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}
.card-overlay {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    height: 100%;
}
.card-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-overlay .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}
.card-overlay h2, .card-overlay h4 {
    margin-bottom: 5px;
}
.card-overlay .meta {
    color: #ddd;
}

/* Trending Sidebar */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.trending-item {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    padding: 10px;
    position: relative;
}
.trending-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 15px;
}
.trend-number {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--accent-yellow);
    color: #111;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}
.trend-info h4 {
    font-size: 0.95rem;
    line-height: 1.3;
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Featured Section */
.featured-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    background: var(--bg-main);
    padding: 30px;
}
.card-horizontal {
    display: flex;
    align-items: center;
    gap: 15px;
}
.card-horizontal img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}
.card-info h4 {
    font-size: 0.95rem;
}

/* Search Widget */
.search-widget h3 {
    border-bottom: 2px solid var(--accent-yellow);
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.search-form {
    display: flex;
}
.search-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    color: var(--text-dark);
}
.search-form button {
    background: var(--accent-yellow);
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
}

/* Vertical Posts List */
.vertical-posts {
    background: var(--bg-main);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.card-list {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
}
.card-list:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.card-list img {
    width: 300px;
    height: 200px;
    object-fit: cover;
}
.card-list-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.card-list-content h4 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}
.card-list-content p {
    color: var(--text-gray);
    margin: 10px 0 20px;
}
.btn-outline {
    align-self: flex-start;
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s;
}
.btn-outline:hover {
    background: var(--accent-yellow);
    border-color: var(--accent-yellow);
}
.tag-bottom {
    position: absolute;
    bottom: -15px;
    left: -330px;
}

/* Pre-Footer Welcome */
.pre-footer-welcome {
    background: var(--bg-main);
    padding: 40px;
    text-align: center;
    border-top: 4px solid var(--accent-yellow);
}
.welcome-box h2 {
    margin-bottom: 15px;
    font-size: 1.8rem;
}
.welcome-box p {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* Footer */
.site-footer {
    background-color: var(--bg-footer);
    color: #ccc;
    padding: 40px 0 20px;
    text-align: center;
    position: relative;
}
.footer-links {
    margin-bottom: 20px;
}
.footer-links a {
    margin: 0 15px;
    font-size: 0.9rem;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--accent-yellow);
}
.footer-disclaimer {
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 15px 0;
}
.footer-copy {
    font-size: 0.85rem;
}

/* Back to top */
#back-to-top {
    position: absolute;
    right: 20px;
    bottom: 20px;
    background: var(--accent-yellow);
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
#back-to-top img {
    width: 20px;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    bottom: 20px;
    right: -400px;
    width: 320px;
    background: var(--bg-main);
    border-left: 4px solid var(--accent-yellow);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    padding: 20px;
    z-index: 9999;
    transition: right 0.5s ease-in-out;
}
.cookie-modal.show {
    right: 20px;
}
.cookie-content h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}
.cookie-content p {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 15px;
}
.cookie-buttons {
    display: flex;
    gap: 10px;
}
.btn-accept, .btn-decline {
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
}
.btn-accept {
    background: var(--accent-yellow);
    color: #111;
}
.btn-decline {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-section, .featured-section {
        grid-template-columns: 1fr;
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-list {
        flex-direction: column;
    }
    .card-list img {
        width: 100%;
        height: auto;
    }
    .tag-bottom {
        position: static;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide for mobile, normally requires hamburger menu */
    }
    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
    .ticker-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    .ticker-content {
        padding: 10px 0;
    }
}
/* Inner page styles */
/* -----------------------------------
   Styles for Internal Article Page
----------------------------------- */

/* Article Wrapper */
.article-page {
    margin-top: 40px;
}

.single-post {
    background: var(--bg-main);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 40px;
}

/* Post Header */
.post-header {
    text-align: center;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.post-header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 15px 0;
    color: var(--text-dark);
}

/* Images */
.post-main-img {
    width: 100%;
    height: auto;
    max-height: 550px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.post-inline-img {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

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

.toc-title {
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: var(--text-dark);
}

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

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

.toc ul li a {
    color: var(--primary-blue);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Article Content Typography & Tags */
.post-content h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.post-content h3 {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin: 35px 0 15px;
}

.post-content h4 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin: 30px 0 15px;
}

.post-content h5,
.post-content h6 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 20px 0 10px;
}

.post-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 25px;
}

.post-content span.highlight {
    background-color: var(--accent-yellow);
    color: #111;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

/* Lists in content */
.post-content ul,
.post-content ol {
    margin: 0 0 25px 25px;
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.7;
}

.post-content li {
    margin-bottom: 10px;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 35px;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    background-color: var(--bg-main);
}

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

.post-content th {
    background-color: var(--primary-blue);
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

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

/* Forms (Comments & Contact) */
.comments-section,
.contact-section {
    background: var(--bg-main);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.6rem;
    text-transform: uppercase;
    color: var(--text-dark);
    margin-bottom: 30px;
    display: inline-block;
    border-bottom: 3px solid var(--accent-yellow);
    padding-bottom: 8px;
}

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

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

.form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.15);
    background-color: var(--bg-main);
}

textarea.form-control {
    resize: vertical;
}

.btn-submit {
    background-color: var(--accent-yellow);
    color: #111;
    border: none;
    padding: 14px 30px;
    font-weight: bold;
    font-size: 0.95rem;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

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

.btn-submit:active {
    transform: translateY(2px);
}

/* Related Posts Specifics */
.related-posts {
    margin-bottom: 50px;
}

/* Responsive adjustments for internal page */
@media (max-width: 768px) {
    .single-post,
    .comments-section,
    .contact-section {
        padding: 25px 15px;
    }
    
    .post-header h1 {
        font-size: 1.8rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .toc {
        padding: 15px;
    }
}