/* ====== GLOBAL ====== */
:root {
  --primary-color: #b00000;
  --primary-dark: #8b0000;
  --bg-color: #f4f7f6;
  --card-bg: #ffffff;
  --text-dark: #2c3e50;
  --text-muted: #6c757d;
  --shadow-sm: 0 4px 15px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --radius: 4px;
  --gradient-primary: linear-gradient(135deg, #b00000, #d32f2f);
  --gradient-success: linear-gradient(135deg, #2e7d32, #66bb6a);
  --gradient-info: linear-gradient(135deg, #0277bd, #29b6f6);
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-size: 16px;
  background: var(--bg-color);
  color: var(--text-dark);
}

*, *::before, *::after { box-sizing: border-box; }
img, video, canvas, svg { max-width: 100%; height: auto; display: block; }

/* ===== TIPOGRAFÍA — delegada a kinetic-arena.css ====== */
/* Las familias tipográficas las define el sistema de diseño principal */

/* ====== NAVBAR PREMIUN ====== */
.custom-navbar {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 15px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: all 0.3s ease;
}

.custom-navbar .navbar-brand {
  color: var(--primary-color);
  font-size: 1.8rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}
.custom-navbar .navbar-brand:hover {
    transform: scale(1.05);
}

.custom-navbar .nav-link {
  color: var(--text-dark) !important;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 5px;
  padding: 8px 15px !important;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.custom-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.custom-navbar .nav-link:hover::after,
.custom-navbar .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}
.custom-navbar .nav-link:hover, .custom-navbar .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(176, 0, 0, 0.05);
}

.dropdown-menu {
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    border-radius: 6px;
    padding: 8px 15px;
    transition: all 0.2s ease;
}
.dropdown-item:hover {
  background-color: rgba(176, 0, 0, 0.05);
  color: var(--primary-color);
  transform: translateX(5px);
}

/* ====== HERO ====== */
.hero {
  height: 70vh;
  position: relative;
  overflow: hidden;
}

.hero-img {
  object-fit: cover;
  width: 100%;
  height: 75vh;
  max-height: 800px;
  filter: brightness(80%);
  transition: transform 6s ease;
}

.carousel-item.active .hero-img {
    transform: scale(1.05);
}

.hero-caption {
  bottom: 50%;
  transform: translateY(50%);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 40px 30px;
  max-width: 700px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translate(-50%, 60%); }
    to { opacity: 1; transform: translate(-50%, 50%); left: 50%; }
}
.hero-caption { left: 50%; transform: translate(-50%, 50%); position: absolute; }


.hero-caption h1 {
  color: #fff;
  font-size: 4.5rem;
  letter-spacing: 2px;
  text-shadow: 2px 4px 10px rgba(0,0,0,0.5);
  margin-bottom: 15px;
}

.hero-caption p {
  color: #f0f0f0;
  font-size: 1.3rem;
  margin-bottom: 25px;
  font-weight: 300;
}

/* ====== CARDS PREMIUN ====== */
.card {
  border: none;
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  height: auto;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-img-top {
    transition: transform 0.5s ease;
}
.card:hover .card-img-top {
    transform: scale(1.08);
}
.card > div:first-child:not(.card-body) {
    overflow: hidden; /* For zooming images */
}

.card-title {
  color: var(--text-dark);
  font-size: 1.25rem;
}

/* ====== BADGES ====== */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.badge.bg-success { background: var(--gradient-success) !important; }
.badge.bg-primary { background: var(--gradient-info) !important; }
.badge.bg-danger { background: var(--gradient-primary) !important; }


/* ====== BOTONES PREMIUN ====== */
.btn {
    border-radius: 8px;
    padding: 10px 24px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary, .btn-danger, .btn-hero {
  background: var(--gradient-primary) !important;
  color: #fff;
}
.btn-primary:hover, .btn-danger:hover, .btn-hero:hover {
  box-shadow: 0 8px 20px rgba(176, 0, 0, 0.3);
  transform: translateY(-2px);
}

.btn-success {
    background: var(--gradient-success) !important;
}
.btn-success:hover {
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3);
    transform: translateY(-2px);
}

.btn-info {
    background: var(--gradient-info) !important;
    color: white !important;
}

.btn-outline-primary, .btn-outline-danger {
    background: transparent !important;
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    box-shadow: none;
}
.btn-outline-primary:hover, .btn-outline-danger:hover {
    background: var(--gradient-primary) !important;
    color: white !important;
    box-shadow: 0 8px 20px rgba(176, 0, 0, 0.2);
    border-color: transparent !important;
}

/* ====== SECTIONS & CONTAINERS ====== */
.content {
    animation: fadeIn 0.6s ease;
}

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

/* ====== FOOTER ====== */
.footer {
  background: #1a1a2e; /* Admin sidebar color */
  color: #a0aab5;
  text-align: center;
  padding: 40px 0;
  font-size: 0.95rem;
  margin-top: 60px;
}

/* ====== SPONSOR CAROUSEL ====== */
.sponsor-carousel-container {
    background: rgba(255, 255, 255, 1);
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    overflow: hidden;
    position: relative;
    width: 100%;
}

.sponsor-carousel-track {
    display: flex;
    width: max-content;
    animation: scrollSponsors 40s linear infinite;
    align-items: center;
}

/* When only 1 or 2 items (no sponsors), center instead of animate */
.sponsor-carousel-track:has(.sponsor-item:only-of-type) {
    width: 100%;
    animation: none;
    justify-content: center;
}

.sponsor-item {
    width: 200px;
    flex-shrink: 0;
    margin: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-item img {
    max-height: 55px;
    max-width: 150px;
    filter: grayscale(50%);
    opacity: 0.65;
    transition: all 0.4s ease;
    object-fit: contain;
}

.sponsor-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.08);
}

@keyframes scrollSponsors {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Pause on hover */
.sponsor-carousel-container:hover .sponsor-carousel-track {
    animation-play-state: paused;
}

/* ====== MODAL PREMIUN ====== */
.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
  overflow: hidden;
}
.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: #f8f9fa;
}
.nav-tabs .nav-link {
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    border: none;
    border-bottom: 3px solid transparent;
}
.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background: transparent;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .navbar-brand img { height: 60px; }
  .custom-navbar { padding: 10px; }
  .hero-caption { width: 90%; padding: 25px 20px; }
  .hero-caption h1 { font-size: 3rem; }
  .card:hover { transform: none; } /* Disable heavy animations on mobile */
}

