* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #F3F4F6;
  color: #374151;
}

/* Container */
.container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: #FFFFFF;
  border-right: 1px solid #D1FAE5;
  padding: 20px 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.logo {
  padding: 0 20px 20px;
  border-bottom: 1px solid #D1FAE5;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-image {
  max-width: 180px;
  height: auto;
  object-fit: contain;
}

.nav-menu {
  padding: 0 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: #6B7280;
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 2px;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-item:hover {
  background: #ECFDF5;
  color: #10B981;
}

.nav-item.active {
  background: #D1FAE5;
  color: #10B981;
  font-weight: 500;
}

.nav-item i {
  width: 20px;
  margin-right: 12px;
  font-size: 14px;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 250px;
  padding: 30px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 600;
  color: #374151;
}

/* Botón hamburguesa - oculto por defecto */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #10B981;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.mobile-menu-btn:hover {
  background-color: #ECFDF5;
}

/* Overlay para cerrar sidebar en móvil */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.search-container {
  position: relative;
  width: 300px;
}

.search-container i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6B7280;
}

.search-container input {
  width: 100%;
  padding: 12px 15px 12px 40px;
  border: 1px solid #D1FAE5;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-container input:focus {
  border-color: #10B981;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

/* Cards */
.card {
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-header {
  padding: 20px;
  border-bottom: 1px solid #D1FAE5;
  background: #ECFDF5;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-content {
  padding: 20px;
}

/* FAQ Section */
.faq-item {
  border-bottom: 1px solid #D1FAE5;
  margin-bottom: 15px;
  padding-bottom: 15px;
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 10px 0;
  font-weight: 500;
  color: #374151;
}

.faq-question:hover {
  color: #10B981;
}

.faq-answer {
  padding: 10px 0;
  color: #6B7280;
  line-height: 1.5;
  display: none;
}

.faq-answer.show {
  display: block;
}

/* Video Section */
.video-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  border: 1px solid #D1FAE5;
  border-radius: 8px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.2s;
}

.video-item:hover {
  border-color: #10B981;
  background: #ECFDF5;
}

.video-thumbnail {
  width: 120px;
  height: 80px;
  background: #F3F4F6;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* NUEVOS ESTILOS: Para loading y placeholder de thumbnails */
.thumbnail-loading,
.thumbnail-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F3F4F6;
  color: #6B7280;
  font-size: 20px;
}

.thumbnail-loading {
  color: #10B981;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  z-index: 10;
}

.video-info h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
  color: #374151;
}

.video-duration {
  background: #10B981;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  display: inline-block;
}

/* Quick Actions */
.quick-actions {
  margin-top: 30px;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: white;
  border: 1px solid #D1FAE5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.action-btn:hover {
  border-color: #10B981;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn i {
  font-size: 24px;
  color: #10B981;
}

.action-title {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.action-desc {
  font-size: 12px;
  color: #6B7280;
}

/* Video Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  width: 80%;
  max-width: 800px;
  border-radius: 12px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #ECFDF5;
  border-bottom: 1px solid #D1FAE5;
}

.modal-header h3 {
  margin: 0;
  color: #374151;
}

.close {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #6B7280;
}

.close:hover {
  color: #374151;
}

.modal-body {
  padding: 0;
}

#videoPlayer {
  width: 100%;
  height: 450px;
}

#videoPlayer video {
  width: 100%;
  height: 100%;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .sidebar-overlay.show {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 15px;
  }

  .mobile-menu-btn {
    display: block;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }

  .page-header h1 {
    font-size: 24px;
    order: 2;
  }

  .mobile-menu-btn {
    order: 1;
    align-self: flex-start;
  }

  .search-container {
    width: 100%;
    order: 3;
  }

  .logo-image {
    max-width: 150px;
  }

  .video-item {
    flex-direction: column;
    text-align: center;
  }

  .video-thumbnail {
    width: 100%;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 15px 10px;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .card-content {
    padding: 15px;
  }

  .action-buttons {
    grid-template-columns: 1fr;
  }
}
