:root {
  /* --- PALETA CORPORATIVA CD DON BENITO --- */

  /* Rojo Carmesí Oficial (Fuerza e Identidad) */
  --cd-red: #d32027;
  --cd-red-dark: #9b1319;
  --cd-red-glow: rgba(211, 32, 39, 0.4);

  /* Azul Marino Institucional (Estructura y Fondo App) */
  --cd-blue: #0b1120;         /* Fondo principal profundo */
  --cd-blue-card: #162238;    /* Fondo de tarjetas de alto contraste */
  --cd-blue-accent: #1e40af;  /* Azul secundario para elementos informativos */

  /* Dorado Escudo (Puntos destacados y avisos) */
  --cd-gold: #f59e0b;
  --cd-gold-light: #fef3c7;

  /* Neutros y Lectura */
  --white: #ffffff;
  --text-muted: #94a3b8;
  --emerald: #10b981;

  --radius: 20px;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--cd-blue);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(220, 38, 38, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 80% 100%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
  color: var(--white);
  display: flex;
  justify-content: center;
  padding: 14px;
  min-height: 100vh;
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cartel de Error */
.error-banner {
  display: none;
  background: rgba(185, 28, 28, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 0.85rem;
  border: 1px solid #f87171;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

/* Franjas Rojiblancas Club */
.club-stripes {
  height: 6px;
  width: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--cd-red),
    var(--cd-red) 18px,
    var(--white) 18px,
    var(--white) 36px
  );
}

/* Cabecera Matchday */
.header-card {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
}

.header-content {
  padding: 22px 18px;
  text-align: center;
}

.badge-jornada {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--cd-gold);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.competition-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}

/* Disposición de Equipos en 3 líneas (Local / VS / Visitante) */
.vs-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 18px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.team-name {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
  line-height: 1.3;
  letter-spacing: 0.3px;
}

.team-my-team {
  color: #ef4444;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.team-rival {
  color: #ffffff;
}

.vs-badge {
  background: linear-gradient(135deg, var(--cd-red), var(--cd-red-dark));
  color: var(--white);
  font-weight: 900;
  font-size: 0.8rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--cd-red-glow);
  border: 2px solid rgba(255, 255, 255, 0.2);
  margin: 2px 0;
}

/* Tarjetas Generales */
.card {
  background: var(--cd-blue-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
}

.card-header svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--cd-red);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Filas de Información */
.info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.info-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-red svg { stroke: #ef4444; }
.icon-red { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); }

.icon-blue svg { stroke: #3b82f6; }
.icon-blue { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.2); }

.icon-gold svg { stroke: #f59e0b; }
.icon-gold { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.2); }

.icon-green svg { stroke: #10b981; }
.icon-green { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); }

.info-content strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
}

.info-content span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Citación Destacada */
.citacion-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background-color: var(--cd-gold);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cd-gold);
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Botón Google Maps */
.btn-maps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 14px;
  border-radius: 14px;
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-maps:active {
  transform: scale(0.98);
}

.btn-maps svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* CARRUSEL DE FOTOS */
.carousel-wrapper {
  display: none;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  background-color: #080d1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  max-width: 100%;
  height: 240px;
  object-fit: contain;
  background-color: #080d1a;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.85);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.prev-btn { left: 8px; }
.next-btn { right: 8px; }

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  width: 20px;
  border-radius: 10px;
  background: var(--cd-gold);
}

/* EQUIPACIÓN Y COLORES DINÁMICOS */
.kit-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.kit-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kit-badge-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.swatch {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.kit-image-box {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.kit-image-box img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
}

/* ESPINILLERAS Y CALZADO (FIJO) */
.mandatory-kit-box {
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.5) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mandatory-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mandatory-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Pie de página */
/* Ajuste del Footer para maximizar ancho en móviles */
.footer {
  text-align: center;
  padding: 18px 4px; /* Margen lateral mínimo (4px) para ganar espacio horizontal */
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer strong {
  color: var(--cd-red);
}

/* Modelo SONRISAS en una única línea fluida */
.footer-sonrisas {
  /* clamp escala la letra automáticamente según la pantalla del teléfono */
  font-size: clamp(0.50rem, 2.25vw, 0.75rem);
  white-space: nowrap; /* Fuerza a que no se divida en varias líneas */
  overflow: hidden;
  color: var(--text-muted);
  margin-top: 12px;
  letter-spacing: -0.2px; /* Ajusta sutilmente el espacio entre letras */
  opacity: 0.9;
  text-align: center;
}

.footer-sonrisas span {
  color: var(--cd-red);
  font-weight: 800;
}

/* Botón Añadir al Calendario */
.btn-calendar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--cd-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 12px;
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-calendar:active {
  transform: scale(0.98);
  background: rgba(245, 158, 11, 0.25);
}

.btn-calendar svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}