/* =====================================================
   Buenos Aires Noticias — Main Stylesheet
   Estilo: limpio, editorial, blanco y rojo
   ===================================================== */

/* ── Variables ─────────────────────────────────────── */
:root {
  --red:       #E30613;
  --red-dark:  #b80010;
  --red-light: #ff1a2a;
  --black:     #0d0d0d;
  --gray-900:  #1a1a1a;
  --gray-800:  #2d2d2d;
  --gray-600:  #666666;
  --gray-400:  #999999;
  --gray-200:  #e5e5e5;
  --gray-100:  #f5f5f5;
  --white:     #ffffff;
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --max-w:     1240px;
  --radius:    4px;
  --shadow:    0 2px 12px rgba(0,0,0,.08);
  --shadow-md: 0 4px 24px rgba(0,0,0,.12);
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--black); background: var(--white); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Container ─────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }

/* ── Publicidad Header ─────────────────────────────── */
.pub-header { background: var(--gray-100); text-align: center; padding: 8px 16px; border-bottom: 1px solid var(--gray-200); }
.pub-header img { max-height: 90px; margin: 0 auto; }
.pub-label { display: block; font-size: 10px; color: var(--gray-400); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }

/* ── Header ────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); box-shadow: 0 1px 0 var(--gray-200); }

.header-top { background: var(--black); color: var(--white); font-size: 12px; padding: 6px 0; }
.header-top-inner { display: flex; justify-content: space-between; align-items: center; }
.date-display { color: var(--gray-400); text-transform: capitalize; }
.social-links { display: flex; gap: 16px; }
.social-links a { color: var(--gray-400); transition: color .2s; }
.social-links a:hover { color: var(--red); }

.header-main { padding: 12px 0; }
.header-main .container { display: flex; align-items: center; justify-content: space-between; }

.site-logo { display: flex; align-items: center; gap: 10px; }
.logo-ban {
  background: var(--red);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 28px;
  padding: 4px 10px;
  letter-spacing: -1px;
  line-height: 1;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-title { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--black); }
.logo-sub { font-size: 11px; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: .15em; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--black); transition: .3s; }

/* ── Navigation ────────────────────────────────────── */
.main-nav { background: var(--black); border-top: 3px solid var(--red); }
.nav-list { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.nav-list::-webkit-scrollbar { display: none; }
.nav-list a {
  display: block;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 12px 16px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-list a:hover, .nav-list a.active { color: var(--red); border-bottom-color: var(--red); }

/* ── Breaking Ticker ───────────────────────────────── */
.breaking-bar { background: var(--red); color: var(--white); padding: 8px 0; overflow: hidden; }
.breaking-bar .container { display: flex; align-items: center; gap: 12px; }
.breaking-label { font-weight: 700; font-size: 11px; letter-spacing: .12em; white-space: nowrap; background: var(--white); color: var(--red); padding: 2px 8px; flex-shrink: 0; }
.ticker-wrap { flex: 1; overflow: hidden; }
.ticker { display: flex; gap: 0; animation: ticker 40s linear infinite; }
.ticker span { white-space: nowrap; padding-right: 48px; font-size: 13px; font-weight: 400; }
.ticker span::before { content: '●'; margin-right: 8px; opacity: .7; }
.ticker a { color: var(--white); }
.ticker a:hover { text-decoration: underline; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── Category Badges ───────────────────────────────── */
.cat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--red);
  color: var(--white);
  margin-bottom: 8px;
}
.cat-ciudad-de-buenos-aires { background: var(--red); }
.cat-politica                { background: #1a1a2e; }
.cat-economia                { background: #16213e; }
.cat-policiales              { background: #0f3460; }
.cat-deportes                { background: var(--red); }
.cat-sociedad                { background: #533483; }
.cat-mundo                   { background: #2b4162; }
.cat-espectaculos            { background: #e94560; }
.cat-provincia-ba            { background: #0d47a1; }
.cat-cultura                 { background: #6a1b9a; }

/* ── Main Layout ───────────────────────────────────── */
.site-main { padding: 24px 0 48px; }
.content-grid { display: grid; grid-template-columns: 1fr 300px; gap: 32px; }

/* ── Hero Article ──────────────────────────────────── */
.hero-article { margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; }
.hero-img-link { display: block; position: relative; }
.hero-img-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--gray-200); }
.hero-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.hero-article:hover .hero-img-wrap img { transform: scale(1.02); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 50%, transparent 100%); }
.hero-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px; }
.hero-title { font-family: var(--font-head); font-size: clamp(22px, 3vw, 34px); font-weight: 900; color: var(--white); line-height: 1.2; margin-bottom: 8px; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.hero-sub { color: rgba(255,255,255,.85); font-size: 15px; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { color: rgba(255,255,255,.7); font-size: 13px; display: flex; gap: 8px; align-items: center; }

/* ── News Grid 4 ───────────────────────────────────── */
.news-grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 32px; }

/* ── News Card ─────────────────────────────────────── */
.news-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.news-card a { display: flex; flex-direction: column; height: 100%; }
.card-img-wrap { aspect-ratio: 16/9; overflow: hidden; background: var(--gray-200); flex-shrink: 0; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .card-img-wrap img { transform: scale(1.05); }
.card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--black); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; transition: color .2s; }
.news-card:hover .card-title { color: var(--red); }
.card-time { font-size: 12px; color: var(--gray-400); margin-top: auto; }

/* ── Section Block ─────────────────────────────────── */
.section-block { margin-bottom: 40px; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--black); margin-bottom: 20px; padding-bottom: 10px; }
.section-title { font-family: var(--font-head); font-size: 22px; font-weight: 900; }
.section-title .accent { color: var(--red); }
.ver-mas { font-size: 13px; font-weight: 600; color: var(--red); text-transform: uppercase; letter-spacing: .08em; }
.ver-mas:hover { text-decoration: underline; }

/* ── Ciudad Grid ───────────────────────────────────── */
.ciudad-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.ciudad-main { grid-row: 1 / 3; }
.ciudad-main .card-img-wrap { aspect-ratio: 4/5; }
.ciudad-main .card-title { font-size: 18px; }
.ciudad-side { display: flex; gap: 12px; border-bottom: 1px solid var(--gray-200); padding-bottom: 12px; }
.ciudad-side .card-body { padding: 0; }
.ciudad-side .card-title { font-size: 14px; }

/* ── Últimas Grid ──────────────────────────────────── */
.ultimas-grid { display: flex; flex-direction: column; gap: 0; }
.ultima-card { border-bottom: 1px solid var(--gray-200); }
.ultima-card:last-child { border-bottom: none; }
.ultima-card a { display: flex; gap: 16px; padding: 16px 0; align-items: flex-start; }
.ultima-card:hover .card-title { color: var(--red); }
.ultima-img { width: 120px; flex-shrink: 0; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); background: var(--gray-200); }
.ultima-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ultima-card:hover .ultima-img img { transform: scale(1.05); }
.ultima-body { flex: 1; min-width: 0; }
.ultima-body h3 { font-family: var(--font-head); font-size: 16px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; color: var(--black); transition: color .2s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ultima-sub { font-size: 14px; color: var(--gray-600); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }

/* ── Publicidad ────────────────────────────────────── */
.pub-entre { margin: 32px 0; text-align: center; }
.pub-entre img { max-height: 120px; margin: 0 auto; }
.pub-sidebar { margin-bottom: 24px; text-align: center; }
.pub-sidebar img { max-height: 250px; margin: 0 auto; }

/* ── Sidebar ───────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px; background: var(--white); }
.widget-title { font-family: var(--font-head); font-size: 18px; font-weight: 900; border-bottom: 2px solid var(--red); padding-bottom: 10px; margin-bottom: 16px; }

.leida-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--gray-200); }
.leida-item:last-child { border-bottom: none; padding-bottom: 0; }
.leida-num { font-family: var(--font-head); font-size: 28px; font-weight: 900; color: var(--red); line-height: 1; min-width: 28px; }
.leida-item h4 { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--black); transition: color .2s; }
.leida-item a:hover h4 { color: var(--red); }

.cat-list li { border-bottom: 1px solid var(--gray-200); }
.cat-list li:last-child { border-bottom: none; }
.cat-list a { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 14px; font-weight: 600; transition: color .2s; }
.cat-list a:hover { color: var(--red); }
.cat-count { font-size: 12px; background: var(--gray-100); padding: 2px 8px; border-radius: 10px; color: var(--gray-600); }

/* ── Footer ────────────────────────────────────────── */
.site-footer { background: var(--black); color: var(--white); padding: 48px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand p { color: rgba(255,255,255,.6); font-size: 14px; margin-top: 16px; max-width: 280px; line-height: 1.6; }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo .logo-title, .footer-logo .logo-sub { color: var(--white); }
.footer-links h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--red); margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,.7); font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { padding: 20px 0; text-align: center; color: rgba(255,255,255,.4); font-size: 13px; }

/* ── Artículo individual ───────────────────────────── */
.article-hero { width: 100%; max-height: 500px; overflow: hidden; margin-bottom: 32px; border-radius: var(--radius); }
.article-hero img { width: 100%; max-height: 500px; object-fit: cover; }
.article-header { margin-bottom: 24px; }
.article-cat { margin-bottom: 12px; }
.article-title { font-family: var(--font-head); font-size: clamp(24px, 4vw, 42px); font-weight: 900; line-height: 1.15; color: var(--black); margin-bottom: 16px; }
.article-sub { font-size: 18px; color: var(--gray-600); line-height: 1.5; border-left: 3px solid var(--red); padding-left: 16px; margin-bottom: 20px; }
.article-meta { display: flex; gap: 16px; align-items: center; font-size: 14px; color: var(--gray-600); padding: 16px 0; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); margin-bottom: 28px; flex-wrap: wrap; }
.article-meta strong { color: var(--black); }
.article-body { font-size: 17px; line-height: 1.8; color: var(--gray-800); }
.article-body p { margin-bottom: 20px; }
.article-body h2, .article-body h3 { font-family: var(--font-head); font-weight: 700; color: var(--black); margin: 28px 0 12px; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 1024px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .news-grid-4 { grid-template-columns: 1fr; }
  .ciudad-grid { grid-template-columns: 1fr; }
  .ciudad-main { grid-row: auto; }
  .sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: flex; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; }
  .nav-list a { padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.1); border-left: none; }
  .hero-title { font-size: 20px; }
  .ultima-img { width: 90px; }
}

