:root {
  /* Modo Claro */
  --primary: #c1121f;
  --primary-dark: #780000;
  --secondary: #003049;
  --accent: #fca311;
  --bg-main: #fefefe;
  --bg-secondary: #f8f9fa;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #6c757d;
  --border: #dee2e6;
  --shadow: rgba(0, 0, 0, 0.1);
  --ad-bg: #fff5e6;
  --ad-border: #fca311;
  
  /* Tipografía */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --font-ui: system-ui, -apple-system, sans-serif;
}

/* Modo Oscuro */
body.dark-mode {
  --bg-main: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: rgba(0, 0, 0, 0.3);
  --ad-bg: #1e293b;
  --ad-border: #fbbf24;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

/* === BARRA SUPERIOR === */
.info-bar {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
  padding: 8px 0;
  font-size: 13px;
  font-family: var(--font-ui);
  border-bottom: 2px solid var(--primary);
}

.info-container {
  max-width: 1400px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.datetime {
  display: flex;
  gap: 20px;
}

.date, .time {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quotes {
  display: flex;
  gap: 20px;
  align-items: center;
}

.quote-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* === HEADER === */
.header {
  background: var(--bg-main);
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 2px 10px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideDown 0.5s ease-out;
  transition: background-color 0.3s;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.header-container {
  max-width: 1400px;
  margin: auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  gap: 12px;
  align-items: center;
  transition: opacity 0.3s;
}

.logo:hover {
  opacity: 0.8;
}

.logo-icon {
  font-size: 36px;
  color: var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-ui);
}

/* Búsqueda */
.search-box {
  position: relative;
  flex: 0 1 300px;
}

.search-box input {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: 2px solid var(--border);
  border-radius: 25px;
  font-family: var(--font-ui);
  font-size: 14px;
  transition: all 0.3s;
  background: var(--bg-main);
  color: var(--text-primary);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.1);
}

.search-box i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Navegación */
.nav-links {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links button {
  background: none;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: 20px;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links button:hover,
.nav-links button.active {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Botón EN VIVO */
.live-btn {
  background: #dc2626 !important;
  color: white !important;
  padding: 10px 20px !important;
  display: flex !important;
  align-items: center;
  gap: 8px;
  animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}

.pulse-dot {
  color: white;
  font-size: 8px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

.live-text {
  font-weight: 900;
  font-size: 14px;
}

.live-subtitle {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.9;
  display: block;
}

/* Toggle Modo Oscuro */
.dark-mode-toggle {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-primary);
}

.dark-mode-toggle:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: rotate(180deg);
}

/* === BREADCRUMBS === */
.breadcrumbs {
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 20px;
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-ui);
}

.breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumbs a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.breadcrumbs span {
  margin: 0 8px;
  color: var(--text-muted);
}

/* === PUBLICIDAD === */

/* Publicidad Principal Superior */
.ad-container-top {
  max-width: 1400px;
  margin: 30px auto 20px;
  padding: 0 20px;
}

.ad-destacada {
  background: var(--ad-bg);
  border: 3px solid var(--ad-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
  position: relative;
}

.ad-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-ui);
  z-index: 10;
}

.ad-content {
  position: relative;
  padding-bottom: 56.25%; /* Ratio 16:9 */
  background: var(--bg-secondary);
  cursor: pointer;
  overflow: hidden;
}

.ad-content img,
.ad-content video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.ad-content:hover img,
.ad-content:hover video {
  transform: scale(1.05);
}

.ad-info {
  padding: 20px;
  background: var(--bg-main);
  transition: background-color 0.3s;
}

.ad-sponsor {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.ad-title {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.5;
}

.ad-cta {
  display: inline-block;
  background: var(--accent);
  color: var(--text-primary);
  padding: 10px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-ui);
  font-size: 14px;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(252, 163, 17, 0.3);
}

.ad-cta:hover {
  background: #e69500;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(252, 163, 17, 0.4);
}

/* Publicidad Intercalada (como card en grid) */
.ad-card {
  background: var(--ad-bg);
  border: 2px dashed var(--ad-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px var(--shadow);
  transition: transform 0.3s;
  position: relative;
}

.ad-card:hover {
  transform: translateY(-5px);
}

.ad-card .ad-badge {
  top: 10px;
  left: 10px;
}

.ad-card .ad-content {
  padding-bottom: 56.25%; /* 16:9 */
}

.ad-card .ad-info {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ad-card .ad-sponsor {
  font-size: 18px;
}

.ad-card .ad-title {
  font-size: 14px;
  margin-bottom: 12px;
}

.ad-card .ad-cta {
  padding: 8px 20px;
  font-size: 13px;
}

/* Publicidad en Artículo */
.ad-article {
  margin: 40px 0;
  background: var(--ad-bg);
  border: 2px solid var(--ad-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
}

.ad-article .ad-content {
  padding-bottom: 56.25%;
}

.ad-article .ad-info {
  padding: 20px;
  text-align: center;
}

/* === DESTACADA === */
.featured-card {
  max-width: 1400px;
  margin: 30px auto;
  background: var(--bg-main);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow);
  cursor: pointer;
  transition: all 0.4s;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.featured-card img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  transition: transform 0.6s;
}

.featured-card:hover img {
  transform: scale(1.05);
}

.featured-content {
  padding: 30px;
}

.featured-content h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.3;
  margin: 15px 0;
  color: var(--text-primary);
}

.featured-content p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === GRID DE NOTICIAS === */
.news-grid {
  max-width: 1400px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  padding: 20px;
}

.card {
  background: var(--bg-main);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
  cursor: pointer;
  transition: all 0.4s;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.6s;
}

.card:hover img {
  transform: scale(1.1);
}

.card h3 {
  padding: 15px 15px 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

.card p {
  padding: 0 15px 15px;
  font-size: 15px;
  color: var(--text-secondary);
  flex-grow: 1;
}

.card .meta {
  padding: 0 15px 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.tag {
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  display: inline-block;
  margin: 15px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-ui);
}

/* === BOTÓN CARGAR MÁS === */
.load-more-container {
  text-align: center;
  margin: 40px 0;
}

.load-more-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(193, 18, 31, 0.3);
}

.load-more-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(193, 18, 31, 0.4);
}

/* === PÁGINA DE ARTÍCULO === */
.article-page {
  max-width: 900px;
  margin: auto;
  padding: 30px 20px;
  animation: fadeIn 0.5s ease-out;
}

.back-btn {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  margin-bottom: 25px;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.back-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateX(-5px);
}

.article-page article {
  background: var(--bg-main);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--shadow);
}

.article-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 25px;
}

