/*
Theme Name:  Krasno
Theme URI:   https://krasno.cl
Description: Portal de Noticias de la Araucanía — IA + periodismo
Author:      Krasno
Version:     2.2
*/

/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --crimson: #7B1A2C;
  --navy:    #1B3A6B;
  --dark:    #111111;
  --mid:     #444444;
  --muted:   #888888;
  --border:  #E2E2E2;
  --bg:      #EAEAEA;
  --white:   #FFFFFF;
  --serif:   'Georgia', 'Times New Roman', serif;
  --sans:    'Helvetica Neue', Arial, sans-serif;
  --player-h: 90px;
}

html { font-size: 16px; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--dark);
  padding-bottom: var(--player-h);
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ─── Topbar ────────────────────────────────────────────── */
.k-topbar {
  background: var(--dark);
  color: #ccc;
  font-size: 11px;
  letter-spacing: .5px;
  padding: 6px 0;
  text-align: center;
}
.k-topbar span { margin: 0 16px; }
.k-topbar .live {
  color: var(--crimson);
  font-weight: 700;
  cursor: pointer;
}
.k-topbar .live::before {
  content: '●';
  animation: blink 1.2s infinite;
  margin-right: 5px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }

/* ─── Header ────────────────────────────────────────────── */
.k-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 0 16px;
}
.k-header .inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.k-logo img { height: 270px; width: auto; background: transparent; mix-blend-mode: multiply; }
.k-logo-text {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--dark);
}
.k-logo-text span { color: var(--crimson); }
.k-header-right {
  display: flex; align-items: center; gap: 24px;
  font-size: 12px; color: var(--muted);
  text-align: right; line-height: 1.5;
}

/* ─── Navigation ────────────────────────────────────────── */
.k-nav {
  background: var(--white);
  border-bottom: 2px solid var(--dark);
  position: sticky; top: 0; z-index: 200;
}
.k-nav .inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 0;
  overflow-x: auto;
}
.k-nav a {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--mid);
  padding: 13px 18px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.k-nav a:hover  { color: var(--dark); }
.k-nav a.active { color: var(--dark); border-bottom-color: var(--crimson); }

/* ─── Wrapper ───────────────────────────────────────────── */
.k-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ─── Hero ──────────────────────────────────────────────── */
.k-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--border);
}
.k-hero-img {
  position: relative;
  background: #ddd;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.k-hero-img img { width:100%; height:100%; object-fit:cover; }
.k-hero-img .placeholder {
  width:100%; height:100%;
  background: linear-gradient(160deg,#e8e6e2,#d4d1cc);
  display:flex; align-items:center; justify-content:center;
  color:#bbb; font-size:48px;
}
.k-hero-img .cat-pill {
  position:absolute; top:16px; left:16px;
}

.k-hero-body { display:flex; flex-direction:column; justify-content:center; gap:16px; }
.k-hero-kicker {
  font-size: 13px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--crimson);
}
.k-hero-title {
  font-family: var(--serif);
  font-size: 48px; font-weight: 700; line-height: 1.15;
  color: var(--navy);
}
.k-hero-title a { color: var(--navy); }
.k-hero-title a:hover { color: var(--crimson); }
.k-hero-excerpt {
  font-size: 20px; color: var(--mid); line-height: 1.65;
}
.k-hero-meta {
  display:flex; align-items:center; gap:12px;
  padding-top:16px; border-top:1px solid var(--border);
  flex-wrap:wrap;
}
.k-time  { font-size:12px; color:var(--muted); }
.k-fuente{ font-size:12px; color:var(--muted); }

/* ─── Botón Audio ───────────────────────────────────────── */
.btn-audio {
  display:inline-flex; align-items:center; gap:7px;
  background: var(--dark); color: var(--white);
  border: none; border-radius: 2px; cursor: pointer;
  font-size:10px; font-weight:700; letter-spacing:1px;
  text-transform:uppercase; padding:8px 14px;
  transition:background .15s;
}
.btn-audio:hover { background: var(--crimson); }
.btn-audio svg { width:12px; height:12px; flex-shrink:0; }

/* ─── Section header ────────────────────────────────────── */
.k-section { margin: 36px 0; }
.k-section-head {
  display:flex; align-items:baseline; justify-content:space-between;
  border-top: 2px solid var(--navy);
  padding-top: 12px; margin-bottom: 24px;
}
.k-section-head h2 {
  font-size:11px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--navy);
}
.k-section-head .ver-todas {
  font-size:11px; font-weight:700; letter-spacing:1px;
  text-transform:uppercase; color:var(--crimson);
}
.k-section-head .ver-todas:hover { text-decoration:underline; }

/* ─── Grid ──────────────────────────────────────────────── */
.k-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }

