/* magazine.css - Estilo libro digital */

.magazine-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* Encabezado */
.magazine-header {
  text-align: center;
  margin-bottom: 2rem;
}

.magazine-header h1 {
  font-family: 'Lora', serif;
  font-size: 2.5rem;
  color: #1e272e;
  margin-bottom: 0.3rem;
}

.magazine-edition {
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
}

/* Navegación superior */
.magazine-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  border: 1px solid #eef2f6;
}

.nav-btn {
  background: none;
  border: 2px solid #0a3d62;
  color: #0a3d62;
  padding: 0.6rem 1.5rem;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: #0a3d62;
  color: white;
}

.page-selector {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.page-selector label {
  font-weight: 500;
  color: #2c3e50;
}

.categoria-select {
  padding: 0.5rem 1rem;
  border: 1px solid #e0e6ed;
  border-radius: 30px;
  font-family: 'Inter', sans-serif;
  background: white;
  cursor: pointer;
}

/* EL LIBRO */
.magazine-book {
  background: #f9f9f9;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid #eef2f6;
  min-height: 600px;
  position: relative;
}

/* PÁGINAS */
.magazine-page {
  display: none;
  padding: 3rem;
  background: white;
  min-height: 600px;
}

.magazine-page.active {
  display: block;
}

/* Animaciones */
@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pageOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

/* PORTADA */
.cover-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  background: linear-gradient(135deg, #0a3d62, #1e5f8e);
  border-radius: 16px;
  color: white;
  text-align: center;
}

.cover-content {
  max-width: 600px;
}

.cover-label {
  font-size: 1.2rem;
  letter-spacing: 8px;
  text-transform: uppercase;
  opacity: 0.8;
}

.cover-title {
  font-size: 4rem;
  margin: 0.5rem 0;
  font-family: 'Lora', serif;
}

.cover-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cover-date {
  font-size: 1rem;
  letter-spacing: 2px;
}

.cover-icon {
  font-size: 4rem;
  margin-top: 2rem;
  opacity: 0.5;
}

/* ÍNDICE */
.indice-page {
  padding: 2rem;
}

.page-title {
  font-size: 2.5rem;
  color: #1e272e;
  margin-bottom: 2rem;
  font-family: 'Lora', serif;
  border-bottom: 2px solid #eef2f6;
  padding-bottom: 0.5rem;
}

.indice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.indice-item {
  text-decoration: none;
  color: #2c3e50;
  padding: 1rem;
  background: #f8fafd;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid #eef2f6;
  text-align: center;
}

.indice-item:hover {
  background: #0a3d62;
  color: white;
  transform: translateY(-3px);
}

/* PÁGINAS DE SECCIÓN */
.section-page {
  padding: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 1rem;
}

.section-icon {
  font-size: 2.5rem;
}

.section-title-page {
  font-size: 2rem;
  margin: 0;
  color: #1e272e;
}

.section-content {
  display: grid;
  gap: 2rem;
}

.magazine-article {
  border-bottom: 1px dashed #e0e6ed;
  padding-bottom: 1.5rem;
}

.magazine-article h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #1e272e;
}

.magazine-article p {
  color: #5f6b7a;
  margin-bottom: 0.5rem;
}

.article-link {
  color: #0a3d62;
  text-decoration: none;
  font-weight: 600;
}

.article-link:hover {
  text-decoration: underline;
}

/* Navegación inferior */
.magazine-nav-bottom {
  display: flex;
  justify-content: center;
}

.page-indicator {
  background: white;
  padding: 0.8rem 2rem;
  border-radius: 40px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  border: 1px solid #eef2f6;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .magazine-nav-top {
    flex-direction: column;
    gap: 1rem;
  }
  
  .indice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cover-title {
    font-size: 2.5rem;
  }
  
  .magazine-page {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .indice-grid {
    grid-template-columns: 1fr;
  }
  
  .page-selector {
    flex-direction: column;
  }
}