
/* === ESTILOS GENERALES === */

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: url('../images/fondo.jpg') no-repeat center center fixed;
  background-size: cover;
  color: white;
}

header {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
}

/* ===== Menú superior - TODAS LAS PÁGINAS ===== */
nav.arriba {
  display: flex;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  padding: 0;
}

nav.arriba a {
  color: black;
  background-color: white;
  padding: 12px 20px;
  text-decoration: none;
  border: 1px solid white;
  border-right: none;
  font-weight: bold;
  transition: background 0.3s, color 0.3s;
}

nav.arriba a:last-child {
  border-right: 1px solid white;
}

nav.arriba a:hover {
  background-color: #b88e6a;
  color: white;
}

/* ===== Botones laterales - TODAS LAS PÁGINAS ===== */
nav.side {
  position: absolute;
  top: 100px;
  left: 10px;
  display: flex;
  flex-direction: column;
}

nav.side button {
  margin: 5px 0;
  padding: 10px;
  width: 140px;
  background: #d9e4f5;
  border: 2px outset #ccc;
  font-weight: bold;
  cursor: pointer;
}

section {
  padding: 20px;
}

h2 {
  border-bottom: 2px solid #b88e6a;
  padding-bottom: 5px;
}


/* === PÁGINA PRINCIPAL === */

.miembro {
  display: inline-block;
  margin: 15px;
  text-align: left;
  transition: transform 0.3s ease;
}

.miembro img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #b88e6a;
}

.miembro:hover {
  cursor: pointer;
  transform: scale(1.05);
}

.img-central {
  display: block;
  margin: 0 0 20px 0;
  max-width: 800px;
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 4px solid #b88e6a;
}

.familia-oculta {
  height: 0;
  opacity: 0;
  overflow: hidden;
  transition: height 0.6s ease-out, opacity 0.6s ease-out;
  margin-top: 0;
  padding-top: 0;
}

.familia-visible {
  height: 200px;
  opacity: 1;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px dashed #b88e6a;
}

.familia-oculta .miembro {
  margin: 10px;
}


/* === FRASES Y ANÉCDOTAS === */

#lista-frases li {
  margin: 10px 0;
}

#lista-anecdotas p {
  margin: 10px 0;
  background: #fff6e5;
  padding: 10px;
  border-radius: 8px;
  color: #333;
}

.frase {
  background-color: #fff6e5;
  color: #333;
  padding: 12px 16px;
  margin: 10px 0;
  border-radius: 10px;
  border-left: 6px solid #b88e6a;
  font-style: italic;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}


/* === PIE DE PÁGINA === */

footer {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  text-align: center;
  padding: 10px;
}


/* === ENCABEZADO GENERAL === */

.header-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #000;
  padding: 10px 20px;
}

.header-logo h1 {
  color: white;
  font-size: 3em;
  text-align: center;
  flex-grow: 1;
}

.logo {
  height: 150px;
  width: 150px;
  object-fit: contain;
}


/* === BOTONES LATERALES FIJOS === */

.side-buttons {
  position: fixed;
  top: 160px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 5px;
}

/* Estilos personalizados para el scrollbar */
.side-buttons::-webkit-scrollbar {
  width: 8px;
}

.side-buttons::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.side-buttons::-webkit-scrollbar-thumb {
  background: rgba(184, 142, 106, 0.6);
  border-radius: 10px;
}

.side-buttons::-webkit-scrollbar-thumb:hover {
  background: rgba(184, 142, 106, 0.8);
}

.side-buttons button {
  background-color: #333;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  width: 150px;
  text-align: left;
}

.side-buttons button:hover {
  background-color: #555;
  transform: scale(1.05);
}

/* === DROPDOWN EN SIDEBAR === */

.sidebar-dropdown {
  width: 150px;
  position: relative;
}

.sidebar-dropdown .dropdown-toggle {
  background-color: #333;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  width: 100%;
  text-align: left;
  white-space: normal;
  line-height: 1.3;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-dropdown .dropdown-toggle:hover,
.sidebar-dropdown .dropdown-toggle.active {
  background-color: #555;
  transform: scale(1.05);
}

.sidebar-dropdown .dropdown-toggle i {
  transition: transform 0.3s;
  font-size: 12px;
}

.sidebar-dropdown .dropdown-toggle.active i {
  transform: rotate(180deg);
}

.sidebar-dropdown .dropdown-content {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 5px 0;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.sidebar-dropdown .dropdown-content.show {
  display: flex;
  max-height: 200px;
}

.sidebar-dropdown .dropdown-content button {
  background-color: #444;
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-dropdown .dropdown-content button:hover {
  background-color: #666;
  transform: translateX(5px);
}

.sidebar-dropdown .dropdown-content button i {
  font-size: 14px;
  width: 16px;
}


/* === ORGANIGRAMA === */

#organigrama {
  padding: 20px;
  margin-left: 190px;
  text-align: left;
}

.tabla-contenedor {
  overflow-x: auto;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 15px;
  border-radius: 10px;
  margin-top: 20px;
}

.tabla-familiar {
  width: 100%;
  border-collapse: collapse;
  color: white;
  font-size: 14px;
}

.tabla-familiar th,
.tabla-familiar td {
  padding: 12px 10px;
  border: 1px solid #b88e6a;
  text-align: left;
}

.tabla-familiar th {
  background-color: #b88e6a;
  color: black;
}

.tabla-familiar tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05);
}

