/* Kashmir TV - Public Frontend Styles */

:root {
    --brand-blue: #1e1b6e;
    --brand-blue-light: #2a2689;
    --brand-blue-dark: #12104a;
    --brand-red: #e31e24;
    --brand-red-dark: #b0151a;
    --brand-green: #4caf50;
    --brand-green-light: #6bc46e;
    --primary: var(--brand-red);
    --primary-dark: var(--brand-red-dark);
    --dark: var(--brand-blue);
    --darker: var(--brand-blue-dark);
    --light: #f8f9fa;
    --gold: var(--brand-green);
    --accent: var(--brand-green);
    --text: #333;
    --text-light: #888;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--darker);
    color: var(--light);
    line-height: 1.6;
}

/* Header */
.site-header {
    background: var(--brand-blue);
    border-bottom: 3px solid var(--brand-red);
    padding: 0.65rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(18, 16, 74, 0.35);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--light);
}

.logo-img {
    height: 56px;
    width: auto;
    display: block;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.logo-text-wrap {
    display: flex;
    flex-direction: column;
}

.logo-tagline {
    display: block;
    font-size: 0.8rem;
    color: var(--brand-green-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
}

.header-nav a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--brand-green-light);
}

.header-nav a.active {
    border-bottom-color: var(--brand-red);
}

.nav-live-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--brand-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.25rem;
}

.site-main {
    min-height: calc(100vh - 200px);
}

/* News Ticker */
.news-ticker {
    background: var(--primary);
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 36px;
}

.ticker-label {
    background: var(--primary-dark);
    padding: 0 1rem;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
    white-space: nowrap;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
}

.ticker-wrap {
    overflow: hidden;
    flex: 1;
}

.ticker-content {
    display: flex;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    padding: 0 2rem;
    font-size: 0.875rem;
}

.ticker-separator {
    color: rgba(255,255,255,0.5);
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Player Section */
.player-section {
    padding: 2rem 0;
    background: linear-gradient(180deg, var(--dark) 0%, var(--darker) 100%);
}

.player-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.live-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.live-badge.is-live {
    background: rgba(227, 30, 36, 0.92);
    color: white;
}

.live-badge.is-offline {
    background: rgba(0,0,0,0.7);
    color: #aaa;
}

.live-badge.is-replay {
    background: rgba(0,0,0,0.75);
    color: #ddd;
}

/* Home Player */
.home-player-section {
    padding: 2rem 0 1rem;
    background: linear-gradient(180deg, var(--dark) 0%, var(--darker) 100%);
}

.home-player-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.home-player-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.home-player-logo {
    height: 72px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.home-player-tagline {
    color: var(--brand-green-light);
    margin: 0;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

.offline-note {
    font-size: 0.8rem;
    color: #aaa;
    background: rgba(255,255,255,0.06);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.is-live .live-dot {
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.player-container {
    position: relative;
    background: #000;
    aspect-ratio: 16/9;
}

.player-container video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.youtube-player,
.embed-player,
.video-embed-player {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.youtube-player iframe,
.embed-player iframe,
.video-embed-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Crop outer branding chrome on fallback embed player */
.player-container--embed .video-embed-player iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 115%;
    height: 115%;
    transform: translate(-50%, -50%);
    border: none;
}

.live-badge.is-playing {
    background: rgba(30, 27, 110, 0.88);
    color: #fff;
}

.player-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-light) 100%);
    color: #666;
    position: relative;
}

.player-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary);
    opacity: 0.5;
}

.player-placeholder.offline {
    color: var(--light);
}

.poster-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.offline-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
}

.offline-overlay i {
    font-size: 3rem;
    color: var(--light);
    opacity: 0.8;
}

.offline-overlay p {
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

/* Today Schedule */
.today-schedule {
    background: var(--dark);
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.today-schedule h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.today-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.today-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    overflow: visible;
}

.today-card {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.2s, border-color 0.2s;
}

.today-card:hover {
    transform: translateY(-3px);
    border-color: rgba(227, 30, 36, 0.45);
}

.today-card .program-thumb {
    width: 100%;
    border-radius: 0;
    border: none;
}

.today-card-body {
    padding: 1rem;
}

.today-card-body .today-time {
    display: block;
    font-size: 0.75rem;
    color: var(--gold);
    margin-bottom: 0.35rem;
}

.today-card-body .today-title {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.today-card-body .today-desc {
    display: block;
    font-size: 0.8rem;
    color: #888;
    line-height: 1.4;
}

/* Schedule Section */
.schedule-section {
    padding: 4rem 0;
    background: var(--darker);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 0.75rem auto 0;
}

.schedule-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.schedule-tab {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--light);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.schedule-tab:hover,
.schedule-tab.active {
    background: var(--primary);
    border-color: var(--primary);
}

.schedule-day {
    display: none;
    max-width: 700px;
    margin: 0 auto;
}

.schedule-day.active {
    display: block;
}

.schedule-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    align-items: flex-start;
}

.program-thumb {
    flex-shrink: 0;
    width: 160px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(255,255,255,0.08);
}

.program-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.schedule-body {
    flex: 1;
    min-width: 0;
}

.schedule-time {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

.schedule-info h4 {
    margin-bottom: 0.25rem;
}

.schedule-info p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

/* About Section */
.about-section {
    padding: 4rem 0;
    background: var(--dark);
}

.about-text {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.8;
}

.contact-card {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.contact-card h4 {
    margin-bottom: 1rem;
    color: var(--gold);
}

.contact-card p {
    margin-bottom: 0.5rem;
}

.contact-card a {
    color: var(--light);
    text-decoration: none;
}

.contact-card a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--light);
    transition: all 0.2s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-light) 100%);
    padding: 3rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #aaa;
    margin: 0;
}

