/* CSS VARIABLES & RESET */
:root {
    --bg-color: #f9f9f9;
    --text-color: #333333;
    --text-light: #777777;
    --primary-teal: #6ebfb5;
    --header-bg: #0a1111;
    --white: #ffffff;
    --border-color: #eaeaea;
    --font-main: 'Inter', sans-serif;
}

* {
    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;
}

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

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

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

/* HEADER */
.main-header {
    background-color: var(--header-bg);
    color: var(--white);
    padding: 20px 0;
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--white);
    border-radius: 50%;
    position: relative;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav a {
    font-size: 14px;
    color: #cccccc;
}

.main-nav a:hover {
    color: var(--primary-teal);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn img {
    width: 30px;
    height: 30px;
    filter: invert(1);
}

/* HERO GRID */
.hero-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.hero-top {
    display: flex;
    height: 400px;
}

.hero-bottom {
    display: flex;
    height: 250px;
}

.hero-card {
    position: relative;
    background-size: cover;
    background-position: center;
    color: var(--white);
    overflow: hidden;
    cursor: pointer;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 100%);
    transition: background 0.3s ease;
}

.hero-card:hover::before {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-card.large {
    flex: 1;
}

.hero-card.small {
    flex: 1;
}

.hero-overlay {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    z-index: 2;
}

.hero-overlay h2 {
    font-size: 28px;
    margin-bottom: 5px;
    line-height: 1.2;
}

.hero-overlay h3 {
    font-size: 18px;
    margin-bottom: 5px;
    line-height: 1.3;
}

.date {
    font-size: 13px;
    color: #cccccc;
}

/* RECENT ARTICLES */
.recent-articles {
    padding: 60px 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title.center {
    text-align: center;
    font-size: 28px;
    text-transform: none;
    margin-bottom: 40px;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.recent-info {
    flex: 1;
}

.category {
    color: var(--primary-teal);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.recent-info h4 {
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 5px;
}

.meta {
    font-size: 12px;
    color: var(--text-light);
}

/* MAIN LAYOUT */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    padding-bottom: 60px;
}

/* WELCOME BANNER */
.welcome-banner {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.welcome-banner h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

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

/* CARDS GRID */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

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

.post-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 20px;
    margin: 10px 0;
    line-height: 1.3;
}

.excerpt {
    color: var(--text-light);
    font-size: 14px;
    margin: 15px 0;
    flex: 1;
}

.btn-read {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--primary-teal);
    color: var(--primary-teal);
    font-size: 13px;
    align-self: flex-start;
    transition: all 0.3s ease;
}

.btn-read:hover {
    background-color: var(--primary-teal);
    color: var(--white);
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-num {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 14px;
}

.page-num.active {
    background-color: var(--primary-teal);
    color: var(--white);
    border-color: var(--primary-teal);
}

.page-next {
    font-size: 14px;
    color: var(--primary-teal);
    margin-left: 10px;
}

/* SIDEBAR */
.author-widget {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 30px;
    text-align: center;
}

.author-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    object-fit: cover;
}

.author-widget h4 {
    font-size: 18px;
    margin-bottom: 15px;
}

.author-widget p {
    font-size: 13px;
    color: var(--text-light);
}

/* PRE-FOOTER WELCOME */
.pre-footer-welcome {
    background-color: var(--primary-teal);
    color: var(--white);
    text-align: center;
    padding: 50px 20px;
}

.pre-footer-welcome h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.pre-footer-welcome p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 15px;
    opacity: 0.9;
}

/* FOOTER */
.main-footer {
    background-color: var(--header-bg);
    color: #999;
    padding: 50px 0 20px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #222;
    padding-bottom: 30px;
}

.footer-logo {
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a {
    margin-left: 20px;
    font-size: 14px;
}

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

.footer-disclaimer {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    font-size: 13px;
    line-height: 1.6;
    color: #aaa;
}

.footer-bottom {
    text-align: center;
    font-size: 13px;
}

/* COOKIE MODAL */
.cookie-modal {
    position: fixed;
    bottom: -100%; /* Hidden initially */
    right: 20px;
    width: 350px;
    background-color: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 9999;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--primary-teal);
}

.cookie-modal.show {
    bottom: 20px;
}

.cookie-content {
    padding: 25px;
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.cookie-icon {
    width: 24px;
    height: 24px;
}

.cookie-header h4 {
    font-size: 18px;
    color: var(--text-color);
}

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

.cookie-actions {
    display: flex;
    gap: 10px;
}

.btn-accept,
.btn-decline {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.btn-accept {
    background-color: var(--primary-teal);
    color: var(--white);
}

.btn-accept:hover {
    background-color: #5aa99f;
}

.btn-decline {
    background-color: #f1f1f1;
    color: var(--text-color);
}

.btn-decline:hover {
    background-color: #e4e4e4;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .hero-top, .hero-bottom {
        flex-direction: column;
        height: auto;
    }

    .hero-card {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none; /* simple hide for mobile, can be toggled via JS */
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .footer-top {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links a {
        display: block;
        margin: 10px 0;
    }

    .cookie-modal {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
}

/* Inner page styles */
/* NEW STYLES FOR INTERNAL ARTICLE PAGE */
.single-article {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 40px;
    margin-bottom: 40px;
    border-radius: 5px;
}

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

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

.article-meta span {
    color: var(--text-color);
}

.article-meta a {
    color: var(--primary-teal);
    font-weight: 600;
}

.article-main-img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    margin-bottom: 30px;
    border-radius: 5px;
}

/* Table of Contents */
.article-toc {
    background-color: #f2fafa;
    border-left: 4px solid var(--primary-teal);
    padding: 25px;
    margin-bottom: 35px;
    border-radius: 0 5px 5px 0;
}

.article-toc h4 {
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--text-color);
}

.article-toc ul {
    list-style-type: none;
    padding-left: 0;
}

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

.article-toc a {
    color: var(--text-color);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.article-toc a:hover {
    color: var(--primary-teal);
}

/* Article Body Text Styles */
.article-body h1, 
.article-body h2, 
.article-body h3, 
.article-body h4, 
.article-body h5, 
.article-body h6 {
    color: var(--text-color);
    margin: 35px 0 15px;
    line-height: 1.3;
}

.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; }

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

.article-body span {
    color: var(--primary-teal);
    font-weight: 600;
}

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

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

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

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

/* Article Inner Images */
.article-body img.responsive-img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 25px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* Article Table */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 15px;
}

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

.article-body th {
    background-color: var(--primary-teal);
    color: var(--white);
    font-weight: 600;
}

.article-body tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* Forms (Comments & Contact) */
.custom-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-form input, 
.custom-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-main);
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease;
    background-color: #fbfbfb;
}

.custom-form input:focus, 
.custom-form textarea:focus {
    border-color: var(--primary-teal);
    background-color: var(--white);
}

.custom-form textarea {
    resize: vertical;
    min-height: 150px;
}

.custom-form button {
    background-color: var(--primary-teal);
    color: var(--white);
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.custom-form button:hover {
    background-color: #5aa99f;
}

/* Comments Section */
.comments-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 5px;
    margin-bottom: 40px;
}

.comments-section h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.mt-40 {
    margin-top: 40px;
}

/* Related Articles */
.related-articles {
    margin-top: 50px;
    margin-bottom: 40px;
}

.related-articles h3 {
    font-size: 22px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--primary-teal);
    padding-bottom: 10px;
    display: inline-block;
}

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

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 5px;
}

.sidebar-widget h4 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-teal);
}

.contact-widget .custom-form input, 
.contact-widget .custom-form textarea {
    padding: 12px;
    font-size: 14px;
}

.contact-widget .custom-form button {
    padding: 12px;
    font-size: 14px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .single-article {
        padding: 20px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .custom-form div[style] {
        flex-direction: column;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .comments-section {
        padding: 25px;
    }
}