/*
Theme Name: NewsStream Video
Theme URI: https://example.com
Author: Custom
Description: Fox News style video news theme with responsive grid layout
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: newsstream
Tags: news, video, responsive, custom-logo
*/

/* ============================================================
   CSS VARIABLES & RESET
   ============================================================ */
:root {
  --color-header-bg: #003366;
  --color-header-accent: #0066cc;
  --color-breaking: #cc0000;
  --color-trending: #e8a000;
  --color-text-primary: #111111;
  --color-text-secondary: #555555;
  --color-text-muted: #888888;
  --color-bg-main: #f4f4f4;
  --color-bg-card: #ffffff;
  --color-bg-dark: #1a1a1a;
  --color-border: #e0e0e0;
  --color-tag-bg: #003366;
  --color-tag-text: #ffffff;
  --font-headline: 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Source Sans Pro', 'Segoe UI', Arial, sans-serif;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.10);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.18);
  --radius: 3px;
  --gap: 18px;
  --sidebar-width: 300px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg-main);
  color: var(--color-text-primary);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============================================================
   GOOGLE FONTS IMPORT
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;600;700&family=Source+Sans+Pro:wght@400;600;700&display=swap');

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  background: var(--color-header-bg);
  border-bottom: 4px solid var(--color-breaking);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 110px;
  gap: 20px;
}

.site-logo {
  flex-shrink: 0;
}

.site-logo img {
  height: 100px;
  width: auto;
  display: block;
}

.site-logo .logo-text {
  font-family: var(--font-headline);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.header-tagline {
  font-family: var(--font-headline);
  font-size: 30px;
  font-weight: 700;
  font-style: normal;
  color: #ffffff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  flex: 1;
  text-align: center;
}

.header-share {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.header-share a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.13);
  color: #fff;
  font-size: 15px;
  transition: background 0.2s;
}
.header-share a:hover { background: rgba(255,255,255,0.28); }

/* ============================================================
   BREAKING / TICKER BAR
   ============================================================ */
.ticker-bar {
  background: var(--color-breaking);
  color: #fff;
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  overflow: hidden;
  white-space: nowrap;
  height: 30px;
  display: flex;
  align-items: center;
}

.ticker-label {
  background: #800000;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 12px;
  flex-shrink: 0;
}

.ticker-content {
  display: inline-block;
  animation: ticker-scroll 40s linear infinite;
  padding-left: 100%;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.site-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* TOP ROW: trending post + sidebar — side by side */
.top-row {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
  margin-bottom: var(--gap);
}

.trending-wrap {
  flex: 1;
  min-width: 0;
}

/* Wide layout: posts grid + sidebar */
.content-area {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
}

.posts-column {
  flex: 1;
  min-width: 0;
}

.sidebar-column {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

/* ============================================================
   TRENDING / FEATURED POST (TOP)
   ============================================================ */
.trending-post {
  background: #111;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
}

.trending-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  background: var(--color-trending);
  color: #fff;
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
}

.trending-post .video-wrapper {
  position: relative;
  padding-bottom: 52%;
  background: #000;
  cursor: pointer;
}

.trending-post .video-wrapper iframe,
.trending-post .video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.trending-post .post-content {
  padding: 16px 18px 14px;
  background: #111;
}

.trending-post .post-title {
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--color-breaking);
  cursor: pointer;
  transition: opacity 0.2s;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.trending-post .post-title:hover { opacity: 0.82; }

.trending-post .post-tags .post-tag {
  background: #2a2a2a;
  color: rgba(255,255,255,0.7);
  border: 1px solid #333;
}
.trending-post .post-tags .post-tag:hover {
  background: var(--color-header-bg);
  color: #fff;
}

/* ============================================================
   POSTS GRID
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

/* ============================================================
   POST CARD
   ============================================================ */
.post-card {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.post-card .video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  background: #000;
  overflow: hidden;
}

.post-card .video-wrapper img.thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.post-card:hover .video-wrapper img.thumb { transform: scale(1.04); }

.post-card .video-wrapper iframe,
.post-card .video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: none;
}

/* Play button overlay */
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.18);
  transition: background 0.2s;
  z-index: 2;
}
.post-card:hover .play-overlay { background: rgba(0,0,0,0.32); }
.play-overlay.hidden { display: none; }

.play-btn {
  width: 52px;
  height: 52px;
  background: rgba(0,51,102,0.88);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255,255,255,0.85);
  transition: transform 0.2s, background 0.2s;
}
.post-card:hover .play-btn {
  transform: scale(1.12);
  background: var(--color-header-bg);
}
.play-btn::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #ffffff;
  margin-left: 4px;
}

.post-card .post-content {
  padding: 12px 14px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.post-category {
  display: none;
}

.post-date {
  font-size: 11px;
  color: var(--color-text-muted);
}

.post-card .post-title {
  font-family: var(--font-headline);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-primary);
  margin-bottom: 8px;
  flex: 1;
  transition: color 0.2s;
}
.post-card:hover .post-title { color: var(--color-header-bg); }

/* ============================================================
   POST CARD — EXPANDED STATE (video playing)
   ============================================================ */
