/* Extra frontend styles: responsive polish + CMS content + performance-friendly defaults */

/* AOS: keep layout stable before animation starts */
[data-aos] {
    pointer-events: auto;
}

:root {
    --stv-red: #f10000;
    --stv-blue: #01386b;
}

/* E-paper listing cards: full cover fits inside fixed frame */
.epaper-link {
    display: block;
    height: 100%;
}

.epaper-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.epaper-link:hover .epaper-item {
    border-color: #d0d7de;
    box-shadow: 0 4px 14px rgba(1, 56, 107, 0.08);
}

.epaper-thumb {
    width: 100%;
    background: #fff;
    overflow: hidden;
    line-height: 0;
}

.epaper-thumb img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: unset;
    object-position: center top;
}

.epaper-meta {
    padding: 0.75rem 0.85rem 0.9rem;
}

.epaper-meta h6 {
    font-size: 0.95rem;
    line-height: 1.35;
    margin: 0;
    color: #1a1a1a;
}

/* Home nav: icon only (all pages) */
.news-menu .nav-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
}

.news-menu .nav-home i {
    font-size: 1.05em;
    line-height: 1;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

.site-btn-danger,
.btn.site-btn-danger {
    background: var(--stv-red);
    border-color: var(--stv-red);
    color: #fff;
}
.site-btn-danger:hover,
.btn.site-btn-danger:hover {
    background: var(--stv-blue);
    border-color: var(--stv-blue);
    color: #fff;
}

/* Horizontal news cards (home + category) */
.political-link,
.sports-link,
.latest-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.political-item,
.sports-item,
.latest-item {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: .3s;
    height: 100%;
}

.political-item:hover,
.sports-item:hover,
.latest-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, .1);
}

.political-item img,
.sports-item img,
.latest-item img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.political-content h6,
.sports-content h6,
.latest-content h6 {
    font-size: 14px;
    margin: 0 0 4px;
    line-height: 1.35;
}

