/* ============================================================
   Cristalina TV — Folha de Estilos Principal
   Design: Editorial / Portal de Notícias
   ============================================================ */

/* Fontes carregadas via <link> em includes/head-assets.php (evita @import bloqueante) */

/* ── Variáveis ──────────────────────────────────────────────── */
:root {
  --primary:   #c0392b;
  --primary-dk:#962d22;
  --dark:      #1a1a2e;
  --gray-1:    #f8f9fa;
  --gray-2:    #e9ecef;
  --gray-3:    #6c757d;
  --text:      #212529;
  --border:    #dee2e6;
  --radius:    8px;
  --shadow:    0 2px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', sans-serif;
  --transition: .22s ease;
}

/* ── Reset / Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }

/* ── Tipografia ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); line-height: 1.25; }

/* ── Top Bar ────────────────────────────────────────────────── */
.topbar {
  background: var(--dark);
  color: #aaa;
  font-size: .78rem;
  padding: 5px 0;
  border-bottom: 3px solid var(--primary);
}
.topbar a { color: #ccc; }
.topbar a:hover { color: #fff; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar-main {
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  padding: 0;
}
.navbar-brand-logo {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary) !important;
  letter-spacing: -1px;
}
.navbar-brand-logo span { color: var(--dark); }
.navbar-main .nav-link {
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 20px 14px !important;
  color: var(--dark) !important;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
  color: var(--primary) !important;
  border-bottom-color: var(--primary);
}
.navbar-main .btn-admin {
  background: var(--primary);
  color: #fff !important;
  border-radius: 4px;
  padding: 7px 16px !important;
  margin-left: 10px;
  font-size: .8rem;
  border-bottom: none !important;
}
.navbar-main .btn-admin:hover { background: var(--primary-dk); }

/* Busca */
.search-form .form-control {
  border-radius: 20px 0 0 20px;
  border-color: var(--border);
  font-size: .85rem;
}
.search-form .btn {
  border-radius: 0 20px 20px 0;
  background: var(--primary);
  color: #fff;
  border: none;
}

/* ── Breaking News Ticker ───────────────────────────────────── */
.breaking-bar {
  background: var(--primary);
  color: #fff;
  font-size: .82rem;
  padding: 7px 0;
  overflow: hidden;
}
.breaking-bar .label {
  background: var(--dark);
  padding: 0 12px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-wrap { overflow: hidden; flex: 1; }
.ticker-move {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 50s linear infinite;
}
.ticker-move:hover { animation-play-state: paused; }
.ticker-move a { color: #fff; margin-right: 50px; }
@keyframes ticker {
  0%   { transform: translateX(5%); }
  100% { transform: translateX(-100%); }
}

/* ── Cards de Notícias ──────────────────────────────────────── */
.news-card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.news-card .card-img-top {
  height: 200px;
  object-fit: cover;
  width: 100%;
}
.news-card .card-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  line-height: 1.35;
}
.news-card .card-title a { color: var(--dark); }
.news-card .card-title a:hover { color: var(--primary); }

/* ── Card Destaque (hero) ───────────────────────────────────── */
.hero-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 400px;
}
.hero-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.hero-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 40%, transparent 100%);
}
.hero-card .content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px;
  color: #fff;
}
.hero-card .content h2 {
  font-size: 1.55rem;
  font-family: var(--font-head);
  line-height: 1.25;
}
.hero-card .content h2 a { color: #fff; }
.hero-card .content h2 a:hover { color: #ffd; }

/* ── Lista horizontal (notícias) ────────────────────────────── */
.article-row { border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 20px; }
.article-row:last-child { border-bottom: none; }
.article-row .thumb {
  width: 120px; height: 85px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.article-row h3 {
  font-size: 1.05rem;
  font-family: var(--font-head);
  margin-bottom: 4px;
}
.article-row h3 a { color: var(--dark); }
.article-row h3 a:hover { color: var(--primary); }

/* ── Badges / Categorias ────────────────────────────────────── */
.badge-cat {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 3px;
  color: #fff;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar-widget {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 28px;
}
.sidebar-widget .widget-title {
  background: var(--dark);
  color: #fff;
  font-family: var(--font-head);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 16px;
  margin: 0;
}
.sidebar-widget .widget-body { padding: 16px; }
.sidebar-most-read li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--gray-2);
}
.sidebar-most-read li:last-child { border-bottom: none; }
.sidebar-most-read .num {
  font-size: 1.6rem; font-weight: 900; color: var(--gray-2);
  font-family: var(--font-head); line-height: 1; flex-shrink: 0;
}
.sidebar-most-read .title { font-size: .875rem; font-weight: 600; line-height: 1.35; }
.sidebar-most-read .title a { color: var(--dark); }
.sidebar-most-read .title a:hover { color: var(--primary); }

/* ── Página de Artigo ───────────────────────────────────────── */
.article-header h1 {
  font-size: 2rem;
  font-family: var(--font-head);
  line-height: 1.25;
}
.article-meta { font-size: .82rem; color: var(--gray-3); }
.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
}
.article-body h2, .article-body h3 { font-family: var(--font-head); margin-top: 2em; }
.article-body p { margin-bottom: 1.4em; }
.article-body img { border-radius: 6px; margin: 1.5em auto; }
.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 12px 20px;
  background: var(--gray-1);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  margin: 2em 0;
}

/* Compartilhar */
.share-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.share-bar a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px;
  font-size: .82rem; font-weight: 600; color: #fff;
  transition: opacity .2s;
}
.share-bar a:hover { opacity: .85; color: #fff; }
.btn-whatsapp { background: #25d366; }
.btn-facebook { background: #1877f2; }
.btn-twitter  { background: #1da1f2; }
.btn-copy     { background: var(--gray-3); }

/* ── Paginação ──────────────────────────────────────────────── */
.pagination .page-link {
  color: var(--primary);
  border-color: var(--border);
  font-size: .875rem;
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--dark);
  color: #aaa;
  font-size: .875rem;
  margin-top: 60px;
}
footer a { color: #ccc; }
footer a:hover { color: #fff; }
footer .footer-brand { font-family: var(--font-head); font-size: 1.4rem; color: #fff; }
footer hr { border-color: rgba(255,255,255,.1); }
footer .copy { color: #666; font-size: .78rem; }

/* ── Utilitários ────────────────────────────────────────────── */
.text-primary-ct { color: var(--primary) !important; }
.bg-primary-ct   { background: var(--primary) !important; }
.divider-red { border-top: 3px solid var(--primary); margin: 0 0 20px; }
.section-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary);
  margin-bottom: 20px;
}

/* ── Skeleton loading ───────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg,#eee 25%,#f5f5f5 50%,#eee 75%); background-size: 200%; animation: shimmer 1.4s infinite; border-radius: 4px; }
@keyframes shimmer { 0%{background-position:200%} 100%{background-position:-200%} }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 767px) {
  .article-header h1 { font-size: 1.45rem; }
  .hero-card { min-height: 260px; }
  .hero-card .content h2 { font-size: 1.15rem; }
  .article-row .thumb { width: 90px; height: 65px; }
}