.tabla-familiar tr:hover {
  background-color: rgba(255, 255, 255, 0.1);
}


/* === TARJETAS - VARIAS PÁGINAS === */

.pagina {
  background-color: #1a1a1a;
  border: 2px solid #b88e6a;
  border-radius: 12px;
  padding: 20px;
  width: 320px;
  color: white;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease;
}

.pagina:hover {
  transform: scale(1.03);
  box-shadow: 0 0 15px #b88e6a;
}

.pagina h3 {
  color: #b88e6a;
  border-bottom: 1px solid #b88e6a;
  padding-bottom: 5px;
  margin-bottom: 15px;
}


/* === QUIENES SOMOS === */

.quienes {
  background-color: #1a1a1a;
  border: 2px solid #b88e6a;
  border-radius: 12px;
  padding: 30px;
  color: white;
  width: 80%;
  margin-left: 190px;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease;
}

.quienes h3 {
  color: #b88e6a;
  font-size: 2em;
  border-bottom: 1px solid #b88e6a;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.quienes p {
  font-size: 1.2em;
  line-height: 1.6;
}


/* === FILOSOFÍA === */

.filosofia {
  background-color: #1f1f1f;
  border: 2px solid #b88e6a;
  border-radius: 12px;
  padding: 30px;
  color: white;
  width: 80%;
  margin-left: 190px;
  margin-top: 30px;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease;
}

.filosofia h3 {
  color: #b88e6a;
  font-size: 2em;
  border-bottom: 1px solid #b88e6a;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.filosofia p {
  font-size: 1.2em;
  line-height: 1.6;
}

.filosofia ul {
  list-style-type: square;
  padding-left: 20px;
  margin-top: 10px;
  margin-bottom: 15px;
}

.filosofia li {
  margin-bottom: 8px;
  font-size: 1.1em;
}


/* === CUMPLEAÑOS.HTML === */

#cumpleanos h3 {
  margin-top: 30px;
  color: #ffd700;
  font-size: 1.4em;
  font-weight: bold;
  text-transform: uppercase;
}

#cumpleanos hr {
  border: 0;
  height: 2px;
  background: #ffd700;
  margin-bottom: 15px;
  width: 80%;
}

@media (max-width: 992px) {
  /* Ajustes de diseño general */
}

@media (max-width: 576px) {
  /* Ajustes para pantallas pequeñas */
}

/* === ACCESO.HTML (Login) === */
.acceso {
  max-width: 400px;
  margin: 80px auto;
  padding: 30px;
  background-color: rgba(0, 0, 0, 0.75);
  border-radius: 12px;
  box-shadow: 0 0 15px #28a745;
}

.acceso h2 {
  color: #28a745;
  margin-bottom: 20px;
  text-align: center;
}

label {
  color: white;
}

.btn-acceso {
  background-color: #28a745;
  border: none;
}

.btn-acceso:hover {
  background-color: #218838;
}

.autor-seccion {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 15px;
}

.autor-seccion:last-child {
  border-bottom: none;
}

.autor-nombre {
  font-size: 1.1em;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 5px;
  display: inline-block;
}

.border-left {
  border-left: 3px solid #3498db;
  background-color: #f8f9fa;
  margin-left: 10px;
}

.frase {
  font-style: italic;
  line-height: 1.5;
  color: black;
}

#frases-librito {
  text-align: center;
}

.frases-contenedor {
  display: inline-block;
  text-align: left;
  max-width: 800px;
}

.autor-nombre {
  text-align: center;
  width: 100%;
  display: block;
}

.autor-seccion {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 15px;
}

.autor-seccion:last-child {
  border-bottom: none;
}

.autor-nombre {
  font-size: 1.1em;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 5px;
  display: inline-block;
}

.border-left {
  border-left: 3px solid #3498db;
  background-color: #f8f9fa;
  margin-left: 10px;
}

.anecdota {
  font-style: italic;
  line-height: 1.5;
  color: black;
}

#anecdotas {
  text-align: center;
}

.anecdotas-contenedor {
  display: inline-block;
  text-align: left;
  max-width: 800px;
}

.autor-nombre {
  text-align: center;
  width: 100%;
  display: block;
}

.mes-seccion {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 15px;
}

