:root {
    --primary-color: #0856af;
    --primary-dark: #1184b9;
    --primary-light: #ff6659;
    --secondary-color: #2c3e50;
    --accent-color: #007ef3;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-bg: #f8f9fa;
    --dark-bg: #3c3c4e;
    --text-color: #2c3e50;
    --light-text: #7f8c8d;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: var(--text-color);
    background-color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

.nepali-text {
    font-family: 'Noto Serif Devanagari', 'Kantipur', 'Mukta', 'Laila', 'Samyak Devanagari', 'Mangal', 'Arial Unicode MS', 'Arial', sans-serif;
    font-weight: 500;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Header & Navigation - Enhanced */
.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0.8rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.navbar-brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    margin: 0 8px;
    padding: 8px 16px !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(211, 47, 47, 0.08);
}

.nav-link.active:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* User Menu Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown .dropdown-toggle::after {
    display: none;
}

.user-avatar-btn {
    padding: 0;
    border: 0;
    border-radius: 50%;
    line-height: 0;
    background: transparent;
    cursor: pointer;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.user-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
}

.user-avatar-initial.d-none {
    display: none !important;
}

/* Force right alignment ourselves: Bootstrap's .dropdown-menu-end only
   right-aligns via the [data-bs-popper] attribute, which Popper only adds
   when the JS toggle runs (click) - not when we reveal the menu on hover. */
.user-dropdown .dropdown-menu {
    top: 100%;
    right: 0;
    left: auto;
}

@media (hover: hover) {
    .user-dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* Hero Section - Modern Design */
.hero-section {
    position: relative;
    padding: 30px 0 80px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    overflow: hidden;
}

.hero-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1518837695005-2083093ee35b?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    opacity: 0.2;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #ffcccb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(211, 47, 47, 0.4);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

/* Breaking News Ticker */
.breaking-news {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 12px 0;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.breaking-news-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.breaking-news-label {
    background: var(--secondary-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.news-ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding-left: 150px; /* Space for the fixed label */
    cursor: pointer; /* Hand cursor on hover */
}

.ticker-content {
    display: inline-flex;
    white-space: nowrap;
    animation: ticker 60s linear infinite;
    will-change: transform;
}

/* Pause animation on hover */
.news-ticker:hover .ticker-content {
    animation-play-state: paused;
}

.ticker-item {
    color: rgba(250, 250, 250, 0.8);
    display: inline-block;
    padding: 0 30px;
    position: relative;
    transition: color 0.3s ease;
}

.ticker-item:hover {
    color: rgba(255, 254, 189, 0.8);
}

.ticker-item:not(:last-child)::after {
    content: "•";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Move left by 50% to create seamless loop with duplicated content */
        transform: translateX(-50%);
    }
}

/* News Cards - Modern Design */
.news-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    background: white;
    position: relative;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.profile-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    background: white;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.profile-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    font-size: 48px;
    font-weight: 600;
}

.profile-avatar-initial.d-none {
    display: none !important;
}

.profile-avatar-edit {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.profile-avatar-edit:hover {
    background: var(--primary-color);
    color: #fff;
}

.news-card-image {
    height: 220px;
    width: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-card-image {
    transform: scale(1.05);
}

.news-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-body {
    padding: 1.5rem;
}

.news-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-excerpt {
    color: var(--light-text);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
}

.news-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Featured News Slider */
.featured-news-slider {
    margin: 3rem 0;
}

.swiper {
    width: 100%;
    height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.swiper-slide {
    position: relative;
    background: #000;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
}

.slide-category {
    background: var(--primary-color);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1rem;
}

.slide-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* Events Calendar */
.events-calendar {
    background: var(--light-bg);
    padding: 4rem 0;
    border-radius: var(--border-radius);
    margin: 3rem 0;
}

.event-card {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--accent-color);
}

.event-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.event-date {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.event-date .date-badge {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.event-date .date-badge .day {
    font-size: 1.5rem;
    line-height: 1;
}

.event-date .date-badge .month {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Interactive Map */
.map-container {
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
}

.map-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    max-width: 300px;
}

/* Business Directory */
.business-category-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

.business-category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.business-category-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: white;
}

/* Competitions */
.competition-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.competition-card:before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(30deg);
}

.competition-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Footer */
footer {
    background: var(--dark-bg);
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
}

footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-about {
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-heading {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
}

footer .footer-heading:after {
    background: #fff;
}

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

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    opacity: 0.7;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-logo {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .swiper {
        height: 400px;
    }

    .slide-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-section {
        padding: 30px 0 30px;
    }

    .swiper {
        height: 300px;
    }

    .slide-content {
        padding: 1.5rem;
    }

    .slide-title {
        font-size: 1.4rem;
    }

    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: var(--border-radius-sm);
        box-shadow: var(--shadow-md);
        margin-top: 10px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-outline-light {
        width: 100%;
        text-align: center;
    }
}


/* HEADER */
.login-header {
    background: linear-gradient(135deg,
            var(--secondary-color),
            var(--primary-dark));
    padding: 18px 25px;
    position: relative;
    justify-content: center;
}

/* CENTER HEADER TEXT */
.login-header .modal-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    text-align: center;
}


/* Custom List */

/* ORDERED & UNORDERED LIST STYLING */
.custom-list,
.custom-list-ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* COMMON LIST ITEM */
.custom-list li,
.custom-list-ul li {
    position: relative;
    padding: 14px 16px 14px 60px;
    margin-bottom: 15px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(41, 38, 38, 0.95);
    line-height: 1.9;
    font-size: 0.95rem;
    transition: 0.3s ease;
    backdrop-filter: blur(8px);
}

/* HOVER EFFECT */
.custom-list li:hover,
.custom-list-ul li:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.12);
}

/* ORDERED LIST NUMBER */
.custom-list {
    counter-reset: custom-counter;
}

.custom-list li::before {
    counter-increment: custom-counter;
    content: counter(custom-counter);

    position: absolute;
    left: 15px;
    top: 14px;

    width: 32px;
    height: 32px;

    border-radius: 50%;
    background: var(--primary-color);

    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* UNORDERED LIST ICON */
.custom-list-ul li::before {
    content: '\f058';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;

    position: absolute;
    left: 18px;
    top: 16px;

    color: #4ade80;
    font-size: 1rem;
}

/* MOBILE */
@media (max-width: 768px) {

    .custom-list li,
    .custom-list-ul li {
        font-size: 0.9rem;
        padding: 12px 14px 12px 55px;
    }

}


/* Single Page Post View */
/* Post Content Styling */
.post-wrapper {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.2rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.news-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-color);
}

.news-content h2,
.news-content h3,
.news-content h4 {
    font-family: 'Noto Serif Devanagari', serif;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

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

.news-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
}

.news-content figure {
    max-width: 100%;
    margin: 2rem 0;
}

.news-content figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--light-text);
    margin-top: 0.5rem;
    font-style: italic;
}

