/*
Theme Name: Estados del Alma
Author: Julia Sfeir El Khoury
Description: Libro digital Estados del Alma
Version: 1.0
*/

/* =========================================
   RESET GLOBAL
========================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: #f2ebe4;
  font-family: Georgia, "Times New Roman", serif;
  color: #2a2a2a;
}

/* Ocultar TODO lo que WordPress mete por defecto */
header,
footer,
.wp-site-blocks,
.wp-block-template-part,
.wp-block-post-title {
  display: none !important;
}

/* =========================================
   HOME (FRONT PAGE)
========================================= */

.book-home {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.book-home-inner {
  width: 100%;
  max-width: 1200px;
  text-align: center;
}

.book-home-cover {
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,.15);
  box-shadow: 0 12px 35px rgba(0,0,0,.25);
}

.book-home-cover img {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================================
   BOTONES IDIOMA
========================================= */

.book-home-lang {
  margin-top: 2.5rem;
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.book-home-lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 16px 36px;
  font-size: 16px;
  line-height: 1;

  background: #443120;
  color: #fff;
  text-decoration: none;

  border-radius: 4px;
  border: 1px solid #2e2016;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);

  transition: all .2s ease;
}

.book-home-lang a:hover {
  background: #5a4232;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,.3);
}

/* Responsive home */
@media (max-width: 600px) {
  .book-home-lang {
    flex-direction: column;
    gap: 1.2rem;
  }

  .book-home-lang a {
    font-size: 18px;
    padding: 18px 42px;
  }
}

/* =========================================
   P脕GINAS DEL LIBRO
========================================= */

/* CONTENEDOR GENERAL */
.book-page {
  min-height: calc(100vh - 120px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem 3rem;
  background: #f4ece3;
}

/* CONTENIDO */
.book-page-content {
  width: 100%;
  max-width: 1100px; /* antes 900 */
  margin: 0 auto;
}


/* Imagen del libro */
.book-page-image {
  width: 100%;
  background: #fff;
  padding: 1.2rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* Imagen real */
.book-page-image img {
  display: block;
  width: 100%;
  height: auto;

  /* Mejora perceptiva */
  image-rendering: auto;
  -webkit-font-smoothing: antialiased;
  backface-visibility: hidden;
}

@media (max-width: 768px) {

  .book-page {
    padding: 1rem 0.5rem 2.5rem;
    align-items: center;
  }

  .book-page-content {
    max-width: 100%;
  }

  .book-page-image {
    padding: 0.6rem;
    box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  }
}


/* ===============================
   BOOK NAVIGATION
   =============================== */

.book-navigation {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* ---------- Navegaci贸n principal ---------- */

.book-nav-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.book-nav-main .btn {
  background-color: #443120;
  color: #ffffff !important;
  padding: 14px 28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid #2e2016;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transition: background-color 0.2s ease,
              transform 0.15s ease,
              box-shadow 0.15s ease;
}

.book-nav-main .btn:hover {
  background-color: #5a4232;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.3);
}

.book-nav-main .btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

/* ===============================
   BOOK NAV ICON MENU
   =============================== */

.book-nav-secondary {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 0.8rem;
}

.book-nav-secondary .nav-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;

  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  color: #443120 !important;

  opacity: 0.85;
  transition: opacity 0.2s ease,
              transform 0.15s ease;
}

.book-nav-secondary .nav-icon i {
  font-size: 22px;
  line-height: 1;
}

.book-nav-secondary .nav-icon span {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.book-nav-secondary .nav-icon:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* Responsive */

@media (max-width: 600px) {
  .book-nav-secondary {
    gap: 2rem;
  }

  .book-nav-secondary .nav-icon i {
    font-size: 20px;
  }
}


/* ===============================
   TABLA DE CONTENIDO (TOC)
   =============================== */

.book-toc {
  background: #f2ebe4;
  border: 2px solid #000;
  padding: 2.5rem 3rem;
  font-family: "Times New Roman", Georgia, serif;
}

.book-toc-note {
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.book-toc-title {
  text-align: center;
  font-size: 3.2rem;
  color: #c87c1e;
  font-family: "Snell Roundhand", "Edwardian Script ITC", cursive;
  margin-bottom: 2.5rem;
}

.book-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.book-toc-list li {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.toc-index {
  min-width: 2rem;
}

.toc-title {
  color: #000;
  text-decoration: none;
}

.toc-title:hover {
  text-decoration: underline;
}

.toc-dots {
  border-bottom: 1px dotted #000;
  height: 1px;
  align-self: center;
}

.toc-page {
  min-width: 3rem;
  text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
  .book-toc {
    padding: 1.5rem;
  }

  .book-toc-title {
    font-size: 2.2rem;
  }

  .book-toc-list li {
    font-size: 1rem;
  }
}

/* =====================================
   BOOK VIDEOS – DEFINITIVE STYLES
   ===================================== */

.book-videos {
  width: 100%;
  max-width: 1100px;          /* mismo ancho visual del libro */
  margin: 0 auto 2.5rem;
  display: grid;
  gap: 2rem;
}

/* ===== GRID POR CANTIDAD ===== */

.book-videos-1 {
  grid-template-columns: 1fr;
}

.book-videos-2,
.book-videos-3 {
  grid-template-columns: repeat(2, 1fr);
}

.book-videos-4,
.book-videos-5,
.book-videos-6 {
  grid-template-columns: repeat(3, 1fr);
}

/* ===== ITEM ===== */

.book-video-item {
  width: 100%;
  text-align: center;
}

/* ===== CONTENEDOR VIDEO / THUMB ===== */

.book-video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

/* iframe y thumbnail SE COMPORTAN IGUAL */
.book-video-embed iframe,
.book-video-embed img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

/* ===== TÍTULO ===== */

.book-video-title {
  margin-top: 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.4;
  color: #443120;
}

/* =====================================
   MOBILE ADJUSTMENTS
   ===================================== */

@media (max-width: 768px) {

  /* Siempre 1 columna en móvil */
  .book-videos {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  .book-video-item {
    width: 100%;
  }

  .book-video-embed {
    border-radius: 3px;
  }

  /* Reduce impacto visual del play */
  .book-video-embed iframe {
    transform: scale(0.92);
    transform-origin: center;
  }

  .book-video-title {
    font-size: 0.9rem;
    margin-top: 0.6rem;
    padding: 0 0.5rem;
    line-height: 1.35;
  }
}
