:root {
    --primary-bg: #f4f6f8;
    --white: #ffffff;
    --text-main: #333333;
    --text-light: #777777;
    --accent-color: #ef533e;
    --accent-hover: #d9422e;
    --footer-bg: #222222;
    --footer-text: #cccccc;
    --border-color: #eaeaea;
    --font-ui: 'Open Sans', sans-serif;
    --font-serif: 'Merriweather', serif;
}

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

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

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

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

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

/* Top Bar */
.top-bar {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
}

.top-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.top-links a:hover {
    color: var(--accent-color);
}

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

.ui-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.ui-icon:hover {
    opacity: 1;
}

/* Header */
.site-header {
    background-color: var(--white);
    padding: 30px 0;
    text-align: center;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.site-header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: none;
}

.header-deco-img {
    width: 60px;
    height: 60px;
}

/* Trending Bar */
.trending-bar {
    display: flex;
    background: var(--white);
    margin: 20px auto;
    padding: 10px;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.trending-label {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 5px 15px;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.trending-items {
    display: flex;
    gap: 30px;
    overflow: hidden;
    white-space: nowrap;
}

.trend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.trend-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

/* Common Section Box */
.section-box {
    background: var(--white);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.section-header h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: 700;
}

/* About Section */
.about-section h2 {
    color: var(--accent-color);
    margin-bottom: 15px;
}

.about-section p {
    font-size: 1.05rem;
    color: var(--text-light);
}

/* Hero Grid */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

/* Latest Post */
.latest-img-wrapper {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.main-hero-img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
}

.latest-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--white);
}

.tags {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.tag {
    background-color: var(--accent-color);
    color: var(--white);
    font-size: 0.7rem;
    padding: 3px 8px;
    text-transform: uppercase;
    font-weight: bold;
}

.latest-overlay h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-family: var(--font-serif);
}

