/* ======= General ======= */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #FFF8E7;
  color: #333;
}

h1, h2, h3 {
  margin: 0 0 15px 0;
  color: #333;
}

p {
  margin: 0 0 10px 0;
}

a {
  text-decoration: none;
}

/* ======= Botón ======= */
.btn {
  background-color: #F7931E;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  display: inline-block;
  margin-top: 15px;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #e67e00;
}

/* ======= Header ======= */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: linear-gradient(180deg, #f9f7e8 0%, #FFF8E7 100%);
  border-bottom: none;
  box-shadow: 0 4px 24px rgba(105,200,216,0.10);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 10;
}

header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, #69C8D8 0%, #F7931E 50%, #b39ddb 100%);
  border-radius: 0 0 8px 8px;
  opacity: 0.7;
  animation: header-bar-move 4s linear infinite alternate;
}

@keyframes header-bar-move {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

header .logo {
  font-weight: bold;
  font-size: 2.1rem;
  color: #333;
  letter-spacing: 1px;
  transition: color 0.2s, text-shadow 0.2s;
  cursor: pointer;
}
header .logo:hover {
  color: #F7931E;
  text-shadow: 0 2px 8px #fdc654;
}

header nav a {
  margin: 0 7px;
  color: #333;
  font-weight: 600;
  font-size: 1.25rem;
  transition: color 0.2s, text-shadow 0.2s;
  border-radius: 6px;
  padding: 4px 10px;
}
header nav a:hover {
  color: #F7931E;
  background: #fff3e0;
  text-shadow: 0 2px 8px #fdc654;
}

/* ======= Hero Section ======= */
.hero {
  background: linear-gradient(135deg, #69C8D8 60%, #f7e8ff 100%);
  text-align: center;
  padding: 100px 20px 120px 20px;
  color: white;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 60px 60px;
  box-shadow: 0 8px 32px rgba(105,200,216,0.15);
  min-height: 420px;
  animation: hero-bg-move 10s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 180px;
  background: linear-gradient(0deg, #d1b3ff 0%, rgba(209,179,255,0.0) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero > * { position: relative; z-index: 2; }

@keyframes hero-bg-move {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.hero-decor {
  position: absolute;
  left: 50%;
  top: 30px;
  transform: translateX(-50%);
  z-index: 1;
}

.hero-icon {
  font-size: 4.5rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12));
  display: inline-block;
  margin-bottom: 10px;
  animation: hero-bounce 2.5s infinite;
}

@keyframes hero-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

.hero-title {
  font-family: 'Poppins', 'Comic Sans MS', cursive, sans-serif;
  font-size: 3.2rem;
  font-weight: bold;
  color: #fff;
  margin: 40px 0 18px 0;
  letter-spacing: 1px;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.13);
  z-index: 2;
  position: relative;
}

.hero-desc {
  font-size: 1.35rem;
  color: #f7f7f7;
  margin-bottom: 38px;
  z-index: 2;
  position: relative;
  text-shadow: 1px 1px 8px rgba(0,0,0,0.10);
}

.hero-btn {
  font-size: 1.25rem;
  padding: 18px 38px;
  border-radius: 30px;
  background: linear-gradient(90deg, #F7931E 60%, #fdc654 100%);
  color: #fff;
  font-weight: bold;
  box-shadow: 0 4px 18px rgba(247,147,30,0.18);
  border: none;
  margin-top: 10px;
  transition: background 0.3s, transform 0.2s;
  z-index: 2;
  position: relative;
}
.hero-btn:hover {
  background: linear-gradient(90deg, #fdc654 0%, #F7931E 100%);
  transform: scale(1.07);
}

/* Animaciones de entrada */
.anim-fadein {
  opacity: 0;
  animation: fadeInUp 1.2s ease forwards;
}
.anim-fadein.hero-title { animation-delay: 0.2s; }
.anim-fadein.hero-desc { animation-delay: 0.4s; }
.anim-fadein.hero-btn { animation-delay: 0.6s; }

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

@media (max-width: 900px) {
  .hero-title { font-size: 2.1rem; }
  .hero { padding: 70px 10px 90px 10px; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 1.3rem; }
  .hero-desc { font-size: 1rem; }
  .hero-btn { font-size: 1rem; padding: 12px 20px; }
  .hero { border-radius: 0 0 30px 30px; }
  .hero-icon { font-size: 2.5rem; }
}

/* ======= Historia Section ======= */
.historia {
  padding: 60px 20px;
  text-align: center;
}

.carousel {
  position: relative;
  max-width: 950px;
  min-height: 400px;
  height: 400px;
  margin: 0 auto;
  background: #fff url('../Imagenes/Fondo Ruben Dario.jpg') center center/cover no-repeat;
  border-radius: 30px;
  padding: 50px 60px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.carousel-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.carousel-item {
  display: none;
  text-align: center;
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.5s cubic-bezier(.77,0,.18,1);
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
}

.carousel-item.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
  position: relative;
}

.carousel-item p {
  font-size: 1.35rem;
  line-height: 1.25;
  color: #fff;
  margin: 0 auto;
  padding: 10px 0 0 0;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7), 0 1px 0 #333;
  max-width: 80%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 3.8em;
  text-align: justify;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #3ec1e8;
  color: #fff;
  border: none;
  font-size: 2.5rem;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 6px 18px rgba(62,193,232,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  outline: 4px solid #fff;
  outline-offset: -6px;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: #1b9fc7;
  transform: translateY(-50%) scale(1.13);
  box-shadow: 0 10px 24px rgba(62,193,232,0.35);
}

.carousel-prev {
  left: -45px;
}

.carousel-next {
  right: -45px;
}

/* Indicadores del carrusel */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 30px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.carousel-indicator {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.carousel-indicator.active {
  background: #3ec1e8;
  transform: scale(1.25);
}

.carousel-indicator:hover {
  background: #3ec1e8;
  transform: scale(1.1);
}

/* ======= Cuentos Section ======= */
.cuentos {
  padding: 60px 20px;
  text-align: center;
}

.cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.card {
  background-color: #FDC654;
  padding: 20px;
  border-radius: 10px;
  width: 290px;
  opacity: 0;
  transform: scale(0.8) translateY(40px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  border: none;
  transition: all 0.3s ease;
}

.card.card-anim {
  animation: card-bouncein 0.4s cubic-bezier(.68,-0.55,.27,1.55) forwards;
}

.card:nth-child(1).card-anim { animation-delay: 0.01s; }
.card:nth-child(2).card-anim { animation-delay: 0.09s; }
.card:nth-child(3).card-anim { animation-delay: 0.17s; }

@keyframes card-bouncein {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(40px);
  }
  60% {
    opacity: 1;
    transform: scale(1.08) translateY(-18px);
  }
  80% {
    transform: scale(0.97) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes card-bubble {
  0% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.12) rotate(2deg); }
  60% { transform: scale(0.97) rotate(-2deg); }
  80% { transform: scale(1.04) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.card img {
  width: 100%;
  max-height: 310px;
  object-fit: cover;
}

.card:hover {
  transform: scale(1.15) translateY(-15px);
  z-index: 2;
  box-shadow: 0 15px 40px rgba(247,147,30,0.30), 0 6px 20px rgba(0,0,0,0.20);
  background-color: #ffd54f;
  width: 320px;
}

@keyframes card-pulse {
  0% { transform: scale(1.08) translateY(-12px); }
  50% { transform: scale(1.15) translateY(-15px); }
  100% { transform: scale(1.08) translateY(-12px); }
}

/* ======= Actividades Section ======= */
.actividades {
  background: linear-gradient(135deg, #64cbe0, #51b8d3);
  padding: 40px 20px;
  text-align: center;
}

.actividades h2 {
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 40px;
  font-weight: bold;
}

.actividades ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 600px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 28px 38px;
  justify-items: center;
  align-items: center;
}

.actividades ul li {
  width: 240px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.actividades ul li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #e3f6fa;
  padding: 0;
  border-radius: 14px;
  text-decoration: none;
  color: #333;
  font-weight: 700;
  font-size: 1.25rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.actividades ul li a:hover {
  background-color: #b2ebf2;
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 6px 16px rgba(0,0,0,0.13);
}


/* ======= Registro Section ======= */
.registro {
  padding: 60px 20px;
  text-align: center;
}

.form {
  max-width: 300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form input[type="email"],
.form input[type="password"] {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.form button {
  background-color: #F7931E;
  border: none;
  padding: 10px;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.form button:hover {
  background-color: #e67e00;
}

/* ======= Footer ======= */
footer {
  padding: 20px;
  text-align: center;
  background-color: #FFF8E7;
  border-top: 2px solid #eee;
  font-size: 0.9rem;
}

footer .social a {
  margin: 0 10px;
  color: #333;
  text-decoration: none;
}

footer .social a:hover {
  text-decoration: underline;
}

/* ======= Sopa de Letras ======= */
#sopa-container {
  display: inline-grid;
  grid-template-columns: repeat(12, 40px);
  gap: 3px;
  margin: 30px auto;
  padding: 10px;
  background-color: #ffffff;
  border-radius: 12px;
  border: 3px solid #69C8D8;
}

.celda {
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: bold;
  background-color: #FFF8E7;
  border: 2px solid #FDC654;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.celda.seleccionada {
  background-color: #FFE082;
}

.celda.encontrada {
  background-color: #81C784;
  color: white;
}

#palabras {
  margin-top: 30px;
  font-size: 18px;
  color: #333;
  text-align: center;
}

#palabras h3 {
  margin-bottom: 10px;
  color: #00796b;
}

#lista-palabras {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

#lista-palabras li {
  background-color: #FDC654;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
}


#flipbook .page {
	background:white;
	background-size:100% 100%;
}
#flipbook .shadow {
	-webkit-box-shadow:0 4px 10px #666;
	-moz-box-shadow:0 4px 10px #666;
	-o-box-shadow:0 4px 10px #666;
	-ms-box-shadow:0 4px 10px #666;
	box-shadow:0 4px 10px #666;
}