.mes-seccion:last-child {
  border-bottom: none;
}

.mes-titulo {
  font-size: 1.3em;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 5px;
  display: inline-block;
  text-transform: capitalize;
}

.evento-item {
  border-left: 3px solid #3498db;
  background-color: #f8f9fa;
  margin-left: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.evento-nombre {
  font-weight: bold;
  color: #2c3e50;
  font-style: italic;
}

.evento-fecha {
  color: #000000;
  font-size: 1.1em;
  font-style: italic;
  font-weight: 500;
}

#cumpleanos {
  text-align: center;
}

.fechas-contenedor {
  display: inline-block;
  text-align: left;
  max-width: 800px;
}

.mes-titulo {
  text-align: center;
  width: 100%;
  display: block;
}
 .mes-seccion {
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  height: fit-content;
}

.mes-titulo {
  font-size: 1.3em;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 5px;
  display: inline-block;
  text-transform: capitalize;
}

.evento-item {
  border-left: 3px solid #3498db;
  background-color: #f8f9fa;
  margin-left: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.evento-nombre {
  font-weight: bold;
  color: #2c3e50;
  font-style: italic;
}

.evento-fecha {
  color: #000000;
  font-size: 1.1em;
  font-style: italic;
  font-weight: 500;
}

#cumpleanos {
  text-align: center;
}

.fechas-contenedor {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.mes-titulo {
  text-align: center;
  width: 100%;
  display: block;
}

.user-icon {
  margin-left: 20px;
  margin-right: 20px;
}

.arriba {
  margin-left: 200px;
  padding-left: 20px;
}

#tabla-fam {
  padding: 20px;
  width: 100%;
}

.tabla-contenedor {
  overflow-x: auto;
  width: 100%;
}

#tabla_direcciones {
  width: 100% !important;
  min-width: 800px; /* Ancho mínimo para que no se comprima demasiado */
}

#crearFraseModal .form-control::placeholder {
  color: #cccccc !important;
  opacity: 1;
}

#crearFraseModal .form-control::-webkit-input-placeholder {
  color: #cccccc !important;
}

#crearFraseModal .form-control::-moz-placeholder {
  color: #cccccc !important;
  opacity: 1;
}

#crearFraseModal .form-control:-ms-input-placeholder {
  color: #cccccc !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #tabla_direcciones {
    min-width: 600px;
  }
}

/* Responsive: en pantallas pequeñas mostrar 2 columnas */
@media (max-width: 992px) {
  .fechas-contenedor {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive: en pantallas muy pequeñas mostrar 1 columna */
@media (max-width: 576px) {
  .fechas-contenedor {
    grid-template-columns: 1fr;
  }
}

/* === BOTONES DE ACCIÓN EN FRASES === */

/* Botones pequeños en frases */
.frase .btn-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Botón añadir en autor */
.autor-nombre .btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: white;
}

/* === MODAL DE EDITAR FRASES === */

/* Placeholders en modal de editar */
#editarFraseModal .form-control::placeholder,
#editarFraseModal .form-control::-webkit-input-placeholder,
#editarFraseModal .form-control::-moz-placeholder,
#editarFraseModal .form-control:-ms-input-placeholder {
  color: #cccccc !important;
  opacity: 1 !important;
}

/* Inputs en modal de editar */
#editarFraseModal input.form-control,
#editarFraseModal textarea.form-control {
  background-color: #2a2a2a !important;
  color: white !important;
  border: 1px solid #b88e6a !important;
}

#editarFraseModal input.form-control:focus,
#editarFraseModal textarea.form-control:focus {
  background-color: #2a2a2a !important;
  color: white !important;
  border-color: #b88e6a !important;
  box-shadow: 0 0 0 0.2rem rgba(184, 142, 106, 0.25) !important;
}

/* === ALERTAS PERSONALIZADAS === */

/* Alertas de éxito y error */
.alert {
  border-radius: 8px;
  border: none;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.9);
  color: white;
  border-left: 4px solid #28a745;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.9);
  color: white;
  border-left: 4px solid #dc3545;
}

.alert i {
  margin-right: 8px;
}

/* Auto-desaparecer alertas después de 5 segundos */
.alert.auto-dismiss {
  animation: fadeOut 5s forwards;
}

@keyframes fadeOut {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

/* === MODALES DE ANÉCDOTAS === */

/* Modal de crear anécdota - Placeholders */
#crearAnecdotaModal .form-control::placeholder {
  color: #cccccc !important;
  opacity: 1;
}

#crearAnecdotaModal .form-control::-webkit-input-placeholder {
  color: #cccccc !important;
}

#crearAnecdotaModal .form-control::-moz-placeholder {
  color: #cccccc !important;
  opacity: 1;
}

#crearAnecdotaModal .form-control:-ms-input-placeholder {
  color: #cccccc !important;
}

