@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600&family=Crimson+Pro:wght@300;400&family=Playfair+Display:wght@600&family=Cinzel:wght@400;600&display=swap');

/* --- BASE GENERAL --- */
body {
  margin: 0;
  font-family: 'Crimson Pro', serif;
  font-size: 15px;
  color: #e0e0e0;
  line-height: 1.7;
  background: linear-gradient(-45deg, #0b0b0c, #121317, #1a1b1f, #0b0c10);
  background-size: 400% 400%;
  animation: noche 60s ease-in-out infinite;
  scroll-behavior: smooth;
}

h1, h2, h3 {
  font-family: 'Cinzel', serif;
  color: #bfa76f;
  letter-spacing: 3px;
}

/* --- EFECTO DE NIEBLA Y HALO --- */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02), transparent 100%),
              radial-gradient(circle at 100% 100%, rgba(255,255,255,0.02), transparent 100%);
  animation: movimientoNiebla 0.6s infinite alternate;
  z-index: -1;
}

.halo {
  position: fixed;
  top: 50%; left: 50%;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.35), transparent 70%);
  transform: translate(-50%, -50%);
  animation: respirar 6s infinite ease-in-out;
  z-index: -2;
  pointer-events: none;
}

/* --- HEADER --- */
header {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #111, #4b3a1e, #111);
  background-size: 200% 200%;
  animation: moverGradiente 15s ease infinite alternate;
  box-shadow: 0 0 25px rgba(212,175,55,0.15);
}

header h1 {
  font-size: 2.3rem;
  color: #d4af37;
  text-shadow: 0 0 8px rgba(212,175,55,0.4);
  margin-bottom: 10px;
  animation: aparecer 1.5s ease-out forwards;
}

header h1:hover {
  text-shadow: 0 0 15px rgba(212,175,55,0.8);
}

header p {
  color: #ddd;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* --- NAVEGACIÓN --- */
nav {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
  background: #0a0a0a;
  padding: 1rem;
  border-bottom: 1px solid rgba(212,175,55,0.25);
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  z-index: 10;
}

nav a {
  color: #d4af37;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s ease;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #d4af37;
  transition: width 0.3s;
}

nav a:hover::after, nav a.active::after {
  width: 100%;
}

nav a:hover {
  color: #fff;
  text-shadow: 0 0 8px #d4af37;
}

/* --- SECCIONES --- */
section {
  max-width: 900px;
  margin: 3rem auto;
  padding: 1rem;
  text-align: justify;
  animation: aparecer 1.2s ease forwards;
  opacity: 0;
}

h2 {
  color: #d4af37;
  border-bottom: 2px solid #d4af37;
  display: inline-block;
  margin-bottom: 1rem;
}

/* --- CITAS --- */
.cita {
  border-left: 3px solid #d4af37;
  padding-left: 15px;
  font-style: italic;
  color: #ccc;
  max-width: 700px;
  margin: 40px auto;
}

/* --- REFLEXIONES --- */
.reflexiones p {
  background: rgba(255,255,255,0.02);
  padding: 1.2rem;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(212,175,55,0.05);
  margin-bottom: 1.5rem;
  transition: 0.4s ease;
}

.reflexiones p:hover {
  box-shadow: 0 0 25px rgba(212,175,55,0.25);
  transform: scale(1.01);
}

.reflexiones a {
  color: #d4af37;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.reflexiones a:hover {
  color: #fff5cc;
  text-shadow: 0 0 8px #d4af37;
}

/* --- GALERÍA --- */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.galeria img {
  width: 100%;
  border-radius: 10px;
  transition: transform 0.4s, box-shadow 0.4s;
  box-shadow: 0 4px 10px rgba(212,175,55,0.1);
}

.galeria img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(212,175,55,0.3);
}

/* --- PIE DE PÁGINA --- */
footer {
  background: #0a0a0a;
  text-align: center;
  padding: 1.2rem;
  font-size: 0.9rem;
  border-top: 1px solid rgba(212,175,55,0.2);
  box-shadow: 0 -2px 8px rgba(212,175,55,0.1);
  color: #bfbfbf;
}

footer span {
  color: #d4af37;
}

/* --- DETALLES --- */
.autor {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #888;
}

.fecha-auto {
  text-align: center;
  font-size: 0.9rem;
  color: #aaa;
  opacity: 0.8;
  margin-top: 30px;
}

/* --- EFECTOS VISUALES --- */
@keyframes moverGradiente {
  30% { background-position: 30% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes noche {
  30% { background-position: 30% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes respirar {
  0%, 100% { opacity: 10; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 10; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes movimientoNiebla {
  20% { background-position: 10, 100% 100%; }
  100% { background-position: 50% 50%, 150% 150%; }
}

@keyframes aparecer {
  from { opacity: 5; transform: translateY(20px); }
  to { opacity: 4; transform: translateY(0); }
}
/* --- Header (ya no fijo, pero estable y siempre visible) --- */
header {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15,15,15,0.95), rgba(15,15,15,0.85));
  text-align: center;
  padding: 3rem 1rem 2rem;
  border-bottom: 1px solid rgba(212,175,55,0.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.6);
}

header h1 {
  color: #d4af37;
  font-size: 2.3rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(212,175,55,0.2);
}

header p {
  color: #d0d0d0;
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Centrado general de las reflexiones --- */
.reflexiones {
  max-width: 850px;
  margin: 3rem auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Estilo de cada reflexión --- */
.reflexion-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem 1.8rem;
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  margin: 1.5rem 0;
  text-align: center;
  font-size: 1.15rem;
  color: #ddd;
  box-shadow: 0 0 25px rgba(212,175,55,0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.reflexion-item:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px rgba(212,175,55,0.25);
}

/* --- Enlaces dentro de reflexiones --- */
.enlace-reflexion {
  display: block;
  color: #d4af37;
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 5px;
  text-decoration: none;
  transition: color 0.5s ease, text-shadow 0.5s ease;
}

.enlace-reflexion:hover {
  color: #fff5cc;
  text-shadow: 0 0 10px #d4af37;
}
/* --- Aparición suave al leer --- */
.reflexion-item {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.0s ease, transform 1.2s ease, box-shadow 1s ease;
}

.reflexion-item.visible {
  opacity: 1;
  transform: translateY(0);
}
.texto-reflexion {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #ddd;
  text-align: justify;
  max-width: 850px;
  margin: 3rem auto;
  font-family: 'Crimson Text', serif;
  padding: 1rem 2rem;
}

.mensaje-final {
  text-align: center;
  margin-top: 2rem;
  font-style: italic;
  color: #d4af37;
  opacity: 0.5;
  animation: respirarMensaje 7s infinite ease-in-out;
}

@keyframes respirarMensaje {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.navegacion-reflexiones {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 850px;
  margin: 2rem auto;
  padding: 0 2rem;
}
.btn-volver, .btn-siguiente {
  color: #d4af37;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.6s ease, text-shadow 0.5s ease;
}

.btn-volver:hover, .btn-siguiente:hover {
  color: #fff5cc;
  text-shadow: 0 0 5px #d4af37;
}
.navegacion-reflexiones {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 2.5rem auto 1rem;
  padding: 0.5rem;
  text-align: center;
}

.navegacion-reflexiones a {
  color: #d4af37;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: color 0.3s, text-shadow 0.3s;
}

.navegacion-reflexiones a:hover {
  color: #fff;
  text-shadow: 0 0 10px #d4af37;
}

/* Asegura separación visible aunque flex falle */
.separador {
  width: 10px;
}
/* Fondo animado de flores */
.fondo-flores {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}