.post-card.ns-expanded {
  position: fixed;
  z-index: 2000;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) !important;
  width: 90vw;
  max-width: 900px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7) !important;
  transition: none;
}

.post-card.ns-expanded .video-wrapper {
  padding-bottom: 56.25%;
}

/* Loading spinner — centered, large */
.ns-loading-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  z-index: 10;
}

.ns-loading-spinner::after {
  content: '';
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ns-spin 0.8s linear infinite;
}

@keyframes ns-spin {
  to { transform: rotate(360deg); }
}

/* Dim overlay behind expanded card */
.ns-card-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1999;
}
.ns-card-overlay.active { display: block; }
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.post-tag {
  font-size: 10px;
  font-family: var(--font-headline);
  font-weight: 600;
  color: var(--color-tag-bg);
  background: #e8f0f8;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: lowercase;
  transition: background 0.2s, color 0.2s;
}
.post-tag:hover {
  background: var(--color-tag-bg);
  color: #fff;
}
.post-tag::before { content: '#'; }

/* ============================================================
   SHARE BAR (per post)
   ============================================================ */
.post-share {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-headline);
  padding: 4px 9px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  transition: opacity 0.2s;
  text-decoration: none;
}
.share-btn:hover { opacity: 0.85; }
.share-btn.fb  { background: #1877f2; }
.share-btn.tw  { background: #1da1f2; }
.share-btn.tg  { background: #2ca5e0; }
.share-btn.wa  { background: #25d366; }
.share-btn.cp  { background: #555; }

.sidebar-column {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

.sidebar-column .widget {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--gap);
  overflow: hidden;
  width: 100%;
}

.sidebar-column .widget-title {
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-header-bg);
  padding: 8px 14px;
  border-bottom: 3px solid var(--color-breaking);
}

.ad-banner-wrap {
  padding: 0;
  text-align: center;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #f0f0f0;
  width: 100%;
}

.ad-banner-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.ad-placeholder {
  width: 100%;
  min-height: 400px;
  background: #e8e8e8;
  border: 2px dashed #bbb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 12px;
  font-family: var(--font-headline);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  gap: 8px;
}

.ad-placeholder::before {
  content: 'REKLAMA';
  font-size: 11px;
  letter-spacing: 3px;
  color: #bbb;
}

/* ============================================================
   INLINE AD (mobile / narrow — after trending post)
   ============================================================ */
.inline-ad-banner {
  display: none;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--gap);
  overflow: hidden;
  text-align: center;
  min-height: 100px;
}

/* ============================================================
   LOAD MORE
   ============================================================ */
.load-more-wrap {
  text-align: center;
  margin: 28px 0;
}

.load-more-btn {
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-header-bg);
  border: none;
  padding: 12px 36px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s;
}
.load-more-btn:hover { background: var(--color-breaking); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.75);
  padding: 28px 20px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.footer-logo img { height: 80px; width: auto; filter: brightness(0) invert(1); display: block; margin: 0 auto; }
.footer-logo .logo-text {
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
}

.footer-about {
  font-size: 13px;
  max-width: 600px;
  line-height: 1.6;
  color: rgba(255,255,255,0.65);
}

.footer-share {
  display: flex;
  gap: 10px;
}

.footer-share a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 15px;
  transition: background 0.2s;
}
.footer-share a:hover { background: var(--color-header-bg); }

.footer-copy {
  font-size: 11px;
  color: rgba(255,255,255,0.38);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 14px;
  width: 100%;
  text-align: center;
}

/* ============================================================
   VIDEO MODAL (inline — no new window)
   ============================================================ */
.video-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.video-modal-overlay.active { display: flex; }

.video-modal-box {
  background: #000;
  border-radius: 4px;
  width: 90vw;
  max-width: 900px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.video-modal-close {
  position: absolute;
  top: -38px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.video-modal-player {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.video-modal-player iframe,
.video-modal-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   RESPONSIVE — 2 columns grid
   ============================================================ */
@media (max-width: 1100px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  :root { --sidebar-width: 260px; }
}

/* ============================================================
   RESPONSIVE — 1 column
   ============================================================ */
@media (max-width: 768px) {
  .top-row { flex-direction: column; }
  .top-row .sidebar-column { width: 100%; flex-shrink: 0; }
  .content-area { flex-direction: column; }
  .content-area .sidebar-column { display: none; }
  .posts-grid { grid-template-columns: 1fr; }
  .inline-ad-banner { display: none !important; }
  .trending-post .post-title { font-size: 22px; }
  .trending-post .video-wrapper { padding-bottom: 56.25%; }
  .trending-wrap { width: 100%; }
}

@media (max-width: 480px) {
  .header-tagline { font-size: 14px; letter-spacing: 0.5px; }
  .header-inner { padding: 0 10px; height: 80px; gap: 8px; }
  .site-logo img { height: 60px; }
  .site-main { padding: 10px; }
  .trending-post .post-title { font-size: 18px; }
  .post-share { flex-wrap: wrap; }
  .header-share { display: none; }
}

/* Footer logo — neslėpti, nerodyti filtro kuris gadina */
.footer-logo img {
  height: 80px;
  width: auto;
  display: block;
  margin: 0 auto;
  filter: none;
}
