/* ===== Radio 4TLX — sitio público ===== */
:root {
  --vino: #5c1332;
  --vino-2: #7a1c44;
  --vino-oscuro: #3d0b21;
  --oro: #d4a64a;
  --oro-claro: #f3e3bd;
  --rojo-vivo: #e02424;
  --tinta: #1d1a1c;
  --gris: #6b6468;
  --linea: #e7e1e3;
  --fondo: #faf8f6;
  --blanco: #fff;
  --ancho: 1180px;
  --player-h: 68px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font: 16px/1.55 Inter, system-ui, sans-serif; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--vino-2); }
button { font: inherit; }
.wrap { max-width: var(--ancho); margin: 0 auto; padding: 0 16px; }
.ico { width: 18px; height: 18px; flex: none; }
[hidden] { display: none !important; }

/* Mostrar / ocultar según la radio esté al aire */
.on-live { display: none; }
body.is-live .on-live { display: inline; }
body.is-live .off-live { display: none; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rojo-vivo); vertical-align: middle; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Barra superior */
.topbar { background: var(--vino-oscuro); color: #e9d7de; font-size: 13px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 16px; }
.social { display: inline-flex; align-items: center; gap: 4px; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: var(--oro); }
.social a:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Cabecera */
.masthead { background: var(--vino); color: #fff; position: relative; }
.masthead-in { display: flex; align-items: center; gap: 20px; padding: 16px; }
.brand { display: flex; align-items: flex-start; color: #fff; flex: none; }
.brand:hover { color: #fff; }
.brand-word { font-family: 'Archivo Black', Impact, sans-serif; font-size: 42px; line-height: 1; letter-spacing: -2px; }
.brand-word b { color: var(--oro); font-weight: inherit; }
.brand-word small { color: var(--oro); font-size: 22px; letter-spacing: -1px; }
.brand-waves { width: 30px; height: 30px; margin: -8px 0 0 -4px; color: #fff; }
.tagline { margin: 0; color: var(--oro-claro); font-family: Merriweather, Georgia, serif; font-style: italic; font-size: 17px; flex: 1; min-width: 0; }
.search input { width: 220px; max-width: 100%; padding: 9px 14px; border-radius: 999px; border: 0; font: inherit; font-size: 14px; }

/* Botón de radio en la cabecera */
.live-btn { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border: 2px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(0,0,0,.15); color: #fff; cursor: pointer; text-align: left; flex: none; }
.live-btn:disabled { cursor: default; opacity: .7; }
.live-ico { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.15); }
.live-ico .ico { width: 20px; height: 20px; }
.live-txt { display: flex; flex-direction: column; line-height: 1.15; }
.live-txt strong { font-size: 14px; }
.live-txt small { font-size: 11.5px; color: var(--oro-claro); text-transform: uppercase; letter-spacing: .06em; }
body.is-live .live-btn { background: var(--oro); border-color: var(--oro); color: var(--vino-oscuro); box-shadow: 0 0 0 0 rgba(212,166,74,.6); animation: ring 2s infinite; }
body.is-live .live-btn .live-ico { background: var(--vino); color: #fff; }
body.is-live .live-txt small { color: var(--vino); font-weight: 700; }
body.is-live .live-btn:hover { background: #fff; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(212,166,74,.55); } 70% { box-shadow: 0 0 0 12px rgba(212,166,74,0); } 100% { box-shadow: 0 0 0 0 rgba(212,166,74,0); } }

.menu-btn { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; flex: none; }
.menu-btn .ico { width: 24px; height: 24px; }
.menu-btn .when-open, .menu-btn[aria-expanded="true"] .when-closed { display: none; }
.menu-btn[aria-expanded="true"] .when-open { display: inline-flex; }

.catnav { background: var(--vino-2); border-top: 3px solid var(--oro); }
.catnav-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.catnav-in::-webkit-scrollbar { display: none; }
.catnav a { padding: 11px 14px; color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.catnav a:hover, .catnav a.on { background: var(--oro); color: var(--vino-oscuro); }
.search-mobile, .social-mobile { display: none !important; }

main.wrap { padding-top: 28px; padding-bottom: 48px; }

.kicker { display: inline-block; color: var(--vino-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.kicker::before { content: ""; display: inline-block; width: 18px; height: 3px; background: var(--oro); vertical-align: middle; margin-right: 8px; }
time { color: var(--gris); font-size: 13px; }
.sections { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.chip { display: inline-block; padding: 2px 10px; border: 1.5px solid var(--vino-2); border-radius: 999px; color: var(--vino-2); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.chip:hover { background: var(--vino-2); color: #fff; }

/* Noticia principal */
.lead { display: grid; grid-template-columns: 1.4fr 1fr; background: var(--blanco); border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 36px; }
.lead-img img { width: 100%; height: 100%; aspect-ratio: 16/10; object-fit: cover; }
.lead-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 12px; border-left: 6px solid var(--oro); }
.lead h1 { font-family: Merriweather, Georgia, serif; font-size: 32px; line-height: 1.2; margin: 0; }
.lead p { margin: 0; color: #3d383b; }

/* Layout con barra lateral */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
.section-title { font-family: 'Archivo Black', Impact, sans-serif; font-weight: 400; font-size: 22px; color: var(--vino); margin: 0 0 20px; padding-bottom: 8px; border-bottom: 3px solid var(--vino); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 24px; }
.card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card-img { border-radius: 4px; overflow: hidden; background: var(--linea); }
.card-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.03); }
.card h3 { font-family: Merriweather, Georgia, serif; font-size: 18px; line-height: 1.3; margin: 0; }
.card p { margin: 0; color: #4a4447; font-size: 14.5px; }
.empty { color: var(--gris); }

/* Bloques por sección en la portada */
.home-block { margin-top: 48px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 3px solid var(--vino); margin-bottom: 20px; }
.block-head .section-title { border: 0; margin: 0; }
.block-head .more { font-weight: 700; font-size: 14px; color: var(--vino-2); white-space: nowrap; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 18px; }
.grid-4 .card h3 { font-size: 15.5px; }

.pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin-top: 40px; font-size: 14px; color: var(--gris); }
.pager a { padding: 8px 16px; border: 2px solid var(--vino); border-radius: 999px; color: var(--vino); font-weight: 600; }
.pager a:hover { background: var(--vino); color: #fff; }

/* Barra lateral */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.box { background: var(--blanco); border-radius: 6px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.box-live { background: var(--vino); color: #fff; text-align: center; }
.box-live img { width: 140px; margin: 0 auto 6px; border-radius: 4px; }
.box-tag { font-family: Merriweather, Georgia, serif; font-style: italic; color: var(--oro-claro); margin: 0 0 14px; font-size: 17px; }
.box-note { font-size: 13px; color: var(--oro-claro); margin: 12px 0 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--oro); color: var(--vino-oscuro); font-weight: 700; padding: 10px 20px; border-radius: 999px; border: 0; cursor: pointer; }
.btn:hover { background: #fff; color: var(--vino); }
.btn:disabled { background: rgba(255,255,255,.15); color: #e9d7de; cursor: default; }
.box-title { font-family: 'Archivo Black', Impact, sans-serif; font-weight: 400; font-size: 17px; color: var(--vino); margin: 0 0 12px; }
.follow { display: flex; flex-direction: column; gap: 8px; }
.follow a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; color: #fff; font-weight: 600; font-size: 14.5px; }
.follow a:hover { color: #fff; filter: brightness(1.1); }
.follow-facebook { background: #1877f2; }
.follow-instagram { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); }
.follow-tiktok { background: #111; }
.follow-youtube { background: #e00; }
.follow-x { background: #000; }
.follow-whatsapp { background: #25d366; }
.popular { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.popular li { counter-increment: n; display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--linea); font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.popular li::before { content: counter(n); font-family: 'Archivo Black', sans-serif; color: var(--oro); font-size: 22px; line-height: 1; min-width: 20px; }

/* Página de noticia */
.article { max-width: 760px; margin: 0 auto; }
.article h1 { font-family: Merriweather, Georgia, serif; font-size: 38px; line-height: 1.18; margin: 12px 0; overflow-wrap: break-word; }
.dek { font-size: 20px; color: #4a4447; margin: 0 0 16px; }
.byline { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); font-size: 14px; color: var(--gris); }
.article-img { margin: 24px 0; }
.article-img img { width: 100%; border-radius: 4px; }
.article-img figcaption { margin-top: 6px; font-size: 12.5px; color: var(--gris); }
.article-body { font-family: Merriweather, Georgia, serif; font-size: 18px; line-height: 1.8; margin-top: 24px; overflow-wrap: break-word; }
.article-body p { margin: 0 0 1.2em; }
.article-body h2, .article-body h3 { font-family: Inter, sans-serif; color: var(--vino); line-height: 1.3; }
.article-body a { color: var(--vino-2); text-decoration: underline; }
.article-body blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--oro); font-style: italic; color: #3d383b; }
.article-body li[data-list="bullet"] { list-style-type: disc; }
.article-body ol:has(> li[data-list="bullet"]) { padding-left: 1.5em; }
.article-body .ql-ui { display: none; }
.article-body .ql-align-center { text-align: center; }
.video { position: relative; aspect-ratio: 16/9; margin: 24px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 4px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 32px 0; padding-top: 20px; border-top: 3px solid var(--vino); font-weight: 600; }
.share a { padding: 7px 14px; border-radius: 999px; background: var(--vino); color: #fff; font-size: 14px; }
.share a:hover { background: var(--oro); color: var(--vino-oscuro); }
.related { margin-top: 48px; }
.draft-note { background: var(--oro-claro); padding: 8px 12px; border-radius: 4px; font-weight: 600; }
.notfound { text-align: center; padding: 80px 0; }

/* Pie */
.footer { background: var(--vino-oscuro); color: #e9d7de; padding: 36px 0; font-size: 14px; }
.footer-in { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.footer-logo { border-radius: 4px; }
.footer strong { color: #fff; font-size: 16px; }
.footer-tag { color: var(--oro); font-style: italic; font-family: Merriweather, Georgia, serif; }
.footer a { color: var(--oro); }
.social-footer { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.social-footer a { width: auto; height: auto; border-radius: 0; gap: 6px; font-weight: 600; }
.social-footer a:hover { background: none; }
.footer .copy { grid-column: 1 / -1; margin: 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); color: #b9a3ac; }

/* Reproductor fijo (solo visible al aire) */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--vino-oscuro); color: #fff; border-top: 3px solid var(--oro); box-shadow: 0 -4px 18px rgba(0,0,0,.25); padding-bottom: env(safe-area-inset-bottom); }
.player-in { display: flex; align-items: center; gap: 14px; height: var(--player-h); }
.player-btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--oro); color: var(--vino-oscuro); cursor: pointer; flex: none; }
.player-btn:hover { background: #fff; }
.player-btn .ico { width: 24px; height: 24px; }
.player-btn .i-pause, body.is-playing .player-btn .i-play { display: none; }
body.is-playing .player-btn .i-pause { display: inline-flex; }
.player-info { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.player-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info small { color: var(--oro-claro); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: #ff8a8a; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 24px; flex: none; }
.eq i { width: 4px; height: 6px; background: var(--oro); border-radius: 2px; }
body.is-playing .eq i { animation: eq .9s ease-in-out infinite; }
body.is-playing .eq i:nth-child(2) { animation-delay: .2s; }
body.is-playing .eq i:nth-child(3) { animation-delay: .4s; }
body.is-playing .eq i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 0%, 100% { height: 6px; } 50% { height: 24px; } }
body.is-live .footer { padding-bottom: calc(36px + var(--player-h)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== Tablet (hasta 1024px) ===== */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; gap: 36px; }
  .sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead h1 { font-size: 28px; }
  .lead-body { padding: 24px; }
  .tagline { font-size: 15px; }
  .search input { width: 180px; }
}

/* ===== Tablet vertical y móvil grande (hasta 820px) ===== */
@media (max-width: 820px) {
  .masthead-in { flex-wrap: wrap; gap: 12px 14px; padding: 12px 16px; }
  .brand { order: 1; }
  .tagline { order: 2; flex: 1 1 auto; }
  .live-btn { order: 3; }
  .menu-btn { order: 4; display: inline-flex; }
  .masthead-in > .search { display: none; }
  .brand-word { font-size: 34px; }
  .brand-word small { font-size: 18px; }

  /* Menú desplegable */
  .catnav { display: none; }
  .catnav.open { display: block; }
  .catnav-in { flex-direction: column; gap: 0; overflow: visible; padding: 6px 16px 14px; }
  .catnav a { padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 15px; }
  .catnav a:hover, .catnav a.on { background: none; color: var(--oro); }
  .search-mobile { display: block !important; margin-top: 14px; }
  .search-mobile input { width: 100%; padding: 12px 16px; font-size: 16px; }
  .social-mobile { display: flex !important; justify-content: center; gap: 12px; margin-top: 12px; }
  .social-mobile a { width: 44px; height: 44px; background: rgba(255,255,255,.1); }

  .lead { grid-template-columns: 1fr; }
  .lead-body { border-left: 0; border-top: 6px solid var(--oro); padding: 20px; }
  .lead h1 { font-size: 26px; }
  .article h1 { font-size: 32px; }
}

/* ===== Móvil (hasta 600px) ===== */
@media (max-width: 600px) {
  .topbar-in { padding: 4px 12px; }
  .masthead-in { padding: 10px 12px; }
  .brand-word { font-size: 30px; letter-spacing: -1.5px; }
  .brand-word small { font-size: 16px; }
  .brand-waves { width: 24px; height: 24px; }
  .tagline { order: 5; flex-basis: 100%; font-size: 14px; margin-top: -4px; }
  .brand { flex: 1; }
  .live-btn { padding: 4px; border-width: 2px; }
  .live-txt { display: none; }
  .live-ico { width: 36px; height: 36px; }

  main.wrap { padding-top: 18px; }
  .lead { margin: 0 -12px 28px; border-radius: 0; }
  .lead h1 { font-size: 23px; }
  .lead-body { padding: 18px 16px; }
  .layout { gap: 28px; }
  .grid { grid-template-columns: 1fr; gap: 22px; }
  .section-title { font-size: 20px; }

  /* En móvil las tarjetas de los bloques se ven como lista con miniatura */
  .grid-4 { gap: 0; }
  .grid-4 .card { display: grid; grid-template-columns: 112px 1fr; grid-template-rows: auto 1fr; column-gap: 12px; row-gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--linea); }
  .grid-4 .card-img { grid-row: 1 / 3; }
  .grid-4 .card-img img { aspect-ratio: 4/3; height: 100%; object-position: left center; }
  .grid-4 .card h3 { font-size: 15px; }
  .home-block { margin-top: 36px; }

  .sidebar { grid-template-columns: 1fr; }
  .article h1 { font-size: 26px; }
  .dek { font-size: 17px; }
  .article-body { font-size: 17px; line-height: 1.75; }
  .footer-in { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .social-footer { justify-content: center; }
  .wrap { padding: 0 12px; }
  .player-in { gap: 12px; }
  .pager { gap: 10px; }
}

/* ===== Móviles muy chicos ===== */
@media (max-width: 360px) {
  .brand-word { font-size: 26px; }
  .topbar-in > span:first-child { font-size: 12px; }
  .social a { width: 26px; height: 26px; }
}