.news-content iframe,
.news-content video {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
}

.news-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--secondary-color);
    background: var(--light-bg);
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.news-content ul,
.news-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.news-content li {
    margin-bottom: 0.5rem;
}

.news-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.news-content a:hover {
    color: var(--primary-dark);
}

/* Post Header */
.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.post-category-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: var(--transition);
}

.post-category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
    color: white;
}

.post-title {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1.25rem;
    color: var(--secondary-color);
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--light-text);
    font-size: 0.9rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta-item i {
    color: var(--primary-color);
    font-size: 0.95rem;
}

.post-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Featured Image */
.post-featured-image {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.post-featured-image:hover img {
    transform: scale(1.02);
}

/* Social Share */
.social-share-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    margin-top: 1rem;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.social-share-label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-right: 0.5rem;
    font-size: 0.95rem;
}

.social-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.social-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

.share-facebook {
    background: #1877f2;
}

.share-twitter {
    background: #1da1f2;
}

.share-whatsapp {
    background: #25d366;
}

.share-linkedin {
    background: #0a66c2;
}

.share-copy {
    background: var(--light-bg);
    color: var(--text-color);
    border: 1px solid #ddd;
    cursor: pointer;
}

.share-copy:hover {
    background: #eee;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.3rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.widget-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: var(--primary-color);
}