.political-content small,
.sports-content small,
.latest-content small,
.news-item small,
.featured-content small {
    display: inline-block;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Header social icons (same links as footer; keep footer include too) */
.header .logo img {
    width: 220px;
    max-width: 100%;
    height: auto;
}

.header .right-box {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.header .right-box-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header .customer-care a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.header .customer-care a span {
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 575.98px) {
    .header .customer-care a span {
        display: none;
    }
}

.header-social {
    display: flex;
    align-items: center;
}

.header-social .social-sidebar {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    z-index: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
}

.header-social .social-sidebar a {
    width: 34px;
    height: 34px;
    font-size: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
}

.header-social .social-sidebar a:hover {
    transform: translateY(-2px) scale(1.06);
}

@media (max-width: 767.98px) {
    .header .right-box {
        align-items: center;
        width: 100%;
    }

    .header-social .social-sidebar {
        justify-content: center;
    }

    .header-social .social-sidebar a {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Home Breaking News sidebar — tighter row spacing */
.latest-news .news-scroll li {
    padding: 8px 12px;
    line-height: 1.35;
}

.latest-news .news-scroll li:hover {
    padding-left: 14px;
}

.latest-news .news-scroll a small {
    margin-top: 2px;
    line-height: 1.2;
    font-size: 10px !important;
}

/* Video popup */
.news-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.news-popup .popup-content {
    position: relative;
    width: min(900px, 100%);
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.news-popup iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
}

.news-popup .popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 2;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

/* Magazine cards */
.magazine-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, .08);
}

/* CMS article body — prevent overflow on mobile */
.article-body {
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.7;
}

.article-body img,
.article-body video,
.article-body iframe {
    max-width: 100% !important;
    height: auto !important;
}

.article-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.article-body pre {
    white-space: pre-wrap;
    overflow-x: auto;
}

/* Main content breathing room above fixed mobile widgets */
main {
    padding-bottom: 1rem;
}

/* =========================
   Responsive — tablet/phone
   ========================= */
@media (max-width: 991.98px) {
    .container,
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .live-tv-floating {
        right: 12px;
        bottom: 84px;
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 767.98px) {
    .header-container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .search-box {
        order: 3;
        width: 100%;
    }

    .flash-bar {
        height: auto !important;
        flex-wrap: wrap;
        align-items: stretch;
        margin-top: 10px;
    }

    .flash-title {
        width: 100%;
        text-align: center;
        padding: 8px 12px;
        font-size: 13px;
    }

    .flash-marquee {
        width: 100%;
        font-size: 13px;
        order: 2;
    }

    .flash-marquee marquee {
        line-height: 36px;
    }

    .date-time {
        width: 100%;
        justify-content: center;
        gap: 10px;
        padding: 6px 10px 8px;
        font-size: 12px;
        order: 3;
        border-top: 1px solid rgba(255, 255, 255, .12);
    }

    .political-item img,
    .sports-item img,
    .latest-item img {
        width: 96px;
        height: 64px;
    }

    .carousel-caption h3 {
        font-size: 1rem;
    }

    .carousel-caption p {
        font-size: .85rem;
        margin-bottom: .25rem;
    }

    .live-tv-floating {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: 10px;
        font-size: 12px;
        padding: 8px 10px;
    }

    .news-menu .menu-toggle {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        padding: 10px;
    }

    .history-section,
    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .footer-grid,
    .footer .row {
        row-gap: 1rem;
    }

    form .btn,
    .btn {
        min-height: 42px;
    }

    input,
    select,
    textarea {
        font-size: 16px !important; /* prevent iOS zoom */
    }
}

@media (max-width: 575.98px) {
    .political-item,
    .sports-item,
    .latest-item {
        gap: 8px;
        padding: 8px;
    }

    .political-content h6,
    .sports-content h6,
    .latest-content h6 {
        font-size: 13px;
    }

    .carousel-caption {
        left: 8%;
        right: 8%;
        bottom: 8px;
        padding: 6px;
    }

    .live-tv-floating {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

/* Prefer reduced motion for accessibility / battery */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .live-tv-floating,
    .live-dot,
    [data-aos] {
        animation: none !important;
        transition: none !important;
    }
}

/* =========================
   Home hero: logos top-right, Live TV bottom under logos
   ========================= */
.page-home .right-float-stack {
    display: none;
}

.hero-split > [class*="col-"] {
    min-width: 0;
}

@media (min-width: 992px) {
    .hero-split.flex-lg-nowrap {
        flex-wrap: nowrap !important;
    }

    .hero-slider-col {
        flex: 1 1 0 !important;
        width: auto !important;
        max-width: none !important;
    }

    .hero-breaking-col {
        flex: 0 0 34% !important;
        width: 34% !important;
        max-width: 420px;
    }

    .hero-aside {
        flex: 0 0 auto !important;
    }
}

.hero-aside {
    display: flex;
}

.hero-side-col {
    --hero-aside-w: 92px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: var(--hero-aside-w);
    height: 100%;
    min-height: 100%;
    gap: 8px;
}

.hero-side-col .rightside-categories {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

.hero-live-tv {
    margin-top: auto;
    padding-top: 0;
    width: 100%;
}

/* Match logo tile size/alignment exactly */
.hero-side-col .rightside-categories__link,
.live-tv-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    padding: 4px;
    box-sizing: border-box;
    border-radius: 10px;
    text-decoration: none !important;
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    z-index: auto !important;
}

.live-tv-btn {
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #fff !important;
    background: #01386b;
    border: 1px solid rgba(1, 56, 107, .2);
    box-shadow: 0 2px 10px rgba(1, 56, 107, .18);
    white-space: nowrap;
    animation: none !important;
}

.live-tv-btn:hover {
    background: #024a8a;
    color: #fff !important;
}

.live-tv-btn .live-dot {
    width: 8px;
    height: 8px;
    margin-right: 0;
    background: #f10000;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
    animation: liveBlink 1.5s infinite;
}

.rightside-categories {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.hero-side-col .rightside-categories__link {
    background: #fff;
    border: 1px solid rgba(1, 56, 107, .12);
    box-shadow: 0 2px 10px rgba(1, 56, 107, .1);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.rightside-categories__logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 80px;
    max-height: 44px;
    object-fit: contain;
    object-position: center;
}

.hero-side-col .rightside-categories__link:hover,
.hero-side-col .rightside-categories__link:focus-visible,
.hero-side-col .rightside-categories__link.is-active {
    transform: translateY(-2px);
    border-color: rgba(241, 0, 0, .35);
    box-shadow: 0 8px 18px rgba(1, 56, 107, .18);
}

.rightside-categories__link:focus-visible {
    outline: none;
}

/* Non-home pages: fixed logos stack */
.right-float-stack {
    position: fixed;
    top: 50%;
    right: 16px;
    bottom: auto;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    transform: translateY(-50%);
}

.right-float-stack .rightside-categories__link,
.right-float-stack .live-tv-btn {
    width: 78px;
    height: 52px;
}

.right-float-stack .live-tv-btn {
    font-size: 11px;
    gap: 5px;
    flex-shrink: 0;
}

.right-float-stack .live-tv-btn .live-dot {
    width: 8px;
    height: 8px;
    margin-right: 0;
}

@media (max-width: 991.98px) {
    .hero-aside {
        width: 100%;
    }

    .hero-side-col {
        width: 100%;
        height: auto;
        min-height: 0;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .hero-side-col .rightside-categories {
        flex-direction: row;
        flex-wrap: wrap;
        width: auto;
    }

    .hero-live-tv {
        margin-top: 0;
        width: auto;
    }

    .hero-side-col .rightside-categories__link,
    .live-tv-btn {
        width: 92px;
        height: 56px;
    }
}

@media (max-width: 767.98px) {
    .right-float-stack {
        display: none;
    }
}

/* =========================
   App-like mobile shell + speed polish
   ========================= */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

body.menu-open {
    overflow: hidden;
    touch-action: none;
}

.menu-toggle {
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    padding: 10px;
    margin: 0;
    line-height: 1;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 5px;
    box-sizing: border-box;
}

.menu-toggle span {
    pointer-events: none;
    display: block !important;
    width: 100% !important;
    height: 3px !important;
    margin: 0 !important;
    background: #fff !important;
    border-radius: 5px;
}

/* Video listing cards (thumbnail + play) */
.videos-card {
    display: block;
    height: 100%;
}

.videos-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
}

.videos-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.videos-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(1, 56, 107, 0.28);
    color: #fff;
    font-size: 1.35rem;
    transition: background .2s ease;
}

.videos-card:hover .videos-play,
.videos-card:focus-visible .videos-play {
    background: rgba(241, 0, 0, 0.45);
}

.videos-item h6 {
    font-size: 0.95rem;
    line-height: 1.35;
}

/* Mobile bottom dock — app feel */
.mobile-dock {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-dock {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10050;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
        gap: 0;
        min-height: 58px;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid rgba(1, 56, 107, 0.12);
        box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    main#main-content {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .footer {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-dock__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 48px;
        padding: 4px 2px;
        text-decoration: none !important;
        color: #64748b;
        font-size: 10px;
        font-weight: 700;
        line-height: 1.1;
        border-radius: 10px;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-dock__item i {
        font-size: 1.05rem;
        line-height: 1;
    }

    .mobile-dock__item.is-active {
        color: var(--stv-blue);
    }

    .mobile-dock__live {
        color: #fff !important;
        background: var(--stv-blue);
        margin: 0 2px;
        box-shadow: 0 4px 12px rgba(1, 56, 107, 0.28);
    }

    .mobile-dock__live-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #f10000;
        display: inline-block;
        box-shadow: 0 0 0 0 rgba(241, 0, 0, 0.7);
        animation: liveBlink 1.5s infinite;
    }

    .title-box h1,
    .title-box h2 {
        font-size: clamp(1.25rem, 5.5vw, 1.65rem) !important;
        line-height: 1.25;
    }

    .header .time {
        display: none;
    }

    .header-container {
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .header .logo img {
        width: 160px;
        max-height: none;
        height: auto;
    }

    .header .whatsapp a {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        padding: 6px 10px;
        font-size: 13px;
    }

    .news-menu .menu-toggle {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
        gap: 5px;
    }

    .footer-social a,
    .footer .social-sidebar a {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    .news-menu {
        position: sticky !important;
        top: 0;
        z-index: 1050;
    }

    .menu-scroll.show {
        max-height: min(70vh, 520px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .slider-img {
        aspect-ratio: 16 / 9;
        object-fit: cover;
        height: auto;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .flash-marquee,
    .date-time {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 575.98px) {
    .videos-section .col-6 .videos-item h6 {
        font-size: 0.8rem;
    }

    .mobile-dock__item span {
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rightside-categories__link,
    .live-tv-btn .live-dot,
    .mobile-dock__live-dot {
        transition: none !important;
        animation: none !important;
    }
}