/* Modal de crear anécdota - Inputs */
#crearAnecdotaModal input.form-control,
#crearAnecdotaModal textarea.form-control {
  background-color: #2a2a2a !important;
  color: white !important;
  border: 1px solid #b88e6a !important;
  font-size: 14px;
  line-height: 1.5;
}

#crearAnecdotaModal input.form-control:focus,
#crearAnecdotaModal textarea.form-control:focus {
  background-color: #2a2a2a !important;
  color: white !important;
  border-color: #b88e6a !important;
  box-shadow: 0 0 0 0.2rem rgba(184, 142, 106, 0.25) !important;
}

/* Modal de editar anécdota - Placeholders */
#editarAnecdotaModal .form-control::placeholder,
#editarAnecdotaModal .form-control::-webkit-input-placeholder,
#editarAnecdotaModal .form-control::-moz-placeholder,
#editarAnecdotaModal .form-control:-ms-input-placeholder {
  color: #cccccc !important;
  opacity: 1 !important;
}

/* Modal de editar anécdota - Inputs */
#editarAnecdotaModal input.form-control,
#editarAnecdotaModal textarea.form-control {
  background-color: #2a2a2a !important;
  color: white !important;
  border: 1px solid #b88e6a !important;
  font-size: 14px;
  line-height: 1.5;
}

#editarAnecdotaModal input.form-control:focus,
#editarAnecdotaModal textarea.form-control:focus {
  background-color: #2a2a2a !important;
  color: white !important;
  border-color: #b88e6a !important;
  box-shadow: 0 0 0 0.2rem rgba(184, 142, 106, 0.25) !important;
}

/* Botones pequeños en anécdotas */
.anecdota .btn-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* === EDITOR DE TEXTO ENRIQUECIDO === */

.contenido-editable {
  min-height: 100px;
  padding: 15px;
  border-radius: 5px;
  line-height: 1.6;
}

#editor-container {
  margin-top: 20px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  background-color: #1a1a1a;
}

#toolbar {
  background: #2a2a2a;
  padding: 10px;
  border: 1px solid #b88e6a;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
}

#toolbar button {
  margin-right: 5px;
  padding: 5px 10px;
  border: 1px solid #b88e6a;
  background: #1a1a1a;
  color: #b88e6a;
  cursor: pointer;
  border-radius: 3px;
  font-weight: bold;
}

#toolbar button:hover {
  background: #b88e6a;
  color: #1a1a1a;
}

#toolbar .toolbar-label {
  margin-left: 15px;
  color: #b88e6a;
  font-size: 14px;
  font-weight: normal;
}

#toolbar select {
  margin-left: 10px;
  padding: 5px;
  border: 1px solid #b88e6a;
  border-radius: 3px;
  background: #1a1a1a;
  color: #b88e6a;
}

#toolbar select:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(184, 142, 106, 0.25);
}

#editor {
  font-family: inherit;
  line-height: 1.6;
  background-color: #1a1a1a !important;
  color: white !important;
  border: 1px solid #b88e6a !important;
  border-top: none !important;
  border-radius: 0 0 5px 5px;
  padding: 15px;
  min-height: 200px;
  font-size: inherit;
}

#editor:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px #b88e6a;
}

/* Asegurar que el texto dentro del editor sea visible y del tamaño normal */
#editor * {
  color: inherit;
  font-size: inherit;
}

#editor p {
  margin-bottom: 1rem;
  font-size: inherit;
}

#editor ul, #editor ol {
  padding-left: 2rem;
  margin-bottom: 1rem;
}

#editor li {
  margin-bottom: 0.5rem;
  font-size: inherit;
}


/* Estilos para botones de navegación */
.btn-navegacion {
  user-select: none;
  outline: none;
}

.btn-navegacion:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

.btn-navegacion:disabled:hover {
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

/* Scroll horizontal suave para el contenedor interno */
.contenedor-relaciones-scroll {
  scrollbar-width: thin;
  scrollbar-color: #b88e6a rgba(42, 42, 42, 0.5);
}

.contenedor-relaciones-scroll::-webkit-scrollbar {
  height: 8px;
}

.contenedor-relaciones-scroll::-webkit-scrollbar-track {
  background: rgba(42, 42, 42, 0.3);
  border-radius: 4px;
}

.contenedor-relaciones-scroll::-webkit-scrollbar-thumb {
  background: #b88e6a;
  border-radius: 4px;
}

.contenedor-relaciones-scroll::-webkit-scrollbar-thumb:hover {
  background: #c89b6f;
}

/* Efectos hover para contenedores */
.contenedor-relacion-individual:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  border-color: #c89b6f;
  background-color: rgba(42, 42, 42, 0.8);
}

.contenedor-descendientes {
  scrollbar-width: thin;
  scrollbar-color: #b88e6a rgba(51, 51, 51, 0.6);
}

