/* Importing Google Font - Open Sans */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

/* Color variables for light theme */
:root {
  --white-color: #fff;
  --black-color: #000;
  --light-white-color: #f0f0f0;
  --light-gray-color: #e5e5e5;
  --border-color: #ccc;
  --primary-color: #3b82f6;
  --secondary-color: #404040;
  --overlay-dark-color: rgba(0, 0, 0, 0.6);
}

/* Color variables for dark theme */
.dark-mode {
  --white-color: #171717;
  --black-color: #d4d4d4;
  --light-white-color: #333;
  --light-gray-color: #404040;
  --border-color: #808080;
  --secondary-color: #d4d4d4;
}

body {
  background: var(--white-color);
  min-height: 100vh;
}

header,
.sidebar .nav-left,
.category-list {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white-color);
}

.navbar {
  display: flex;
  gap: 32px;
  align-items: center;
  padding: 8px 16px;
  justify-content: space-between;
}

:where(.navbar, .sidebar) .nav-section {
  gap: 16px;
}

:where(.navbar, .sidebar) :where(.nav-section, .nav-logo, .search-form) {
  display: flex;
  align-items: center;
}

:where(.navbar, .sidebar) :where(.logo-image, .user-image) {
  width: 32px;
  cursor: pointer;
  border-radius: 50%;
}

:where(.navbar, .sidebar) .nav-section .nav-button {
  border: none;
  height: 40px;
  width: 40px;
  cursor: pointer;
  background: none;
  border-radius: 50%;
}

:where(.navbar, .sidebar) .nav-section .nav-button:hover {
  background: var(--light-gray-color) !important;
}

:where(.navbar, .sidebar) .nav-button i {
  font-size: 1.5rem;
  display: flex;
  color: var(--black-color);
  align-items: center;
  justify-content: center;
}

:where(.navbar, .sidebar) .nav-logo {
  display: flex;
  gap: 8px;
  text-decoration: none;
}

:where(.navbar, .sidebar) .nav-logo .logo-text {
  color: var(--black-color);
  font-size: 1.25rem;
}

.navbar .search-back-button {
  display: none;
}