/* Search Widget */
.search-form .input-group {
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.search-form .form-control {
    border: 2px solid #eee;
    border-right: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.search-form .btn {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    padding: 0 1.25rem;
}

.search-form .btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--light-bg);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.category-list a:hover {
    background: rgba(211, 47, 47, 0.06);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(5px);
}

.category-list .cat-count {
    background: white;
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Recent Posts Sidebar */
.sidebar-post-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
}

.sidebar-post-item:hover {
    background: var(--light-bg);
    transform: translateX(5px);
}

.sidebar-post-thumb {
    width: 80px;
    height: 65px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-post-info {
    flex: 1;
    min-width: 0;
}

.sidebar-post-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-color);
}

.sidebar-post-date {
    font-size: 0.8rem;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Trending Posts */
.trending-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    text-decoration: none;
    color: inherit;
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    position: relative;
}

.trending-item:hover {
    background: var(--light-bg);
}

.trending-rank {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(2, 81, 108, 0.3);
}

.trending-rank.top-three {
    background: linear-gradient(135deg, var(--accent-color), #0682b3);
}

.trending-content {
    flex: 1;
    min-width: 0;
}

.trending-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.trending-views {
    font-size: 0.8rem;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Tags */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-block;
    padding: 6px 14px;
    background: var(--light-bg);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.tag-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.2);
}

/* Breadcrumb */
.breadcrumb-wrapper {
    background: var(--light-bg);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.breadcrumb {
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: var(--light-text);
}

/* Navigation between posts */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.post-nav-item {
    flex: 1;
    padding: 1.25rem;
    background: var(--light-bg);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border: 1px solid transparent;
}

.post-nav-item:hover {
    border-color: var(--primary-color);
    background: rgba(211, 47, 47, 0.03);
}

.post-nav-item.next {
    text-align: right;
}

.post-nav-label {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.post-nav-title {
    font-weight: 600;
    color: var(--secondary-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 991px) {
    .post-wrapper {
        padding: 1.5rem;
    }

    .post-title {
        font-size: 1.8rem;
    }

    .sidebar-widget {
        padding: 1.25rem;
    }
}

@media (max-width: 767px) {
    .post-title {
        font-size: 1.5rem;
    }

    .post-meta {
        gap: 1rem;
    }

    .post-navigation {
        flex-direction: column;
    }

    .post-nav-item.next {
        text-align: left;
    }
}


/* Hereo E-Paper */
.epaper-link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.epaper-link:hover {
    color: #09a3f6; /* Bootstrap warning (gold) */
    text-decoration: none;
}

.epaper-link:hover i {
    color: #f89a04;
}

/* ═══════════════════════════════════════════════
   MY PROFILE (account page with tabs)
   ═══════════════════════════════════════════════ */
.account-header {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.account-cover {
    height: 110px;
    background: linear-gradient(120deg, var(--primary-color), var(--accent-color));
}

.account-header-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .75rem;
    padding: 0 1.5rem 1.25rem;
    margin-top: -56px;
}

.account-avatar-wrap {
    flex-shrink: 0;
}

.account-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: var(--shadow-sm);
    background: #fff;
    display: inline-block;
}

.account-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    font-size: 44px;
    font-weight: 600;
}

.account-identity {
    width: 100%;
    min-width: 0;
}

.account-identity h1 {
    word-break: break-word;
}

.account-chip {
    background: var(--light-bg);
    color: var(--text-color);
    border: 1px solid #e5e7eb;
    font-weight: 500;
}

.account-tabs {
    display: flex;
    gap: .25rem;
    padding: 0 1rem;
    border-top: 1px solid #eef0f3;
    overflow-x: auto;
    scrollbar-width: none;
}

.account-tabs::-webkit-scrollbar {
    display: none;
}

/* Centre the tabs, but keep them scrollable from the first one when they overflow */
.account-tab:first-child {
    margin-left: auto;
}

.account-tab:last-child {
    margin-right: auto;
}

.account-tab {
    white-space: nowrap;
    padding: .9rem 1rem;
    color: var(--light-text);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    transition: var(--transition);
}

.account-tab:hover {
    color: var(--primary-color);
}

.account-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

@media (max-width: 575.98px) {
    .account-tabs {
        gap: 0;
        padding: 0 .35rem;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .account-tab:first-child,
    .account-tab:last-child {
        margin-left: 0;
        margin-right: 0;
    }

    .account-tab {
        flex: 0 0 auto;
        padding: .65rem .6rem;
        font-size: .88rem;
    }
}

.account-stat {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 1.1rem 1.25rem;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    color: var(--text-color);
    height: 100%;
    transition: var(--transition);
}

.account-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-color);
}

