/* css/style.css */
:root {
    --primary-color: #004d1a;
    --primary-light: #0d8033;
    --primary-dark: #003310;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f4f6f4;
    --white: #ffffff;
    --border-color: #dddddd;
    --accent-color: #8c1d1d;
    --accent-hover: #b82d2d;
    --transition: all 0.3s ease;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    box-sizing: border-box;
}

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

body {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img, video, iframe, canvas, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Top bar with Date and Socials */
.top-bar {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
}

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

.top-bar-socials a {
    margin-left: 15px;
    opacity: 0.8;
}

.top-bar-socials a:hover {
    opacity: 1;
}

/* Main Header */
.main-header {
    background-color: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

.logo-circle {
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo-text {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 1px;
}

/* Navigation Bar */
.main-nav {
    background-color: var(--primary-color);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px 0;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    display: block;
    padding: 18px 20px;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.nav-links li a:hover,
.nav-links li.active a {
    background-color: var(--primary-light);
}

.nav-auth {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-auth {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--primary-color);
}

.btn-auth-login {
    background: transparent;
    color: var(--primary-color);
}

.btn-auth-login:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-auth-register {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-auth-register:hover {
    background-color: var(--primary-light);
    color: var(--white);
    border-color: var(--primary-light);
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.btn-logout {
    font-size: 0.85rem;
    color: #ffcccc;
    text-decoration: underline;
}

/* Ticker / Latest Posts */
.ticker-section {
    background-color: #f0f0f0;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
}

.ticker-section .container {
    display: flex;
    align-items: center;
}

.ticker-title {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 4px 12px;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-right: 15px;
    white-space: nowrap;
}

.ticker-content-wrapper {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.ticker-content-track {
    display: inline-block;
    white-space: nowrap;
    font-size: 0.95rem;
    color: var(--text-color);
    animation: marquee-scroll 30s linear infinite;
}

.ticker-content-track a {
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.ticker-content-track a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
}

.ticker-thumb {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Hero & Tabs Grid */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

/* Carousel/Slider */
.carousel-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 450px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: var(--white);
    padding: 30px 20px;
}

.carousel-overlay h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.25;
}

.carousel-overlay p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-nav-btn:hover {
    background-color: var(--primary-light);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

/* Filter Tabs System (Trending / Popular / Latest) */
.tabs-widget {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 450px;
}

.tabs-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-light);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.tab-content {
    flex-grow: 1;
    overflow-y: auto;
}

.tabs-post-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dotted var(--border-color);
}

.tabs-post-item:last-child {
    border-bottom: none;
}

.tabs-post-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.tabs-post-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tabs-post-category {
    font-size: 0.75rem;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 2px 6px;
    border-radius: 3px;
    align-self: flex-start;
    font-weight: bold;
}

.tabs-post-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Category Grid Sections (Trending, Popular) */
.section-title-wrapper {
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 6px 18px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px 4px 0 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.post-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

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

.post-card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-card-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    border-top: 1px solid #eeeeee;
    padding-top: 8px;
    margin-top: auto;
}

/* Featured Stories Grid (2 columns: list of stories & large media banner) */
.featured-stories-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.featured-stories-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.featured-story-item {
    display: flex;
    gap: 15px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
}

.featured-story-thumb {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.featured-story-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.featured-story-banner {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    height: 100%;
    min-height: 350px;
}

.featured-story-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Single News & Comments */
.news-detail-wrapper {
    display: grid;
    grid-template-columns: 2.5fr 1.2fr;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.news-main-content h1 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-main-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.news-main-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
}

.news-main-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

/* Comments Section */
.comments-section {
    margin-top: 40px;
    border-top: 2px solid var(--primary-color);
    padding-top: 30px;
}

.comment-form {
    margin-top: 20px;
    margin-bottom: 30px;
}

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

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

.comment-item {
    background-color: var(--bg-light);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: bold;
}

/* Footer Section */
.main-footer {
    background-color: #031c0a;
    color: #dddddd;
    padding: 50px 0 20px 0;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 35px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-light);
}

.footer-col p {
    margin-bottom: 10px;
}

.footer-links-list {
    list-style: none;
}

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

.footer-links-list li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.footer-gallery-grid img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.copyright-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* Auth Pages (Login / Register) */
.auth-wrapper {
    max-width: 450px;
    margin: 60px auto;
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background-color: var(--white);
}

.auth-title {
    font-size: 1.8rem;
    color: var(--primary-dark);
    font-weight: 700;
    text-align: center;
    margin-bottom: 25px;
}

/* Sidebar and Dashboard Grid */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: calc(100vh - 120px);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-sidebar {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 30px 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    max-width: 100%;
}

/* Sidebar Toggle Buttons (Desktop vs Mobile) */
.sidebar-toggle-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.sidebar-toggle-btn:hover {
    background-color: var(--primary-light);
}

.mobile-toggle {
    display: none !important;
}

.desktop-toggle {
    display: inline-flex !important;
}

.sidebar-header-mobile {
    display: none !important;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    font-weight: bold;
    font-size: 1.05rem;
}
.sidebar-close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
}
.sidebar-close-btn:hover {
    background: rgba(255,255,255,0.25);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 99988;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
    display: block !important;
    opacity: 1 !important;
}

/* Sidebar Menu Links */
.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 6px;
    font-weight: 600;
    position: relative;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.sidebar-menu li a i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    background-color: var(--primary-light);
}

.nav-badge {
    margin-left: auto;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
}
.nav-badge.orange { background: orange; color: green; }
.nav-badge.red { background: #dc3545; color: white; }

.dashboard-main {
    padding: 30px;
    background-color: var(--bg-light);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Collapsed Desktop Sidebar State (.sidebar-collapsed) */
body.sidebar-collapsed .dashboard-layout {
    grid-template-columns: 80px minmax(0, 1fr) !important;
}

body.sidebar-collapsed .dashboard-sidebar {
    padding: 30px 10px;
}

body.sidebar-collapsed .link-text,
body.sidebar-collapsed .nav-badge {
    display: none !important;
}

body.sidebar-collapsed .sidebar-menu li a {
    justify-content: center;
    padding: 14px 10px;
}

body.sidebar-collapsed .sidebar-menu li a i {
    width: auto;
    font-size: 1.25rem;
    margin: 0;
}

/* Tooltip Popup on Hover when Collapsed on Desktop */
@media (min-width: 993px) {
    body.sidebar-collapsed .sidebar-menu li a {
        position: relative;
    }
    body.sidebar-collapsed .sidebar-menu li a::after {
        content: attr(data-tooltip);
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%) translateX(10px);
        background-color: var(--primary-dark);
        color: #ffffff;
        padding: 7px 14px;
        border-radius: 6px;
        font-size: 0.85rem;
        font-weight: 600;
        white-space: nowrap;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, transform 0.2s ease;
        z-index: 99999;
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
    body.sidebar-collapsed .sidebar-menu li a::before {
        content: '';
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%) translateX(4px);
        border-width: 5px;
        border-style: solid;
        border-color: transparent var(--primary-dark) transparent transparent;
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease;
        z-index: 99999;
    }
    body.sidebar-collapsed .sidebar-menu li a:hover::after {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) translateX(14px);
    }
    body.sidebar-collapsed .sidebar-menu li a:hover::before {
        opacity: 1;
        visibility: visible;
    }
}

/* Mobile & Tablet Responsiveness (<= 992px) */
@media (max-width: 992px) {
    .dashboard-layout {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100%;
        max-width: 100%;
    }
    .mobile-toggle {
        display: inline-flex !important;
    }
    .desktop-toggle {
        display: none !important;
    }
    .sidebar-header-mobile {
        display: flex !important;
    }
    .dashboard-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -320px !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100% !important;
        height: 100vh !important;
        z-index: 99999 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-shadow: 4px 0 25px rgba(0,0,0,0.4) !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    .dashboard-sidebar.active {
        left: 0 !important;
    }
    .dashboard-main {
        padding: 20px 15px;
        width: 100%;
        max-width: 100%;
    }
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-stats-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    margin-bottom: 25px;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-overview-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 30px;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card {
    background-color: var(--white);
    padding: 16px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
    text-align: center;
    min-width: 0;
}

.stat-num {
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 3px;
    line-height: 1.1;
}

.stat-label {
    font-size: clamp(0.7rem, 1vw, 0.82rem);
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
}

.tabs-widget {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 450px;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 15px 10px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: rgba(44, 62, 80, 0.03);
}

.tab-content {
    padding: 12px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tab-content-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.tabs-post-item {
    width: 100%;
    flex-shrink: 1;
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--white);
    border-radius: 6px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: var(--transition);
    padding: 6px 8px;
    border-left: 3px solid transparent;
    min-height: 0;
}

.tabs-post-item:hover {
    border-left-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tabs-post-item.active-slide {
    border-left: 3px solid #22c55e;
    background-color: rgba(34, 197, 94, 0.06);
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.15);
}

.tabs-post-item.active-slide .tabs-post-thumb {
    border: 2px solid #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.tabs-post-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    margin-right: 10px;
}

.tabs-post-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.tabs-post-category {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background-color: var(--primary-color);
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    display: inline-block;
    padding: 2px 7px;
    border-radius: 3px;
}

.tabs-post-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tabs-post-title:hover {
    color: var(--primary-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: #eeeeee;
    font-weight: bold;
    color: var(--text-color);
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 3px;
    margin-right: 5px;
    cursor: pointer;
}

.btn-success {
    background-color: #28a745;
    color: white;
    border: none;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
    border: none;
}

/* Alerts */
.alert {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: bold;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Responsive adjustments */
@media (max-width: 992px) {

    .hero-grid,
    .featured-stories-layout,
    .news-detail-wrapper {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Large & Medium screens (cards on single row, posts & comments side by side) */
    .dashboard-stats-grid,
    .stats-grid {
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        grid-template-columns: none;
        gap: 12px;
    }

    .dashboard-overview-tables {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        width: 100%;
    }
}

/* Smaller screens (<= 768px): Always 2 cards per row, Post & Comment stacked 100% */
@media (max-width: 768px) {
    /* Hide Latest, Trending, Popular tabs next to carousel on smaller screens */
    .hero-grid {
        grid-template-columns: 1fr !important;
    }

    .hero-grid .tabs-widget {
        display: none !important;
    }

    .carousel-wrapper {
        height: 300px;
    }

    .carousel-overlay {
        padding: 20px 15px;
    }

    .carousel-overlay h2 {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }

    .carousel-overlay p {
        font-size: 0.85rem;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .dashboard-stats-grid,
    .stats-grid {
        grid-auto-flow: row !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .dashboard-overview-tables {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
        width: 100% !important;
    }

    .stat-card {
        padding: 14px 10px !important;
    }

    .stat-num {
        font-size: 1.65rem !important;
    }
}

/* Extra small mobile screens (<= 480px): Maintain 2 cards per row with compact padding */
@media (max-width: 480px) {
    .dashboard-stats-grid,
    .stats-grid {
        grid-auto-flow: row !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .dashboard-overview-tables {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        width: 100% !important;
    }

    .stat-card {
        padding: 12px 6px !important;
    }

    .stat-num {
        font-size: 1.45rem !important;
    }

    .stat-label {
        font-size: 0.72rem !important;
    }
}

@media (max-width: 600px) {
    .menu-toggle {
        display: block !important;
    }

    .main-header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .logo-section {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .logo-text {
        display: none !important;
    }

    .logo-section img {
        height: 40px !important;
        width: 40px !important;
    }

    .btn-auth {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .user-welcome {
        font-size: 0.8rem;
    }

    .main-nav .container {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        padding: 5px 15px;
    }

    .menu-toggle {
        display: block !important;
        margin-right: auto;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 10px;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--primary-color);
        z-index: 1000;
        padding-left: 15px;
        padding-right: 15px;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: left;
    }

    .nav-links li a {
        padding: 12px 0;
        width: 100%;
    }

    .nav-search-form {
        display: none !important;
    }

    .nav-search-input {
        width: 100%;
    }

    .card-grid,
    .footer-grid,
    .featured-stories-list {
        grid-template-columns: 1fr;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 5px;
    }
}

/* ============================================
   Logout Button
   ============================================ */
.btn-logout {
    display: inline-block;
    background-color: #dc3545;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.btn-logout:hover {
    background-color: #a71d2a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* ============================================
   Dashboard Data Tables & Controls
   ============================================ */
.table-responsive {
    overflow-x: auto;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table thead {
    background-color: var(--primary-color);
    color: var(--white);
}
.data-table thead th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}
.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}
.data-table tbody tr:hover {
    background-color: #f0f8f0;
}
.data-table tbody td {
    padding: 10px 15px;
    vertical-align: middle;
}

/* Small Action Buttons */
.btn-sm {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    margin: 2px;
    text-decoration: none;
    line-height: 1.4;
}
.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn-sm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-success {
    background-color: #28a745;
    color: #fff;
}
.btn-success:hover { background-color: #1e7e34; }

.btn-danger {
    background-color: #dc3545;
    color: #fff;
}
.btn-danger:hover { background-color: #a71d2a; }

.btn-info {
    background-color: #e9ecef;
    color: #333;
}
.btn-info:hover { background-color: #ced4da; }

/* DataTable Wrapper Controls */
.data-table-wrapper {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* User Management Table Optimization (Zero Horizontal Scroll) */
.users-management-table {
    width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse;
}
.users-management-table th,
.users-management-table td {
    padding: 8px 8px !important;
    font-size: 0.82rem !important;
}
.users-management-table select.form-control,
.users-management-table button {
    font-size: 0.78rem !important;
}

/* ===== Home Page: Country Tabs ===== */
.home-country-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    justify-content: center;
}
.hct-btn {
    padding: 8px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1.5px solid var(--primary-color, #2a6496);
    border-radius: 6px;
    background: transparent;
    color: var(--primary-color, #2a6496);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.hct-btn:hover,
.hct-btn.active {
    background: var(--primary-color, #2a6496);
    color: #fff;
}
.hct-country-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 5px;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 3px 10px;
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
    border-radius: 0;
    margin-bottom: 6px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-align: left;
}
.hct-country-badge::before {
    content: "\f3c5";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.72rem;
    color: #2e7d32;
}

/* ===== Home Page: View More Button ===== */
.view-more-wrapper {
    display: flex;
    justify-content: center;
    margin: 18px 0 40px;
}
.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 30px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid var(--primary-color, #2a6496);
    border-radius: 30px;
    color: var(--primary-color, #2a6496);
    background: transparent;
    text-decoration: none;
    transition: all 0.22s ease;
    letter-spacing: 0.03em;
}
.view-more-btn:hover {
    background: var(--primary-color, #2a6496);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(42, 100, 150, 0.18);
}

/* ===== Floating Action Buttons (WhatsApp & Back to Top) ===== */
.floating-actions-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 9999;
}

.floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.35rem;
}

.floating-btn:hover {
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* WhatsApp Floating Button */
.whatsapp-floating-btn {
    background: #25D366;
}
.whatsapp-floating-btn:hover {
    background: #20BA5A;
}

/* Back to Top Floating Button */
.back-to-top-btn {
    background: var(--primary-color, #2a6496);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
}
.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top-btn:hover {
    background: var(--primary-dark, #1c4b75);
}

@media (max-width: 600px) {
    .floating-actions-container {
        bottom: 18px;
        right: 18px;
        gap: 10px;
    }
    .floating-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
}

/* ============================================
   Responsive Page Layouts
   (News, Gallery, Videos, Contact, About)
   ============================================ */

/* --- News page: sidebar + grid wrapper --- */
.news-page-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 30px;
}

/* --- News grid: 4 columns on desktop --- */
.news-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* --- Gallery grid: 4 columns on desktop --- */
.gallery-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* --- Videos grid: 4 columns on desktop --- */
.videos-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* --- Contact page: two-column --- */
.contact-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

/* --- Page headings scale down on mobile --- */
.page-h1-title {
    font-size: 2.5rem;
    text-align: center;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--primary-dark);
}

/* --- Tablet breakpoint (≤ 900px): 2 per row --- */
@media (max-width: 900px) {
    .news-page-layout {
        grid-template-columns: 1fr;
    }
    .news-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .videos-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-page-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* --- Mobile phones (≤ 600px): 1 per row --- */
@media (max-width: 600px) {
    .gallery-card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .news-card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .videos-card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .contact-page-grid {
        gap: 20px;
    }
    .page-h1-title {
        font-size: 1.7rem;
    }
    /* News sidebar collapses to pill-style tags */
    .news-sidebar-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .news-sidebar-list li {
        flex: 0 0 auto;
    }
    .news-sidebar-list li a {
        display: inline-block;
        padding: 5px 10px !important;
        border: 1px solid var(--border-color);
        border-radius: 20px;
        font-size: 0.82rem;
        white-space: nowrap;
    }
    .news-sidebar-list li.active a {
        background: var(--primary-color);
        color: #fff;
        border-color: var(--primary-color);
    }
}