/* ==================================  BASE  ============================================================================= */
body {
  margin: 0;
  font-family: system-ui;
  transition: background 0.3s ease, color 0.3s ease;
  font-size: 16px;
}

h1 {
  text-align: center;
  padding: 10px;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* ===== TOP INLINE ===== */
.top-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

/* - - - */
/* Evita desbordes horizontales en todos los dispositivos */
html, body {
  /*overflow-x: hidden;*/
}

/* Ajustes generales móviles */
#contenido {
  padding: 10px;
  font-size: 16px;
}

.song-line {
  font-size: 14px;
}

#alfabeto {
  gap: 4px;
}

.alpha {
  min-width: 32px;
  height: 32px;
  font-size: 14px;
}

/* ==================================  MENU PRINCIPAl  ==================================================================== */

/* -------------------- BOTON MENU -------------------- */
/* Seccion Menu en html */
.menu-wrapper {
  position: relative;
}

#menuBtn {
  font-size: 18px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  Color: #1e293b; 
}

/* modo oscuro */
.light-mode #menuBtn {
  color: white;
}

/* modo proyector */
.projector #menuBtn {
  color: white;
}

#menuBtn:hover {
  opacity: 0.7;
}

/* MENU */
.menu-wrapper {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 45px;
  left: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  width: 240px;
  display: none;
  z-index: 9999;
  color: #1e293b;
}

.dropdown-menu.active {
  display: block;
}

.menu-item {
  padding: 10px 15px;
  cursor: pointer;
  /*text-decoration: none; /* quita subrayado */
  /*color: inherit;        /* mantiene el color del menú */
}

.menu-item a,             /* quita subrayado solo a los items del menu */
a.menu-item {
  text-decoration: none;
  color: inherit;
}

.menu-item:hover {
  background: rgba(0,0,0,0.05);
}

.divider {              /* linea divisoria */
  height: 1px;
  background: #ddd;
  margin: 5px 0;
}


.sub-item {
  padding-left: 40px;  /* tabulacion en el submenú*/
  position: relative;
}

.sub-item::before {   /* linea en el borde del submenú */
  content: "";
  position: absolute;
  left: 25px;         /* separacion del borde izquierdo */
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(0,0,0,0.2);

}

.menu-title {
  padding: 10px 15px;
  /*font-weight: bold;*/
  /*opacity: 0.7;*/
  cursor: default;
}


.menu-title:hover {   /* evitar efecto hover en los items del menu que no son clickeables */
  background: none;
}



/* *** Acerca de... */
  /* Encontrar la programación en >> Acerca de...*/


/* *** Libro: Cancionero MV o Himnarios */

/* *** Idiomas */
  /* Encontrar la programación en >> Idiomas*/




/* ===== BOTON IDIOMA ===== */
.lang-wrapper {
  position: relative;
}

/* BOTON REDONDO */
#langBtn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #000;
  background: #1e293b;
  font-size: 20px;
  cursor: pointer;
  color: white;
}

.light-mode #langBtn {
  background: white;
  color: #1e293b;
}

/* *** Favoritos */

/* *** Tamano de letra: A+ A A- */
/* Tamano: A- */


/* *** Proyector */
/* *** Tema: Claro / Oscuro */
/* *** Feedback */
/* *** Donaciones */


/* -------------------- INPUT BUSCADOR -------------------- */
/* *** CONTENEDOR GENERAL */
.top-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* *** FILA SUPERIOR */
.top-row {
  display: flex;
  gap: 10px;
  padding: 10px;
}

/* *** CONTENEDOR BUSCADOR */
.buscador-container {
  flex: 1;
}

/* *** INPUT BUSCADOR */
#buscador {
  flex: 1;
  width: 100%;
  box-sizing: border-box;

  margin: 10px;
  padding: 10px;

  border-radius: 10px;
  border: 1px solid #000;

  font-size: 16px;
}

/* *** estado focus */
#buscador:focus {
  outline: none;
  border: 2px solid #3b82f6;
}

/* -------------------- BOTON CAMBIAR DE IDIOMA CON BANDERAS ------------------------------------- */



/* -------------------- MENU ALFABETO ------------------------------------------------------------ */
#alfabeto {
  display: flex;
  flex-wrap: wrap;          /* permite múltiples filas */
  justify-content: center;  /* centra los botones */
  gap: 6px;
  padding: 10px;
}

.alpha {
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
}

.alpha.active {
  background: #ff0000;
}

/* **********  INDICE (Lista de canciones debajo del alfabeto) ********** */ 
#indice {
  width: 90%;         /* ocupa el 90% */
  margin: 0 auto;     /* centrado perfecto */
  padding: 0;
}

#indice li {
  list-style: none;

  padding: 10px;
  margin: 10px 0;   /* solo vertical */
  
  background: #1e293b;
  border-radius: 20px;
  cursor: pointer;
}

#contenido {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* evita scroll horizontal */
  box-sizing: border-box;
  padding: 0 15px; /* margen izquierdo y derecho */
  font-size: 18px;
}