.account-stat-icon {
    font-size: 1.25rem;
}

.account-stat-count {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
}

.account-stat-label {
    font-size: .95rem;
    color: var(--light-text);
}

.account-quick-links .list-group-item {
    border-left: 0;
    border-right: 0;
    padding-left: 0;
    color: var(--text-color);
}

/* Count of the writer's posts that need changes, on the navbar avatar */
.user-avatar-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #0dcaf0;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border: 2px solid #fff;
}

.user-dropdown .dropdown-header {
    max-width: 240px;
}

/* ═══════════════════════════════════════════════
   NEWS CARDS & HOME PAGE (kd-*)
   Posts without a photo get a text-first layout.
   ═══════════════════════════════════════════════ */
.kd-home {
    padding: 1rem 0 2rem;
}

.kd-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 50px;
    background: rgba(8, 86, 175, .1);
    color: var(--primary-color);
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.6;
}

.kd-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    color: var(--light-text);
    font-size: .9rem;
    margin-bottom: 1rem;
}

/* Top stories: big centred headlines */
.kd-lead-section {
    margin-bottom: 2rem;
}

.kd-lead {
    text-align: center;
    padding: 1.5rem 0 2rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.kd-lead:last-child {
    margin-bottom: 0;
}

.kd-lead-title {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: clamp(1.8rem, 4.2vw, 3rem);
    font-weight: 800;
    line-height: 1.35;
    margin: 0 auto .75rem;
    max-width: 960px;
}

.kd-lead-title a {
    color: var(--secondary-color);
    text-decoration: none;
}

.kd-lead-title a:hover {
    color: var(--primary-color);
}

.kd-lead-image {
    display: block;
    max-width: 960px;
    margin: 0 auto 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.kd-lead-image img {
    width: 100%;
    max-height: 540px;
    object-fit: cover;
    display: block;
}

.kd-lead-excerpt {
    max-width: 820px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #4a5568;
}

/* Section headings */
.kd-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
}

.kd-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: var(--secondary-color);
}

.kd-section-more {
    font-size: .95rem;
    text-decoration: none;
    color: var(--primary-color);
}

.kd-category-block {
    margin-top: 2.5rem;
}

/* Grid card */
.kd-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.kd-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.kd-card-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eef1f5;
}

.kd-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.kd-card:hover .kd-card-image img {
    transform: scale(1.04);
}

.kd-chip--on-image {
    position: absolute;
    left: .75rem;
    top: .75rem;
    background: var(--primary-color);
    color: #fff;
}

