/* K9 NEWS VIJAYAPUR - Main Stylesheet */
:root {
    --k9-red: #ED2939;
    --k9-red-dark: #C41C2B;
    --k9-blue: #3E408F;
    --k9-blue-dark: #2A2C6B;
    --k9-sun: #FFB800;
    --k9-dark: #1A1E29;
    --k9-gray: #4A5568;
    --k9-gray-light: #718096;
    --k9-bg: #F8F9FA;
    --k9-border: #E2E8F0;
    --k9-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --k9-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
}

body {
    background-color: var(--k9-bg);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a:hover {
    color: var(--k9-red);
}

/* ==========================================================================
   TOP BAR & BRAND MASTHEAD
   ========================================================================== */
.k9-topbar {
    background-color: #0F172A;
    color: #CBD5E1;
    font-size: 0.85rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.k9-topbar a {
    color: #E2E8F0;
}

.k9-topbar a:hover {
    color: var(--k9-sun);
}

.k9-topbar a i {
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.15s ease-in-out;
}

.k9-topbar a:hover i {
    transform: scale(1.18);
}

.k9-topbar .btn-subscribe-top {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #111827 !important;
    font-weight: 700;
    font-size: 0.74rem;
    padding: 3px 8px;
    border-radius: 4px;
    border: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.25;
    text-decoration: none;
}

.k9-topbar .btn-subscribe-top:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #b45309 100%);
    color: #000000 !important;
}

.k9-topbar .btn-cms-top {
    font-size: 0.74rem;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.25;
    border: 1px solid rgba(255,255,255,0.35);
    color: #F8FAFC !important;
    text-decoration: none;
}

.k9-topbar .btn-cms-top:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: #FFFFFF;
}

/* Mobile Header Optimizations (< 576px) */
@media (max-width: 575.98px) {
    .k9-topbar {
        padding: 4px 0;
        font-size: 0.74rem;
        overflow-x: clip;
    }
    .k9-topbar .container-xl {
        padding-left: 6px;
        padding-right: 6px;
    }
    .k9-topbar .btn-subscribe-top {
        font-size: 0.70rem;
        padding: 2px 5px;
        flex-shrink: 0;
    }
    .k9-topbar .btn-cms-top {
        font-size: 0.70rem;
        padding: 2px 5px;
        flex-shrink: 0;
    }
    .k9-brand-logo {
        height: 52px;
        width: 52px;
    }
    .k9-brand-text h1 {
        font-size: 1.15rem;
    }
    .k9-brand-badge {
        font-size: 0.65rem;
        padding: 1px 6px;
    }
    .k9-brand-text .k9-leadership {
        font-size: 0.68rem;
        margin-top: 1px;
        line-height: 1.2;
    }
    .k9-masthead {
        padding: 10px 0;
    }
}

.k9-masthead {
    background-color: #FFFFFF;
    padding: 16px 0;
    border-bottom: 1px solid var(--k9-border);
}

.k9-brand-logo {
    height: 78px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    aspect-ratio: 1/1;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.k9-header-portrait {
    display: flex;
    align-items: center;
    justify-content: center;
}

.k9-leader-img {
    height: 76px;
    width: 76px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.k9-leader-img-mobile {
    height: 46px;
    width: 46px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.k9-brand-text h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--k9-blue);
    margin: 0;
    line-height: 1.2;
}

.k9-brand-text .tagline {
    font-size: 0.88rem;
    color: var(--k9-gray);
    margin: 0;
    line-height: 1.3;
}

.k9-brand-text .k9-leadership {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--k9-red);
    margin: 2px 0 0 0;
    line-height: 1.25;
    letter-spacing: 0.2px;
}

.k9-brand-badge {
    background-color: var(--k9-red);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   SUBSCRIBE / SUPPORT BUTTON
   ========================================================================== */
.k9-subscribe-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #111827 !important;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid #d97706;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    cursor: pointer;
}