@media (max-width: 480px) {
  .header-top { display: none; }
  .breaking-bar .container { gap: 8px; }
  .breaking-label { display: none; }
}

/* ── Admin Styles ──────────────────────────────────── */
.admin-body { background: #f0f2f5; font-family: var(--font-body); }
.admin-header { background: var(--black); color: var(--white); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 56px; position: fixed; top: 0; left: 0; right: 0; z-index: 200; }
.admin-header .logo { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.admin-header .logo span { color: var(--red); }
.admin-sidebar { position: fixed; top: 56px; left: 0; bottom: 0; width: 220px; background: var(--gray-900); overflow-y: auto; padding: 16px 0; }
.admin-sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: rgba(255,255,255,.7); font-size: 14px; font-weight: 500; transition: all .2s; border-left: 3px solid transparent; }
.admin-sidebar a:hover, .admin-sidebar a.active { color: var(--white); background: rgba(255,255,255,.05); border-left-color: var(--red); }
.admin-sidebar .nav-section { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--gray-600); padding: 16px 20px 4px; }
.admin-content { margin-left: 220px; margin-top: 56px; padding: 32px; min-height: calc(100vh - 56px); }
.admin-card { background: var(--white); border-radius: 8px; box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
.admin-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-200); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--white); border-radius: 8px; padding: 20px; box-shadow: var(--shadow); border-top: 3px solid var(--red); }
.stat-card .num { font-family: var(--font-head); font-size: 36px; font-weight: 900; color: var(--black); }
.stat-card .label { font-size: 13px; color: var(--gray-600); text-transform: uppercase; letter-spacing: .08em; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; border: none; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary { background: var(--gray-200); color: var(--black); }
.btn-secondary:hover { background: var(--gray-300); }
.btn-danger { background: #dc3545; color: var(--white); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--gray-800); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 14px; color: var(--black);
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(227,6,19,.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 12px 16px; background: var(--gray-100); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-600); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.table tr:hover td { background: var(--gray-100); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-green { background: #d4edda; color: #155724; }
.badge-gray  { background: #e2e3e5; color: #383d41; }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
