/* ======================
   MODO OSCURO GLOBAL
====================== */
.dark-mode body,
.dark-mode .panel,
.dark-mode .comments-list,
.dark-mode .c-text {
  background-color: #000 !important;
  color: #f0f0f0 !important;
}

/* Para textos */
.dark-mode p,
.dark-mode span,
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode small,
.dark-mode input {
  color: #f0f0f0 !important;
}

/* Fondos de contenedores */
.dark-mode .card,
.dark-mode .container,
.dark-mode .box,
.dark-mode .new-carousel-card {
  background-color: #242529 !important;
}

.dark-mode .comment-input,
.dark-mode .profile-right {
  background-color: #2a2c30 !important;
  color: #fff !important;
}

.dark-mode ::placeholder {
  color: #fff;
}

/* Links */
.dark-mode a {
  color: #009cff !important;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Lato", "Inter", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

body {
  min-height: 100vh;
  background-color: #fff;
  color: #333;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  justify-items: center;
  padding: 6px 1px;
}

/* Contenido principal */
.main-content {
  flex: 1;
  margin-left: 320px;
  padding: 30px;
  transition: all 0.3s ease;
}

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

.header h1 {
  font-size: 44px;
  color: #000;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #3498db;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-weight: bold;
}

/* Tarjetas de contenido */
.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 25px;
  margin-bottom: 25px;
}

.card h2 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #2c3e50;
}

.card p {
  color: #7f8c8d;
  line-height: 1.6;
  margin-bottom: 20px;
}

.btn {
  background-color: #025ecd;
  color: white;
  border: none;
  padding: 12px 50px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #294fb9;
}

/* Sección de inicio (como en la imagen) */
.inicio-section {
  display: flex;
  flex-direction: column;
  margin-bottom: 40px;
  background-color: #2b2c30;
  border-radius: 11px;
  padding: 30px 20px;
  text-align: center;
}

.inicio-section h1 {
  font-size: 28px;
  color: #2c3e50;
  margin-bottom: 15px;
}

.inicio-section h2 {
  font-size: 32px;
  color: #fffffd;
  margin-bottom: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.inicio-section p {
  color: #feffff;
  line-height: 1.5;
  margin-bottom: 20px;
  max-width: 100%;
  font-size: 16px;
}

.text-content {
  flex: 1;
  max-width: 100%;
  font-size: 18px;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

/* Estilos para el texto del carousel */
.text-slide {
  position: absolute;
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.6s ease-in-out;
  width: 100%;
}

.text-slide.active {
  position: relative;
  opacity: 1;
  transform: translateX(0);
}

.text-content {
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.image-content {
  flex: 1;
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Carousel para la imagen de inicio */
.inicio-carousel {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.carousel-images {
  display: flex;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  height: 250px;
}

.carousel-image {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.carousel-nav {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  gap: 10px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ddd;
  cursor: pointer;
  transition: background-color 0.3s;
}

.carousel-dot.active {
  background-color: #3498db;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
  font-size: 16px;
  color: #3498db;
}

.carousel-arrow.left {
  left: 10px;
}

.carousel-arrow.right {
  right: 10px;
}

.highlight-card {
  background-color: #e8f4fe;
  border-left: 4px solid #3498db;
}

.highlight-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #2c3e50;
}

.highlight-card p {
  color: #7f8c8d;
  margin-bottom: 15px;
}

/* Sección de seguir explorando */
.explore-section {
  margin-top: 40px;
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  font-size: 22px;
}

.explore-section h2 {
  margin-bottom: 20px;
  color: #2c3e50;
}

.explore-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.explore-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  transition: transform 0.3s;
}

.explore-card:hover {
  transform: translateY(-5px);
}

.explore-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #2c3e50;
}

.explore-card p {
  color: #7f8c8d;
  font-size: 14px;
}

/* Botón de menú móvil */
.menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  background-color: #1e2a3a;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  font-size: 20px;
  z-index: 1000;
  cursor: pointer;
}

/* NUEVOS ESTILOS PARA LA SECCIÓN DE FILTROS Y TARJETAS */

.carousel-images {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.carousel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-in-out;
}

.carousel-image.active {
  transform: translateX(0);
}

.carousel-image.slide-out {
  transform: translateX(-100%);
}

.carousel-image.slide-in {
  transform: translateX(100%);
}

.carousel-image.slide-in.active {
  transform: translateX(0);
}

/* SECCIONES DE TEMAS */
.tema-section {
  margin-bottom: 30px;
}

.tema-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding: 0 4px;
}

.tema-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #000;
}

