/* ==========================================================================
   Travely Jannah-Style News Magazine Stylesheet
   ========================================================================== */

/* Typography & Root Variables */
:root {
    --tv-news-bg: #0b0f19;
    --tv-news-card-bg: #151b26;
    --tv-news-text: #f3f4f6;
    --tv-news-text-muted: #9ca3af;
    --tv-news-border: rgba(255, 255, 255, 0.08);
    --tv-news-accent: #ff4500; /* Warm orange tint */
    --tv-news-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    
    /* Category Colors */
    --color-esim: #3b82f6;      /* Blue */
    --color-guides: #10b981;    /* Emerald */
    --color-tips: #f59e0b;      /* Amber */
    --color-news: #ef4444;      /* Red */
    --color-insights: #8b5cf6;  /* Purple */
}

.tv-news-magazine-container {
    background-color: var(--tv-news-bg);
    color: var(--tv-news-text);
    font-family: 'Inter', 'Outfit', sans-serif;
    padding: 30px 15px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: var(--tv-news-shadow);
}

/* ==========================================================================
   1. Trending News Ticker
   ========================================================================== */
.tv-news-ticker-bar {
    display: flex;
    align-items: center;
    background-color: var(--tv-news-card-bg);
    border: 1px solid var(--tv-news-border);
    border-radius: 6px;
    padding: 8px 15px;
    margin-bottom: 25px;
    overflow: hidden;
    height: 40px;
}

.tv-news-ticker-label {
    background-color: var(--tv-news-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    margin-right: 15px;
    white-space: nowrap;
    position: relative;
    letter-spacing: 0.5px;
}

.tv-news-ticker-label::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid var(--tv-news-accent);
}

.tv-news-ticker-wrap {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.tv-news-ticker-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    animation: tvTickerScroll 25s linear infinite;
}

.tv-news-ticker-list:hover {
    animation-play-state: paused;
}

.tv-news-ticker-item {
    display: inline-block;
    padding-right: 40px;
}

.tv-news-ticker-item a {
    color: var(--tv-news-text);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.tv-news-ticker-item a:hover {
    color: var(--tv-news-accent);
}

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

/* ==========================================================================
   2. Hero Featured Grid (Jannah Style: 1 Big Left, 2 Small Right)
   ========================================================================== */
.tv-news-hero-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 15px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .tv-news-hero-grid {
        grid-template-columns: 1fr;
    }
    .tv-news-grid-card {
        height: 260px;
    }
    .tv-news-grid-card.small-card {
        height: 160px;
    }
}

.tv-news-grid-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--tv-news-card-bg);
    border: 1px solid var(--tv-news-border);
    height: 380px;
}

.tv-news-grid-card.small-card {
    height: 182px;
}

.tv-news-card-img-wrap {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.tv-news-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tv-news-grid-card:hover .tv-news-card-img-wrap img {
    transform: scale(1.06);
}

.tv-news-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, rgba(11, 15, 25, 0.95) 0%, rgba(11, 15, 25, 0.4) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    box-sizing: border-box;
    z-index: 2;
}

.tv-news-grid-card.small-card .tv-news-card-overlay {
    padding: 15px;
    height: 85%;
}

.tv-news-badge {
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    color: #fff !important;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.tv-news-badge:hover {
    opacity: 0.9;
    color: #fff !important;
    text-decoration: none !important;
}

.tv-news-badge.cat-esim { background-color: var(--color-esim); }
.tv-news-badge.cat-guides { background-color: var(--color-guides); }
.tv-news-badge.cat-tips { background-color: var(--color-tips); }
.tv-news-badge.cat-news { background-color: var(--color-news); }
.tv-news-badge.cat-insights { background-color: var(--color-insights); }

.tv-news-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px 0;
}

.tv-news-card-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.tv-news-card-title a:hover {
    color: var(--tv-news-accent);
}

.tv-news-grid-card.small-card .tv-news-card-title {
    font-size: 15px;
}

.tv-news-card-meta {
    font-size: 11px;
    color: var(--tv-news-text-muted);
    display: flex;
    gap: 12px;
}