.article-page h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  line-height: 1.2;
  margin: 20px 0;
  color: var(--text-primary);
}

.article-meta {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-page p {
  font-size: 18px;
  line-height: 1.8;
  margin: 20px 0;
  color: var(--text-primary);
  text-align: justify;
}

.article-page p:first-of-type:first-letter {
  font-size: 3.5em;
  line-height: 0.9;
  float: left;
  margin: 5px 10px 0 0;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--primary);
}

/* Elementos especiales del artículo */
.article-quote {
  font-family: var(--font-display);
  font-size: 28px;
  font-style: italic;
  color: var(--secondary);
  padding: 30px;
  margin: 30px 0;
  border-left: 5px solid var(--primary);
  background: var(--bg-secondary);
  border-radius: 0 8px 8px 0;
}

.article-image-block {
  margin: 30px 0;
}

.article-image-block img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.caption {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
}

.article-audio {
  margin: 30px 0;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.article-audio h4 {
  margin-bottom: 15px;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.article-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 30px 0;
  border-radius: 8px;
  overflow: hidden;
}

.article-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Compartir en artículo */
.share-article {
  margin: 30px 0;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 8px;
  text-align: center;
}

.share-article h4 {
  margin-bottom: 15px;
  font-family: var(--font-display);
  color: var(--text-primary);
}

.share-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-family: var(--font-ui);
}

.share-btn.whatsapp {
  background: #25d366;
}

.share-btn.facebook {
  background: #1877f2;
}

.share-btn.twitter {
  background: #1da1f2;
}

.share-btn.copy {
  background: #64748b;
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* === NOTAS RELACIONADAS === */
.related-news {
  margin: 50px 0;
  padding: 30px;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.related-news h3 {
  font-family: var(--font-display);
  font-size: 28px;
  margin-bottom: 25px;
  color: var(--text-primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* === FOOTER === */
.footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
  margin-top: 60px;
  padding: 40px 20px 20px;
}

.footer-content {
  max-width: 1400px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h4 {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--accent);
}

.footer-section p {
  font-size: 14px;
  line-height: 1.6;
  color: #ccc;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-links a {
  color: white;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: var(--accent);
}

.btn-contact {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: var(--accent);
  color: #1a1a1a;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 700;
  transition: all 0.3s;
}

.btn-contact:hover {
  background: #e69500;
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #999;
  font-size: 13px;
}

/* === MODAL === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s;
}

.modal-content {
  background: var(--bg-main);
  padding: 30px;
  border-radius: 12px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s;
}

.modal-content.live-modal {
  max-width: 1200px;
  width: 90%;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s;
  z-index: 10;
}

.close:hover {
  color: var(--primary);
}

.modal-content h2 {
  margin-bottom: 20px;
  font-family: var(--font-display);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

#liveStreamContainer {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

#liveStreamContainer iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box {
    order: 3;
    flex: 1 1 100%;
  }
  
  .nav-links {
    order: 2;
    justify-content: center;
  }
  
  .dark-mode-toggle {
    order: 4;
    align-self: center;
  }
  
  .logo-text {
    font-size: 22px;
  }
  
  .featured-content h2 {
    font-size: 28px;
  }
  
  .article-page h1 {
    font-size: 32px;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .article-page article {
    padding: 25px 20px;
  }
  
  .ad-destacada .ad-info {
    padding: 15px;
  }
  
  .ad-sponsor {
    font-size: 18px;
  }
}

/* Animación de carga */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.loading i {
  font-size: 32px;
  animation: spin 1s linear infinite;
}
