/* ===== ESTILOS PARA TABS ===== */
.media-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(255,255,255,0.1);
  border: 2px solid transparent;
  color: #eaeaea;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  background: rgba(107, 193, 255, 0.2);
  border-color: #6bc1ff;
}

.tab-btn.active {
  background: #6bc1ff;
  color: #1a1f2e;
  border-color: #6bc1ff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInUp 0.5s ease-out;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

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

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

/* ===== GRID DE IMÁGENES ===== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.media-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
  background: rgba(255,255,255,0.05);
}

.media-item:hover {
  transform: translateY(-5px);
}

.media-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  color: white;
}

.media-item:hover .media-overlay {
  opacity: 1;
}

.media-overlay i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.media-overlay span {
  font-size: 1rem;
  font-weight: 500;
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.95) !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  animation: fadeIn 0.3s ease-out;
  cursor: pointer;
  padding: 20px;
  box-sizing: border-box;
}

.lightbox-content {
  position: relative !important;
  max-width: 90vw;
  max-height: 90vh;
  cursor: default;
  animation: fadeIn 0.4s ease-out;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  display: block;
}

.lightbox-content video {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  display: block;
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  line-height: 1;
  padding: 0;
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: rotate(90deg);
}

/* ===== GRID DE VIDEOS ===== */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.video-item {
  position: relative;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(107, 193, 255, 0.2);
}

.video-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(107, 193, 255, 0.3);
  border-color: rgba(107, 193, 255, 0.4);
}

.video-container {
  position: relative;
  width: 100%;
  height: 200px;
  background: #000;
  overflow: hidden;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Overlay para videos */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  color: white;
}

.video-item:hover .video-overlay {
  opacity: 1;
}

.video-overlay i {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: #6bc1ff;
}

.video-overlay span {
  font-size: 1rem;
  font-weight: 500;
}

.video-info {
  padding: 1rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.05));
}

.video-info h3 {
  margin: 0 0 0.5rem 0;
  color: #6bc1ff;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.video-info p {
  margin: 0;
  color: #bbb;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ===== GRID DE INSTALACIONES ===== */
.facilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.facility-item {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s;
}

.facility-item:hover {
  transform: translateY(-3px);
}

.facility-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.facility-info {
  padding: 1rem;
}

.facility-info h3 {
  margin: 0 0 0.5rem 0;
  color: #6bc1ff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.facility-info p {
  margin: 0;
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ===== ESTADÍSTICAS ===== */
.course-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  padding: 2rem;
  background: rgba(107, 193, 255, 0.1);
  border-radius: 12px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #6bc1ff;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: #ccc;
  margin-top: 0.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .media-tabs {
    gap: 0.5rem;
  }
  
  .tab-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  
  .media-grid,
  .videos-grid,
  .facilities-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .lightbox-content video {
    max-width: 95vw;
    max-height: 70vh;
  }
  
  .course-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .lightbox-content {
    max-width: 95vw;
    max-height: 85vh;
  }
  
  .lightbox-content img {
    max-height: 85vh;
  }
  
  .lightbox-close {
    top: -45px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}