.tv-news-hero-right-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==========================================================================
   3. Main Body Structure (Magazine + Sidebar Columns)
   ========================================================================== */
.tv-news-magazine-body {
    display: grid;
    grid-template-columns: 2.8fr 1.2fr;
    gap: 25px;
}

@media (max-width: 991px) {
    .tv-news-magazine-body {
        grid-template-columns: 1fr;
    }
}

/* Category Headers (Jannah Style) */
.tv-news-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--tv-news-border);
    margin-bottom: 20px;
    padding-bottom: 5px;
}

.tv-news-section-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 7px;
    margin: 0;
    letter-spacing: 0.5px;
    color: var(--tv-news-text) !important;
}

.tv-news-section-title a {
    color: inherit !important;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
}

.tv-news-section-title a:hover {
    opacity: 0.8;
}

.tv-news-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--tv-news-accent);
}

.tv-news-section-title.color-esim::after { background-color: var(--color-esim); }
.tv-news-section-title.color-guides::after { background-color: var(--color-guides); }
.tv-news-section-title.color-tips::after { background-color: var(--color-tips); }
.tv-news-section-title.color-weather::after { background-color: var(--color-news); }
.tv-news-section-title.color-transit::after { background-color: var(--color-tips); }
.tv-news-section-title.color-policy::after { background-color: var(--color-insights); }

