/*
Theme Name: DigitalTV TZ
Theme URI: https://digitaltv.tz
Author: DigitalTV TZ
Author URI: https://digitaltv.tz
Description: A modern, high-end News Media WordPress theme for DigitalTV TZ.
Version: 1.0.0
Text Domain: digitaltvtz
*/

:root {
    /* Color Palette */
    --color-bg: #ffffff;
    --color-surface: #f9fafb;
    --color-text-main: #1a1a1a;
    --color-text-muted: #6b7280;
    --color-accent: #FF6C03;
    --color-accent-hover: #e66100;
    --color-accent-secondary: #FFDE21;
    --color-black: #000000;
    --color-white: #ffffff;
    --color-border: #e5e7eb;
    --color-red: #ef4444;
    
    /* Typography */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Borders & Shadows */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Layout */
    --max-width: 1280px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text-main);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}


a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-main);
    font-weight: 700;
    line-height: 1.2;
}

/* Sticky Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: none;
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
        gap: var(--spacing-xl);
    }
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--spacing-xs) 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.btn-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-accent);
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(255, 108, 3, 0.39);
}

.btn-live:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 108, 3, 0.5);
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.play-icon {
    font-size: 0.8rem;
}

/* Main Layout Grid */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
    padding-top: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
}

@media (min-width: 1024px) {
    .main-layout {
        grid-template-columns: 2fr 1fr;
    }
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.category-tag {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 6px 16px;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-block;
}

.header-line {
    flex-grow: 1;
    height: 4px;
    background-color: var(--color-black);
    margin-left: 0;
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.news-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    background-color: var(--color-bg);
}

@media (min-width: 640px) {
    .news-card {
        flex-direction: row;
        align-items: flex-start;
    }
}

.news-thumbnail-wrapper {
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-md);
    position: relative;
}

@media (min-width: 640px) {
    .news-thumbnail-wrapper {
        width: 320px;
    }
}

@media (min-width: 1024px) {
    .news-thumbnail-wrapper {
        width: 360px;
    }
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.news-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.news-headline {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

@media (min-width: 768px) {
    .news-headline {
        font-size: 1.5rem;
    }
}

.news-headline a {
    color: var(--color-text-main);
}

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

.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.author {
    color: var(--color-text-main);
}

.news-excerpt {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Load More Button */
.load-more-btn {
    margin-top: var(--spacing-xl);
    width: 100%;
    padding: 16px;
    background-color: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text-main);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    border-color: var(--color-text-main);
    background-color: var(--color-surface);
}

/* YouTube Playlist Sidebar */
.youtube-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.video-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.video-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.play-button {
    width: 64px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.video-card:hover .video-img {
    transform: scale(1.05);
}

.video-card:hover .play-overlay {
    background-color: rgba(0, 0, 0, 0.1);
}

.video-card:hover .play-button {
    background-color: var(--color-red); /* YouTube Red */
    transform: scale(1.1);
}

.video-title {
    font-size: 1.1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card:hover .video-title {
    color: var(--color-accent);
}

/* Sidebar Ad space */
.ad-banner {
    margin-top: var(--spacing-xl);
    width: 100%;
    height: 250px;
    background-color: var(--color-surface);
    border: 1px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Footer */
.site-footer {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-2xl);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.footer-logo {
    height: 40px;
    filter: grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.footer-copy {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Single Post Styles */
.single-post-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .single-post-title {
        font-size: 2.5rem;
    }
}

.single-post-thumbnail-wrapper {
    margin-bottom: var(--spacing-xl);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.single-post-img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-main);
    margin-bottom: var(--spacing-xl);
}

.single-post-content p {
    margin-bottom: var(--spacing-md);
}

.single-post-content h2, .single-post-content h3, .single-post-content h4 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--spacing-md) 0;
}

.single-post-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    font-style: italic;
    color: var(--color-text-muted);
    font-size: 1.25rem;
}

.single-post-tags {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.single-post-tags a {
    display: inline-block;
    background-color: var(--color-surface);
    color: var(--color-text-main);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.single-post-tags a:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.tag-label {
    font-weight: 700;
    margin-right: 8px;
    font-size: 0.9rem;
}

.single-post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--color-black);
}

.nav-prev, .nav-next {
    max-width: 48%;
}

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

.single-post-navigation a {
    font-weight: 700;
    color: var(--color-text-main);
    font-size: 1.1rem;
}

.single-post-navigation a:hover {
    color: var(--color-accent);
}

/* -------------------------------------
   New Global Publishers Layout Styles
------------------------------------- */

/* Top News Section */
.top-news-section {
    background-color: var(--color-surface);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-border);
}

.top-news-scroll-container {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar Firefox */
}

.top-news-scroll-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar Safari/Chrome */
}

