/*
Theme Name: TeleviziaTv
Theme URI: https://televiziatv.com
Author: TeleviziaTv
Author URI: https://televiziatv.com
Description: Georgian TV Live Streaming WordPress Theme - Dark design optimized for AdSense and SEO
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: televiziatv
Tags: dark, streaming, tv, georgian, live, adsense
*/

/* ═══════════════════════════════════════════
   RESET & ROOT
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:    #e63946;
  --bg:     #0d0d1c;
  --bg2:    #111122;
  --bg3:    #161628;
  --bg4:    #1e1e32;
  --border: #222240;
  --text:   #ffffff;
  --muted:  #888899;
  --dim:    #555566;
  --gold:   #f4a522;
  --green:  #4caf50;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,.4);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; }

/* ═══════════════════════════════════════════
   LAYOUT WRAPPER
═══════════════════════════════════════════ */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ═══════════════════════════════════════════
   AD ZONES  (ცარიელი AdSense-ისთვის)
═══════════════════════════════════════════ */
.ad-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  overflow: hidden;
}
/* ადსენსი ჩამოსვლის შემდეგ ეს კლასი ამოღება/hide */
.ad-zone.ad-label::before { content: 'Advertisement'; }

.ad-zone-leaderboard   { width: 100%; height: 90px; margin: 10px 0; }
.ad-zone-banner        { width: 100%; height: 60px; margin: 8px 0; }
.ad-zone-rectangle     { width: 300px; height: 250px; }
.ad-zone-half-page     { width: 300px; height: 600px; }
.ad-zone-in-feed       { width: 100%; height: 100px; margin: 16px 0; grid-column: 1 / -1; }
.ad-zone-in-article    { width: 100%; height: 90px; margin: 20px 0; }

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
#site-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}
.site-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: .5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo span { color: #fff; }
.site-logo img { height: 38px; width: auto; }

/* Primary Nav */
#primary-nav { display: flex; align-items: center; gap: 4px; }
#primary-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 6px;
  transition: all .2s;
  white-space: nowrap;
}
#primary-nav a:hover,
#primary-nav a.current-menu-item { color: #fff; background: rgba(255,255,255,.06); }

/* Search */
.header-search {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color .2s;
}
.header-search:focus-within { border-color: var(--red); }
.header-search input {
  background: none; border: none; outline: none;
  color: #fff; font-size: 13px; width: 160px;
}
.header-search input::placeholder { color: var(--dim); }
.header-search svg { color: var(--dim); flex-shrink: 0; }

/* Mobile menu btn */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1;
}

/* Mobile nav */
#mobile-nav {
  display: none;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  flex-direction: column;
  gap: 2px;
}
#mobile-nav.is-open { display: flex; }
#mobile-nav a {
  padding: 10px 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 6px;
  transition: all .2s;
}
#mobile-nav a:hover { color: #fff; background: rgba(255,255,255,.05); }

/* Header Ad Strip */
.header-ad-strip {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 6px 20px;
  display: flex;
  justify-content: center;
}