.kd-card-body {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.kd-card-title {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 .5rem;
}

.kd-card-title a {
    color: var(--secondary-color);
    text-decoration: none;
}

.kd-card-title a:hover {
    color: var(--primary-color);
}

.kd-card-time,
.kd-list-time {
    color: var(--light-text);
    font-size: .85rem;
    margin-top: auto;
}

/* No photo: text-first card with an accent bar and a teaser */
.kd-card--text {
    border-top: 4px solid var(--primary-color);
}

.kd-card--text .kd-card-body {
    padding-top: 1.25rem;
}

.kd-card--text .kd-chip {
    align-self: flex-start;
}

.kd-card--text .kd-card-title {
    font-size: 1.35rem;
}

.kd-card-excerpt {
    color: #4a5568;
    font-size: .98rem;
    line-height: 1.7;
    margin-bottom: .75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Compact list row */
.kd-list-item {
    display: flex;
    gap: .85rem;
    padding: .75rem 0;
    border-bottom: 1px solid #edf0f3;
    text-decoration: none;
    color: var(--secondary-color);
}

.kd-list-item:first-child {
    padding-top: 0;
}

.kd-list-item:hover .kd-list-title {
    color: var(--primary-color);
}

.kd-list-thumb {
    width: 110px;
    height: 74px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
}

.kd-list-body {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
}

.kd-list-title {
    font-family: 'Noto Serif Devanagari', serif;
    font-weight: 600;
    line-height: 1.5;
    font-size: 1.05rem;
}

/* No photo: a small accent marker instead of the thumbnail */
.kd-list-item--text .kd-list-body {
    border-left: 3px solid var(--primary-color);
    padding-left: .75rem;
}

/* Sidebar boxes */
.kd-box {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
}

.kd-box-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.kd-box-title i {
    color: var(--primary-color);
    margin-right: .35rem;
}

.kd-ranked {
    list-style: none;
    counter-reset: kd-rank;
    padding: 0;
    margin: 0;
}

.kd-ranked li {
    counter-increment: kd-rank;
    position: relative;
    padding: .7rem 0 .7rem 2.6rem;
    border-bottom: 1px solid #edf0f3;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.kd-ranked li:last-child {
    border-bottom: 0;
}

.kd-ranked li::before {
    content: counter(kd-rank, devanagari);
    position: absolute;
    left: 0;
    top: .55rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: rgba(8, 86, 175, .35);
    line-height: 1;
}

.kd-ranked a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    line-height: 1.5;
}

.kd-ranked a:hover {
    color: var(--primary-color);
}

.kd-epaper-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    background: linear-gradient(120deg, var(--primary-color), var(--accent-color));
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.kd-epaper-card:hover {
    color: #fff;
    box-shadow: var(--shadow-md);
}

.kd-epaper-card > i:first-child {
    font-size: 1.8rem;
}

.kd-epaper-card span {
    display: flex;
    flex-direction: column;
}

.kd-epaper-card small {
    opacity: .85;
}

@media (max-width: 575px) {
    .kd-lead {
        padding: 1rem 0 1.5rem;
    }

    .kd-lead-excerpt {
        font-size: 1.05rem;
    }

    .kd-list-thumb {
        width: 92px;
        height: 64px;
    }
}

/* Sidebar "ताजा लेख/रचना/समचार": posts without a photo get an accent bar instead of a thumbnail */
.sidebar-post-item.sidebar-post-item--text .sidebar-post-info {
    border-left: 3px solid var(--primary-color);
    padding-left: .75rem;
}

.sidebar-post-item.sidebar-post-item--text .sidebar-post-title {
    -webkit-line-clamp: 3;
}

/* Devanagari vowel marks are taller than a 1.4 line: give clamped sidebar
   titles enough room so the hidden next line doesn't peek through */
.sidebar-widget .sidebar-post-title {
    line-height: 1.65;
    max-height: calc(1.65em * 2);
}

.sidebar-widget .sidebar-post-item--text .sidebar-post-title {
    max-height: calc(1.65em * 3);
}

/* ═══════════════════════════════════════════════
   NAVBAR (kd-navbar) & FLASH NEWS (kd-flash)
   ═══════════════════════════════════════════════ */
:root {
    --kd-nav-height: 68px;
}

.kd-navbar {
    background: rgba(255, 255, 255, .97) !important;
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid #e8edf3;
    box-shadow: none;
    min-height: var(--kd-nav-height);
    padding: 0;
    font-size: 1rem;
    transition: box-shadow .25s ease;
}

.kd-navbar.scrolled {
    box-shadow: 0 4px 18px rgba(15, 35, 70, .08);
    padding: 0;
}

.kd-navbar-spacer {
    height: var(--kd-nav-height);
}

.kd-navbar-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-height: var(--kd-nav-height);
}

