/* Logo */
.logo-integrado {
  width: 100%;
  text-align: center;
  margin: 0;
  padding: 10px 0;
  background: transparent;
}

.logo-brillo {
  display: inline-block;
  position: relative;
  transition: transform 0.3s ease;
  border-radius: 12px;
}

.logo-brillo img {
  width: 150px;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 0 8px 3px rgba(212,175,55,0.6);
  transition: box-shadow 0.3s ease;
}

.logo-brillo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 215, 0, 0.4) 0%,
    rgba(255, 255, 224, 0.7) 50%,
    rgba(255, 215, 0, 0.4) 100%
  );
  opacity: 0;
  transform: skewX(-20deg) translateX(-100%);
  transition: none;
}

.logo-brillo:hover {
  transform: scale(1.04);
}

.logo-brillo:hover::before {
  animation: shine 0.8s ease forwards;
  opacity: 1;
}

@keyframes shine {
  0% {
    transform: skewX(-20deg) translateX(-100%);
  }
  100% {
    transform: skewX(-20deg) translateX(200%);
  }
}

/* Nav */
nav {
  background-color: #111;
  padding: 4px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.8);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 24px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  padding: 4px 8px;
  display: inline-block;
  transition: color 0.3s ease;
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background-color: #ffcc00;
  transition: width 0.3s ease;
  border-radius: 2px;
}

nav ul li a:hover {
  color: #ffcc00;
}

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

nav ul li a.active {
  color: #ffcc00;
}

nav ul li a:focus {
  outline: 2px solid #ffcc00;
  outline-offset: 3px;
}

/* Body */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #fef9f0;
  margin: 0;
  padding: 1rem;
  color: #222;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Titulos */
h1 {
  text-align: center;
  color: #FFD700;
}

/* Texto principal */
.texto-principal {
  background: #fff8dccc;
  border-radius: 12px;
  padding: 2rem 2.5rem;
  margin: 2rem auto 3rem auto;
  max-width: 850px;
  color: #5a3e00;
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 500;
  box-shadow: 0 0 10px rgba(181, 142, 17, 0.3);
  text-align: justify;
  font-family: 'Georgia', serif;
  position: relative;
}

.texto-principal p {
  margin-bottom: 1.4rem;
}

.texto-principal p:last-child {
  margin-bottom: 0;
}

.texto-principal .emoji {
  font-size: 1.5rem;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.texto-principal .titulo {
  font-weight: 700;
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 1.8rem;
  color: #b58e11;
  text-shadow: 1px 1px 3px #d4af37;
}

.texto-principal hr {
  border: none;
  height: 1px;
  background: #d4af37cc;
  margin: 1.8rem 0;
  border-radius: 3px;
}

/* Cards container */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 3rem;
}