.meta {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 10px;
}

.lyrics div {
  font-family: monospace;
  margin: 3px 0;
}

/*BOTON DE OCULTAR CANCIONES*/
.hidden {
  display: none;
}

#toggleLista,
#fontSizeBtn,
#projectorBtn {
  margin: 10px;
  padding: 8px 12px;
  border: none;
  border-radius: 100px;
  background: #b6b6b657;
  color: rgb(255, 255, 255);
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid #000;
}

#toggleLista:hover,
#fontSizeBtn:hover,
#projectorBtn:hover {
  opacity: 0.85;
  transform: scale(1.05);
}

#toggleLista {
  display: none;
}


.fade-in {
  animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------- MENU LISTA DE CANCIONES AL SELECCIONAR UNA LETRA ------------------------- */


/****/









/* **********  IDIOMAS Y BANDERAS  ********** */
/* =====  SELECT IDIOMA (base) ===== */
#idioma {
  margin: 10px;
  padding: 8px;
  border-radius: 8px;
  flex-shrink: 0;
  position: absolute;
  opacity: 0;
  pointer-events: none;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background: #1e293b;
  color: white;

  border: 1px solid #000;
  font-size: 14px;
  cursor: pointer;

  padding: 8px 28px 8px 12px;

  /* icono flecha */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='M5.5 7l4.5 5 4.5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}

/* ===== MODOS DE COLOR ===== */
.light-mode #idioma {
  background: #b6b6b657;
  color: white;
}

.dark-mode #idioma {
  background: #e2e8f0;
  color: black;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  #idioma {
    width: 60px;
    font-size: 13px;
    padding: 6px 24px 6px 10px;
  }
}

/* ===== SELECT OCULTO ===== */
#idioma.hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ===== BOTÓN MENÚ IDIOMA ===== */
#menuIdioma:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ===== BANDERAS PARA CAMBIAR EL IDIOMA ===== */
.flags {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3em;
  font-weight: 500;
}

.flags b {
  margin-right: 5px;
  font-size: 0.8em; /* apenas más chico */
}

.flag {
  font-size: 20px; /* antes 22px */
  margin-right: 8px;
  cursor: pointer;
  opacity: 0.6;
  transition: 0.2s;
}

.flag:hover {
  opacity: 1;
  transform: scale(1.2);
}

.flag.active {
  opacity: 1;
  border-bottom: 2px solid #38bdf8;
}

/* **********  MODO CLARO/OSCURO  ********** */
/* MODO CLARO 👓 → botón negro */
.light-mode  {
  background: #1e293b;  /*Fondo negro*/
  color: #ffffff;       /*Letras blancas*/
}

/* MODO OSCURO 🕶️ → botón blanco */
.dark-mode  {
  background: #ffffff;  /*Fondo blanco*/
  color: #1e293b;       /*Letras negras 000000*/
}

/* COLOR DE FONDO LISTA */
.light-mode #indice li {
  background: #e2e8f0; 
  color: #1e293b;
}

.dark-mode #indice li {
  background: #1e293b;
  color: white;
}

/* BOTONES ALFABETO */
.light-mode .alpha {
  background: #e2e8f0;
  color: #1e293b;
  font-weight: bold;
}

.dark-mode .alpha {
  background: #1e293b;
  color: white;
  font-weight: bold;
}

/* ===== MODO PROYECTOR ===== */
body.projector {
    background: black;
    color: white;
}

body.projector h1 {
    font-size: 3rem;
    text-align: center;
}

body.projector #contenido {
    font-size: 3rem;
    line-height: 1.6;
    padding: 40px;
    /*estrofas*/
}

body.projector .song-break {
  height: 40px; /* espacio entre estrofas */
}

body.projector .top-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* NO ocultar alfabeto si lo quieres usar */
body.projector #alfabeto {
    display: flex;
    justify-content: center;
}

/* ====================  ACERCA DE....  ==================== */
/* MODAL FONDO */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

/* CONTENIDO */
.modal-content {
  background: #fff;
  margin: 5% auto;
  padding: 25px;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  background: white;
  color: #1e293b;
}

/* BOTÓN CERRAR */
.close {
  float: right;
  font-size: 28px;
  cursor: pointer;
}

/* DARK MODE (opcional si ya lo usás) */
body.dark .modal-content {
  background: #1e1e1e;
  color: #fff;
}

/* CONTACTO REDES SOCIALES */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-links a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}

.social-links a:hover {
  opacity: 0.7;
}

.icon {
  font-size: 18px;
}


/* ====================  MUSICA: CANCIONES E INFO PREVIA  ==================== */
/* ========== icono apple music, spotify o youtube ==========
.audio a {
  text-decoration: none;
  font-weight: 600;
}

/* Spotify */
.audio a.spotify {
  color: #1DB954; /* verde Spotify estándar */
}

/* Apple Music */
.audio a.apple {
  color: #ff2d55; /* rosa/rojo Apple Music */
}