.navbar .nav-center {
  gap: 8px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.navbar .search-form {
  flex: 1;
  height: 40px;
  max-width: 550px;
}

.navbar .search-form .search-input {
  width: 100%;
  height: 100%;
  font-size: 1rem;
  padding: 0 16px;
  outline: none;
  color: var(--black-color);
  background: var(--white-color);
  border-radius: 49px 0 0 49px;
  border: 1px solid var(--border-color);
}

.navbar .search-form .search-input:focus {
  border-color: var(--primary-color);
}

.navbar .search-form .search-button {
  height: 40px;
  width: auto;
  padding: 0 20px;
  border-radius: 0 49px 49px 0;
  border: 1px solid var(--border-color);
  border-left: 0;
}

.navbar .nav-center .mic-button {
  background: var(--light-white-color);
}

.navbar .nav-right .search-button {
  display: none;
}

.main-layout {
  display: flex;
  overflow-y: auto;
  scrollbar-color: #a6a6a6 transparent;
}

.main-layout .sidebar {
  width: 280px;
  overflow: hidden;
  padding: 0 11px 0;
  background: var(--white-color);
}

.main-layout .sidebar .nav-left {
  display: none;
  padding: 8px 5px;
}

body.sidebar-hidden .main-layout .sidebar {
  width: 0;
  padding: 0;
}

.sidebar .links-container {
  padding: 16px 0 32px;
  overflow-y: auto;
  height: calc(100vh - 60px);
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.sidebar .links-container:hover {
  scrollbar-color: #a6a6a6 transparent;
}

.sidebar .link-section {
  list-style: none;
}

.sidebar .link-section .link-item {
  display: flex;
  cursor: pointer;
  color: var(--black-color);
  white-space: nowrap;
  align-items: center;
  font-size: 0.938rem;
  padding: 5px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  text-decoration: none;
}

.sidebar .link-section .link-item:hover {
  background: var(--light-gray-color);
}

.sidebar .link-section .link-item i {
  font-size: 1.4rem;
  margin-right: 10px;
}

.sidebar .link-section .section-title {
  color: var(--black-color);
  font-weight: 600;
  font-size: 0.938rem;
  margin: 16px 0 8px 8px;
}

.sidebar .section-separator {
  height: 1px;
  margin: 10px 0;
  background: var(--light-gray-color);
}

.main-layout .content-wrapper {
  padding: 0 16px;
  overflow-x: hidden;
  width: 100%;
}

.content-wrapper .category-list {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 12px 0 11px;
  scrollbar-width: none;
}

.category-list .category-button {
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.94rem;
  border-radius: 8px;
  white-space: nowrap;
  color: var(--black-color);
  padding: 6px 12px;
  background: var(--light-gray-color);
}

.category-list .category-button.active {
  color: var(--white-color);
  background: var(--black-color);
  pointer-events: none;
}

.dark-mode .category-list .category-button.active {
  filter: brightness(120%);
}

.category-list .category-button:not(.active):hover {
  background: var(--border-color);
}

.content-wrapper .video-list {
  display: grid;
  gap: 16px;
  padding: 20px 0 20px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.content-wrapper .content {
  gap: 16px;
  /*padding: 20px 0 20px;*/
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    color: #222; /* texto oscuro */
  background-color: #fff; /* fondo claro si aplica */
}

body.dark-mode .content-wrapper .content {
  color: #fff; /* texto claro */
  background-color: #1a1a1a; /* fondo oscuro opcional */
}

@media (min-width: 1024px) {
  .content-wrapper .video-list {
    grid-template-columns: repeat(4, 1fr);
  }
}


.content-wrapper .video-list .video-card {
  text-decoration: none;
}

.content-wrapper .video-list .video-card .thumbnail-container {
  position: relative;
}

.content-wrapper .video-list .video-card .thumbnail {
  width: 100%;
  object-fit: contain;
  border-radius: 8px;
  aspect-ratio: 4/3;
  background: var(--light-white-color);
}

.content-wrapper .video-list .video-card .duration {
  position: absolute;
  right: 10px;
  bottom: 12px;
  color: #fff;
  font-size: 0.875rem;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--overlay-dark-color);
}

.playtitle {
  position: absolute;
  right: 10px;
  bottom: 12px;
  color: #fff;
  font-size: 0.875rem;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--overlay-dark-color);
}

.content-wrapper .video-list .video-card .video-info {
  display: flex;
  gap: 11px;
  padding: 11px 8px;
}

.content-wrapper .video-list .video-card .icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.content-wrapper .video-list .video-card .title {
  font-size: 1rem;
  color: var(--black-color);
  font-weight: 600;
  line-height: 1.375;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.content-wrapper .video-list .video-card:hover .title {
  color: var(--primary-color);
}

.content-wrapper .video-list .video-card p {
  font-size: 0.875rem;
  color: var(--secondary-color);
}

.content-wrapper .video-list .video-card .channel-name {
  margin: 4px 0 2px;
}

/* Responsive media code for small devices */
@media (max-width: 768px) {

  .navbar {
    gap: 1rem;
  }

  .navbar .nav-center,
  body.show-mobile-search .navbar .nav-left,
  body.show-mobile-search .navbar .nav-right {
    display: none;
  }

  .navbar .nav-right .search-button,
  body.show-mobile-search .navbar .search-back-button,
  body.show-mobile-search .navbar .nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-layout .screen-overlay {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 15;
    width: 100%;
    height: 100vh;
    background: var(--overlay-dark-color);
    transition: 0.2s ease;
  }

  body.sidebar-hidden .main-layout .screen-overlay {
    opacity: 0;
    pointer-events: none;
  }

  .main-layout .sidebar {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 20;
    height: 100vh;
    transition: 0.2s ease;
  }

  body.sidebar-hidden .main-layout .sidebar {
    left: -280px;
  }

  .main-layout .sidebar .nav-left {
    display: flex;
  }
}


.thumbnail-container {
  width: 100%;
  max-width: 100%;
  position: relative;
}

.thumbnail-container iframe,
.thumbnail-container script,
.thumbnail-container div {
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
}

.video-info {
  display: flex;
  align-items: center;
  padding: 10px 0;
  flex-wrap: wrap;
}

.icon {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}

.video-details {
  flex: 1;
  min-width: 0;
}
.custom-shadow {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); /* similar a Bootstrap .shadow */
  padding: 1rem;
  background-color: #fff;
  border-radius: 0.5rem;
}
.centered-text {
  display: flex;
  justify-content: center; /* centra horizontalmente */
  align-items: center;     /* centra verticalmente */
  text-align: center;      /* centra el texto si hay varias líneas */
  /*height: 100%;             asegúrate de que el div tenga una altura definida */
}

.bold {
  font-weight: bold;
}

/* Ocultar en móvil, mostrar en PC */
.show-on-desktop {
  display: none;
}

@media (min-width: 992px) {
  .show-on-desktop {
    display: block !important;
  }
}

/* Mostrar en móvil, ocultar en PC */
.show-on-mobile {
  display: block;
}

@media (min-width: 992px) {
  .show-on-mobile {
    display: none !important;
  }
}

.footer-text {
  background-color: #f9f9f9;
  color: #222;
  padding: 10px;
  text-align: center;
}

.dark-mode .footer-text {
  background-color: #121212;
  color: #e0e0e0;
}

.ticker-wrap {
  overflow: hidden;
  position: relative;
  background: #1a1a1a;
  height: 40px;
  display: flex;
  align-items: center;
  color: #fff;
  font-family: 'Roboto', sans-serif;
}

.ticker {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
}

.ticker-content {
  display: inline-block;
  padding-left: 100%;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-content a {
  display: inline-block;
  padding: 0 2rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

/* Pausa al pasar el mouse */
.ticker-wrap:hover .ticker-content {
  animation-play-state: paused;
}

/* Scroll infinito */
@keyframes ticker-scroll {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}



.form-bootstrap-like {
  max-width: 600px;
  margin: 20px auto;
  padding: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  font-family: Arial, sans-serif;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  font-size: 16px;
  line-height: 1.5;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-control:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-submit {
  display: inline-block;
  background-color: #007bff;
  color: #fff;
  padding: 10px 18px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-submit:hover {
  background-color: #0056b3;
}

/* ajuste de visión nocturna para botones de bootstrap*/

.dark-mode .btn {
  background-color: var(--white-color);  /* fondo del botón */
  color: var(--black-color);             /* texto del botón */
  border: 1px solid var(--border-color); /* borde opcional */
}

.dark-mode .btn:hover,
.dark-mode .btn:focus {
  background-color: var(--light-white-color);
  color: var(--secondary-color);
  border-color: var(--border-color);
}

/* dropdown */

.dark-mode .dropdown-menu {
  background-color: var(--white-color);
  color: var(--black-color);
  border: 1px solid var(--border-color);
}

.dark-mode .dropdown-item {
  color: var(--black-color);
}

.dark-mode .dropdown-item:hover,
.dark-mode .dropdown-item:focus {
  background-color: var(--light-gray-color);
  color: var(--secondary-color);
}

/* user-image */

.dark-mode .user-image {
  border: 1px solid var(--border-color);
  background-color: var(--white-color);
}

/* Cards */
.dark-mode .card {
  background-color: var(--white-color);
  color: var(--black-color);
  border: 1px solid var(--border-color);
}

.dark-mode .card-header {
  background-color: var(--light-white-color);
  color: var(--secondary-color);
  border-bottom: 1px solid var(--border-color);
}

.dark-mode .card-body {
  background-color: var(--white-color);
  color: var(--black-color);
}

.dark-mode .card-footer {
  background-color: var(--light-white-color);
  color: var(--secondary-color);
  border-top: 1px solid var(--border-color);
}

/* Inputs, Textareas y Select */
.dark-mode input[type="text"],
.dark-mode input[type="email"],
.dark-mode input[type="password"],
.dark-mode input[type="number"],
.dark-mode input[type="date"],
.dark-mode select,
.dark-mode textarea,
.dark-mode .form-control {
  background-color: var(--white-color);
  color: var(--black-color);
  border: 1px solid var(--border-color);
}

.dark-mode input::placeholder,
.dark-mode textarea::placeholder {
  color: var(--secondary-color);
}

.dark-mode input:focus,
.dark-mode select:focus,
.dark-mode textarea:focus {
  border-color: var(--secondary-color);
  background-color: var(--light-white-color);
  color: var(--black-color);
  outline: none;
  box-shadow: none;
}

/* Checkbox y Radio */

.dark-mode input[type="checkbox"],
.dark-mode input[type="radio"] {
  accent-color: var(--secondary-color); /* cambia el color del check y radio */
}

/* Opcional: si quieres estilo más personalizado */
.dark-mode .form-check-input {
  background-color: var(--white-color);
  border: 1px solid var(--border-color);
}

.dark-mode .form-check-input:checked {
  background-color: var(--secondary-color);
  border-color: var(--border-color);
}

/* Label y texto de formularios */

.dark-mode label,
.dark-mode .form-check-label,
.dark-mode .form-text {
  color: var(--black-color);
}

.modo-mensaje {
  background-color: var(--white-color);
  color: var(--black-color);
  padding: 2rem;
  border-radius: 10px;
}