.k9-subscribe-btn:hover,
.k9-subscribe-btn:focus {
    background: linear-gradient(135deg, #fbbf24 0%, #b45309 100%);
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.k9-subscribe-btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   HEADER SPONSOR BANNER (ADBLOCK-RESISTANT)
   ========================================================================== */
.k9-header-sponsor {
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.k9-header-sponsor img {
    max-height: 80px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease-in-out;
}

.k9-header-sponsor img:hover {
    opacity: 0.95;
}

.k9-header-sponsor-mobile {
    background-color: #f8fafc;
}

.k9-header-sponsor-mobile img {
    max-height: 65px;
    width: auto;
    max-width: 95%;
    object-fit: contain;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.k9-navbar {
    background-color: var(--k9-blue);
    border-top: 3px solid var(--k9-red);
    padding: 0;
    box-shadow: var(--k9-shadow-md);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.k9-navbar .nav-link {
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 12px 14px !important;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.k9-navbar .nav-link:hover,
.k9-navbar .nav-link.active {
    background-color: rgba(255,255,255,0.12);
    border-bottom-color: var(--k9-sun);
    color: #FFFFFF !important;
}

.k9-navbar .dropdown-menu {
    border-radius: 0 0 6px 6px;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    margin-top: 0;
}

.k9-navbar .dropdown-item {
    font-weight: 500;
    padding: 8px 16px;
    color: var(--k9-dark);
}

.k9-navbar .dropdown-item:hover {
    background-color: #F1F5F9;
    color: var(--k9-red);
}

/* ==========================================================================
   BREAKING NEWS TICKER (SMOOTH RIGHT-TO-LEFT HORIZONTAL SCROLL)
   ========================================================================== */
.k9-ticker-wrap {
    background-color: var(--k9-red);
    color: #FFFFFF;
    display: flex;
    align-items: stretch;
    min-height: 44px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
    position: relative;
    overflow: hidden;
}

.k9-ticker-badge {
    background-color: var(--k9-red-dark);
    font-weight: 700;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    z-index: 5;
    box-shadow: 3px 0 6px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #FFFFFF;
    border-radius: 50%;
    display: inline-block;
    animation: pulseAnimation 1.5s infinite;
}

@keyframes pulseAnimation {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.k9-ticker-content {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
    mask-image: linear-gradient(to right, transparent 0, #000 15px, #000 calc(100% - 15px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 15px, #000 calc(100% - 15px), transparent 100%);
}

.k9-ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: tickerScrollRightToLeft 35s linear infinite;
}

/* Pause scroll on hover or when paused class is toggled */
.k9-ticker-wrap:hover .k9-ticker-track,
.k9-ticker-track.paused {
    animation-play-state: paused !important;
}

@keyframes tickerScrollRightToLeft {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.k9-ticker-group {
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.k9-ticker-item {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.02rem;
    color: #FFFFFF;
    padding-right: 32px;
    white-space: nowrap;
}

.ticker-separator {
    color: var(--k9-sun);
    font-size: 0.7rem;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
}

.ticker-link {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.15s ease-in-out, text-decoration 0.15s ease;
}

.ticker-link:hover {
    color: var(--k9-sun);
    text-decoration: underline;
}

.ticker-text {
    color: #FFFFFF;
}

.k9-ticker-controls {
    display: flex;
    align-items: center;
    padding-right: 14px;
    padding-left: 8px;
    background-color: var(--k9-red);
    z-index: 5;
    flex-shrink: 0;
}

.k9-ticker-btn {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #FFFFFF;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.k9-ticker-btn:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
    .k9-ticker-track {
        animation: none;
        overflow-x: auto;
    }
}

/* ==========================================================================
   CARDS & EDITORIAL COMPONENTS
   ========================================================================== */
.card-news {
    background: #FFFFFF;
    border: 1px solid var(--k9-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-news:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0,0,0,0.08);
}

.card-news .thumb-wrapper {
    position: relative;
    padding-top: 58%; /* 16:9 approx */
    background-color: #E2E8F0;
    overflow: hidden;
}

.card-news .thumb-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-news:hover .thumb-wrapper img {
    transform: scale(1.03);
}

.card-news .card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-news .news-category-badge {
    color: var(--k9-red);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: inline-block;
}

.card-news .news-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 8px;
    line-height: 1.45;
}

.card-news .news-excerpt {
    font-size: 0.95rem;
    color: var(--k9-gray);
    margin-bottom: 12px;
    flex-grow: 1;
}

.card-news .news-meta {
    font-size: 0.82rem;
    color: var(--k9-gray-light);
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #F1F5F9;
    padding-top: 10px;
}

/* Lead Story Styling */
.lead-story-card {
    background-color: #FFFFFF;
    border: 1px solid var(--k9-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--k9-shadow-sm);
}

.lead-story-card .thumb-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background-color: #0F172A;
}

.lead-story-card .thumb-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lead-story-card .card-body {
    padding: 24px;
}

.lead-story-card .lead-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.35;
    margin-bottom: 14px;
}

/* Supporting Compact Stories */
.supporting-story-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--k9-border);
}

.supporting-story-item:last-child {
    border-bottom: none;
}

.supporting-story-thumb {
    width: 110px;
    height: 75px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: #E2E8F0;
}

.supporting-story-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.supporting-story-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
}

/* Section Header Titles */
.section-header {
    border-bottom: 2px solid var(--k9-border);
    margin-bottom: 20px;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--k9-blue);
    position: relative;
    margin: 0;
    padding-left: 14px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 5px;
    background-color: var(--k9-red);
    border-radius: 2px;
}

/* ==========================================================================
   VIDEO CARDS (COMPACT HEIGHT & RESPONSIVE 16:9 PROPORTIONS)
   ========================================================================== */
.card-video {
    background-color: #FFFFFF;
    color: var(--k9-dark);
    border: 1px solid var(--k9-border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Dark Theme Video Cards (inside dark section) */
section.text-white .card-video,
.card-video.card-video-dark {
    background-color: #1E293B !important;
    border-color: #334155 !important;
    color: #FFFFFF !important;
}

section.text-white .card-video:hover {
    background-color: #273549 !important;
    border-color: #475569 !important;
}

section.text-white .card-video a.text-white {
    color: #FFFFFF !important;
}

section.text-white .card-video a.text-white:hover {
    color: var(--k9-red) !important;
}

.card-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0,0,0,0.1);
}

.card-video .thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Exact 16:9 Aspect Ratio */
    background-color: #000000;
    overflow: hidden;
    flex-shrink: 0;
}

.card-video .thumb-wrapper a,
.card-video .thumb-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.card-video:hover .thumb-wrapper img {
    transform: scale(1.04);
}

.card-video .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(237, 41, 57, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.35rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.35);
    transition: transform 0.2s ease, background-color 0.2s ease;
    z-index: 2;
    pointer-events: none;
}

.card-video:hover .play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: var(--k9-red);
}

.card-video .card-video-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: #FFFFFF;
}

.card-video .card-video-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
    color: #0F172A;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-video .card-video-title a {
    color: #0F172A;
    text-decoration: none;
}

.card-video .card-video-title a:hover {
    color: var(--k9-red);
}

.card-video .video-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.4;
    padding: 10px 12px;
    margin: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.k9-footer {
    background-color: #0B1120;
    color: #94A3B8;
    padding: 50px 0 20px 0;
    margin-top: 60px;
    border-top: 4px solid var(--k9-blue);
}

.k9-footer h5 {
    color: #F8FAFC;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 18px;
    border-left: 3px solid var(--k9-red);
    padding-left: 10px;
}

.k9-footer a {
    color: #94A3B8;
    line-height: 2;
}

.k9-footer a:hover {
    color: #FFFFFF;
}

.k9-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 40px;
    padding-top: 20px;
    font-size: 0.85rem;
}

/* Print Styles */
@media print {
    .k9-topbar, .k9-navbar, .k9-ticker-wrap, .k9-footer, .ad-banner, .social-share-btns {
        display: none !important;
    }
    body {
        background: #FFFFFF;
        color: #000000;
    }
}
