:root {
    --primary-color: #3b82f6;
    --secondary-color: #9ca3af;
    --background-color: #1f2937;
    /* Darker Background */
    --card-bg: #111827;
    /* Darker Cards */
    --text-color: #f3f4f6;
    /* Light Text */
    --text-muted: #9ca3af;
    --border-radius: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    --transition: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Added Comment Styles */
.comments-wrapper {
    margin-top: 40px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.comment-header strong {
    color: var(--primary-color);
}

.comment-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.comment-form {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #34d399;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
}


body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0056b3;
}


/* --- HEADER --- */
:root {
    --header-bg: #111827;
    /* Dark news background */
    --header-text: #f3f4f6;
    --nav-bg: #1f2937;
    /* Slightly lighter for nav */
    --nav-text: #e5e7eb;
    --nav-active: #3b82f6;
    --nav-active-bg: rgba(59, 130, 246, 0.1);
}

.site-header-wrapper {
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
}

/* Sticky Wrapper Hook - We can stick the Nav or the whole thing. 
   Making the Navbar sticky is cleaner. */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area img {
    height: 60px;
    width: auto;
    border-radius: 4px;
    /* Optional sharp or rounded */
}

.title-area {
    text-align: right;
}

.site-title a {
    color: var(--header-text);
    font-size: 2rem;
    /* Larger brand */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    font-family: 'Segoe UI', serif;
    /* Newsy font choice */
    text-decoration: none;
}

.site-tagline {
    color: #9ca3af;
    font-size: 0.9rem;
    margin: 5px 0 0;
    font-style: italic;
}

/* --- NAVIGATION --- */
.navbar {
    background: var(--nav-bg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    padding: 0;
    /* Remove padding to let links fill height */
}

.nav-container {
    display: flex;
    justify-content: center;
    /* Center menu */
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0;
    /* Removing gap, using padding on links */
    flex-wrap: wrap;
}

.nav-menu li a {
    display: block;
    padding: 15px 25px;
    color: var(--nav-text);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    border-radius: 0;
    /* Full height/width */
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-bottom-color: var(--nav-active);
}

/* --- MOBILE BAR --- */
.mobile-bar {
    display: none;
    background: var(--nav-bg);
    color: white;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-bar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-brand a {
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
}

#menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
}

.bar {
    width: 24px;
    height: 2px;
    background-color: white;
    transition: 0.3s;
}

/* --- CONTENT --- */
body>.container {
    padding-top: 40px;
    /* Reduced since header is separate */
    padding-bottom: 70px;
}


.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.post-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.post-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.post-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-content h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.post-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
}

.read-more {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white !important;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-top: 15px;
    align-self: flex-start;
}

footer {
    background-color: #fff;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 10px;
    transition: all 0.3s ease;
    display: inline-block;
}

footer a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

/* --- RESPONSIVE --- */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    /* Hide Main Large Header on Mobile */
    .main-header {
        display: none;
    }

    /* Show Mobile Bar */
    .mobile-bar {
        display: block;
        position: sticky;
        /* Sticky Mobile Bar */
        top: 0;
        z-index: 1001;
    }

    /* Reposition Nav for Mobile */
    .navbar {
        display: none;
        /* Hidden by default */
        position: fixed;
        top: 60px;
        /* Height of mobile bar appx */
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--header-bg);
        /* Dark bg for menu */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 999;
        overflow-y: auto;
    }

    .navbar.open {
        display: block;
        animation: slideRight 0.3s ease;
    }

    .nav-container {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
    }

    .nav-menu li a {
        padding: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: left;
        font-size: 1.1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes slideRight {
    from {
        transform: translateX(-10%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Category Page Enhancements --- */
.section-spacing {
    margin-top: 60px;
}

.category-block.mb-large {
    margin-bottom: 40px;
}

.short-hr {
    width: 50px;
    margin-left: 0;
    border-color: var(--primary-color);
}


/* --- SIDEBAR STYLES --- */
.site-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.main-content {
    flex: 0 0 100%;
    max-width: 100%;
    transition: all 0.3s ease;
}

.site-content-wrapper.has-sidebar .main-content {
    flex: 0 0 calc(70% - 15px);
    max-width: calc(70% - 15px);
}

.sidebar-wrapper {
    flex: 0 0 calc(30% - 15px);
    max-width: calc(30% - 15px);
    display: none;
}

.site-content-wrapper.has-sidebar .sidebar-wrapper {
    display: block;
}

.sidebar-widget {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 12px rgba(31, 29, 29, 0.2);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search Widget */
.sidebar-search-form {
    display: flex;
}

.sidebar-search-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 6px 0 0 6px;
    outline: none;
}

.sidebar-search-form button {
    padding: 10px 15px;
    background: #007bff;
    border: none;
    color: white;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

/* Social Widget */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    text-decoration: none;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.btn-social:hover {
    color: white;
    opacity: 0.9;
}

.btn-wa {
    background-color: #25D366;
}

.btn-tg {
    background-color: #0088cc;
}

/* Categories Widget */
.sidebar-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-cat-list li {
    margin-bottom: 10px;
}

.sidebar-cat-list a {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.sidebar-cat-list a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
    text-decoration: none;
}

.cat-count {
    background: #007bff;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Popular Posts Widget */
.sidebar-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    text-decoration: none;
    color: inherit;
    align-items: flex-start;
}

.sidebar-post-item:last-child {
    margin-bottom: 0;
}

.sp-image {
    flex: 0 0 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.sp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sp-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 5px;
    color: var(--text-color);
}

.sp-views {
    font-size: 0.75rem;
    color: #888;
}

.sidebar-post-item:hover .sp-title {
    color: #007bff;
}

@media (max-width: 900px) {
    .site-content-wrapper.has-sidebar .main-content {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .site-content-wrapper.has-sidebar .sidebar-wrapper {
        display: block;
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 20px;
    }
}


/* --- AD PLACEMENTS --- */
.ad-container {
    margin: 20px auto;
    max-width: 100%;
    text-align: center;
    overflow: hidden;
}

.ad-header {
    margin-top: 20px;
    margin-bottom: 20px;
}

.ad-sidebar {
    margin-bottom: 30px;
}

.ad-incontent {
    margin: 30px 0;
    clear: both;
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .desktop-only {
        display: none !important;
    }
}

/* =========================================
   List View Card Styles
   ========================================= */
.list-view-card {
    display: flex;
    flex-direction: row;
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    transition: box-shadow 0.3s ease;
    align-items: center;
    /* Center items vertically */
    gap: 15px;
    /* Spacing between image and text */
}

.list-view-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    /* Lighter shadow for cleaner look */
}

.list-view-card .post-image-link {
    flex: 0 0 120px;
    /* Fixed width for image container */
    height: 90px;
    overflow: hidden;
}

.list-view-card .post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Removes bottom space */
    border-top-left-radius: 8px;
    /* Match card radius */
    border-bottom-left-radius: 8px;
    border-top-right-radius: 0;
    /* Reset generic post-card radius if any */
}

.list-view-card .post-content {
    flex: 1;
    /* Take remaining space */
    padding: 10px 15px 10px 0;
    /* Right padding, no left padding (gap handles it) */
    display: flex;
    /* make flex to align content */
    flex-direction: column;
    justify-content: center;
}

.list-view-card h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    line-height: 1.3;
}

.list-view-card h4 a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.list-view-card h4 a:hover {
    color: var(--primary-color);
}

.list-view-card p {
    font-size: 0.9rem;
    color: #ffc6c6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Show only 2 lines of description */
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.list-view-card .read-more {
    display: none;
    /* Hide read more button in list view for cleaner look, title is enough */
}

/* Mobile Adjustments for List View */
@media (max-width: 480px) {
    .list-view-card .post-image-link {
        flex: 0 0 100px;
        height: 80px;
    }

    .list-view-card h4 {
        font-size: 1rem;
    }
}

/* --- CONTENT PAGE STYLES (About, Terms, Privacy) --- */
.content-page {
    background: #fff;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.content-page h2 {
    color: var(--primary-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 25px;
    font-size: 2rem;
}

.content-page h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: #34495e;
}

.content-page p,
.content-page li {
    color: #4a5568;
    font-size: 1.05rem;
    margin-bottom: 15px;
}

.content-page ul {
    padding-left: 20px;
}

/* --- CONTACT PAGE SPECIFIC --- */
.contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin: 20px 0 30px 0;
}

.content-page form {
    margin-top: 20px;
}

.content-page label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    display: block;
}

.content-page input[type="text"],
.content-page input[type="email"],
.content-page textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #fcfcfc;
    transition: border-color 0.2s;
    box-sizing: border-box;
    /* Fix for 100% width causing overflow */
}

.content-page input:focus,
.content-page textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    background-color: #fff;
}

.content-page button[type="submit"] {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}


.content-page button[type="submit"]:hover {
    background: #0056b3;
}

/* Sticky Widget Class */
.sticky-widget {
    position: sticky;
    top: 90px;
    /* Adjust based on sticky header height + spacing */
    z-index: 100;
}

/* Sharing Buttons */
.share-container {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.share-title {
    font-weight: 700;
    margin-bottom: 15px;
    display: block;
    color: #333;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.9;
    color: white;
}

.share-btn svg {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-whatsapp {
    background-color: #25D366;
}

.btn-facebook {
    background-color: #1877F2;
}

.btn-twitter {
    background-color: #1DA1F2;
}

.btn-telegram {
    background-color: #0088cc;
}

/* --- RELATED POSTS & CATEGORY LIST GRID --- */
.related-posts-list,
.category-posts-list {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile default: 1 column */
    gap: 20px;
}

@media (min-width: 768px) {

    .related-posts-list,
    .category-posts-list {
        grid-template-columns: repeat(2, 1fr);
        /* Desktop: 2 columns */
    }
}