/* YouTube */
.audio a.youtube {
  color: #ff0000; /* rojo YouTube */
}

/* evitar cambios del navegador */
.audio a:visited,
.audio a:active {
  color: inherit;
}

.audio a {
  text-decoration: none;
  font-weight: 600;
}

.audio a.spotify {
  color: #1DB954;
}

.audio a.youtube {
  color: #ff0000;
}

.audio a.applemusic {
  color: #ff2d55;
}

/* evitar override del navegador */
.audio a:visited,
.audio a:active,
.audio a:hover {
  opacity: 0.85;
}


/* ====================  MUSICA: CUADRATURA Y ACORDES  ==================== */
/* ========== COLORES DE LA CUADRATURA ==========*/
.song-line {
  font-size: 1em;
  line-height: 1.8;
  /*font-size: 16px;*/
  /*line-height: 2.2; /*altura de cuadratura*/
  margin-bottom: 6px;
}

.lyrics {
  white-space: pre-wrap;
}

.chord-wrap {
  position: relative;
  display: inline-block;
  width: 0;
}

.chord {
  position: absolute;
  top: -2.4em;
  left: 0;
  font-weight: bold;
  font-size: 0.85em;
  white-space: nowrap;
  font-size: 0.85em;
}

/* colores */
.dark-mode .chord {
  color: red;
}

.light-mode .chord {
  color: rgb(53, 255, 2);
}

.song-break {
  height: 10px; /* espacio entre estrofas */
}

@media (max-width: 460px) {

  .song-line {
    font-size: 10px !important;
    line-height: 1.5;
  }

  .lyrics {
    font-size: inherit;
  }

  .chord {
    font-size: 0.65em !important;
    top: -1.8em;
  }
}





















/* ====================  selector cancionero o himnario  ==================== */
#libro {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background: #1e293b;
  color: white;

  border: 1px solid #000;
  border-radius: 8px;

  padding: 10px 28px 10px 12px;
  font-size: 14px;

  cursor: pointer;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='M5.5 7l4.5 5 4.5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;

  width: 100%;
  margin-top: 9px;
}

.light-mode #libro {
  background: #1e293b;
  color: white;
}

.dark-mode #libro {
  background: #e2e8f0;
  color: black;
}

/* dispositivos varios*/
/* =======================================================================
   MÓVILES GRANDES (>= 480px)
   ======================================================================= */
@media (min-width: 480px) {

  #contenido {
    font-size: 17px;
  }

  .song-line {
    font-size: 15px;
  }

  #alfabeto {
    gap: 6px;
  }

  .alpha {
    min-width: 34px;
    height: 34px;
    font-size: 15px;
  }
}

/* =======================================================================
   TABLETS (>= 768px)
   ======================================================================= */
@media (min-width: 768px) {

  .top-inline {
    gap: 15px;
  }

  #contenido {
    font-size: 18px;
    padding: 20px;
  }

  .song-line {
    font-size: 16px;
  }

  #indice {
    width: 80%;
  }

  #buscador {
    font-size: 18px;
  }

  .alpha {
    min-width: 38px;
    height: 38px;
    font-size: 16px;
  }
}

/* =======================================================================
   DESKTOP (>= 1024px)
   ======================================================================= */
@media (min-width: 1024px) {

  #contenido {
    font-size: 20px;
    padding: 30px;
  }

  .song-line {
    font-size: 18px;
  }

  #indice {
    width: 70%;
  }

  #buscador {
    font-size: 18px;
  }

  .alpha {
    min-width: 40px;
    height: 40px;
  }
}

/* =======================================================================
   PANTALLAS GRANDES (>= 1280px)
   ======================================================================= */
@media (min-width: 1280px) {

  #indice {
    width: 60%;
  }

  #contenido {
    max-width: 1000px;
    margin: 0 auto;
  }
}

/* =======================================================================
   PROYECTOR (SEPARADO DEL RESPONSIVE)
   ======================================================================= */
body.projector {

  background: black;
  color: white;

}

body.projector h1 {
  font-size: 3rem;
  text-align: center;
}

body.projector #contenido {
  font-size: 3rem;
  line-height: 1.6;
  padding: 40px;
}

body.projector .song-line {
  font-size: 3rem;
  line-height: 1.6;
}

body.projector .song-break {
  height: 40px;
}

body.projector #alfabeto {
  justify-content: center;
}

/* BOTON LIMPIAR */
.clear-btn {
  min-width: 80px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #000; /* none */
  cursor: pointer;

  background: #38bdf8;    /* celeste fijo */
  color: white;
  font-weight: bold;

  margin-left: 8px;
  transition: 0.2s;
}

.clear-btn:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* asegurar visibilidad en todos los modos */
.light-mode .clear-btn,
.dark-mode .clear-btn,
body.projector .clear-btn {
  background: #38bdf8;
  color: #1e293b;
}



.alpha {
  min-width: 36px;
  height: 36px;   /* 👈 AQUÍ está el alto */
  border-radius: 8px;
  border: 1px solid #000;
}