/*
Theme Name: Yucatán Red
Theme URI: https://yucatanred.com
Author: Personal Assistant
Description: Tema oficial para Yucatán Red v1.6.1 con soporte para submenús desplegables, slider hero, reproductor de radio moderno y maquetación responsive.
Version: 1.6.1
Text Domain: yucatan-red
*/

:root {
  --yc-orange: #E89100;
  --yc-green: #00A562;
  --yc-red: #E31B23;
  --yc-red-dark: #B51218;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --card-border: #e9ecef;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --header-bg: #ffffff;
  --header-border: #e5e7eb;
}

[data-theme="dark"] {
  --primary-color: #E31B23;
  --accent-color: #E89100;
  --secondary-color: #00A562;
  --bg-color: #111827;
  --card-bg: #1f2937;
  --card-border: #374151;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --header-bg: #111827;
  --header-border: #374151;
}

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

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

a { color: var(--yc-red); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--yc-orange); }

/* ==========================================================================
   CABECERA Y MENÚS DESPLEGABLES (DROPDOWNS)
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background-color: var(--header-bg);
  border-bottom: 3px solid var(--yc-green);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  width: 100%;
}

.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 12px 20px;
  border-bottom: 1px solid var(--header-border); flex-wrap: wrap; gap: 10px;
}

.brand-section { display: flex; align-items: center; gap: 12px; }
.custom-logo, .brand-logo-img { max-height: 55px; width: auto; object-fit: contain; }
.site-title { font-size: 1.5rem; font-weight: 900; color: var(--text-main); margin: 0; }
.site-description { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }

.header-tools { display: flex; align-items: center; gap: 15px; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.theme-switch-btn {
  background: var(--card-bg); border: 1px solid var(--card-border);
  color: var(--text-main); padding: 5px 12px; border-radius: 20px;
  cursor: pointer; font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; gap: 6px;
  transition: all 0.2s;
}
.theme-switch-btn:hover { border-color: var(--yc-orange); }

.nav-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-navigation { width: 100%; }
.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 4px;
  margin: 0;
  padding: 6px 0;
  flex-wrap: wrap;
  align-items: center;
}

.main-navigation li { position: relative; }

.main-navigation li a {
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  display: block;
}

.main-navigation li a:hover,
.main-navigation li.current-menu-item > a,
.main-navigation li:hover > a {
  background-color: var(--yc-red);
  color: #ffffff;
}

/* Submenús */
.main-navigation ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--card-bg);
  min-width: 200px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  border: 1px solid var(--card-border);
  padding: 8px 0;
  z-index: 1001;
  flex-direction: column;
  gap: 0;
}

.main-navigation li:hover > ul { display: flex; }
.main-navigation ul ul li { width: 100%; }
.main-navigation ul ul a {
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 0;
  text-transform: none;
}
.main-navigation ul ul a:hover {
  background-color: var(--bg-color);
  color: var(--yc-red);
}

.menu-toggle-btn {
  display: none; background: transparent; border: none; color: var(--text-main); cursor: pointer; padding: 10px 0;
}
.menu-toggle-btn svg { width: 28px; height: 28px; fill: currentColor; }

/* Ticker ÚLTIMA HORA */
.ticker-wrapper { background-color: #111827; color: #fff; padding: 6px 0; font-size: 0.85rem; border-top: 2px solid var(--yc-orange); width: 100%; }
.ticker-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 15px; overflow: hidden; }
.ticker-badge { background: var(--yc-red); color: #fff; font-weight: 800; padding: 3px 10px; border-radius: 4px; text-transform: uppercase; white-space: nowrap; font-size: 0.75rem; letter-spacing: 0.5px; }
.ticker-content { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker-content a { color: #f9fafb; font-weight: 600; }
.ticker-content a:hover { color: var(--yc-orange); }

/* Banners Publicitarios */
.banner-container { max-width: 1200px; margin: 20px auto; padding: 0 20px; text-align: center; }
.banner-container img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--card-border); }

/* ==========================================================================
   ESTRUCTURA GENERAL Y GRID
   ========================================================================== */
.page-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
}

.main-wrapper {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 25px;
  align-items: start;
}

.sidebar { width: 320px; min-width: 0; }
.content-area { width: 100%; min-width: 0; }

/* ==========================================================================
   SLIDER HERO (BLOQUE DESTACADO DE PORTADA)
   ========================================================================== */
.hero-slider-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 25px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 15px;
}

.hero-main {
  position: relative;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
}

.hero-main img { width: 100%; height: 100%; object-fit: cover; }

.hero-main-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  padding: 25px 20px 15px 20px;
  color: #fff;
}