.contenedor-descendientes::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.contenedor-descendientes::-webkit-scrollbar-track {
  background: rgba(51, 51, 51, 0.3);
  border-radius: 3px;
}

.contenedor-descendientes::-webkit-scrollbar-thumb {
  background: #b88e6a;
  border-radius: 3px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .contenedor-organigrama-principal {
    padding: 20px !important;
    border-radius: 15px !important;
    margin: 0 10px !important;
  }
  
  /* Botones de navegación en móviles */
  .btn-navegacion {
    padding: 10px 16px !important;
    font-size: 12px !important;
    border-radius: 20px !important;
  }
  
  .btn-navegacion span {
    display: none;
  }
  
  .btn-navegacion i {
    font-size: 14px !important;
  }
  
  .contenedor-relacion-individual {
    min-width: 240px !important;
    max-width: 260px !important;
    padding: 15px !important;
  }
  
  .imagen-circulo {
    width: 60px !important;
    height: 60px !important;
  }
  
  .persona-horizontal-mini .imagen-circulo {
    width: 45px !important;
    height: 45px !important;
  }
  
  .persona-horizontal-mini p {
    font-size: 8px !important;
    max-width: 45px !important;
  }
  
  .persona-horizontal-mini button {
    font-size: 6px !important;
    padding: 1px 2px !important;
  }
  
  h1 {
    font-size: 2rem !important;
  }
  
  .contenedor-relaciones-scroll {
    padding: 10px 0 !important;
    margin: 0 -10px !important;
  }
  
  .contenedor-relaciones-scroll > div {
    gap: 20px !important;
    padding: 0 10px !important;
  }
  
  .contenedor-organigrama-principal h2 {
    font-size: 1.3rem !important;
  }
  
  /* Ajustes para parejas horizontales en móviles */
  .persona-horizontal p {
    font-size: 9px !important;
    max-width: 60px !important;
  }
  
  .persona-horizontal button {
    font-size: 7px !important;
    padding: 1px 3px !important;
  }
}

@media (max-width: 480px) {
  .contenedor-organigrama-principal {
    padding: 15px !important;
    border-radius: 12px !important;
    margin: 0 5px !important;
  }
  
  /* Botones de navegación más compactos en móviles pequeños */
  .btn-navegacion {
    padding: 8px 12px !important;
    font-size: 11px !important;
    border-radius: 18px !important;
  }
  
  .btn-navegacion i {
    font-size: 12px !important;
  }
  
  .contenedor-relacion-individual {
    min-width: 200px !important;
    max-width: 220px !important;
    padding: 12px !important;
  }
  
  .imagen-circulo {
    width: 50px !important;
    height: 50px !important;
  }
  
  .persona-horizontal-mini .imagen-circulo {
    width: 35px !important;
    height: 35px !important;
  }
  
  .persona-horizontal-mini p {
    font-size: 7px !important;
    max-width: 35px !important;
  }
  
  .persona-horizontal-mini button {
    font-size: 5px !important;
    padding: 1px 2px !important;
  }
  
  /* Ajustar gap de hijos en móviles pequeños */
  .contenedor-descendientes > div {
    gap: 8px !important;
  }
  
  h1 {
    font-size: 1.8rem !important;
    margin-bottom: 20px !important;
  }
  
  .contenedor-relaciones-scroll > div {
    gap: 15px !important;
  }
  
  .contenedor-organigrama-principal h2 {
    font-size: 1.1rem !important;
    letter-spacing: 1px !important;
  }
  
  .contenedor-descendientes {
    padding: 10px !important;
  }
  
  /* Ajustes adicionales para parejas horizontales en móviles pequeños */
  .persona-horizontal p {
    font-size: 8px !important;
    max-width: 50px !important;
  }
  
  .persona-horizontal button {
    font-size: 6px !important;
    padding: 1px 2px !important;
  }
  
  /* Reducir gap entre parejas en móviles pequeños */
  .contenedor-relacion-individual > div > div {
    gap: 10px !important;
  }
}

/* Efectos hover mejorados */
.persona-horizontal .imagen-circulo:hover,
.persona-horizontal-mini .imagen-circulo:hover {
  box-shadow: 0 6px 15px rgba(184, 142, 106, 0.4);
}

