/* COBAT22_WEB TYPOGRAPHY & INSTITUTIONAL DESIGN */
@import url('https://fonts.googleapis.com/css2?family=Encode+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --cobat-guinda: #ab0033;
  --cobat-guinda-dark: #8b002a;
  --cobat-dorado: #bc955c;
  --cobat-pink-bg: #fce4ec;
  --cobat-gris: #54565a;
  --bg-main: #f4f6f8;
  --card-bg: #ffffff;
  --text-main: #54565a;
  --text-dark: #2c3e50;
  --text-muted: #71717a;
  --border-color: #e5e7eb;
  --font-sans: 'Encode Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* NAVBAR HEADER */
.header-banner {
  background: linear-gradient(to right, var(--cobat-guinda) 0%, var(--cobat-guinda-dark) 100%);
  color: white;
  border-bottom: 3.5px solid var(--cobat-dorado);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(139, 0, 42, 0.18);
  width: 100%;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  background: #ffffff;
  padding: 5px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--cobat-dorado);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.brand-logo-img:hover {
  transform: scale(1.03);
}

.brand-text h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.2;
}

.brand-text p {
  font-size: 11px;
  color: #fde68a;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

/* BOTÓN 3 LÍNEAS */
.menu-toggle-btn {
  display: none;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid var(--cobat-dorado);
  color: white;
  font-size: 20px;
  font-weight: 700;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.menu-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-item a {
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  display: inline-block;
}

.nav-item a:hover, .nav-item a.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-bottom: 2px solid var(--cobat-dorado);
}

/* PANTALLA CHICA: 3 LÍNEAS A LA DERECHA */
@media (max-width: 960px) {
  .header-container {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .brand-box {
    flex: 1;
    min-width: 0;
  }

  .brand-text h1 {
    font-size: 15px;
    font-weight: 700;
  }

  .brand-text p {
    font-size: 10px;
    font-weight: 500;
  }

  .menu-toggle-btn {
    display: flex !important;
    margin-left: auto;
    flex-shrink: 0;
  }

  nav {
    width: 100%;
    order: 3;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.25);
  }

  .nav-links.open {
    display: flex !important;
  }

  .nav-item a {
    display: block;
    text-align: center;
    padding: 9px 12px;
    font-size: 12.5px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.12);
  }
}

/* MAIN WRAPPER */
.main-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px;
  flex: 1;
  width: 100%;
}

/* HERO SECTION */
.hero-card {
  background: linear-gradient(135deg, var(--cobat-guinda) 0%, var(--cobat-guinda-dark) 100%);
  color: white;
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(171, 0, 51, 0.15);
  border-bottom: 4px solid var(--cobat-dorado);
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 13.5px;
  color: #fde68a;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 18px 22px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(171, 0, 51, 0.08);
  border-color: var(--cobat-guinda);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--cobat-pink-bg);
  color: var(--cobat-guinda);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--cobat-guinda);
  line-height: 1.1;
}

.stat-info p {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  margin-top: 3px;
}

/* QUICK ACCESS CARDS */
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.quick-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.quick-card:hover {
  transform: translateY(-3px);
  border-color: var(--cobat-guinda);
  box-shadow: 0 8px 18px rgba(171, 0, 51, 0.09);
}

.quick-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cobat-pink-bg);
  color: var(--cobat-guinda);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-card h4 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-dark);
}

.quick-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  font-weight: 400;
}

.quick-card-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cobat-guinda);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}

/* FILTER BAR */
.filter-bar-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 22px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.filter-bar-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--cobat-guinda);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  align-items: center;
}

.filter-input-search {
  grid-column: span 2;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
  background-color: #fafbfc;
  color: var(--text-dark);
}

@media (max-width: 768px) {
  .filter-input-search {
    grid-column: span 1;
  }
}

.filter-input-search:focus {
  border-color: var(--cobat-guinda);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(171, 0, 51, 0.08);
}

.filter-select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: #fafbfc;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-select optgroup {
  font-weight: 700;
  color: var(--cobat-guinda);
  background: #ffffff;
}

.filter-select option {
  font-weight: 500;
  color: var(--text-dark);
  padding: 6px;
}

.filter-select:focus {
  border-color: var(--cobat-guinda);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(171, 0, 51, 0.08);
}

.btn-clear {
  background: var(--cobat-pink-bg);
  color: var(--cobat-guinda);
  border: 1px solid rgba(171, 0, 51, 0.25);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.btn-clear:hover {
  background: var(--cobat-guinda);
  color: white;
}

/* QUICK FILTER PILLS */
.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.pill-btn {
  background: #f1f3f5;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn:hover, .pill-btn.active {
  background: var(--cobat-guinda);
  color: white;
  border-color: var(--cobat-guinda);
}

/* MATCH CARDS - HORIZONTAL INLINE */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.match-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(171, 0, 51, 0.08);
  border-color: var(--cobat-guinda);
}

