/*
Theme Name: Santutxu Divi Child
Theme URI: https://santutxufc.com
Description: Child theme de Divi customizado para Santutxu FC con sistema de colores y tipografía del club
Author: Santutxu FC
Author URI: https://santutxufc.com
Template: Divi
Version: 1.0.0
Text Domain: santutxu-divi-child
Domain Path: /languages
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ============================================
   SISTEMA DE COLORES Y TIPOGRAFÍA
   ============================================ */

:root {
  /* Colores corporativos Santutxu FC */
  --santutxu-azul: #000884;
  --santutxu-azul-tint: #e7e8f5;
  --santutxu-rojo: #cf090a;
  --santutxu-rojo-tint: #fce7e7;

  /* Escala de grises */
  --santutxu-ink: #101340;
  --santutxu-ink-soft: #565d8c;
  --santutxu-line: #d9dbe9;
  --santutxu-surface: #ffffff;
  --santutxu-surface-2: #ecedf4;
  --santutxu-ground: #f6f6f9;

  /* Modo oscuro */
  --santutxu-dark-ink: #e9eaf6;
  --santutxu-dark-ink-soft: #9aa1c6;
  --santutxu-dark-line: #262c58;
  --santutxu-dark-surface: #10142f;
  --santutxu-dark-surface-2: #191e42;
  --santutxu-dark-ground: #080a1c;
  --santutxu-dark-azul: #8290ff;
  --santutxu-dark-rojo: #ff625f;

  /* Tipografía */
  --font-display: "Big Shoulders Display", "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(16, 19, 64, 0.06);
  --shadow-md: 0 8px 24px rgba(16, 19, 64, 0.05);
  --shadow-dark: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --santutxu-ink: var(--santutxu-dark-ink);
    --santutxu-ink-soft: var(--santutxu-dark-ink-soft);
    --santutxu-line: var(--santutxu-dark-line);
    --santutxu-surface: var(--santutxu-dark-surface);
    --santutxu-surface-2: var(--santutxu-dark-surface-2);
    --santutxu-ground: var(--santutxu-dark-ground);
    --santutxu-azul: var(--santutxu-dark-azul);
    --santutxu-rojo: var(--santutxu-dark-rojo);
  }
}

:root[data-theme="dark"] {
  --santutxu-ink: var(--santutxu-dark-ink);
  --santutxu-ink-soft: var(--santutxu-dark-ink-soft);
  --santutxu-line: var(--santutxu-dark-line);
  --santutxu-surface: var(--santutxu-dark-surface);
  --santutxu-surface-2: var(--santutxu-dark-surface-2);
  --santutxu-ground: var(--santutxu-dark-ground);
  --santutxu-azul: var(--santutxu-dark-azul);
  --santutxu-rojo: var(--santutxu-dark-rojo);
}

/* ============================================
   TIPOGRAFÍA GLOBAL
   ============================================ */

body {
  font-family: var(--font-body);
  color: var(--santutxu-ink);
  background-color: var(--santutxu-ground);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.et_pb_text h1,
.et_pb_text h2,
.et_pb_text h3,
.et_pb_text h4,
.et_pb_text h5,
.et_pb_text h6,
.et_pb_heading {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.005em;
  text-wrap: balance;
  line-height: 1.02;
}

/* ============================================
   MÓDULOS DIVI - COLORES BASE
   ============================================ */

/* Botones primarios - Azul */
.et_pb_button,
.et_pb_button:hover,
.et_pb_button.et_pb_button_0_0,
button.submit {
  background-color: var(--santutxu-azul);
  border-color: var(--santutxu-azul);
  color: white;
  transition: all 0.3s ease;
}

.et_pb_button:hover {
  background-color: var(--santutxu-rojo);
  border-color: var(--santutxu-rojo);
}

/* Enlaces - Azul por defecto, rojo en hover */
a {
  color: var(--santutxu-azul);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--santutxu-rojo);
}

/* Fondos de secciones */
.et_pb_section {
  background-color: var(--santutxu-surface);
}