/* Block Layout 1: Featured + List */
.tv-news-magazine-block {
    background-color: var(--tv-news-card-bg);
    border: 1px solid var(--tv-news-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.tv-news-block-featured {
    margin-bottom: 20px;
}

.tv-news-block-featured-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.tv-news-block-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.tv-news-block-featured:hover .tv-news-block-featured-img img {
    transform: scale(1.04);
}

.tv-news-block-featured-title {
    font-size: 18px;
    font-weight: 700;
    margin: 5px 0 8px 0;
}

.tv-news-block-featured-title a {
    color: #fff;
    text-decoration: none;
}

.tv-news-block-featured-title a:hover {
    color: var(--tv-news-accent);
}

.tv-news-block-featured-excerpt {
    font-size: 13px;
    color: var(--tv-news-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* List Block Items */
.tv-news-list-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tv-news-list-item {
    display: flex;
    gap: 15px;
    border-top: 1px solid var(--tv-news-border);
    padding-top: 15px;
}

.tv-news-list-item-img {
    width: 90px;
    height: 65px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.tv-news-list-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tv-news-list-item-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tv-news-list-item-title {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.tv-news-list-item-title a {
    color: var(--tv-news-text);
    text-decoration: none;
}

.tv-news-list-item-title a:hover {
    color: var(--tv-news-accent);
}

/* Block Layout 2: 2x2 Grid */
.tv-news-block-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 576px) {
    .tv-news-block-grid {
        grid-template-columns: 1fr;
    }
}

.tv-news-grid-item {
    display: flex;
    flex-direction: column;
}

.tv-news-grid-item-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.tv-news-grid-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.tv-news-grid-item:hover .tv-news-grid-item-img img {
    transform: scale(1.05);
}

.tv-news-grid-item-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.tv-news-grid-item-title a {
    color: var(--tv-news-text);
    text-decoration: none;
}

.tv-news-grid-item-title a:hover {
    color: var(--tv-news-accent);
}

/* ==========================================================================
   4. Sidebar Widgets
   ========================================================================== */
.tv-news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.tv-news-widget {
    background-color: var(--tv-news-card-bg);
    border: 1px solid var(--tv-news-border);
    border-radius: 8px;
    padding: 20px;
}

.tv-news-widget-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 2px solid var(--tv-news-border);
    padding-bottom: 8px;
    margin-top: 0;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    position: relative;
    color: var(--tv-news-text) !important;
}

.tv-news-widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--tv-news-accent);
}

/* Popular Posts Widget */
.tv-news-popular-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tv-news-popular-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tv-news-popular-num {
    font-size: 24px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.12);
    width: 25px;
    text-align: center;
    line-height: 1;
}

.tv-news-popular-item:nth-child(1) .tv-news-popular-num { color: var(--color-news); opacity: 0.8; }
.tv-news-popular-item:nth-child(2) .tv-news-popular-num { color: var(--color-tips); opacity: 0.8; }
.tv-news-popular-item:nth-child(3) .tv-news-popular-num { color: var(--color-esim); opacity: 0.8; }

.tv-news-popular-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.tv-news-popular-title a {
    color: var(--tv-news-text);
    text-decoration: none;
}

.tv-news-popular-title a:hover {
    color: var(--tv-news-accent);
}

/* Quick Finder Widget */
.tv-news-finder-select {
    width: 100%;
    background-color: var(--tv-news-bg);
    border: 1px solid var(--tv-news-border);
    color: var(--tv-news-text);
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
    outline: none;
}

.tv-news-finder-btn {
    width: 100%;
    background-color: var(--tv-news-accent);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tv-news-finder-btn:hover {
    background-color: #e03d00;
}

/* Social Box Widget */
.tv-news-social-counter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tv-news-social-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    transition: opacity 0.2s;
}

.tv-news-social-box:hover {
    opacity: 0.9;
}

.tv-news-social-box.facebook  { background-color: #3b5998; }
.tv-news-social-box.twitter   { background-color: #1da1f2; }
.tv-news-social-box.pinterest { background-color: #bd081c; }
.tv-news-social-box.instagram { background-color: #e1306c; }

.tv-news-social-icon {
    font-size: 18px;
    margin-bottom: 5px;
}

.tv-news-social-count {
    font-size: 12px;
    font-weight: 800;
}

.tv-news-social-label {
    font-size: 9px;
    opacity: 0.7;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ==========================================================================
   0. Custom Professional News Banner
   ========================================================================== */
/* Hide default Elementor header container on News page */
.page-id-17198 .elementor-element-aab29f4,
.page-id-43468 .elementor-element-aab29f4 {
    display: none !important;
}

.tv-news-hero-banner {
    position: relative;
    background: linear-gradient(rgba(11, 15, 25, 0.8), rgba(21, 27, 38, 0.85)), 
                url('../images/news-banner-bg.png') no-repeat center center;
    background-size: cover;
    border: 1px solid var(--tv-news-border);
    border-radius: 12px;
    padding: 50px 30px;
    margin-bottom: 30px;
    text-align: center;
    overflow: hidden;
}

.tv-news-hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.tv-news-hero-banner::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.tv-news-banner-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    background: linear-gradient(to right, #fff 30%, var(--color-esim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tv-news-banner-subtitle {
    font-size: 14px;
    color: var(--tv-news-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   5. Mobile Clamping & Overflow Fixes (< 768px & < 480px)
   ========================================================================== */
@media (max-width: 768px) {
    .tv-news-grid-card {
        height: 260px !important;
    }
    .tv-news-grid-card.small-card {
        height: 160px !important;
    }
    .tv-news-hero-banner {
        padding: 35px 20px !important;
        margin-bottom: 20px !important;
    }
    .tv-news-banner-title {
        font-size: 28px !important;
    }
    .tv-news-banner-subtitle {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .tv-news-magazine-container {
        padding: 15px 10px;
    }
    .tv-news-card-title {
        font-size: 16px !important;
    }
    .tv-news-block-featured-title {
        font-size: 16px !important;
    }
    .tv-news-grid-item-title {
        font-size: 13px !important;
    }
    .tv-news-ticker-label {
        padding: 3px 6px;
        font-size: 10px;
    }
}

/* New Categories Colors */
.tv-news-section-title.color-nomad { border-left-color: #8b5cf6; }
.tv-news-section-title.color-aviation { border-left-color: #06b6d4; }
.tv-news-section-title.color-tech { border-left-color: #10b981; }
.tv-news-section-title.color-hacks { border-left-color: #f59e0b; }
.tv-news-section-title.color-scams { border-left-color: #ef4444; }