/* ═══════════════════════════════════════════
   HERO BANNER
═══════════════════════════════════════════ */
.site-hero {
  background: linear-gradient(135deg, #111130 0%, #0f2040 55%, #0d0d1c 100%);
  padding: 32px 0 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero-flag { font-size: 36px; margin-bottom: 10px; line-height: 1; }
.hero-title { font-size: 26px; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.hero-title em { color: var(--red); font-style: normal; }
.hero-desc {
  font-size: 14px; color: var(--muted);
  max-width: 540px; margin: 0 auto 20px;
  line-height: 1.7;
}
.hero-stats { display: flex; justify-content: center; gap: 36px; flex-wrap: wrap; }
.stat-n { font-size: 20px; font-weight: 700; color: var(--red); }
.stat-l { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* ═══════════════════════════════════════════
   CATEGORY FILTER BAR
═══════════════════════════════════════════ */
.cat-bar {
  background: #0c0c1e;
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--muted);
  transition: all .2s;
}
.cat-btn:hover { color: #fff; background: var(--bg4); }
.cat-btn.is-active { background: var(--red); color: #fff; border-color: var(--red); }

/* ═══════════════════════════════════════════
   MAIN CONTENT AREA
═══════════════════════════════════════════ */
#main-content { flex: 1; padding: 20px 0 40px; }

.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* ═══════════════════════════════════════════
   CHANNEL GRID
═══════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title { font-size: 14px; font-weight: 600; color: var(--muted); }
.section-count { font-size: 12px; color: var(--dim); }

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

/* ═══════════════════════════════════════════
   CHANNEL CARD
═══════════════════════════════════════════ */
.channel-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.channel-card:hover {
  transform: translateY(-3px);
  border-color: var(--red);
  box-shadow: 0 6px 20px rgba(230,57,70,.15);
}
.channel-card a { display: contents; }

.card-thumb {
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-thumb img {
  width: 75%;
  height: 75%;
  object-fit: contain;
  transition: transform .3s;
}
.channel-card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb .thumb-fallback {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}
.live-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: .8px;
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.45} }

.card-body {
  padding: 10px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-cat {
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 6px;
}
.card-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.card-rating { font-size: 11px; color: var(--gold); margin-bottom: 8px; }
.card-rating span { color: var(--dim); margin-left: 3px; }
.card-btn {
  display: block;
  width: 100%;
  padding: 7px;
  background: rgba(230,57,70,.1);
  border: 1px solid rgba(230,57,70,.25);
  border-radius: 7px;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: background .2s;
}
.card-btn:hover { background: rgba(230,57,70,.25); }

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
#sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 70px;
}
.sidebar-widget {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.widget-title {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--red);
}
.widget-body { padding: 14px; }

/* Popular list */
.popular-list { list-style: none; }
.popular-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.popular-list li:last-child { border-bottom: none; padding-bottom: 0; }
.popular-num { font-size: 11px; color: var(--dim); width: 16px; flex-shrink: 0; }
.popular-logo { width: 32px; height: 32px; border-radius: 6px; object-fit: contain; background: var(--bg2); padding: 3px; flex-shrink: 0; }
.popular-info { flex: 1; min-width: 0; }
.popular-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.popular-cat { font-size: 10px; color: var(--dim); }
.popular-badge { font-size: 9px; background: var(--red); color: #fff; padding: 1px 6px; border-radius: 8px; flex-shrink: 0; }

/* Categories widget */
.cat-list { list-style: none; }
.cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}
.cat-list li:last-child a { border-bottom: none; }
.cat-list a:hover { color: #fff; }
.cat-count {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 10px;
  color: var(--dim);
}

/* ═══════════════════════════════════════════
   SINGLE CHANNEL PAGE
═══════════════════════════════════════════ */
.channel-page-wrap { padding: 20px 0 40px; }

.breadcrumb {
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--red); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--dim); }

.player-box {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  position: relative;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #000;
}
.play-icon {
  font-size: 70px;
  cursor: pointer;
  transition: transform .2s, opacity .2s;
  line-height: 1;
}
.play-icon:hover { transform: scale(1.08); opacity: .9; }
.player-channel-name { font-size: 16px; font-weight: 600; }
.player-hint { font-size: 12px; color: var(--dim); }
.player-frame { width: 100%; height: 100%; border: none; display: none; }

.channel-meta-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.channel-logo-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
}
.channel-logo-card img { max-width: 130px; max-height: 90px; object-fit: contain; }
.channel-info-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.channel-info-card h1 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge {
  display: inline-block;
  background: rgba(230,57,70,.12);
  border: 1px solid rgba(230,57,70,.25);
  color: var(--red);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
}
.channel-description { font-size: 13px; color: var(--muted); line-height: 1.8; }

.related-section { margin-top: 28px; }
.related-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

/* ═══════════════════════════════════════════
   ABOUT / STATIC PAGES
═══════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, #111130, #0f2040);
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.page-hero h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.page-hero h1 em { color: var(--red); font-style: normal; }
.page-hero p { font-size: 13px; color: var(--muted); }

.static-content { max-width: 760px; }
.static-content h2 { font-size: 18px; font-weight: 600; margin: 28px 0 10px; }
.static-content p { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 14px; }
.static-content ul { padding-left: 20px; margin-bottom: 14px; }
.static-content li { font-size: 14px; color: var(--muted); line-height: 1.8; }
.static-content a { color: var(--red); }
.static-content a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════
   ABOUT CARDS
═══════════════════════════════════════════ */
.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.about-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.about-card h3 { font-size: 13px; font-weight: 600; color: var(--red); margin-bottom: 6px; }
.about-card p { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ═══════════════════════════════════════════
   FAQ
═══════════════════════════════════════════ */
.faq-list { margin-top: 20px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.faq-a { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
#site-footer {
  background: #07071a;
  border-top: 1px solid #1a1a30;
  padding: 32px 0 16px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
.footer-brand .site-logo { display: block; margin-bottom: 10px; font-size: 18px; }
.footer-brand p { font-size: 12px; color: var(--dim); line-height: 1.7; }
.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--red);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; }
.footer-col li { padding: 3px 0; }
.footer-col a { font-size: 12px; color: var(--dim); transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #111125;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p { font-size: 11px; color: #333344; }

/* ═══════════════════════════════════════════
   CONTACT FORM
═══════════════════════════════════════════ */
.contact-form { max-width: 580px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--red); }
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-primary {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
}
.btn-primary:hover { background: #c62828; }

/* ═══════════════════════════════════════════
   WORDPRESS DEFAULTS
═══════════════════════════════════════════ */
.wp-block-image { margin: 20px 0; }
.aligncenter { text-align: center; }
.alignleft { float: left; margin: 0 20px 10px 0; }
.alignright { float: right; margin: 0 0 10px 20px; }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .content-layout { grid-template-columns: 1fr; }
  #sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  #primary-nav, .header-search { display: none; }
  .mobile-menu-btn { display: block; }
  .hero-title { font-size: 20px; }
  .hero-stats { gap: 20px; }
  .channels-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .channel-meta-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ad-zone-rectangle, .ad-zone-half-page { width: 100%; }
}

@media (max-width: 480px) {
  .channels-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
}