/* Hero (Home) */
.hero-section {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-light) 50%, var(--brand-blue-dark) 100%);
    padding: 5rem 0;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.hero-badge.is-live {
    background: rgba(227, 30, 36, 0.25);
    color: #ff8a8e;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.hero-tagline {
    color: var(--gold);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
}

.hero-desc {
    color: #aaa;
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-light {
    border-color: rgba(255,255,255,0.3);
    color: var(--light);
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--light);
    color: white;
}

/* Home Features */
.home-features {
    padding: 4rem 0;
    background: var(--darker);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--light);
    transition: all 0.25s;
}

.feature-card:hover {
    background: rgba(227, 30, 36, 0.12);
    border-color: var(--brand-red);
    transform: translateY(-4px);
    color: white;
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #888;
    font-size: 0.875rem;
    margin: 0;
}

/* Home Today */
.home-today {
    padding: 3rem 0;
    background: var(--dark);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--gold);
}

.section-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.section-link:hover {
    text-decoration: underline;
}

/* Home CTA */
.home-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--brand-blue-light) 0%, var(--brand-blue) 100%);
}

.home-cta h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.home-cta p {
    color: #aaa;
    max-width: 500px;
    margin: 0 auto;
}

/* Content Cards */
.content-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 2rem;
}

.content-card h2,
.content-card h4 {
    margin-bottom: 1rem;
    color: var(--gold);
}

.about-list {
    list-style: none;
    padding: 0;
}

.about-list li {
    padding: 0.5rem 0;
    color: #ccc;
}

.about-list i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-links a {
    color: var(--light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-links a:hover {
    color: var(--primary);
}

/* Contact Section */
.contact-section {
    padding: 3rem 0 4rem;
    background: var(--darker);
}

.contact-form .form-label {
    color: #ccc;
}

.contact-form .form-control {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--light);
}

.contact-form .form-control:focus {
    background: rgba(255,255,255,0.12);
    border-color: var(--primary);
    color: var(--light);
    box-shadow: 0 0 0 0.2rem rgba(227, 30, 36, 0.25);
}

/* Footer */
.site-footer {
    background: var(--darker);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 2.5rem 0 1.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 2rem;
    text-align: left;
    margin-bottom: 2rem;
    align-items: start;
}

.footer-brand strong {
    font-size: 1.1rem;
    color: var(--light);
}

.footer-logo {
    height: 72px;
    width: auto;
    display: block;
    margin-bottom: 0.5rem;
    border-radius: 6px;
}

.footer-brand p {
    color: #888;
    margin: 0.5rem 0 0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #888;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    text-decoration: none;
    transition: all 0.2s;
}

.footer-social a:hover {
    background: var(--primary);
}

.footer-copy {
    text-align: center;
    margin: 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Advertisements */
.ad-slot {
    padding: 1rem 0;
}

.ad-slot--global_top {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ad-slot--global_top .container,
.ad-section-inline {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.ad-slot--global_bottom {
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem 0;
}

.ad-slot--global_top,
.ad-slot--global_bottom {
    padding-left: 1rem;
    padding-right: 1rem;
}

.ad-item {
    text-align: center;
    margin-bottom: 0.75rem;
}

.ad-item:last-child {
    margin-bottom: 0;
}

.ad-link {
    display: inline-block;
    line-height: 0;
    transition: opacity 0.2s;
}

.ad-link:hover {
    opacity: 0.9;
}

.ad-banner {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    max-height: 120px;
    object-fit: contain;
}

.ad-slot--home_below_player .ad-banner,
.ad-slot--live_sidebar .ad-banner {
    max-height: 90px;
}

.ad-slot--global_top .ad-banner,
.ad-slot--global_bottom .ad-banner {
    max-height: 100px;
}

.ad-slot--about_sidebar .ad-banner {
    max-height: 250px;
    width: 100%;
    object-fit: cover;
}

.ad-html {
    max-width: 100%;
    overflow: hidden;
}

.ad-section-inline {
    padding: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .header-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding-top: 1rem;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .header-nav.open {
        display: flex;
    }

    .header-nav a {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .nav-live-badge {
        align-self: flex-start;
        margin-top: 0.5rem;
    }

    .logo-img {
        height: 44px;
    }

    .home-player-logo {
        height: 56px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .schedule-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .program-thumb {
        width: 100%;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }
}

.d-none {
    display: none !important;
}