.et_pb_section:nth-child(even) {
  background-color: var(--santutxu-ground);
}

/* Bordes y líneas */
hr,
.et_pb_divider {
  border-top-color: var(--santutxu-line);
}

/* ============================================
   ACENTOS Y ÉNFASIS
   ============================================ */

/* Texto rojo para énfasis importante */
.text-red,
.highlight-red,
[style*="color: #CF090A"],
[style*="color: #cf090a"] {
  color: var(--santutxu-rojo);
}

/* Fondo azul claro para llamadas a la acción */
.highlight-blue,
.cta-background {
  background-color: var(--santutxu-azul-tint);
  color: var(--santutxu-ink);
  padding: 1.5rem;
  border-radius: 0.5rem;
}

/* ============================================
   ELEMENTOS ESPECÍFICOS DE SANTUTXU
   ============================================ */

/* Bloques de equipos */
.team-card {
  border-left: 4px solid var(--santutxu-azul);
  background: var(--santutxu-surface);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0.25rem;
  box-shadow: var(--shadow-sm), var(--shadow-md);
  transition: all 0.3s ease;
}

.team-card:hover {
  border-left-color: var(--santutxu-rojo);
  box-shadow: 0 12px 32px rgba(16, 19, 64, 0.12);
}

.team-card h3 {
  color: var(--santutxu-azul);
  margin-top: 0;
}

.team-card.federados {
  border-left-color: var(--santutxu-azul);
}

.team-card.escolares {
  border-left-color: var(--santutxu-rojo);
}

.team-card.escuela {
  border-left-color: var(--santutxu-ink-soft);
}

/* Bloque "El fin de semana del Santutxu" */
.weekend-block {
  background: linear-gradient(135deg, var(--santutxu-azul-tint) 0%, var(--santutxu-ground) 100%);
  border: 2px solid var(--santutxu-azul);
  padding: 2rem;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.weekend-block h2 {
  color: var(--santutxu-azul);
  margin-top: 0;
}

/* Resultados/Clasificación */
.match-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--santutxu-line);
  font-family: var(--font-body);
}

.match-result:last-child {
  border-bottom: none;
}

.match-score {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--santutxu-ink);
  min-width: 60px;
  text-align: center;
}

.match-score.win {
  color: var(--santutxu-azul);
}

.match-score.loss {
  color: var(--santutxu-rojo);
}

.match-score.draw {
  color: var(--santutxu-ink-soft);
}

/* Tabla de clasificación */
.classification-table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
}

.classification-table th {
  background-color: var(--santutxu-azul);
  color: white;
  padding: 0.75rem;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
}

.classification-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--santutxu-line);
}

.classification-table tr:hover {
  background-color: var(--santutxu-azul-tint);
}

/* ============================================
   COMPATIBILIDAD CON WIDGETS EXTERNO (KlubTek)
   ============================================ */

/* Sobrescribe estilos de widgets externos para mantener consistencia */
.klubtek-widget,
.klubtek-results,
.klubtek-classification,
.klubtek-match {
  color: var(--santutxu-ink);
  background: var(--santutxu-surface);
  border-color: var(--santutxu-line);
}

.klubtek-widget a {
  color: var(--santutxu-azul);
}

.klubtek-widget a:hover {
  color: var(--santutxu-rojo);
}

.klubtek-widget table th {
  background-color: var(--santutxu-azul);
  color: white;
}

.klubtek-widget .score {
  color: var(--santutxu-ink);
  font-weight: 600;
}

/* ============================================
   RESPONSIVE Y ACCESIBILIDAD
   ============================================ */

@media (max-width: 768px) {
  :root {
    --font-body-size: 16px;
  }

  h1, .et_pb_heading {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }

  .team-card {
    padding: 1rem;
  }

  .classification-table th,
  .classification-table td {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
}

/* Focus visible para accesibilidad */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--santutxu-azul);
  outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  body {
    background: white;
    color: black;
  }

  a {
    color: black;
  }

  .no-print,
  .et_pb_sidebar,
  nav {
    display: none;
  }
}
