/*
Theme Name: Erudid
Theme URI: https://erudid.com
Author: Erudid
Description: Tema base personalizado de Erudid.
Version: 1.0.3
*/

/* Degradado azul hielo de las páginas claras */
.bg-ice-gradient {
  background: linear-gradient(180deg, #f4f8ff 0%, #f7faff 35%, #fafcff 70%, #ffffff 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ------------------------------------------------------------------
   Bienvenida (page-bienvenida.php)
   ------------------------------------------------------------------ */

/* Panel del saludo */
.hero-panel {
  background:
    radial-gradient(60% 140% at 100% 0%, rgba(37, 99, 235, 0.10), rgba(37, 99, 235, 0) 60%),
    radial-gradient(50% 100% at 0% 100%, rgba(122, 162, 255, 0.14), rgba(122, 162, 255, 0) 65%),
    #edf4fe;
}

/* La mano saluda una sola vez al cargar */
@keyframes erudid-wave {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(16deg); }
  30%  { transform: rotate(-8deg); }
  45%  { transform: rotate(14deg); }
  60%  { transform: rotate(-4deg); }
  75%  { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}
.wave {
  display: inline-block;
  transform-origin: 70% 80%;
  animation: erudid-wave 1.6s ease-in-out .4s 1;
}

@media (prefers-reduced-motion: reduce) {
  .wave { animation: none; }
}

/* ------------------------------------------------------------------
   Contenido de páginas (page.php)
   Tailwind quita los estilos por defecto de títulos, listas y enlaces;
   aquí se devuelven solo dentro del contenido escrito en el editor.
   ------------------------------------------------------------------ */
.erudid-content {
  color: #334155;
  font-size: 1rem;
  line-height: 1.75;
}

.erudid-content > * + * { margin-top: 1.1em; }

.erudid-content h2,
.erudid-content h3,
.erudid-content h4 {
  color: #0b1329;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-top: 2em;
}
.erudid-content h2 { font-size: 1.5rem; }
.erudid-content h3 { font-size: 1.25rem; }
.erudid-content h4 { font-size: 1.1rem; }

.erudid-content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.erudid-content a:hover { color: #1d4ed8; }

.erudid-content ul { list-style: disc; padding-left: 1.5em; }
.erudid-content ol { list-style: decimal; padding-left: 1.5em; }
.erudid-content li + li { margin-top: 0.35em; }

.erudid-content strong { color: #0b1329; font-weight: 700; }

.erudid-content blockquote {
  border-left: 3px solid #2563eb;
  padding-left: 1em;
  color: #475569;
  font-style: italic;
}

.erudid-content img { max-width: 100%; height: auto; border-radius: 0.75rem; }

.erudid-content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.erudid-content th,
.erudid-content td { border: 1px solid #e2e8f0; padding: 0.6em 0.8em; text-align: left; }
.erudid-content th { background: #edf4fe; color: #0b1329; font-weight: 600; }

.erudid-content hr { border: 0; border-top: 1px solid #e2e8f0; margin: 2em 0; }

/* ------------------------------------------------------------------
   Paginación de resultados (search.php)
   ------------------------------------------------------------------ */
.erudid-pagination { margin-top: 2.5rem; }

.erudid-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.erudid-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.85rem;
  border-radius: 9999px;
  border: 1px solid #dbeafe;
  background: #fff;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color .15s, color .15s, border-color .15s;
}

.erudid-pagination a.page-numbers:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.erudid-pagination .page-numbers.current {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.erudid-pagination .page-numbers.dots {
  border: 0;
  background: transparent;
  min-width: auto;
}

/* ------------------------------------------------------------------
   Página 404 (404.php)
   ------------------------------------------------------------------ */
.e404-num {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 150px;
  font-weight: 800;
  fill: #0b1329;
  letter-spacing: -0.04em;
}

/* El planeta respira un poco */
.e404-planet {
  transform-origin: 260px 110px;
  animation: e404-breathe 6s ease-in-out infinite;
}
@keyframes e404-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}

/* La nave flota a la deriva, girando apenas */
.e404-drift {
  animation: e404-drift 4.5s ease-in-out infinite;
}
@keyframes e404-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(6px, -8px) rotate(6deg); }
}

/* El propulsor chisporrotea (se quedó sin combustible) */
.e404-flame {
  transform-origin: 6px 11px;
  animation: e404-sputter 1.4s steps(2, end) infinite;
}
@keyframes e404-sputter {
  0%, 60%  { opacity: 1; }
  70%, 80% { opacity: .15; }
  100%     { opacity: .9; }
}

/* Estrellas */
.e404-twinkle { animation: e404-twinkle 3s ease-in-out infinite; }
.e404-d1 { animation-delay: .8s; }
.e404-d2 { animation-delay: 1.6s; }
@keyframes e404-twinkle {
  0%, 100% { opacity: .9; }
  50%      { opacity: .25; }
}

@media (prefers-reduced-motion: reduce) {
  .e404-planet, .e404-drift, .e404-flame, .e404-twinkle { animation: none; }
}