/* ═══════════════════════════════════════════════════════════════════════════
   ESTILOS GLOBALES COMPLETOS - Sin dependencia de CDN externo
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --primary-50:  #fef2f2;
  --primary-100: #fee2e2;
  --primary-200: #fecaca;
  --primary-300: #fca5a5;
  --primary-400: #f87171;
  --primary-500: #ef4444;
  --primary-600: #dc2626;
  --primary-700: #b91c1c;
  --primary-800: #991b1b;
  --primary-900: #7f1d1d;
  --primary-950: #450a0a;
}

/* ─────────────────────────────────────────────────────────────────────────
   RESET Y BASE
   ───────────────────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Spline Sans", "Noto Sans", sans-serif;
  background-color: var(--primary-50);
  color: #1f2937;
  line-height: 1.5;
  min-height: 100vh;
}

/* ─────────────────────────────────────────────────────────────────────────
   FLEXBOX Y GRID
   ───────────────────────────────────────────────────────────────────────── */

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.flex-grow {
  flex-grow: 1;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-8 {
  gap: 2rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* ─────────────────────────────────────────────────────────────────────────
   DIMENSIONES
   ───────────────────────────────────────────────────────────────────────── */

.h-screen {
  height: 100vh;
}

.h-10 {
  height: 2.5rem;
}

.w-auto {
  width: auto;
}

.w-full {
  width: 100%;
}

.min-h-screen {
  min-height: 100vh;
}

/* ─────────────────────────────────────────────────────────────────────────
   ESPACIADO
   ───────────────────────────────────────────────────────────────────────── */

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.pb-16 {
  padding-bottom: 4rem;
}

.pb-20 {
  padding-bottom: 5rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.ml-auto {
  margin-left: auto;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.my-2 {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.max-w-xs {
  max-width: 20rem;
}

.w-20 {
  width: 5rem;
}

.h-20 {
  height: 5rem;
}

.bg-center {
  background-position: center;
}

.bg-no-repeat {
  background-repeat: no-repeat;
}

.bg-cover {
  background-size: cover;
}

.cursor-pointer {
  cursor: pointer;
}

.block {
  display: block;
}

.group {
  position: relative;
}

.group:hover .group-hover\:underline {
  text-decoration: underline;
}

.flex-\[2_2_0px\] {
  flex: 2 2 0px;
}

.pt-2 {
  padding-top: 0.5rem;
}

.pb-3 {
  padding-bottom: 0.75rem;
}

.p-2 {
  padding: 0.5rem;
}

/* Posicionamiento fijo */
.fixed {
  position: fixed;
}

.bottom-0 {
  bottom: 0;
}

.inset-x-0 {
  left: 0;
  right: 0;
}

.z-50 {
  z-index: 50;
}

/* Bordes */
.border-t {
  border-top: 1px solid;
}

.border-gray-200 {
  border-color: #e5e7eb;
}

/* Colores de fondo */
.bg-blue-100 {
  background-color: #dbeafe;
}

.bg-white\/80 {
  background-color: rgba(255, 255, 255, 0.8);
}

/* Colores de texto */
.text-blue-600 {
  color: #2563eb;
}

.text-gray-600 {
  color: #4b5563;
}

/* Hover */
.hover\:text-blue-600:hover {
  color: #2563eb;
}

/* Transiciones */
.transition-colors {
  transition-property: color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* ─────────────────────────────────────────────────────────────────────────
   COLORES Y FONDOS
   ───────────────────────────────────────────────────────────────────────── */

.bg-white {
  background-color: #ffffff;
}

.bg-gray-100 {
  background-color: #f3f4f6;
}

.bg-gray-200 {
  background-color: #e5e7eb;
}

.bg-primary-50 {
  background-color: var(--primary-50);
}

.bg-primary-200 {
  background-color: var(--primary-200);
}

.text-gray-800 {
  color: #1f2937;
}

.text-gray-900 {
  color: #111827;
}

.text-gray-500 {
  color: #6b7280;
}

.text-gray-600 {
  color: #4b5563;
}

.text-primary-700 {
  color: var(--primary-700);
}

.text-primary-800 {
  color: var(--primary-800);
}

.text-primary-950 {
  color: var(--primary-950);
}

/* ─────────────────────────────────────────────────────────────────────────
   TIPOGRAFÍA
   ───────────────────────────────────────────────────────────────────────── */

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.leading-tight {
  line-height: 1.25;
}

.text-center {
  text-align: center;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-wider {
  letter-spacing: 0.05em;
}

.tracking-tighter {
  letter-spacing: -0.015em;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────────────────
   BORDES Y SOMBRAS
   ───────────────────────────────────────────────────────────────────────── */

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-2xl {
  border-radius: 1rem;
}

.rounded-full {
  border-radius: 9999px;
}

.pb-3 {
  padding-bottom: 0.75rem;
}

.p-2 {
  padding: 0.5rem;
}

/* Posicionamiento fijo */
.fixed {
  position: fixed;
}

.bottom-0 {
  bottom: 0;
}

.inset-x-0 {
  left: 0;
  right: 0;
}

.z-50 {
  z-index: 50;
}

/* Bordes */
.border-t {
  border-top: 1px solid;
}

.border-gray-200 {
  border-color: #e5e7eb;
}

/* Colores de fondo */
.bg-blue-100 {
  background-color: #dbeafe;
}

.bg-white\/80 {
  background-color: rgba(255, 255, 255, 0.8);
}

/* Colores de texto */
.text-blue-600 {
  color: #2563eb;
}

.text-gray-600 {
  color: #4b5563;
}

/* Hover */
.hover\:text-blue-600:hover {
  color: #2563eb;
}

/* Transiciones */
.transition-colors {
  transition-property: color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.border {
  border: 1px solid #d1d5db;
}

.border-b {
  border-bottom: 1px solid #d1d5db;
}

.border-gray-200 {
  border-color: #e5e7eb;
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ─────────────────────────────────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────────────────────────────────── */

header {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}

header img {
  height: 40px;
  width: auto;
}

header span {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.2;
  text-align: center;
}

/* ─────────────────────────────────────────────────────────────────────────
   TARJETAS
   ───────────────────────────────────────────────────────────────────────── */

.card {
  border-radius: 0.75rem;
  background-color: white;
  padding: 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ─────────────────────────────────────────────────────────────────────────
   BOTONES
   ───────────────────────────────────────────────────────────────────────── */

button {
  cursor: pointer;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

button:hover {
  opacity: 0.9;
}

.btn-primary {
  background-color: var(--primary-600);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-700);
}

/* ─────────────────────────────────────────────────────────────────────────
   OVERFLOW
   ───────────────────────────────────────────────────────────────────────── */

.overflow-hidden {
  overflow: hidden;
}

.overflow-x-hidden {
  overflow-x: hidden;
}

.overflow-y-auto {
  overflow-y: auto;
}

/* ─────────────────────────────────────────────────────────────────────────
   POSICIONAMIENTO
   ───────────────────────────────────────────────────────────────────────── */

.sticky {
  position: sticky;
}

.relative {
  position: relative;
}

.z-10 {
  z-index: 10;
}

/* ─────────────────────────────────────────────────────────────────────────
   TRANSICIONES
   ───────────────────────────────────────────────────────────────────────── */

.transition-shadow {
  transition-property: box-shadow;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* ─────────────────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  header span {
    font-size: 12px;
  }

  .p-4 {
    padding: 1rem;
  }

  .md\:p-6 {
    padding: 1rem;
  }

  .md\:grid-cols {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .md\:p-6 {
    padding: 1.5rem;
  }

  .md\:grid-cols {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  }

  .md\:grid-cols-\[repeat\(auto-fit\,minmax\(380px\,1fr\)\)\] {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  }

  .md\:cols-left {
    grid-template-columns: 2fr 1fr;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   UTILITARIOS EXTRAS
   ───────────────────────────────────────────────────────────────────────── */

.prose {
  max-width: 65ch;
}

.prose p {
  margin: 1rem 0;
  line-height: 1.75;
}

.prose a {
  color: var(--primary-600);
  text-decoration: underline;
}

.prose a:hover {
  color: var(--primary-700);
}

/* ─────────────────────────────────────────────────────────────────────────
   COLORES ADICIONALES (Verde, Amarillo, Azul)
   ───────────────────────────────────────────────────────────────────────── */

/* Verde */
.bg-green-50 { background-color: #f0fdf4; }
.bg-green-100 { background-color: #dcfce7; }
.bg-green-400 { background-color: #4ade80; }
.bg-green-500 { background-color: #22c55e; }
.bg-green-600 { background-color: #16a34a; }

.text-green-50 { color: #f0fdf4; }
.text-green-100 { color: #dcfce7; }
.text-green-400 { color: #4ade80; }
.text-green-500 { color: #22c55e; }
.text-green-600 { color: #16a34a; }

/* Amarillo */
.bg-yellow-50 { background-color: #fefce8; }
.bg-yellow-100 { background-color: #fef3c7; }
.bg-yellow-400 { background-color: #facc15; }
.bg-yellow-500 { background-color: #eab308; }
.bg-yellow-600 { background-color: #ca8a04; }

.text-yellow-50 { color: #fefce8; }
.text-yellow-100 { color: #fef3c7; }
.text-yellow-400 { color: #facc15; }
.text-yellow-500 { color: #eab308; }
.text-yellow-600 { color: #ca8a04; }

/* Azul */
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-400 { background-color: #60a5fa; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-blue-600 { background-color: #2563eb; }

.text-blue-50 { color: #eff6ff; }
.text-blue-100 { color: #dbeafe; }
.text-blue-400 { color: #60a5fa; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }

/* Gradientes */
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-green-400 {
  --tw-gradient-from: #4ade80;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(74, 222, 128, 0));
}

.from-green-500 {
  --tw-gradient-from: #22c55e;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(34, 197, 94, 0));
}

.from-blue-50 {
  --tw-gradient-from: #eff6ff;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 246, 255, 0));
}

.to-green-500 {
  --tw-gradient-to: #22c55e;
}

.to-green-600 {
  --tw-gradient-to: #16a34a;
}

.to-blue-500 {
  --tw-gradient-to: #3b82f6;
}

.to-blue-100 {
  --tw-gradient-to: #dbeafe;
}

/* Bordes izquierdo con colores */
.border-l-4 {
  border-left: 4px solid;
}

.border-green-500 {
  border-color: #22c55e;
}

.border-yellow-500 {
  border-color: #eab308;
}

.border-blue-200 {
  border-color: #bfdbfe;
}

/* Hover para botones */
.hover\:bg-green-600:hover {
  background-color: #16a34a;
}

.hover\:shadow-lg:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Transition */
.transition-colors {
  transition-property: background-color, border-color, color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-shadow {
  transition-property: box-shadow;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* ─────────────────────────────────────────────────────────────────────────
   ANIMACIONES
   ───────────────────────────────────────────────────────────────────────── */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ─────────────────────────────────────────────────────────────────────────
   MAIN Y LAYOUT
   ───────────────────────────────────────────────────────────────────────── */

main {
  flex: 1;
  overflow-y: auto;
}

footer {
  margin-top: auto;
  padding: 20px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  position: relative;
  z-index: 100;
}

/* ─────────────────────────────────────────────────────────────────────────
   PANEL CONTROL ESPECÍFICO
   ───────────────────────────────────────────────────────────────────────── */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
}

@media (max-width: 640px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* Cards específicas del panel */
.card-wrapper {
  border-radius: 0.75rem;
  background-color: white;
  padding: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.card-wrapper:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Información destacada */
.highlight-box {
  background-color: var(--primary-200);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.highlight-box p:first-child {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-800);
}

.highlight-box p:nth-child(2) {
  font-size: 3rem;
  font-weight: bold;
  letter-spacing: -0.015em;
  color: var(--primary-950);
  margin: 0.5rem 0;
}

.highlight-box p:last-child {
  font-size: 0.875rem;
  color: var(--primary-700);
  max-width: 20rem;
  margin: 0 auto;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────────────────
   REPRODUCTOR DE AUDIO PERSONALIZADO
   ───────────────────────────────────────────────────────────────────────── */

audio.mdls-audio-player {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

/* Estilo para navegadores WebKit (Chrome, Safari) */
audio.mdls-audio-player::-webkit-media-controls-panel {
  background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
  border-radius: 8px;
}

audio.mdls-audio-player::-webkit-media-controls-play-button {
  cursor: pointer;
  width: 32px;
  height: 32px;
}

audio.mdls-audio-player::-webkit-media-controls-timeline {
  cursor: pointer;
  margin: 0 8px;
}

audio.mdls-audio-player::-webkit-media-controls-time-remaining-display {
  font-size: 12px;
}

audio.mdls-audio-player::-webkit-media-controls-current-time-display {
  font-size: 12px;
}

/* Estilo para Firefox */
audio.mdls-audio-player::-moz-range-track {
  background: #e5e7eb;
  border-radius: 4px;
}

audio.mdls-audio-player::-moz-range-thumb {
  cursor: pointer;
  background: #3b82f6;
  border-radius: 50%;
}

/* ─────────────────────────────────────────────────────────────────────────
   REPRODUCTOR GLOBAL
   ───────────────────────────────────────────────────────────────────────── */

.contenedor-global-contenido-reproductor {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  transform: translateY(calc(100% + 12px));
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
  padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
  pointer-events: none;
}

.contenedor-global-contenido-reproductor:not(.contenedor-global-contenido-reproductor-oculto) {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.contenedor-global-contenido-reproductor .player-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  border-radius: 16px;
  padding: .5rem .75rem;
  max-width: 720px;
  margin: 0 auto;
}
