/* ============================================================
   Noticiaclara.com — Portal de noticias (layout clásico)
   ============================================================ */
:root {
  --nc-primary:   #047857;   /* verde periódico, más sobrio */
  --nc-primary-d: #065f46;
  --nc-accent:    #b91c1c;    /* rojo "última hora" */
  --nc-dark:      #111827;
  --nc-text:      #1f2937;
  --nc-muted:     #6b7280;
  --nc-soft:      #9ca3af;
  --nc-bg:        #ffffff;
  --nc-bg-alt:    #f7f7f5;
  --nc-card:      #ffffff;
  --nc-border:    #e5e7eb;
  --nc-line:      #1f2937;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nc-radius: 12px;
  --container: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--nc-bg);
  color: var(--nc-text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------------- Cabecera ---------------- */
.site-header { background: #fff; border-bottom: 1px solid var(--nc-border); position: sticky; top: 0; z-index: 50; }

.header-top {
  background: var(--nc-dark); color: #cbd5e1; font-size: 12.5px;
}
.header-top .container { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.header-top .date { text-transform: capitalize; letter-spacing: .2px; }
.header-top .links { display: flex; gap: 18px; }
.header-top a:hover { color: #fff; }

.nav-main { display: flex; align-items: center; gap: 22px; padding: 18px 0; }

.nc-logo { font-family: var(--serif); font-weight: 700; font-size: 30px; letter-spacing: -.5px; line-height: 1; white-space: nowrap; }
.nc-logo .a { color: var(--nc-dark); }
.nc-logo .b { color: var(--nc-primary); }
.nc-logo small { display: block; font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: 5px; color: var(--nc-muted); margin-top: 4px; }

.header-search { margin-left: auto; position: relative; width: 280px; }
.header-search input {
  width: 100%; padding: 10px 14px 10px 40px; border: 1px solid var(--nc-border);
  border-radius: 999px; background: var(--nc-bg-alt); font-size: 14px; outline: none; font-family: inherit;
}
.header-search input:focus { border-color: var(--nc-primary); background: #fff; }
.header-search .bi-search { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--nc-muted); }

.header-actions { display: flex; align-items: center; gap: 18px; }
.header-actions a { color: var(--nc-muted); font-size: 19px; position: relative; }
.header-actions a:hover { color: var(--nc-text); }
.header-actions .badge-dot { position: absolute; top: -4px; right: -6px; background: var(--nc-accent); color: #fff; font-size: 10px; font-weight: 700; min-width: 15px; height: 15px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }

.hamburger { display: none; background: none; border: 0; font-size: 24px; color: var(--nc-dark); cursor: pointer; padding: 0; }

/* Menú de categorías */
.nav-cats { border-top: 1px solid var(--nc-border); }
.nav-cats .container { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; }
.nav-cats .container::-webkit-scrollbar { display: none; }
.nav-cats a {
  padding: 13px 0; font-size: 14px; font-weight: 600; color: var(--nc-muted);
  border-bottom: 3px solid transparent; white-space: nowrap; transition: color .15s, border-color .15s;
}
.nav-cats a:hover { color: var(--nc-text); }
.nav-cats a.active { color: var(--nc-dark); border-bottom-color: var(--nc-primary); }

/* Menú móvil desplegable */
.mobile-menu { display: none; background: #fff; border-bottom: 1px solid var(--nc-border); }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 13px 24px; font-weight: 600; border-bottom: 1px solid var(--nc-border); }
.mobile-menu a:hover { background: var(--nc-bg-alt); }

/* ---------------- Títulos de sección ---------------- */
.section { margin: 40px 0; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 3px solid var(--nc-line); padding-top: 10px; margin-bottom: 22px;
}
.section-head h2 { font-size: 20px; font-weight: 800; margin: 0; letter-spacing: -.2px; }
.section-head h2 .accent { color: var(--nc-primary); }
.section-head a { font-size: 13px; font-weight: 600; color: var(--nc-primary); display: inline-flex; align-items: center; gap: 4px; }

.kicker {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .8px;
  text-transform: uppercase; color: var(--nc-primary); margin-bottom: 6px;
}

/* ---------------- Portada (lead) ---------------- */
.lead-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; padding: 30px 0 8px; }

.lead-main .lead-media { position: relative; border-radius: var(--nc-radius); overflow: hidden; aspect-ratio: 16/9; margin-bottom: 16px; }
.lead-main .lead-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.lead-main:hover .lead-media img { transform: scale(1.03); }
.lead-main h1 { font-family: var(--serif); font-size: 34px; line-height: 1.18; font-weight: 700; margin: 6px 0 12px; letter-spacing: -.3px; }
.lead-main:hover h1 { color: var(--nc-primary-d); }
.lead-main .dek { font-size: 17px; color: #374151; margin: 0 0 14px; }
.lead-main .byline { font-size: 13px; color: var(--nc-muted); display: flex; align-items: center; gap: 14px; }
.lead-main .byline img { width: 26px; height: 26px; border-radius: 50%; }

.lead-side { display: flex; flex-direction: column; }
.lead-side .side-story { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--nc-border); }
.lead-side .side-story:first-child { border-top: 0; padding-top: 0; }
.lead-side .side-story .txt { flex: 1; }
.lead-side .side-story img { width: 96px; height: 72px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.lead-side .side-story h3 { font-family: var(--serif); font-size: 16px; font-weight: 600; line-height: 1.3; margin: 4px 0 6px; }
.lead-side .side-story:hover h3 { color: var(--nc-primary-d); }
.lead-side .side-story small { color: var(--nc-muted); font-size: 12px; }

/* ---------------- Tarjeta de noticia ---------------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
.story { display: block; }
.story .story-media { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 16/10; margin-bottom: 12px; }
.story .story-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.story:hover .story-media img { transform: scale(1.04); }
.story h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.3; margin: 8px 0 8px; }
.story:hover h3 { color: var(--nc-primary-d); }
.story .dek { font-size: 14px; color: var(--nc-muted); margin: 0 0 10px; }
.story .story-meta { font-size: 12.5px; color: var(--nc-soft); display: flex; align-items: center; gap: 12px; }
.story .story-meta span { display: inline-flex; align-items: center; gap: 5px; }

.ia-tag { position: absolute; top: 10px; left: 10px; background: #4f46e5; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 4px 9px; border-radius: 6px; }

/* ---------------- Distribución principal + rail ---------------- */
.main-cols { display: grid; grid-template-columns: 1fr 320px; gap: 44px; }
.rail { display: flex; flex-direction: column; gap: 30px; position: sticky; top: 130px; align-self: start; }
.rail-box .section-head { margin-bottom: 16px; }

/* Lo más leído */
.most-read { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.most-read li { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--nc-border); align-items: flex-start; }
.most-read li:first-child { border-top: 0; padding-top: 0; }
.most-read .num { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--nc-primary); line-height: 1; min-width: 26px; }
.most-read h4 { font-size: 14.5px; font-weight: 600; line-height: 1.35; margin: 0 0 4px; }
.most-read li:hover h4 { color: var(--nc-primary-d); }
.most-read small { color: var(--nc-muted); font-size: 12px; }

/* Rail newsletter */
.rail-news { background: var(--nc-bg-alt); border: 1px solid var(--nc-border); border-radius: var(--nc-radius); padding: 22px; }
.rail-news h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; margin: 0 0 8px; }
.rail-news p { color: var(--nc-muted); font-size: 14px; margin: 0 0 14px; }
.rail-news input { width: 100%; padding: 11px 14px; border: 1px solid var(--nc-border); border-radius: 8px; margin-bottom: 10px; outline: none; font-family: inherit; }
.rail-news input:focus { border-color: var(--nc-primary); }
.rail-news .btn { width: 100%; }
.rail-news .ok { color: var(--nc-primary); font-size: 14px; font-weight: 600; }

/* ---------------- Banda newsletter ---------------- */
.newsletter-band { background: var(--nc-dark); color: #fff; padding: 48px 0; margin-top: 48px; }
.newsletter-band .inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.newsletter-band h2 { font-family: var(--serif); font-size: 26px; margin: 0 0 6px; }
.newsletter-band p { color: #cbd5e1; margin: 0; }
.newsletter-band form { display: flex; gap: 10px; flex: 1; min-width: 280px; max-width: 460px; }
.newsletter-band input { flex: 1; padding: 13px 16px; border: 0; border-radius: 8px; font-size: 14px; font-family: inherit; }

/* ---------------- Badges / categorías ---------------- */
.badge-cat {
  display: inline-block; padding: 4px 11px; border-radius: 6px; font-size: 11px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; color: #fff; background: var(--nc-primary);
}

/* ---------------- Botones ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; font-size: 14px; font-family: inherit; transition: background .15s, transform .1s, opacity .15s; }
.btn-primary { background: var(--nc-primary); color: #fff; }
.btn-primary:hover { background: var(--nc-primary-d); }
.btn-primary:active { transform: scale(.98); }
.btn-light { background: rgba(255,255,255,.15); color: #fff; }
.btn-light:hover { background: rgba(255,255,255,.28); }
.btn-light-dark { background: #f1f5f9; color: var(--nc-text); }
.btn-light-dark:hover { background: #e2e8f0; }

/* ---------------- Página de artículo ---------------- */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 36px 24px 10px; }
.article-wrap .badge-cat { margin-bottom: 16px; }
.article-title { font-family: var(--serif); font-size: 40px; font-weight: 700; line-height: 1.15; margin: 0 0 18px; letter-spacing: -.5px; }
.article-dek { font-size: 20px; color: #374151; line-height: 1.5; margin: 0 0 22px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; color: var(--nc-muted); font-size: 14px; padding: 16px 0; border-top: 1px solid var(--nc-border); border-bottom: 1px solid var(--nc-border); margin-bottom: 26px; }
.article-meta .who { display: flex; align-items: center; gap: 10px; }
.article-meta .who img { width: 38px; height: 38px; border-radius: 50%; }
.article-meta .who strong { color: var(--nc-text); }
.article-hero { width: 100%; border-radius: var(--nc-radius); margin-bottom: 28px; }
.article-body { font-size: 18px; line-height: 1.8; color: #1f2937; }
.article-body p { margin: 0 0 22px; }
.article-body strong { font-weight: 700; }
.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 30px 0; padding-top: 22px; border-top: 1px solid var(--nc-border); }
.article-tags .label { font-weight: 700; font-size: 13px; color: var(--nc-muted); }
.article-tags a { padding: 6px 14px; background: var(--nc-bg-alt); border: 1px solid var(--nc-border); border-radius: 20px; font-size: 13px; font-weight: 500; }
.article-tags a:hover { border-color: var(--nc-primary); color: var(--nc-primary-d); }
.article-share { display: flex; gap: 10px; padding-bottom: 10px; }

/* ---------------- Rejilla de categorías ---------------- */
.page-head { padding: 36px 0 8px; border-bottom: 1px solid var(--nc-border); margin-bottom: 8px; }
.page-head h1 { font-family: var(--serif); font-size: 34px; font-weight: 700; margin: 0 0 6px; display: flex; align-items: center; gap: 14px; }
.page-head .ic { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; }
.page-head p { color: var(--nc-muted); margin: 0; }

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card { border: 1px solid var(--nc-border); border-radius: var(--nc-radius); padding: 26px 20px; text-align: center; transition: box-shadow .15s, transform .15s, border-color .15s; }
.cat-card:hover { box-shadow: 0 12px 28px rgba(17,24,39,.10); transform: translateY(-3px); border-color: transparent; }
.cat-card .ic { width: 58px; height: 58px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 25px; margin-bottom: 14px; }
.cat-card h3 { font-family: var(--serif); font-size: 18px; font-weight: 700; margin: 0 0 3px; }
.cat-card small { color: var(--nc-muted); }

/* ---------------- Música ---------------- */
.music-list { display: flex; flex-direction: column; }
.track {
  display: grid; grid-template-columns: 28px 52px 40px 1fr auto auto 40px;
  align-items: center; gap: 14px; padding: 10px 8px; border-radius: 10px;
  border-bottom: 1px solid var(--nc-border); transition: background .15s;
}
.track:hover { background: var(--nc-bg-alt); }
.track.playing { background: #f5f3ff; }
.track-num { text-align: center; color: var(--nc-soft); font-size: 14px; font-weight: 600; }
.track-cover { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; cursor: pointer; }
.track-play {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--nc-primary); color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s;
}
.track-play:hover { background: var(--nc-primary-d); }
.track.playing .track-play { background: #7c3aed; }
.track-info { cursor: pointer; min-width: 0; }
.track-info h4 { font-family: var(--serif); font-size: 16px; font-weight: 600; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-info small { color: var(--nc-muted); font-size: 13px; }
.track-genre { font-size: 12px; color: var(--nc-muted); background: var(--nc-bg-alt); padding: 4px 11px; border-radius: 20px; white-space: nowrap; }
.track-dur { color: var(--nc-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.track-dl { color: var(--nc-muted); font-size: 18px; text-align: center; }
.track-dl:hover { color: var(--nc-primary); }

/* Barra del reproductor */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--nc-border); box-shadow: 0 -4px 20px rgba(15,23,42,.08);
}
.player-inner { display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; gap: 18px; padding: 12px 24px; }
.player-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-now img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; }
.player-meta { min-width: 0; }
.player-meta h5 { font-size: 14px; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-meta small { color: var(--nc-muted); font-size: 12px; }
.player-center { display: flex; flex-direction: column; gap: 6px; }
.player-controls { display: flex; align-items: center; justify-content: center; gap: 18px; }
.player-controls button { background: none; border: 0; cursor: pointer; color: var(--nc-text); font-size: 20px; display: flex; }
.player-controls button:hover { color: var(--nc-primary); }
.player-controls .main { width: 40px; height: 40px; border-radius: 50%; background: var(--nc-primary); color: #fff; align-items: center; justify-content: center; font-size: 22px; }
.player-controls .main:hover { background: var(--nc-primary-d); color: #fff; }
.player-progress { display: flex; align-items: center; gap: 10px; }
.player-progress span { font-size: 11px; color: var(--nc-muted); font-variant-numeric: tabular-nums; min-width: 32px; text-align: center; }
.player-progress input { flex: 1; }
.player-right { display: flex; align-items: center; gap: 10px; justify-content: flex-end; color: var(--nc-muted); }
.player-right input { width: 90px; }
.player-right a { color: var(--nc-muted); font-size: 18px; }
.player-right a:hover { color: var(--nc-primary); }
input[type=range] { accent-color: var(--nc-primary); height: 4px; }

@media (max-width: 768px) {
  .track { grid-template-columns: 44px 38px 1fr auto 36px; }
  .track-num, .track-genre { display: none; }
  .player-right { display: none; }
  .player-inner { grid-template-columns: 1fr 1.4fr; padding: 10px 16px; }
  .player-now img { width: 44px; height: 44px; }
}

/* ---------------- Footer ---------------- */
.site-footer { background: var(--nc-dark); color: #cbd5e1; padding: 50px 0 30px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1); }
.site-footer .nc-logo .a { color: #fff; }
.site-footer .footer-about p { font-size: 14px; margin: 14px 0 0; max-width: 320px; }
.site-footer h4 { color: #fff; font-size: 14px; font-weight: 700; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .5px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.site-footer ul a { font-size: 14px; color: #cbd5e1; }
.site-footer ul a:hover { color: #fff; }
.footer-bottom { padding-top: 22px; font-size: 13px; color: var(--nc-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-social { display: flex; gap: 14px; font-size: 18px; }

/* =====================================================
   Estilos compartidos con el panel admin (NO QUITAR)
   ===================================================== */
.nc-nav { display: flex; flex-direction: column; gap: 4px; }
.nc-nav a { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 10px; color: var(--nc-muted); font-weight: 500; transition: background .15s, color .15s; }
.nc-nav a i { font-size: 18px; }
.nc-nav a:hover { background: var(--nc-bg-alt); color: var(--nc-text); }
.nc-nav a.active { background: #ecfdf5; color: var(--nc-primary-d); font-weight: 600; }
.nc-profile { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--nc-bg-alt); border: 1px solid var(--nc-border); }
.nc-profile .avatar { width: 40px; height: 40px; border-radius: 50%; }
.nc-profile small { color: var(--nc-muted); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
  .lead-grid { grid-template-columns: 1fr; }
  .lead-main h1 { font-size: 30px; }
  .main-cols { grid-template-columns: 1fr; gap: 36px; }
  .rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .rail > * { flex: 1; min-width: 280px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .header-search { display: none; }
  .hamburger { display: block; }
  .nav-cats { display: none; }
  .article-title { font-size: 30px; }
  .article-body { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter-band .inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .news-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .lead-main h1 { font-size: 25px; }
  .article-title { font-size: 25px; }
  .footer-grid { grid-template-columns: 1fr; }
}