/* Brand */
.kd-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.kd-brand-logo,
.kd-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

.kd-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.1rem;
}

.kd-brand-name {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    white-space: nowrap;
}

/* Menu links: plain text with an animated underline */
.kd-nav {
    gap: .15rem;
}

.kd-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: var(--kd-nav-height);
    padding: 0 .55rem;
    color: #2c3e50;
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 1.08rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease;
}

.kd-nav-link::after {
    content: '';
    position: absolute;
    left: .85rem;
    right: .85rem;
    bottom: 0;
    height: 3px;
    border: 0;
    margin: 0;
    border-radius: 3px 3px 0 0;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform .25s ease;
}

.kd-nav-link:hover,
.kd-nav-link:focus-visible,
.kd-nav-link.active {
    color: var(--primary-color);
}

.kd-nav-link:hover::after,
.kd-nav-link.active::after {
    transform: scaleX(1);
}

.kd-dropdown {
    border: 1px solid #e8edf3;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 35, 70, .1);
    padding: .4rem;
    font-size: 1rem;
}

.kd-dropdown .dropdown-item {
    border-radius: 6px;
    padding: .5rem .85rem;
}

.kd-dropdown .dropdown-item.active,
.kd-dropdown .dropdown-item:active {
    background: rgba(8, 86, 175, .1);
    color: var(--primary-color);
}

/* Right side actions */
.kd-nav-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-left: auto;
}

.kd-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e3e8ef;
    background: #fff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    transition: all .2s ease;
}

.kd-icon-btn:hover,
.kd-icon-btn[aria-expanded="true"] {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(8, 86, 175, .05);
}

.kd-search-menu {
    width: min(360px, calc(100vw - 2rem));
    padding: .6rem;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 35, 70, .12);
    margin-top: .6rem !important;
}

.kd-search-menu .form-control {
    font-size: 1rem;
    border-radius: 8px;
}

.kd-mobile-search {
    display: none !important;
}

.kd-search-submit {
    background: var(--primary-color);
    color: #fff;
    border-radius: 8px;
    padding: 0 .9rem;
}

.kd-search-submit:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* Guest login pill */
.kd-login-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    height: 40px;
    padding: 0 1rem 0 .8rem;
    border-radius: 50px;
    border: 1.5px solid var(--primary-color);
    background: #fff;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: all .2s ease;
}

.kd-login-btn i {
    font-size: 1.25rem;
}

.kd-login-btn:hover,
.kd-login-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.kd-navbar .user-avatar {
    width: 40px;
    height: 40px;
}

/* Hamburger (phones and tablets only) */
.kd-nav-toggler {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    background: #fff;
    padding: 0 10px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.kd-nav-toggler span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: #334155;
    transition: transform .25s ease, opacity .2s ease;
}