/* Animación de entrada para el contenedor principal */
.contenedor-organigrama-principal {
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animación de entrada para contenedores individuales */
.contenedor-relacion-individual {
  animation: slideInRight 0.6s ease-out forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Diferentes tiempos de animación para cada relación */
.contenedor-relacion-individual:nth-child(1) { animation-delay: 0.1s; }
.contenedor-relacion-individual:nth-child(2) { animation-delay: 0.2s; }
.contenedor-relacion-individual:nth-child(3) { animation-delay: 0.3s; }
.contenedor-relacion-individual:nth-child(4) { animation-delay: 0.4s; }
.contenedor-relacion-individual:nth-child(5) { animation-delay: 0.5s; }

/* Asegurar que el fondo del cielo se vea bien */
.contenedor-organigrama-principal {
  position: relative;
  overflow: hidden;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Asegurar que el contenido esté sobre las nubes */
.contenedor-organigrama-principal > * {
  position: relative;
  z-index: 10;
}

/* Primera capa de nubes */
.contenedor-organigrama-principal::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  right: -50px;
  bottom: -50px;
  background: 
    /* Nubes de fondo más grandes y muy notorias */
    radial-gradient(ellipse 600px 220px at 20% 20%, rgba(255,255,255,0.45) 0%, transparent 70%),
    radial-gradient(ellipse 550px 200px at 80% 30%, rgba(255,255,255,0.38) 0%, transparent 65%),
    radial-gradient(ellipse 580px 210px at 40% 80%, rgba(255,255,255,0.48) 0%, transparent 72%),
    radial-gradient(ellipse 500px 180px at 90% 70%, rgba(255,255,255,0.42) 0%, transparent 68%),
    radial-gradient(ellipse 650px 240px at 10% 60%, rgba(255,255,255,0.46) 0%, transparent 75%);
  pointer-events: none;
  border-radius: 25px;
  animation: nubesDeAtras 60s ease-in-out infinite reverse;
  z-index: -1;
  opacity: 1;
}

/* Segunda capa de nubes (principal) */
.contenedor-organigrama-principal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    /* Nubes grandes animadas muy visibles */
    radial-gradient(ellipse 450px 180px at 15% 25%, rgba(255,255,255,0.75) 0%, transparent 60%),
    radial-gradient(ellipse 390px 160px at 85% 15%, rgba(255,255,255,0.68) 0%, transparent 55%),
    radial-gradient(ellipse 420px 170px at 50% 75%, rgba(255,255,255,0.78) 0%, transparent 65%),
    radial-gradient(ellipse 350px 140px at 25% 85%, rgba(255,255,255,0.62) 0%, transparent 50%),
    radial-gradient(ellipse 480px 190px at 75% 65%, rgba(255,255,255,0.72) 0%, transparent 58%),
    /* Nubes medianas muy notorias */
    radial-gradient(ellipse 280px 110px at 65% 35%, rgba(255,255,255,0.58) 0%, transparent 50%),
    radial-gradient(ellipse 260px 100px at 35% 55%, rgba(255,255,255,0.62) 0%, transparent 52%),
    radial-gradient(ellipse 300px 120px at 90% 45%, rgba(255,255,255,0.65) 0%, transparent 55%),
    /* Nubes pequeñas muy visibles */
    radial-gradient(ellipse 200px 80px at 10% 60%, rgba(255,255,255,0.52) 0%, transparent 45%),
    radial-gradient(ellipse 220px 90px at 95% 80%, rgba(255,255,255,0.55) 0%, transparent 48%),
    radial-gradient(ellipse 180px 70px at 45% 10%, rgba(255,255,255,0.48) 0%, transparent 42%);
  pointer-events: none;
  border-radius: 20px;
  animation: nubesFlotantes 45s ease-in-out infinite;
  opacity: 1;
  z-index: 0;
}

@keyframes nubesDeAtras {
  0% {
    transform: translateX(-30px) translateY(0) scale(1);
    opacity: 0.95;
  }
  25% {
    transform: translateX(50px) translateY(20px) scale(1.12);
    opacity: 0.8;
  }
  50% {
    transform: translateX(80px) translateY(-15px) scale(0.88);
    opacity: 1;
  }
  75% {
    transform: translateX(35px) translateY(25px) scale(1.05);
    opacity: 0.85;
  }
  100% {
    transform: translateX(-30px) translateY(0) scale(1);
    opacity: 0.95;
  }
}

@keyframes nubesFlotantes {
  0% {
    transform: translateX(0) translateY(0) scale(1);
    opacity: 1;
  }
  20% {
    transform: translateX(-45px) translateY(-18px) scale(1.08);
    opacity: 0.9;
  }
  40% {
    transform: translateX(-25px) translateY(22px) scale(0.95);
    opacity: 0.8;
  }
  60% {
    transform: translateX(60px) translateY(-10px) scale(1.12);
    opacity: 0.95;
  }
  80% {
    transform: translateX(40px) translateY(30px) scale(0.92);
    opacity: 0.85;
  }
  100% {
    transform: translateX(0) translateY(0) scale(1);
    opacity: 1;
  }
}

/* === REPRODUCTOR DE MÚSICA === */

.music-player {
    position: fixed;
    bottom: 0px;
    right: 20px;
    z-index: 1000;
    font-family: 'Arial', sans-serif;
}

/* Pestaña minimizada */
.player-tab {
    background: linear-gradient(135deg, #455bbd 0%, #613b88 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 25px 25px 0 0;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
  }
  
  .player-tab:hover {
    background: linear-gradient(135deg, #253ca7 0%, #4a2470 100%);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.player-tab i {
    margin-right: 5px;
}

.tab-text {
    font-size: 12px;
    font-weight: 500;
}

/* Reproductor completo */
.player-content {
    background: linear-gradient(135deg, #253ca7 0%, #4a2470 100%);
    border-radius: 15px;
    padding: 20px;
    width: 320px;
    color: white;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Header */
.player-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.song-info {
    flex: 1;
}

.song-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    margin: 2px 0 0 0;
    font-size: 12px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-minimize {
    background: transparent;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.btn-minimize:hover {
    color: rgba(255,255,255,0.7);
    transform: scale(1.2);
}

/* Progreso */
.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.time {
    font-size: 11px;
    min-width: 35px;
    text-align: center;
}

.progress-bar {
    flex: 1;
    position: relative;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: white;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

.progress-slider {
    position: absolute;
    top: -6px;
    left: 0;
    width: 100%;
    height: 16px;
    opacity: 0;
    cursor: pointer;
}

/* Controles */
.player-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.control-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.control-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.play-pause {
    width: 55px;
    height: 55px;
    font-size: 20px;
    background: rgba(255,255,255,0.9);
    color: #667eea;
}

.play-pause:hover {
    background: white;
    transform: scale(1.1);
}

/* Volumen */
.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.volume-container i {
    font-size: 12px;
    opacity: 0.8;
}

.volume-slider {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

/* Playlist */
.playlist-container {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 15px;
}

.playlist-title {
    margin: 0 0 10px 0;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
}

.playlist {
    max-height: 120px;
    overflow-y: auto;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.2s ease;
}

.playlist-item:hover {
    background: rgba(255,255,255,0.1);
}

.playlist-item.active {
    background: rgba(255,255,255,0.2);
}

.playlist-item i {
    margin-right: 10px;
    font-size: 12px;
    opacity: 0.7;
}

.playlist-item-info {
    flex: 1;
}

.playlist-item-title {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-artist {
    font-size: 10px;
    opacity: 0.7;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Scrollbar personalizada para reproductor */
.playlist::-webkit-scrollbar {
    width: 4px;
}

.playlist::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.playlist::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.playlist::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Animaciones para reproductor */
@keyframes fadeInPlayer {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOutPlayer {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

.fade-in {
    animation: fadeInPlayer 0.3s ease forwards;
}

.fade-out {
    animation: fadeOutPlayer 0.3s ease forwards;
}

/* === NOTIFICACIÓN DEL REPRODUCTOR === */
.music-notification {
    position: fixed;
    bottom: 60px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    opacity: 0;
    transform: translateX(100%);
    animation: slideInNotification 0.5s ease forwards;
}

.music-notification.fade-out-notification {
    animation: slideOutNotification 0.3s ease forwards;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.notification-content i {
    font-size: 16px;
    color: #ffd700;
}

.notification-content span {
    font-weight: 500;
    font-size: 14px;
}

.notification-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 10px;
}

.notification-close:hover {
    background: rgba(255,255,255,0.3);
}

.notification-arrow {
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #764ba2;
}

/* Animaciones para la notificación */
@keyframes slideInNotification {
    from { 
        opacity: 0; 
        transform: translateX(100%); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes slideOutNotification {
    from { 
        opacity: 1; 
        transform: translateX(0); 
    }
    to { 
        opacity: 0; 
        transform: translateX(100%); 
    }
}

/* Pulso sutil para llamar la atención */
@keyframes pulseNotification {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.music-notification:not(.fade-out-notification) {
    animation: slideInNotification 0.5s ease forwards, 
               pulseNotification 2s ease-in-out 1s infinite;
}

/* ===============================================
   RESPONSIVE DESIGN - MOBILE
   =============================================== */

/* Botón hamburguesa para móviles */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 170px;
  left: 15px;
  z-index: 1001;
  background-color: #b88e6a;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  opacity: 1;
}

.sidebar-toggle:hover {
  background-color: #9a7555;
  transform: scale(1.1);
}

/* Ocultar botón cuando sidebar está activo */
.sidebar-toggle.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Overlay oscuro para cerrar sidebar en móviles */
.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;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Media query para tablets y móviles */
@media (max-width: 768px) {
  /* Mostrar botón hamburguesa */
  .sidebar-toggle {
    display: block;
  }
  
  /* Ocultar sidebar por defecto en móviles */
  .side-buttons {
    position: fixed;
    top: 160px;
    left: -200px;
    width: 180px;
    max-height: calc(100vh - 180px);
    background-color: rgba(0, 0, 0, 0.95);
    padding: 15px;
    border-radius: 0 15px 15px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transition: left 0.3s ease;
    z-index: 1000;
  }
  
  /* Mostrar sidebar cuando está activo */
  .side-buttons.active {
    left: 0;
  }
  
  /* Ajustar contenido principal en móviles */
  main {
    margin-left: 0 !important;
    padding: 15px;
    width: 100%;
  }
  
  /* Ajustar secciones con margin-left */
  section,
  .quienes,
  .galeria-section,
  .image-gallery-container {
    margin-left: 0 !important;
    padding: 15px !important;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Centrar todo el contenido en móviles */
  section > *,
  .quienes > *,
  .galeria-section > * {
    max-width: 100%;
  }
  
  /* Ajustar header en móviles */
  header {
    padding: 15px;
    font-size: 16px;
    text-align: center;
    width: 100%;
  }
  
  /* Ajustar navegación superior */
  nav.arriba {
    flex-wrap: wrap;
    padding: 5px;
  }
  
  nav.arriba a {
    padding: 8px 12px;
    font-size: 12px;
    flex: 1 1 auto;
    text-align: center;
  }
  
  /* Ajustar footer */
  footer {
    padding: 20px 10px;
    font-size: 12px;
  }
  
  /* Ajustar reproductor de música */
  #music-player-fixed {
    bottom: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
  }
  
  #music-player-fixed i {
    font-size: 20px;
  }
  
  /* Ajustar galería en móviles */
  .galeria-grid,
  #galeria-filosofia,
  #galeria-quienes_somos,
  #galeria-familia_campos,
  #galeria-familia_alvarez,
  #imagenes-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    gap: 10px !important;
  }
  
  /* Ajustar modales en móviles */
  #uploadModal > div,
  #imageModal {
    margin: 50px 10px !important;
    max-width: calc(100% - 20px) !important;
  }
  
  /* Ajustar tablas DataTables */
  .dataTables_wrapper {
    font-size: 12px;
  }
  
  table.dataTable {
    font-size: 11px;
  }
  
  table.dataTable th,
  table.dataTable td {
    padding: 8px 5px !important;
  }
  
  /* Ajustar botones */
  .btn,
  button {
    font-size: 13px;
    padding: 8px 12px;
  }
  
  /* Ajustar títulos */
  h1 {
    font-size: 1.8rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
  
  h3 {
    font-size: 1.3rem !important;
  }
  
  h4 {
    font-size: 1.1rem !important;
  }
  
  /* Ajustar editor de texto */
  #editor-container {
    padding: 10px;
  }
  
  #toolbar {
    flex-wrap: wrap;
    padding: 8px !important;
  }
  
  #toolbar > div {
    margin-right: 5px !important;
    margin-bottom: 5px;
  }
  
  #toolbar button {
    padding: 5px 8px !important;
    font-size: 12px;
  }
  
  /* Ajustar sidebar dropdown */
  .sidebar-dropdown {
    width: 100%;
  }
  
  .dropdown-content {
    position: relative;
    left: 0;
    width: 100%;
    box-shadow: none;
  }
}

/* Media query para móviles pequeños */
@media (max-width: 480px) {
  header {
    padding: 10px;
    font-size: 14px;
  }
  
  nav.arriba a {
    padding: 6px 8px;
    font-size: 11px;
  }
  
  .side-buttons {
    width: 160px;
  }
  
  .side-buttons button {
    width: 100%;
    font-size: 14px;
    padding: 10px 15px;
  }
  
  .galeria-grid,
  #galeria-filosofia,
  #galeria-quienes_somos,
  #galeria-familia_campos,
  #galeria-familia_alvarez,
  #imagenes-container {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 8px !important;
  }
  
  h1 {
    font-size: 1.5rem !important;
  }
  
  h2 {
    font-size: 1.3rem !important;
  }
  
  h3 {
    font-size: 1.1rem !important;
  }
  
  /* Ajustar panel de control */
  section .mb-3 {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  section .mb-3 button {
    width: 100%;
    text-align: left;
  }
  
  /* Ajustar formularios */
  .form-control,
  .form-select {
    font-size: 14px;
  }
  
  /* Ajustar cards de videos/imágenes */
  .imagen-card,
  .video-card {
    font-size: 12px;
  }
  
  /* Ajustar notificación de música */
  .music-notification {
    right: 10px;
    bottom: 90px;
    font-size: 12px;
    padding: 10px 15px;
  }
}

/* Media query para pantallas muy pequeñas */
@media (max-width: 360px) {
  .sidebar-toggle {
    padding: 10px 12px;
    font-size: 18px;
  }
  
  .side-buttons {
    width: 140px;
  }
  
  nav.arriba {
    flex-direction: column;
  }
  
  nav.arriba a {
    width: 100%;
    border-right: 1px solid white;
    border-bottom: none;
  }
  
  nav.arriba a:last-child {
    border-bottom: 1px solid white;
  }
}