.top-news-card {
    flex: 0 0 280px; /* Fixed width on mobile, scrolling */
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border);
}

.top-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
    .top-news-scroll-container {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        overflow-x: visible;
        padding-bottom: 0;
    }
    .top-news-card {
        flex: auto;
    }
}

.top-news-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.top-news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.top-news-title {
    font-size: 0.95rem;
    font-weight: 700;
    padding: var(--spacing-xs) var(--spacing-sm) var(--spacing-md) var(--spacing-sm);
    color: var(--color-text-main);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-news-card:first-child .top-news-title {
    color: #ff0000;
}

.top-news-card:hover .top-news-title {
    color: #ff0000;
}

/* Category Badges */
.cat-badge, .cat-badge-main {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #ff0000; /* Distinct Red */
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 8px;
    z-index: 10;
}

.cat-badge-main {
    top: auto;
    bottom: 0;
}

/* Update Main News List Layout */
.news-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
}

@media (min-width: 640px) {
    .news-card {
        padding: 0;
        border: none;
        background-color: transparent;
        gap: var(--spacing-lg);
    }
}

.news-thumbnail-wrapper {
    border-radius: var(--radius-sm); /* smaller radius to match */
}

.news-headline {
    font-size: 1.5rem;
    font-weight: 800;
}

.news-meta .date {
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 600;
}

.news-excerpt {
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
}

/* Read More Button */
.btn-read-more {
    display: inline-block;
    background-color: #ff0000;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 8px 16px;
    margin-top: auto; /* Push to bottom if flex */
    align-self: flex-start;
    transition: background-color 0.2s ease;
}

.btn-read-more:hover {
    background-color: #cc0000;
    color: #ffffff;
}

/* -------------------------------------
   Single Post Detail Styles
------------------------------------- */

.breadcrumb {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.breadcrumb a {
    color: #ff0000;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #cc0000;
    text-decoration: underline;
}

.breadcrumb .current {
    color: #9ca3af;
    font-weight: 500;
}

.single-meta {
    display: flex;
    gap: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.share-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--spacing-lg);
}

.share-row.bottom-share {
    margin-top: var(--spacing-2xl);
    border-top: 1px solid var(--color-border);
    padding-top: var(--spacing-lg);
}

.share-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--color-text-main);
    margin-right: var(--spacing-xs);
}

.share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff !important;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.share-icon:hover {
    opacity: 0.9;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.share-icon.fb { background-color: #3b5998; }
.share-icon.tw { background-color: #1da1f2; }
.share-icon.wa { background-color: #25d366; }

.thumbnail-caption {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: var(--spacing-xs);
    text-align: center;
}

.section-header-red {
    border-bottom: 2px solid #ff0000;
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-2xl);
}

.section-header-red h3 {
    display: inline-block;
    background-color: #ff0000;
    color: #fff;
    padding: 6px 12px;
    font-size: 1rem;
    text-transform: uppercase;
    margin: 0;
}

/* Related Posts */
.related-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 640px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.related-post-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.related-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--color-surface);
    overflow: hidden;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-post-card:hover .related-thumb img {
    transform: scale(1.05);
}

.cat-badge-small {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #ff0000;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    text-transform: uppercase;
    z-index: 2;
}

.related-post-card h4 {
    font-size: 1rem;
    line-height: 1.3;
    margin: 0;
}

.related-post-card:hover h4 {
    color: var(--color-accent);
}

.related-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* -------------------------------------
   Mobile Menu Styles
------------------------------------- */

.nav-actions {
    display: flex;
    align-items: center;
}

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--color-text-main);
    padding: 4px;
    margin-left: var(--spacing-sm);
    cursor: pointer;
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px; /* matches header height */
    left: 0;
    width: 100%;
    background-color: var(--color-bg);
    padding: var(--spacing-md);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--color-border);
    gap: var(--spacing-sm);
    z-index: 40;
}

.nav-links.is-open .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.nav-links.is-open .nav-link:last-child {
    border-bottom: none;
}

@media (max-width: 767px) {
    .live-text {
        display: none;
    }
}