.latest-overlay .author {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Small Post Lists */
.post-list-small {
    list-style: none;
}

.post-list-small li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.post-list-small img {
    width: 70px;
    height: 70px;
    object-fit: cover;
}

.post-info h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

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

.text-list {
    list-style: none;
}

.text-list li {
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

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

.text-list h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

/* Popular Circles */
.popular-circles-section {
    margin: 40px 0;
    text-align: center;
}

.center-title {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.circles-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.circle-item {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 250px;
    text-align: left;
}

.circle-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.circle-text h4 {
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.circle-text span {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Blog Articles */
.blog-articles {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    display: flex;
    gap: 40px;
    padding: 0;
    overflow: hidden;
}

.blog-card-img {
    width: 40%;
    object-fit: cover;
    aspect-ratio: 4/5;
}

.blog-card-content {
    width: 60%;
    padding: 40px 40px 40px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-card-content .date {
    display: block;
    text-align: center;
    margin-bottom: 10px;
}

.blog-card-content h2 {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.meta-tags {
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 25px;
}

.excerpt p {
    font-family: var(--font-serif);
    color: var(--text-light);
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.drop-cap {
    float: left;
    font-size: 4rem;
    line-height: 0.8;
    padding-top: 4px;
    padding-right: 8px;
    padding-left: 3px;
    color: var(--text-main);
    font-family: var(--font-serif);
}

.btn-read-more {
    align-self: center;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 10px 25px;
    font-weight: bold;
    border-radius: 3px;
    transition: background 0.3s;
}

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

/* Pre-Footer Welcome */
.pre-footer-welcome {
    background: var(--white);
    padding: 40px 20px;
    text-align: center;
    border-top: 4px solid var(--accent-color);
    margin-bottom: 0;
}

.pre-footer-welcome h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.pre-footer-welcome p {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-light);
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.disclaimer-col p {
    font-size: 0.85rem;
    line-height: 1.7;
    opacity: 0.8;
}

.links-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.links-col ul {
    list-style: none;
}

.links-col li {
    margin-bottom: 10px;
}

.links-col a {
    font-size: 0.9rem;
    text-decoration: underline;
    opacity: 0.8;
}

.links-col a:hover {
    opacity: 1;
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Cookie Modal */
.cookie-modal {
    display: none;
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    width: 320px;
    padding: 25px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    border-left: 5px solid var(--accent-color);
    z-index: 1000;
    border-radius: 4px;
}

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

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

.btn-accept {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    border-radius: 3px;
    transition: background 0.3s;
}

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

/* Responsive */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }
    .latest-post {
        grid-column: 1 / -1;
    }
    .blog-card {
        flex-direction: column;
    }
    .blog-card-img {
        width: 100%;
        aspect-ratio: 16/9;
    }
    .blog-card-content {
        width: 100%;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .site-header h1 {
        font-size: 2rem;
    }
    .header-deco-img {
        width: 40px;
        height: 40px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .cookie-modal {
        right: 50%;
        transform: translateX(50%);
        bottom: 20px;
        top: auto;
        width: 90%;
        max-width: 400px;
    }
}

/* Inner page styles */
/* Article Page Base Styles */
.article-page {
    padding-top: 30px;
}

.single-post {
    padding: 40px;
}

.post-header {
    text-align: center;
    margin-bottom: 30px;
}

.post-header .meta-tags {
    justify-content: center;
    margin-bottom: 15px;
}

.post-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.2;
}

.post-meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Image Styling */
.post-main-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.post-figure {
    margin: 30px 0;
    text-align: center;
}

.post-intext-img {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 0 auto;
    border-radius: 4px;
    display: block;
}

.post-figure figcaption {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 10px;
    font-style: italic;
}

/* Text Tags Styling */
.post-content {
    font-family: var(--font-serif);
    color: #444;
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 25px;
}

.post-content .highlight {
    background-color: rgba(239, 83, 62, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--accent-color);
    font-weight: bold;
}

.post-content h1, 
.post-content h2, 
.post-content h3, 
.post-content h4, 
.post-content h5, 
.post-content h6 {
    font-family: var(--font-ui);
    color: var(--text-main);
    margin-top: 40px;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.post-content h2 { font-size: 2rem; border-bottom: 2px solid var(--border-color); padding-bottom: 10px; }
.post-content h3 { font-size: 1.6rem; color: var(--accent-color); }
.post-content h4 { font-size: 1.3rem; }
.post-content h5 { font-size: 1.1rem; text-transform: uppercase; }
.post-content h6 { font-size: 1rem; font-style: italic; }

/* Lists Styling */
.post-content ul, 
.post-content ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

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

.post-content ul li {
    list-style-type: square;
    color: var(--accent-color);
}

.post-content ul li span, 
.post-content ul li strong,
.post-content ol li {
    color: #444;
}

/* Table of Contents (TOC) */
.toc {
    background-color: var(--primary-bg);
    border-left: 4px solid var(--accent-color);
    padding: 20px 25px;
    margin-bottom: 35px;
    border-radius: 0 4px 4px 0;
    display: inline-block;
    min-width: 300px;
}

.toc-title {
    font-family: var(--font-ui);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-main);
}

.toc ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-bottom: 0 !important;
}

.toc ul li {
    margin-bottom: 8px !important;
}

.toc a {
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    transition: color 0.2s;
    text-decoration: none;
}

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

/* Table Styling */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 25px;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-ui);
    font-size: 0.95rem;
}

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

.post-content th {
    background-color: var(--primary-bg);
    font-weight: bold;
    color: var(--text-main);
}

.post-content tr:nth-child(even) {
    background-color: rgba(244, 246, 248, 0.5);
}

/* Related Posts Section */
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.related-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.related-info {
    padding: 15px;
}

.related-info h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--text-main);
}

/* Forms Styling (Comments & Contact) */
.styled-form {
    width: 100%;
}

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

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.required {
    color: var(--accent-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-ui);
    font-size: 1rem;
    background-color: #fafafa;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(239, 83, 62, 0.1);
    background-color: var(--white);
}

.textarea-control {
    resize: vertical;
}

.btn-submit {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

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

/* Responsive Adjustments for Internal Page */
@media (max-width: 768px) {
    .single-post {
        padding: 20px;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .toc {
        display: block;
        width: 100%;
    }
}