.hero-main-content h2 a { color: #fff; font-size: 1.7rem; font-weight: 800; }
.hero-category { background: var(--yc-green); color: #fff; font-size: 0.75rem; padding: 3px 8px; border-radius: 4px; font-weight: 800; text-transform: uppercase; display: inline-block; }

.hero-sub-list { display: flex; flex-direction: column; gap: 10px; justify-content: space-between; }
.hero-sub-item { display: flex; gap: 10px; align-items: center; background: var(--bg-color); padding: 8px; border-radius: 6px; border: 1px solid var(--card-border); }
.hero-sub-item img { width: 85px; height: 65px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.hero-sub-item h4 { font-size: 0.88rem; line-height: 1.25; }

/* ==========================================================================
   MÓDULOS DE NOTICIAS DE PORTADA (5 NOTICIAS)
   ========================================================================== */
.category-module { margin-bottom: 30px; }
.module-title { font-size: 1.2rem; font-weight: 900; text-transform: uppercase; border-left: 4px solid var(--yc-red); padding-left: 10px; margin-bottom: 12px; }

.module-5-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
.module-main-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 8px; overflow: hidden; }
.module-main-card img { width: 100%; height: 200px; object-fit: cover; }
.module-main-card-body { padding: 12px; }

.module-sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.module-sub-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 6px; padding: 8px; }
.module-sub-card img { width: 100%; height: 85px; object-fit: cover; border-radius: 4px; margin-bottom: 5px; }

/* Video YouTube */
.video-section { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 20px; margin: 20px 0; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* ==========================================================================
   ESTILOS DE LA NOTA INDIVIDUAL (SINGLE ARTICLE)
   ========================================================================== */
.single-article {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.single-meta-top {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.single-title {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 15px;
}

.single-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: 10px 0;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.font-controls { display: flex; gap: 5px; }
.font-btn {
  background: var(--bg-color);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 800;
}

.share-buttons { display: flex; gap: 12px; margin-bottom: 25px; }
.share-btn {
  padding: 10px 20px;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}
.share-wa { background-color: #25D366; }
.share-fb { background-color: #1877F2; }

.single-featured-img {
  margin-bottom: 25px;
  border-radius: 10px;
  overflow: hidden;
}
.single-featured-img img {
  width: 100%;
  height: auto;
  display: block;
}

.single-article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2d3748;
}
.single-article-content p { margin-bottom: 1.5rem; }

/* ==========================================================================
   REPRODUCTOR DE RADIO MODERNO
   ========================================================================== */
.modern-radio-card {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(232, 145, 0, 0.3);
  border-radius: 16px;
  padding: 22px;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 25px;
}

.radio-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(227, 27, 35, 0.2);
  border: 1px solid var(--yc-red);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.live-dot {
  width: 8px; height: 8px;
  background-color: var(--yc-red);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--yc-red);
}

.live-label { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.5px; color: #fff; }

.radio-body h3 { font-size: 1.25rem; font-weight: 900; margin-bottom: 4px; color: #fff; }
.radio-body p { font-size: 0.8rem; color: #94a3b8; margin-bottom: 15px; }

.modern-play-btn {
  background: linear-gradient(135deg, var(--yc-orange) 0%, #d97706 100%);
  border: none;
  width: 65px; height: 65px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(232, 145, 0, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  margin: 10px 0;
}
.modern-play-btn:hover { transform: scale(1.08); box-shadow: 0 8px 25px rgba(232, 145, 0, 0.6); }

.radio-status { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; color: var(--yc-orange); letter-spacing: 0.5px; }

/* Ecualizador */
.equalizer-bars { display: flex; justify-content: center; align-items: flex-end; gap: 4px; height: 18px; margin-bottom: 10px; opacity: 0.3; }
.equalizer-bars.is-playing { opacity: 1; }
.equalizer-bars .bar { width: 3px; height: 100%; background-color: var(--yc-green); border-radius: 2px; }
.equalizer-bars.is-playing .bar:nth-child(1) { animation: eq 0.8s infinite ease-in-out; }
.equalizer-bars.is-playing .bar:nth-child(2) { animation: eq 1.1s infinite ease-in-out; }
.equalizer-bars.is-playing .bar:nth-child(3) { animation: eq 0.7s infinite ease-in-out; }
.equalizer-bars.is-playing .bar:nth-child(4) { animation: eq 0.9s infinite ease-in-out; }

@keyframes eq {
  0%, 100% { height: 4px; }
  50% { height: 18px; }
}

/* ==========================================================================
   PIE DE PÁGINA (FOOTER)
   ========================================================================== */
.site-footer {
  background-color: #0f172a;
  color: #cbd5e1;
  border-top: 4px solid var(--yc-orange);
  padding: 45px 20px 20px 20px;
  margin-top: 50px;
  font-size: 0.88rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-title {
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--yc-orange);
  margin-bottom: 15px;
  border-bottom: 2px solid #334155;
  padding-bottom: 6px;
}

.footer-desc { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.footer-subtext { font-size: 0.82rem; color: #94a3b8; line-height: 1.5; }

.footer-menu, .footer-info-list { list-style: none; padding: 0; margin: 0; }
.footer-menu li, .footer-info-list li { margin-bottom: 8px; }
.footer-menu a, .footer-info-list a { color: #cbd5e1; }
.footer-menu a:hover, .footer-info-list a:hover { color: var(--yc-green); }

.footer-bottom {
  max-width: 1200px;
  margin: 35px auto 0 auto;
  text-align: center;
  border-top: 1px solid #334155;
  padding-top: 18px;
  color: #64748b;
  font-size: 0.82rem;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .main-wrapper { grid-template-columns: 1fr; }
  .sidebar { width: 100%; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .main-navigation ul ul {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 15px;
  }
}

@media (max-width: 600px) {
  .module-5-grid { grid-template-columns: 1fr; }
  .module-sub-grid { grid-template-columns: 1fr; }
  .hero-main { height: 260px; }
  .footer-grid { grid-template-columns: 1fr; }
  .single-article { padding: 18px; }
  .single-title { font-size: 1.5rem; }
}