.k-card { display:flex; flex-direction:column; gap:10px; background:var(--white); border-radius:4px; padding:0 0 14px; box-shadow:0 1px 4px rgba(0,0,0,.08); overflow:hidden; }
.k-card-img {
  aspect-ratio:16/9; background:#e0ddd8; overflow:hidden;
  position:relative;
}
.k-card-img img { width:100%; height:100%; object-fit:cover; }
.k-card-img .placeholder {
  width:100%; height:100%;
  background:linear-gradient(160deg,#e8e6e2,#d4d1cc);
  display:flex; align-items:center; justify-content:center;
  color:#bbb; font-size:32px;
}
.k-card-kicker, .k-card-title, .k-card-excerpt, .k-card-foot { padding-left:14px; padding-right:14px; }
.k-card-kicker {
  font-size:12px; font-weight:700; letter-spacing:1.5px;
  text-transform:uppercase; color:var(--crimson);
  margin-top:4px;
}
.k-card-title {
  font-family:var(--serif); font-size:22px;
  font-weight:700; line-height:1.3; color:var(--navy);
}
.k-card-title a { color:var(--navy); }
.k-card-title a:hover { color:var(--crimson); }
.k-card-excerpt { font-size:16px; color:var(--mid); line-height:1.55; flex:1; }
.k-card-foot {
  display:flex; align-items:center; justify-content:space-between;
  padding-top:8px; border-top:1px solid var(--border);
}
.k-card-time { font-size:11px; color:var(--muted); }

/* ─── Category pill ─────────────────────────────────────── */
.k-pill {
  display:inline-block; font-size:9px; font-weight:700;
  letter-spacing:1px; text-transform:uppercase;
  padding:3px 8px; border:1px solid currentColor; border-radius:1px;
}
.k-pill-Seguridad  { color:#C0392B; }
.k-pill-Vialidad   { color:#D35400; }
.k-pill-Salud      { color:#1A7A50; }
.k-pill-Economía   { color:#1A5EA8; }
.k-pill-Política   { color:#5B2C8E; }
.k-pill-Cultura    { color:#7D6608; }
.k-pill-Servicios  { color:#555;    }
.k-pill-Emergencias{ color:#922B21; }
.k-pill-Otro       { color:#888;    }

/* ─── Stats ─────────────────────────────────────────────── */
.k-stats {
  background: var(--dark); color: var(--white);
  padding: 40px 0; margin: 40px 0 0;
}
.k-stats .inner {
  max-width:1160px; margin:0 auto; padding:0 24px;
  display:grid; grid-template-columns:repeat(4,1fr);
  gap:20px; text-align:center;
}
.stat-n { font-family:var(--serif); font-size:44px; font-weight:700; color:var(--crimson); }
.stat-l { font-size:10px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:#aaa; margin-top:6px; }

/* ─── Footer ────────────────────────────────────────────── */
.k-footer {
  background:var(--dark); color:#777;
  border-top:1px solid #222; padding:28px 0;
}
.k-footer .inner {
  max-width:1160px; margin:0 auto; padding:0 24px;
  display:flex; align-items:center; justify-content:space-between;
}
.k-footer-logo { font-family:var(--serif); font-size:20px; font-weight:700; color:var(--white); }
.k-footer-logo span { color:var(--crimson); }
.k-footer-info { font-size:11px; letter-spacing:.5px; text-transform:uppercase; }

/* ─── Radio Player (fixed bottom) ───────────────────────── */
.k-player {
  position:fixed; bottom:0; left:0; right:0; z-index:999;
  background:var(--dark); color:var(--white);
  height:var(--player-h); min-height:var(--player-h); max-height:var(--player-h);
  display:flex; align-items:center; flex-wrap:nowrap; overflow:hidden;
  border-top:3px solid var(--crimson);
  padding:0 24px; gap:24px;
  box-sizing:border-box;
}
.player-live {
  display:flex; align-items:center; gap:8px;
  font-size:10px; font-weight:700; letter-spacing:1.5px;
  text-transform:uppercase; color:var(--crimson); flex-shrink:0;
}
.player-live .dot {
  width:8px; height:8px; border-radius:50%;
  background:var(--crimson); animation:blink 1.2s infinite;
}
.player-btn {
  width:40px; height:40px; border-radius:50%;
  background:var(--crimson); border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:var(--white); flex-shrink:0; transition:background .15s;
}
.player-btn:hover { background:#5a1320; }
.player-info   { flex:1; min-width:0; overflow:hidden; }
.player-song   { font-size:26px; font-weight:700; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.2; }
.player-artist { font-size:22px; color:#aaa; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.2; }
.player-badge  { font-size:9px; letter-spacing:1.5px; text-transform:uppercase; color:#555; border:1px solid #333; padding:3px 7px; border-radius:3px; flex-shrink:0; margin-left:auto; }
.player-vol    { display:flex; align-items:center; gap:6px; flex-shrink:0; color:#666; }
.player-vol input[type=range] { width:70px; accent-color:var(--crimson); cursor:pointer; }
.player-close  { background:none; border:none; color:#555; cursor:pointer; font-size:22px; line-height:1; padding:4px 8px; flex-shrink:0; transition:color .15s; }
.player-close:hover { color:#fff; }

/* ─── Radio Hero (Monocle style) ─────────────────────────── */
.k-radio-hero {
  background: #111;
  border-bottom: 3px solid var(--crimson);
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-right: -24px;
  margin-bottom: 40px;
}
.k-radio-hero-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 44px 40px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 40px;
}
.k-radio-left  { flex: 1; min-width: 0; }
.k-radio-right { flex-shrink: 0; position: relative; width: 200px; height: 200px; display: flex; align-items: flex-end; }

.k-radio-onair {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--crimson);
  margin-bottom: 18px;
}
.onair-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--crimson); animation: blink 1.2s infinite; flex-shrink: 0;
}
.k-radio-station {
  font-family: var(--serif);
  font-size: 13px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: #555;
  margin-bottom: 20px;
}
.k-radio-song {
  font-family: var(--serif);
  font-size: 36px; font-weight: 700; line-height: 1.2;
  color: #fff; margin-bottom: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.k-radio-artist {
  font-size: 16px; color: #888;
  margin-bottom: 32px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.k-radio-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--crimson); color: #fff;
  border: none; cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; padding: 14px 28px;
  transition: background .15s;
}
.k-radio-btn:hover { background: #5a1320; }

/* Album art */
.k-radio-right img {
  width: 200px; height: 200px; object-fit: cover;
  display: none; border-radius: 2px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  position: absolute; top: 0; left: 0; z-index: 2;
}

/* Ecualizador */
.k-equalizer {
  display: flex; align-items: flex-end; gap: 4px;
  width: 200px; height: 200px;
  padding: 16px 8px 0;
}
.k-eq-bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(to top,
    #00e676 0%, #69f0ae 40%, #ffee58 70%, #ff7043 88%, #e53935 100%);
  height: 15%;
  animation: eq-bounce var(--dur, 0.6s) var(--del, 0s) ease-in-out infinite alternate;
  transform-origin: bottom;
}
@keyframes eq-bounce {
  from { height: 8%;  opacity: .7; }
  to   { height: var(--h, 70%); opacity: 1; }
}
.k-equalizer.paused .k-eq-bar {
  animation-play-state: paused;
  height: 8%; opacity: .3;
}

/* Player album art (fixed bar) */
.player-art {
  width: 56px; height: 56px; object-fit: cover;
  border-radius: 4px; flex-shrink: 0; display: none;
}

/* ─── Single ────────────────────────────────────────────── */
.k-single { max-width:740px; margin:40px auto; padding:0 24px 60px; }
.k-single-kicker { font-size:13px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--crimson); margin-bottom:12px; }
.k-single-title  { font-family:var(--serif); font-size:52px; font-weight:700; line-height:1.15; margin-bottom:24px; color:var(--navy); }
.k-single-meta   { display:flex; gap:16px; align-items:center; flex-wrap:wrap; padding-bottom:20px; border-bottom:1px solid var(--border); margin-bottom:24px; }
.k-single-audio  { background:var(--white); border:1px solid var(--border); border-left:4px solid var(--crimson); padding:20px; margin-bottom:28px; border-radius:2px; }
.k-single-audio .audio-label { font-size:10px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--muted); margin-bottom:10px; }
.k-single-audio .audio-text  { font-size:14px; line-height:1.7; color:var(--mid); margin-bottom:14px; }
.k-single-body   { font-size:20px; line-height:1.8; color:var(--mid); }
.k-single-body p { margin-bottom:22px; }
.k-single-source { margin-top:28px; padding-top:16px; border-top:1px solid var(--border); font-size:12px; color:var(--muted); }
.k-single-source a { color:var(--crimson); }

/* ─── Responsive ────────────────────────────────────────── */
@media(max-width:900px){
  .k-hero  { grid-template-columns:1fr; }
  .k-grid  { grid-template-columns:repeat(2,1fr); }
  .k-stats .inner { grid-template-columns:repeat(2,1fr); }
}
@media(max-width:700px){
  .k-radio-hero-inner { flex-direction: column; padding: 32px 20px; gap: 24px; }
  .k-radio-right { width: 140px; height: 140px; }
  .k-radio-right img { width: 140px; height: 140px; }
  .k-radio-art-placeholder { width: 140px; height: 140px; }
  .k-radio-song { font-size: 26px; }
}
@media(max-width:600px){
  .k-grid  { grid-template-columns:1fr; }
  .k-topbar span.k-hide { display:none; }
  .k-single-title { font-size:36px; }
  .k-card-title { font-size:18px; }
}
