/* 1. CORE DEFAULTS & TYPOGRAPHY */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

body {
    background-color: #f4f7f6;
    color: #2c3e50;
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 2. NAVIGATION BAR */
.navbar {
    background: #ffffff !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 800;
    color: #1a1a1a !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.5rem;
}

.navbar-light .navbar-nav .nav-link {
    color: #2c3e50;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    transition: color 0.3s;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: #0057b7; /* Ukrainian Blue */
}

/* 3. CONTAINERS & LAYOUT */
.container-fluid {
    max-width: 1300px; /* Prevents stretching on ultra-wide screens */
    margin: 0 auto;
}

.section-feature-1 {
    padding: 60px 0;
}

/* 4. HEADINGS */
h1, h2, h3, h4, h5 {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1a1a1a;
}

.section-title h3 {
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.section-title h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: #0057b7;
    border-radius: 2px;
}

/* 5. FEATURED SLIDER (Owl Carousel) */
.blog-item {
    height: 480px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    margin: 10px;
}

.post-overly {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 40px;
}

.entry-title a {
    color: #2b343d !important;
    text-decoration: none !important;
    font-size: 1.2rem;
}

.entry-title2 a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 2rem;
}

.category-style-2 {
    background: #0057b7;
    color: white !important;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 15px;
}

/* 6. CATEGORY BAR */
.categories-items {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 30px 0;
    -ms-overflow-style: none; 
    scrollbar-width: none;
}

.category-item {
    min-width: 110px;
    text-align: center;
    text-decoration: none !important;
}

.category-item .image img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.category-item:hover .image img {
    transform: scale(1.1);
}

/* 7. RECENT POST LIST */
.post-list-style4 {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    gap: 25px;
    border: 1px solid #eef2f3;
    transition: 0.3s ease;
}

.post-list-style4:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.post-list-image {
    flex: 0 0 280px;
    border-radius: 10px;
    overflow: hidden;
}

.post-list-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin: 0; /* Override the global img margin */
}

/* 8. SIDEBAR WIDGETS */
.sidebar > div, .sidebar aside, .sidebar .widget {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #eef2f3;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 800;
    border-bottom: 3px solid #ffd700; /* Gold Accent */
    padding-bottom: 8px;
    margin-bottom: 20px;
    display: inline-block;
}

/* 9. BUTTONS & UI */
.btn-read-more {
    font-weight: 700;
    color: #0057b7;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.pagination-area .page-link {
    border: none;
    background: #fff;
    color: #2c3e50;
    margin: 0 4px;
    border-radius: 8px !important;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pagination-area .page-item.active .page-link {
    background: #0057b7;
    color: white;
}

/* 10. MOBILE RESPONSIVENESS */
@media (max-width: 991px) {
    .post-list-style4 {
        flex-direction: column;
    }
    .post-list-image {
        flex: 0 0 100%;
    }
    .entry-title a {
        font-size: 1.5rem;
    }
}

/* ------------------------------------------------------------------------------
   SINGLE POST PAGE STYLES
   ------------------------------------------------------------------------------ */

/* Main Container */
.post-single {
    padding: 60px 0;
    background: #f8fafc;
}

.post-single-body {
    max-width: 900px;
    margin: -100px auto 0; /* Pulls the content up over the image slightly */
    background: #ffffff;
    padding: 50px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

/* Featured Image */
.post-single-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 24px;
}

/* Post Title & Meta */
.post-single-title h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 25px;
    color: #1a1a1a;
}

.entry-meta {
    list-style: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.post-author-img img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin: 0;
    border: 2px solid #0057b7;
}

.post-author a {
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}

.entry-cat a {
    background: #eef2f3;
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0057b7;
    text-decoration: none;
    transition: 0.3s;
}

.entry-cat a:hover {
    background: #0057b7;
    color: #fff;
}

.post-date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Article Content Body */
.post-single-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #334155;
}

.post-single-content p {
    margin-bottom: 1.5rem;
}

.post-single-content h2, .post-single-content h3 {
    margin: 2.5rem 0 1rem;
}

