/* Tabs */
.nav-tabs {
  border-bottom: 3px solid #ddd;
}

.nav-tabs .nav-link {
  color: #495057;
  border: none;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
  font-weight: 600;
}

.nav-tabs .nav-link:hover {
  color: #2a5298;
  border-bottom-color: #2a5298;
}

.nav-tabs .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border: none;
  border-radius: 8px 8px 0 0;
}

.tab-content {
  padding-top: 0;
}

/* Gradiente para navbar */
.bg-gradient {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Sección hero */
.hero-section {
  border-bottom: 5px solid #ffd700;
  position: relative;
  min-height: 420px;
}

#inicio {
  background: url('../images/fifa-world-cup-2026-official-logo-zab.webp') center / cover no-repeat;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

/* Cards */
.card {
  transition: transform 0.3s, box-shadow 0.3s;
  border-radius: 10px;
  border: none;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-header {
  border-radius: 10px 10px 0 0;
  font-weight: bold;
}

/* Tabla de posiciones */
.table {
  border-collapse: collapse;
}

.table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Botones */
.btn {
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
  transform: scale(1.02);
}

.btn-success {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  border: none;
}

.btn-success:hover {
  background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
  transform: scale(1.02);
}

/* Badges */
.badge {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 5px;
}

/* Inputs */
.form-control {
  border-radius: 8px;
  border: 1px solid #ddd;
}

.form-control:focus {
  border-color: #2a5298;
  box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.25);
}

/* Footer */
footer {
  border-top: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .table {
    font-size: 0.9rem;
  }
}

/* Animaciones */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: slideIn 0.5s ease-out;
}


/* Bracket de eliminación directa - FIFA Style */
.bracket-wrapper {
  overflow-x: auto;
  padding: 10px 0;
}

.bk-unified-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0 16px;
  min-width: 1100px;
}

.bk-hd {
  background: #e9ecef;
  color: #333;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 6px 8px;
  border-radius: 4px;
  text-align: center;
  border-bottom: 3px solid #2a5298;
}

.bk-hd-final {
  background: #ffd700;
  color: #1a1a2e;
  border-bottom-color: #daa520;
}

.bk-col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 4px;
  padding: 4px 2px;
  position: relative;
}

.bk-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 2px;
}

.bk-trophy {
  width: 120px;
  height: auto;
  margin-bottom: 10px;
  filter: drop-shadow(0 6px 12px rgba(218, 165, 32, 0.5));
}

.bk-final-card .bk-match {
  border: 2px solid #ffd700;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.bk-final-card .bk-match .bk-nm,
.bk-final-card .bk-match .bk-dt,
.bk-final-card .bk-match .bk-label-num {
  color: #fff;
}

.bk-third-card {
  margin-top: 8px;
}

.bk-match {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.72rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: relative;
}

.bk-match.bk-tbd {
  background: #f8f9fa;
  border-color: #e0e0e0;
}

.bk-label-num {
  font-size: 0.6rem;
  font-weight: 700;
  color: #6c757d;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.bk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
  border-bottom: 1px solid #f0f0f0;
}

.bk-row:last-of-type {
  border-bottom: none;
}

.bk-row.bk-w {
  background: rgba(25, 135, 84, 0.1);
  font-weight: 700;
}

.bk-fl {
  width: 16px;
  height: auto;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}

.bk-nm {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.7rem;
}

.bk-sc {
  font-weight: 700;
  background: #1a1a2e;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.65rem;
  margin-left: 4px;
}

.bk-dt {
  font-size: 0.58rem;
  color: #999;
  text-align: center;
  margin-top: 2px;
}

.bk-tbd-text {
  color: #aaa;
  font-style: italic;
  font-size: 0.65rem;
}

/* === Líneas conectoras del bracket === */

/* Par de partidos */
.bk-pair {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  flex: 1;
  justify-content: center;
}

/* Lado izquierdo: línea vertical derecha conecta el par */
.bk-left .bk-pair::after {
  content: '';
  position: absolute;
  top: 25%;
  right: -8px;
  width: 8px;
  height: 50%;
  border: 2px solid #2a5298;
  border-left: none;
  border-radius: 0 4px 4px 0;
}

/* Lado derecho: línea vertical izquierda conecta el par */
.bk-right .bk-pair::after {
  content: '';
  position: absolute;
  top: 25%;
  left: -8px;
  width: 8px;
  height: 50%;
  border: 2px solid #2a5298;
  border-right: none;
  border-radius: 4px 0 0 4px;
}

/* Línea de entrada al match (viene del par anterior) */
/* Lado izquierdo: R16, QF, SF reciben línea desde la izquierda */
.bk-col-r16.bk-left .bk-match::before,
.bk-col-qf.bk-left .bk-match::before,
.bk-col-sf.bk-left .bk-match::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -8px;
  width: 8px;
  height: 2px;
  background: #2a5298;
}

/* Lado derecho: R16, QF, SF reciben línea desde la derecha */
.bk-col-r16.bk-right .bk-match::before,
.bk-col-qf.bk-right .bk-match::before,
.bk-col-sf.bk-right .bk-match::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -8px;
  width: 8px;
  height: 2px;
  background: #2a5298;
}

/* SF: línea de salida hacia la final */
.bk-col-sf.bk-left .bk-match::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -8px;
  width: 8px;
  height: 2px;
  background: #2a5298;
}

.bk-col-sf.bk-right .bk-match::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -8px;
  width: 8px;
  height: 2px;
  background: #2a5298;
}

/* No connectors en la columna central */
.bk-col-center .bk-match::after,
.bk-col-center .bk-match::before {
  display: none;
}


/* Cards de pronósticos especiales - mismo ancho */
.pronosticos-especiales .card,
#pronosticos .card.shadow-sm.mb-4,
#pronosticos .accordion {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}