.kd-nav-toggler[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.kd-nav-toggler[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.kd-nav-toggler[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (min-width: 992px) {
    .kd-nav-collapse {
        order: 1;
    }

    .kd-nav-actions {
        order: 2;
    }
}

@media (max-width: 991.98px) {
    :root {
        --kd-nav-height: 60px;
    }

    .kd-nav-toggler {
        display: inline-flex;
    }

    /* Actions stay on the top row; the menu panel opens underneath */
    .kd-nav-actions {
        order: 1;
    }

    .kd-nav-collapse {
        order: 2;
        flex-basis: 100%;
        background: #fff;
        margin: 0 -12px;
        padding: 0 12px;
        border-top: 1px solid #eef2f6;
        box-shadow: none;
        border-radius: 0;
    }

    .kd-mobile-search {
        display: flex !important;
        padding: .8rem 0 .4rem;
    }

    .kd-desktop-search {
        display: none;
    }

    .kd-nav {
        padding: .4rem 0 .8rem;
        gap: 0;
    }

    .kd-nav-link {
        display: flex;
        height: auto;
        padding: .4rem .5rem;
        border-left: 3px solid transparent;
        border-radius: 0 8px 8px 0;
    }

    .kd-nav-link::after {
        display: none;
    }

    .kd-nav-link.active {
        border-left-color: var(--primary-color);
        background: rgba(8, 86, 175, .06);
    }

    .kd-dropdown {
        border: 0;
        box-shadow: none;
        padding-left: 1rem;
    }

    .kd-brand {
        margin-right: .5rem;
        min-width: 0;
    }

    .kd-brand-name {
        font-size: 1.35rem;
    }
}

@media (max-width: 575.98px) {
    .kd-brand-logo,
    .kd-brand-icon {
        width: 36px;
        height: 36px;
    }

    .kd-brand-name {
        font-size: 1.2rem;
    }

    .kd-nav-actions {
        gap: .4rem;
    }

    .kd-icon-btn,
    .kd-nav-toggler,
    .kd-navbar .user-avatar {
        width: 38px;
        height: 38px;
    }

    /* Login becomes a round icon button */
    .kd-login-btn {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
    }

    .kd-login-text {
        display: none;
    }
}

/* Flash news: slim scrolling headline bar */
.kd-flash {
    background: #f4f7fb;
    border-bottom: 1px solid #e3e9f1;
    font-size: 1rem;
}

.kd-flash-inner {
    display: flex;
    align-items: center;
    gap: .9rem;
    height: 44px;
}

.kd-flash-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex-shrink: 0;
    padding: .2rem .75rem;
    border-radius: 50px;
    background: #d62828;
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.6;
}

.kd-flash-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: kd-pulse 1.6s ease-in-out infinite;
}

@keyframes kd-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.7); }
}

.kd-flash-track {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    /* soft fade at both edges */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}

.kd-flash-items {
    display: inline-flex;
    white-space: nowrap;
    animation: kd-flash-scroll var(--kd-flash-duration, 40s) linear infinite;
}

.kd-flash-track:hover .kd-flash-items,
.kd-flash-track:focus-within .kd-flash-items {
    animation-play-state: paused;
}

.kd-flash-item {
    position: relative;
    padding: 0 1.4rem;
    color: #1f2d3d;
    font-size: 1.02rem;
    font-weight: 500;
    text-decoration: none;
}

.kd-flash-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2px;
    border-radius: 50%;
    background: #d62828;
}

.kd-flash-item:hover {
    color: var(--primary-color);
}

@keyframes kd-flash-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Visitors who prefer less motion get a static, swipeable list */
@media (prefers-reduced-motion: reduce) {
    .kd-flash-items {
        animation: none;
    }

    .kd-flash-track {
        overflow-x: auto;
    }

    .kd-flash-dot {
        animation: none;
    }
}

@media (max-width: 575.98px) {
    .kd-flash-inner {
        height: 40px;
        gap: .6rem;
    }

    .kd-flash-label {
        font-size: .8rem;
        padding: .15rem .6rem;
    }

    .kd-flash-item {
        font-size: .95rem;
        padding: 0 1.1rem;
    }
}

/* Keep the top row at full height when the mobile menu panel is open below it */
.kd-brand,
.kd-nav-actions {
    min-height: var(--kd-nav-height);
}

/* ═══════════════════════════════════════════════
   MEGA MENU (desktop): category links + latest news
   ═══════════════════════════════════════════════ */
.kd-mega-caret {
    font-size: .6rem;
    margin-left: .35rem;
    opacity: .6;
    transition: transform .2s ease;
}

.kd-mega-panel {
    display: none;
}