.match-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--cobat-guinda);
}

.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-color);
}

.sport-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--cobat-guinda);
  background: var(--cobat-pink-bg);
  padding: 3px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border: 1px solid rgba(171, 0, 51, 0.15);
}

.group-badge {
  font-size: 11px;
  font-weight: 600;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 2.5px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* EQUIPOS CORRIDOS (SINGLE LINE HORIZONTAL ROW) */
.match-teams-horizontal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #edf2f7;
  text-align: center;
}

.team-name-inline {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--cobat-guinda);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex: 1;
}

.vs-inline {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--cobat-guinda);
  background: var(--cobat-pink-bg);
  border: 1px solid var(--cobat-guinda);
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.8px;
  flex-shrink: 0;
}

.match-notes {
  font-size: 11px;
  color: #b45309;
  font-weight: 600;
  background: #fffbeb;
  padding: 5px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  border: 1px solid #fde68a;
}

/* PROMINENT DATETIME & VENUE FOOTER */
.match-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.datetime-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-badge {
  color: #92400e;
  font-weight: 600;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.2px;
}

.time-badge {
  color: var(--cobat-guinda);
  font-weight: 600;
  background: var(--cobat-pink-bg);
  border: 1px solid rgba(171, 0, 51, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
}

.venue-badge-link {
  color: var(--text-dark);
  font-weight: 600;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.venue-badge-link:hover {
  background: var(--cobat-pink-bg);
  color: var(--cobat-guinda);
  border-color: var(--cobat-guinda);
}

/* SEDES GRID & VENUE MAP BUTTONS */
.sedes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.sede-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}

.sede-card:hover {
  transform: translateY(-3px);
  border-color: var(--cobat-guinda);
  box-shadow: 0 8px 18px rgba(171, 0, 51, 0.08);
}

.sede-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sede-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cobat-pink-bg);
  color: var(--cobat-guinda);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(171, 0, 51, 0.15);
}

.sede-title-group h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
}

.sede-title-group p {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--cobat-dorado);
}

.sede-location-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.sede-date-badge {
  display: inline-block;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.btn-map-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--cobat-guinda) 0%, var(--cobat-guinda-dark) 100%);
  color: #ffffff !important;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(171, 0, 51, 0.18);
  margin-top: auto;
  text-align: center;
  border: 1px solid var(--cobat-dorado);
}

.btn-map-location:hover {
  transform: translateY(-2px);
  background: var(--cobat-guinda-dark);
  box-shadow: 0 4px 12px rgba(171, 0, 51, 0.25);
}

/* AJEDREZ SECTIONS */
.ajedrez-hero {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: white;
  border-radius: 18px;
  padding: 28px 32px;
  margin-bottom: 24px;
  border: 1.5px solid var(--cobat-dorado);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.ajedrez-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.ajedrez-rule-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.ajedrez-rule-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--cobat-guinda);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.ajedrez-rule-card ul {
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.6;
  font-weight: 400;
}

/* ATLETISMO CARDS */
.atletismo-card {
  background: var(--card-bg);
  border-radius: 14px;
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.2s ease;
}

.atletismo-card:hover {
  border-color: var(--cobat-guinda);
  box-shadow: 0 4px 12px rgba(171, 0, 51, 0.08);
}

.atletismo-code {
  background: var(--cobat-guinda);
  color: white;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  min-width: 60px;
  text-align: center;
}

.atletismo-main {
  flex: 1;
}

.atletismo-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--cobat-guinda-dark);
}

.atletismo-meta {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* PLANTELES GRID */
.planteles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.plantel-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  transition: all 0.2s ease;
}

.plantel-card:hover {
  border-color: var(--cobat-guinda);
  box-shadow: 0 4px 12px rgba(171, 0, 51, 0.08);
}

.plantel-icon {
  width: 48px;
  height: 48px;
  background: var(--cobat-pink-bg);
  color: var(--cobat-guinda);
  border-radius: 50%;
  margin: 0 auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1.5px solid var(--cobat-guinda);
}

.plantel-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
}

/* FOOTER */
.footer-banner {
  background: linear-gradient(to right, var(--cobat-guinda-dark) 0%, #59001b 100%);
  color: white;
  border-top: 3.5px solid var(--cobat-dorado);
  padding: 22px 0;
  margin-top: auto;
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
}

.footer-banner p {
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
  font-size: 11.5px;
}

@media print {
  .header-banner, .footer-banner, .filter-bar-wrapper {
    display: none !important;
  }
  body {
    background: white !important;
  }
  .main-wrapper {
    max-width: 100% !important;
    padding: 0 !important;
  }
}