/* Card estilo mejorado */
.card {
  background: linear-gradient(145deg, #fef9f0, #d4af37);
  width: 320px;
  height: 450px;
  border-radius: 16px;
  box-shadow:
    0 0 8px 3px rgba(212,175,55,0.8),
    0 4px 12px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  color: #3b2f0b;
  font-weight: 600;
  user-select: none;
  border: 3px solid #b58e11; /* marco dorado */
  box-sizing: border-box;
  text-align: center;

  /* Evitar que el texto se salga */
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

/* Card front contenido */
.card-front {
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  width: 100%;

  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  white-space: normal;
  padding: 0 0.5rem;
  box-sizing: border-box;
  padding-bottom: 3rem;
}

/* Imagen del escudo sin marco ni recortes */
.escudo-limpio {
  width: auto;
  max-width: 160px;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  background: transparent;
  margin-bottom: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.card-front img {
  width: 120px;
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.3));
  align-self: center;
}

.card-front span {
  font-size: 1rem;
  color: #5a4200;
  margin-top: auto;
  padding: 0.5rem 0;
  font-style: italic;
  letter-spacing: 0.02em;
  border-top: 1px solid #b58e11;
  user-select: none;
}

/* Texto "clic para ver más" */
.card-front::after {
  content: ".";
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: rgba(90,66,0,0.7);
  font-weight: 500;
  pointer-events: none;
  user-select: none;
  letter-spacing: 0.05em;
  z-index: 2;
}
.click-ver-mas {
  margin-top: auto;
  font-size: 0.8rem;
  font-style: italic;
  color: #a57c1b; /* dorado más suave */
  background: transparent;
  border-top: 1px dashed #d4af37; /* línea dorada sutil */
  padding: 6px 0 4px 0;
  width: 100%;
  text-align: center;
  font-weight: 500;
  opacity: 0.8;
  user-select: none;
  pointer-events: none;
  letter-spacing: 0.3px;
}


/* Overlay y carta grande */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.big-card {
  background: linear-gradient(to bottom right, #fff8dc, #ffd700);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  max-width: 500px;
  color: #333;
  text-align: center;
}

.big-card h3 {
  color: #b58e11;
}

.big-card p {
  margin: 0.5rem 0;
}

.big-card img {
  width: 100px;
  height: auto;
  margin-bottom: 1rem;
}

/* Periodico Layout */
.periodico-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start; /* 👈 CLAVE: evita igualar alturas */
  width: 100%;
  max-width: 900px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  overflow-x: hidden;
}


/* Asegura que hijos de sidebar no salgan del contenedor */
.periodico-layout > * {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Secciones mágicas dentro del sidebar */
.seccion-magica {
  border: 2px solid #b58e11;
  border-radius: 16px;
  padding: 0.6rem;
  text-align: center;
  background: linear-gradient(145deg, #fef9f0, #d4af37);
  box-shadow:
    0 0 8px 3px rgba(212,175,55,0.8),
    0 2px 8px rgba(0,0,0,0.15);

  /* Ajuste para altura justa */
  height: auto;
  min-height: 0;
  display: block;
}

/* Títulos en el sidebar */
.seccion-magica > .titulo {
  font-weight: 700;
  font-size: 1.3rem;
  color: #b58e11;
  text-shadow: 1px 1px 2px #d4af37;
  margin-bottom: 0.5rem;
}

/* Carrusel */
.carousel {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding-bottom: 0.3rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  box-sizing: border-box;
  cursor: grab;
  overflow-y: visible;
}

.carousel:active {
  cursor: grabbing;
}

/* Items del carrusel */
.carousel-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 200px;
  max-width: 100%;
  border-radius: 16px;
  border: 2px solid #b58e11;
  background: linear-gradient(145deg, #fff8dc, #d4af37);
  box-shadow:
    0 0 8px 2px rgba(212,175,55,0.8),
    0 3px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  user-select: none;
}

.carousel-item:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 20px 6px rgba(212,175,55,1),
    0 6px 18px rgba(0,0,0,0.3);
}

/* Imágenes y videos en carrusel */
.carousel-item img,
.carousel-item video {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  user-select: none;
}

/* Imagen flotante */
.imagen-flotante {
  width: 100%;
  max-width: 480px; /* o más, como 600px */
  max-height: none; /* o elimínalo si no necesitas limitar altura */
  animation: flotar 3s ease-in-out infinite alternate;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(212,175,55,0.7);
  margin-top: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}


@keyframes flotar {
  0% {
    transform: translateY(0) rotate(0deg);
    filter: drop-shadow(0 0 3px rgba(212,175,55,0.8));
  }
  100% {
    transform: translateY(-15px) rotate(1deg);
    filter: drop-shadow(0 0 12px rgba(212,175,55,1));
  }
}

/* Responsive */
@media (max-width: 850px) {
  .periodico-layout {
    display: block;
    max-width: 95%;
    padding: 0 0.5rem;
  }
  .sidebar {
    margin-top: 2rem;
  }
  .carousel-item {
    width: 180px;
  }
  .carousel-item img,
  .carousel-item video {
    height: 120px;
  }
  .card {
    width: 280px;
    height: 420px;
  }
  .card-front {
    padding: 0 0.8rem;
    font-size: 0.9rem;
  }
}