@media (min-width: 992px) {
    /* The panel spans the full navbar width, right under it */
    .kd-mega {
        position: static;
    }

    .kd-mega-panel {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: #fff;
        border-top: 1px solid #e8edf3;
        box-shadow: 0 18px 40px rgba(15, 35, 70, .12);
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        /* small delay so the panel doesn't flash while the mouse passes over */
        transition: opacity .18s ease .12s, transform .18s ease .12s, visibility 0s linear .3s;
        z-index: 1040;
    }

    .kd-mega:hover > .kd-mega-panel,
    .kd-mega:focus-within > .kd-mega-panel {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition-delay: .12s, .12s, 0s;
    }

    .kd-mega:hover .kd-mega-caret,
    .kd-mega:focus-within .kd-mega-caret {
        transform: rotate(180deg);
    }

    .kd-mega:hover > .kd-nav-link::after,
    .kd-mega:focus-within > .kd-nav-link::after {
        transform: scaleX(1);
    }
}

.kd-mega-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    padding: 1.5rem 0 1.75rem;
}

.kd-mega-side {
    border-right: 1px solid #eef2f6;
    padding-right: 1.5rem;
    display: flex;
    flex-direction: column;
}

.kd-mega-heading {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: .75rem;
}

.kd-mega-links {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.kd-mega-links a {
    display: block;
    padding: .45rem .6rem;
    margin: 0 -.6rem;
    border-radius: 6px;
    color: #334155;
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 1.02rem;
    font-weight: 500;
    text-decoration: none;
}

.kd-mega-links a:hover {
    background: rgba(8, 86, 175, .07);
    color: var(--primary-color);
}

.kd-mega-all {
    margin-top: auto;
    color: var(--primary-color);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
}

.kd-mega-all i {
    font-size: .8rem;
    transition: transform .2s ease;
}

.kd-mega-all:hover i {
    transform: translateX(3px);
}

.kd-mega-posts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    align-content: start;
}

.kd-mega-post {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    color: var(--secondary-color);
    text-decoration: none;
}

.kd-mega-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    background: #eef1f5;
    margin-bottom: .25rem;
}

.kd-mega-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.kd-mega-post:hover .kd-mega-thumb img {
    transform: scale(1.05);
}

.kd-mega-cat {
    color: var(--primary-color);
    font-size: .8rem;
    font-weight: 700;
}

.kd-mega-title {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.kd-mega-time {
    color: var(--light-text);
    font-size: .8rem;
}

.kd-mega-empty {
    grid-column: 1 / -1;
    color: var(--light-text);
    margin: 0;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .kd-mega-grid {
        grid-template-columns: 180px 1fr;
        gap: 1.25rem;
    }

    .kd-mega-posts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* keep a single tidy row on smaller desktops */
    .kd-mega-post:nth-child(n + 4) {
        display: none;
    }
}

/* Phones & tablets: the caret is hidden, the item is a plain link */
@media (max-width: 991.98px) {
    .kd-mega-caret {
        display: none;
    }
}

/* Text-only mega cards take their own height instead of stretching to the photo cards */
.kd-mega-posts {
    align-items: start;
}

/* ===== Author: avatar, link on the news page, author page header ===== */
.kd-author-avatar {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light, #3b82f6));
    color: #fff;
    font-weight: 600;
    line-height: 1;
}
.kd-author-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-author-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
}
.post-author-link:hover span {
    color: var(--primary-color);
    text-decoration: underline;
}
.kd-author-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}
.kd-author-label {
    font-size: 0.85rem;
    color: #6b7280;
}
.kd-author-name {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

/* Author social links (author page) and their inputs (My Profile) */
.kd-author-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.kd-author-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.kd-author-social a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    color: #fff;
}
.kd-social-addon { width: 42px; justify-content: center; color: #fff; border: 0; }
.kd-social-facebook { background: #1877f2; }
.kd-social-x { background: #000; }
.kd-social-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.kd-social-youtube { background: #ff0000; }
.kd-social-tiktok { background: #010101; }
.kd-social-linkedin { background: #0a66c2; }
.kd-social-website { background: #4b5563; }