/* ====== LOGO ====== */
.navbar-logo {
  height: auto;
  max-height: 80px; 
  transition: max-height 0.3s ease, filter 0.3s ease;
}

/* ======= MOBILE TABLE STACK ======= */
@media screen and (max-width: 768px) {
    .table-mobile-stack:not(.no-responsive) { display: block; width: 100%; overflow-x: hidden; }
    .table-mobile-stack thead { display: none; }
    .table-mobile-stack tr {
        display: block; margin-bottom: 15px; background: #fff;
        border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow-sm);
    }
    .table-mobile-stack td {
        display: flex; justify-content: space-between; text-align: right !important;
        padding: 8px 0; border: none; align-items: center; border-bottom: 1px dashed #eee;
    }
    .table-mobile-stack td:last-child { border-bottom: none; }
    .table-mobile-stack td::before {
        content: attr(data-label); font-weight: 600; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase;
    }
}

/* ======= SPLASH SCREEN (X STYLE) ======= */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#splash-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    animation: logo-entrance 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
               logo-pulse 2s ease-in-out infinite 1.2s;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estado de salida */
.splash-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-hidden #splash-logo {
    transform: scale(10); /* El logo se agranda para "perforar" la pantalla estilo X */
    opacity: 0;
}

@keyframes logo-entrance {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes logo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