.tema-header a {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: #000;
  transition: opacity 0.2s ease;
}

.tema-header a:hover {
  opacity: 0.6;
}

/* Ajustes para oscurecer en modo oscuro */
.dark-mode .tema-header h2 {
  color: #fff !important;
}
.dark-mode .tema-header a {
  color: #fff !important;
}

/* Estilos para el buscador y boton ir atras de las certificaciones */
.controls-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  padding: 0 1px;
  gap: 15px;
  flex-wrap: wrap;
}

.back-button {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px 15px;
  cursor: pointer;
  font-family: "Lato", sans-serif;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
}

.back-button:hover {
  background-color: #e0e0e0;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  justify-content: flex-end;
  min-width: 0; /* Permite que se ajuste correctamente */
}

.search-input {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-family: "Lato", sans-serif;
  font-size: 14px;
  width: 250px;
  max-width: 100%;
  box-sizing: border-box;
}

.search-button {
  background-color: #4a6cf7;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 15px;
  cursor: pointer;
  font-family: "Lato", sans-serif;
  font-size: 14px;
  transition: background-color 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
}

.search-button:hover {
  background-color: #3a5ce5;
}

/* Tablet - Pantallas medianas (768px a 1024px) */
@media (max-width: 1024px) {
  .controls-container {
    margin: 15px 0;
    gap: 12px;
  }

  .search-input {
    width: 200px;
    padding: 9px 14px;
  }

  .back-button,
  .search-button {
    padding: 9px 14px;
    font-size: 13px;
  }
}

/* Móviles grandes - Small tablets (576px a 767px) */
@media (max-width: 767px) {
  .controls-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin: 12px 0;
  }

  .back-button {
    order: 1;
    justify-content: center;
    width: 100%;
  }

  .search-container {
    order: 2;
    justify-content: stretch;
  }

  .search-input {
    width: 100%;
    flex-grow: 1;
  }

  .search-button {
    flex-shrink: 0;
  }
}

/* Móviles pequeños (hasta 575px) */
@media (max-width: 575px) {
  .controls-container {
    margin: 10px 0;
    gap: 10px;
  }

  .search-container {
    flex-direction: column;
    gap: 8px;
  }

  .search-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
  }

  .search-button {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
  }

  .back-button {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* Pantallas muy pequeñas (hasta 320px) */
@media (max-width: 320px) {
  .controls-container {
    margin: 8px 0;
    gap: 8px;
  }

  .search-input,
  .search-button,
  .back-button {
    padding: 7px 10px;
    font-size: 12px;
  }
}

/* Responsive */
@media (min-width: 769px) {
  .inicio-section {
    flex-direction: row;
    text-align: left;
    padding: 50px;
  }

  .text-content {
    align-items: flex-start;
    margin-bottom: 0;
    margin-right: 30px;
  }

  .inicio-section h2 {
    font-size: 42px;
  }

  .inicio-section p {
    font-size: 20px;
  }

  .carousel-images {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    width: 250px;
    transform: translateX(-100%);
  }

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

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

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .user-info {
    align-self: flex-end;
  }

  .inicio-section h2 {
    font-size: 28px;
  }

  .btn {
    padding: 10px 30px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .explore-cards {
    grid-template-columns: 1fr;
  }

  .carousel-arrow {
    display: none;
  }

  .inicio-section {
    padding: 20px 15px;
  }

  .inicio-section h2 {
    font-size: 24px;
  }

  .inicio-section p {
    font-size: 14px;
  }

  .carousel-images {
    height: 200px;
  }

  .text-content {
    font-size: 16px;
  }

  .filter-tags {
    flex-direction: column;
  }
}