/* Tags Section */
.post-single-bottom {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

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

.tags p {
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.tags ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
}

.tags li a {
    display: inline-block;
    padding: 5px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.tags li a:hover {
    border-color: #ffd700;
    color: #1a1a1a;
    background: #fffdf0;
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .post-single-body {
        margin-top: -50px;
        padding: 25px;
        border-radius: 15px;
    }
    .post-single-title h1 {
        font-size: 2rem;
    }
    .post-single-image img {
        height: 350px;
    }
}

/* ------------------------------------------------------------------------------
   1. COLOR VARIABLES (LIGHT & DARK MODES)
   ------------------------------------------------------------------------------ */
:root {
    /* Light Theme (Default) */
    --body-bg: #f4f7f6;
    --navbar-bg: #ffffff;
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-headings: #1a1a1a;
    --text-muted: #7f8c8d;
    --border-color: #eef2f3;
    --accent-blue: #0057b7;
    --accent-gold: #ffd700;
    --post-content: #334155;
    --shadow: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    /* Dark Theme */
    --body-bg: #0f172a;        /* Midnight Blue/Black */
    --navbar-bg: #1e293b;      /* Slate Blue */
    --card-bg: #1e293b;        /* Slate Blue */
    --text-main: #cbd5e1;      /* Light Gray */
    --text-headings: #ffffff;  /* Pure White */
    --text-muted: #94a3b8;     /* Muted Blue Gray */
    --border-color: #334155;   /* Dark Border */
    --post-content: #e2e8f0;   /* Brightened content text */
    --shadow: rgba(0, 0, 0, 0.3);
}

/* ------------------------------------------------------------------------------
   2. CORE DEFAULTS & TYPOGRAPHY
   ------------------------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

body {
    background-color: var(--body-bg);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5 {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-headings);
}

/* ------------------------------------------------------------------------------
   3. NAVIGATION BAR
   ------------------------------------------------------------------------------ */
.navbar {
    background: var(--navbar-bg) !important;
    box-shadow: 0 2px 15px var(--shadow);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 800;
    color: var(--text-headings) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-main);
    font-weight: 600;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--accent-blue);
}

/* ------------------------------------------------------------------------------
   4. LAYOUT & BLOCKS
   ------------------------------------------------------------------------------ */
.container-fluid {
    max-width: 1300px;
    margin: 0 auto;
}

.section-title h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-blue);
    border-radius: 2px;
}

/* Category Bar */
.category-item .image img {
    border: 3px solid var(--card-bg);
    box-shadow: 0 4px 12px var(--shadow);
}

/* Recent Post Cards */
.post-list-style4 {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    gap: 25px;
    border: 1px solid var(--border-color);
    transition: 0.3s ease;
}

.post-list-style4:hover {
    box-shadow: 0 15px 30px var(--shadow);
    transform: translateY(-5px);
}

/* Sidebar Widgets */
.sidebar > div, .sidebar aside, .sidebar .widget {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.widget-title {
    border-bottom: 3px solid var(--accent-gold);
    color: var(--text-headings);
}

/* ------------------------------------------------------------------------------
   5. FEATURED SLIDER
   ------------------------------------------------------------------------------ */
.blog-item {
    height: 480px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.post-overly {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 40px;
}

.entry-title2 a {
    color: #ffffff !important; /* Always white on dark overlays */
}

/* ------------------------------------------------------------------------------
   6. SINGLE POST PAGE
   ------------------------------------------------------------------------------ */
.post-single {
    padding: 60px 0;
    background: var(--body-bg);
}

.post-single-body {
    max-width: 900px;
    margin: -100px auto 0;
    background: var(--card-bg);
    padding: 50px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 20px 40px var(--shadow);
}

.post-single-title h1 {
    color: var(--text-headings);
}

.entry-meta {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
}

.post-author a {
    color: var(--text-headings);
}

.entry-cat a {
    background: var(--body-bg);
    color: var(--accent-blue);
}

.post-single-content {
    color: var(--post-content);
}

/* Tags */
.post-single-bottom {
    border-top: 1px solid var(--border-color);
}

.tags li a {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.tags li a:hover {
    border-color: var(--accent-gold);
    color: var(--text-headings);
}

/* ------------------------------------------------------------------------------
   7. UI ELEMENTS
   ------------------------------------------------------------------------------ */
.pagination-area .page-link {
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

@media (max-width: 991px) {
    .post-list-style4 { flex-direction: column; }
    .post-single-body { margin-top: -50px; padding: 25px; }
}