:root {
  --bg: rgb(244, 241, 236);
  --text: rgb(152, 139, 114);
  --text-soft: rgb(152, 139, 114);
  --accent: #5C93AA;
  --accent-dark:  rgba(62, 53, 37, 0.55);
  --accent-light: #a7bfdc;
  --overlay: rgba(62, 53, 37, 0.55);
  --white-soft: #f6f1e7;
  --max-content: 760px;
  --max-wide: 1100px;
  --radius-pill: 999px;
  --radius-card: 10px;
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.28);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: "Charter", serif;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.quarto-title-block,
#title-block-header,
.quarto-title,
.quarto-title-meta,
#quarto-header,
.navbar {
  display: none !important;
}

.page-columns,
.page-layout-article,
.content,
main.content {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
}

#quarto-content {
  display: block;
  width: 100%;
  max-width: none;
}

.top-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem 1rem;
  background: var(--bg);
}

.nav-btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--text);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nav-btn:hover,
.nav-btn:focus-visible {
  background: rgba(136, 164, 200, 0.15);
  outline: none;
}

.intro-gif {
  display: flex;
  justify-content: center;
  margin: 0 0 -1rem;
  position: relative;
  z-index: 2;
}

.intro-gif img {
  width: 120px;
  display: block;
}

.hero-editorial {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: var(--bg);
}

.hero-intro {
  text-align: center;
  padding: 0 2rem 2rem;
}

.quote {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 3vw, 1.2rem);
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.quote .script {
  font-family: "Charter", serif;
  font-style: italic;
  font-size: 1.6rem;
  text-transform: none;
  color: rgb(152, 139, 114);
  padding-left: 0.1em;
}

.author {
  margin: 0;
  font-family: "Charter", serif;
  font-style: italic;
  font-size: 1.1rem;
  text-align: center;
  color: var(--accent);
}

.author .initial {
  text-transform: uppercase;
}

.hero-image {
  position: relative;
  min-height: 260px;
  height: 42vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 0;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  display: flex;
  width: 500%;
  z-index: 0;
  animation: slideHero 20s infinite ease-in-out;
}

.slide {
  width: 100vw;
  height: 100%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

@keyframes slideHero {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-80%);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
  text-align: center;
  color: var(--bg);
}

.hero-content h1 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.btn,
.session-button a {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  transition: all 0.25s ease;
}

.btn {
  border: 1px solid var(--bg);
  color: var(--bg);
  background: transparent;
}

.btn:hover,
.btn:focus-visible {
  background: var(--bg);
  color: #3e3525;
  outline: none;
}

.statement,
.content-section {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

.statement h2,
.section-title {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text);
  letter-spacing: 0.08em;
}

.statement p {
  margin: 0 0 1rem;
  text-align: justify;
  hyphens: auto;
}

.content-section {
  max-width: 860px;
}

.section-title {
  font-size: 1.3rem;
  text-transform: none;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.module {
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(139, 123, 90, 0.22);
}

.module summary {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  cursor: pointer;
  list-style: none;
  max-width: 740px;
  margin: 0 auto;
  padding: 0.35rem 0;
}

.module summary::-webkit-details-marker {
  display: none;
}

.module-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 38px;
  padding: 0.35rem 1rem;
  border: 1px solid var(--text);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text);
  box-sizing: border-box;
  flex-shrink: 0;
}

.module[open] .module-badge,
.module-badge.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.module-title {
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.35;
  display: flex;
  align-items: center;
  min-height: 88px;
}

.module-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 0 0 5.5rem;
}

.module-content p {
  margin: 0 0 1rem;
  font-weight: 400;
}

.highlight {
  margin-top: 1.2rem;
}

.session-button {
  margin-top: 1.2rem;
}

.session-button a {
  background: var(--accent);
  color: var(--bg);
}

.session-button a:hover,
.session-button a:focus-visible {
  background: var(--accent-dark);
  outline: none;
}

.team {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 2rem;
}

.profile {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.profile-image {
  width: 240px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-text {
  max-width: 680px;
}

.profile-text h3 {
  margin: 0 0 0.8rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
}

.profile-text p {
  margin: 0 0 1rem;
}

.profile-more {
  display: flex;
  flex-direction: column;
  margin: -0.2rem 0 1rem;
}

.profile-more summary {
  display: inline-block;
  order: 1;
  cursor: pointer;
  list-style: none;
  font-size: 0.95rem;
  color: var(--accent);
}

.profile-more summary::-webkit-details-marker {
  display: none;
}

.profile-more summary:hover,
.profile-more summary:focus-visible {
  text-decoration: underline;
  outline: none;
}

.profile-more summary::after {
  content: "... más";
}

.profile-more[open] summary::after {
  content: "menos";
}

.profile-more[open] summary {
  order: 3;
  margin-top: 0.6rem;
}

.profile-more-content {
  order: 2;
  margin-top: 0.8rem;
}

.profile-instagram {
  margin: 0.8rem 0 0;
}

.profile-instagram a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--accent);
  font-size: 0.95rem;
}

.profile-instagram a:hover,
.profile-instagram a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.arrow {
  line-height: 1;
  font-size: 1rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--accent);
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Componentes extra que ya usas en otras páginas */
.hero-band {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 2rem 0;
}

.hero-band img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.definition-band {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 3rem 0;
  padding: 2rem 0;
  background: var(--accent);
}

.definition-content {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.definition-content p {
  margin: 0;
  color: white;
  font-size: 1.05rem;
  line-height: 1.7;
}

.book-definition {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  width: 100%;
  margin: 3rem 0;
  overflow: hidden;
}

.book-image {
  min-height: 230px;
}

.book-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.book-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.2rem 4.2rem;
  background: var(--accent);
  color: var(--white-soft);
}

.book-script {
  margin: 0 0 1rem;
  font-family: "Brush Script MT", cursive;
  font-size: 1.8rem;
  line-height: 1.17;
}

.book-copy {
  margin: 0;
  max-width: 360px;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--white-soft);
}

.book-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.72);
}

.book-modal.open {
  display: flex;
}

.book-modal-content {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
}

.book-modal-content img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  box-shadow: var(--shadow-soft);
}

.book-close {
  position: absolute;
  top: -0.8rem;
  right: -0.8rem;
  width: 2.2rem;
  height: 2.2rem;
  border: none;
  border-radius: 50%;
  background: var(--white-soft);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

/* Bibliografía */
.books-page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

.books-hero {
  margin-bottom: 2.5rem;
  text-align: center;
}

.books-title {
  margin: 0 0 1.3rem;
  color: var(--accent-light);
  font-size: 1.2rem;
  line-height: 1.1;
  font-weight: 400;
}

.books-intro {
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.book-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.6rem;
  align-items: start;
  padding: 1.4rem;
  border: 2px solid var(--accent-light);
  border-radius: 34px;
}

.book-cover {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  padding-top: 0.2rem;
}

.book-cover img {
  width: 130px;
  height: 170px;
  object-fit: cover;
  border-radius: var(--radius-card);
  display: block;
  background: #e9e5de;
}

.book-info {
  min-width: 0;
  width: 100%;
}

.book-meta {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  padding: 0.38rem 0;
  border-bottom: 1px solid rgba(167, 191, 220, 0.55);
}

.meta-label {
  font-size: 0.72rem;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--text-soft);
}

.meta-value {
  font-size: 0.78rem;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--accent);
  word-break: break-word;
}

.book-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.book-btn {
  min-width: 96px;
  box-sizing: border-box;
  padding: 0.38rem 0.95rem;
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-pill);
  text-align: center;
  text-decoration: none;
  font-size: 0.72rem;
  color: var(--accent);
  transition: background-color 0.25s ease;
}

.book-btn:hover,
.book-btn:focus-visible {
  background: #e8edf6;
  outline: none;
}

@media (max-width: 1100px) {
  .books-grid {
    grid-template-columns: 1fr;
  }

  .books-title {
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .top-nav {
    gap: 0.6rem;
    padding: 1.2rem 1rem;
  }

  .nav-btn {
    font-size: 0.68rem;
    padding: 0.55rem 1rem;
  }

  .intro-gif {
    margin-bottom: 0.6rem;
  }

  .intro-gif img {
    width: 80px;
  }

  .hero-intro {
    padding: 0 1.25rem 1.5rem;
  }

  .quote {
    font-size: 1.4rem;
    line-height: 1.35;
    padding: 0 0.5rem;
  }

  .author {
    font-size: 1.15rem;
  }

  .hero-image {
    height: 260px;
    min-height: unset;
    padding-bottom: 2rem;
  }

  .hero-content {
    padding: 1rem;
  }

  .hero-content h1 {
    font-size: 1.25rem;
    letter-spacing: 0.08em;
  }

  .btn,
  .session-button a {
    font-size: 0.68rem;
    padding: 0.55rem 1rem;
  }

  .statement,
  .content-section {
    padding: 3rem 1.2rem;
  }

  .statement h2,
  .section-title {
    font-size: 1.6rem;
    line-height: 1.2;
  }

  .statement p,
  .module-content,
  .profile-text p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .module summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .module-title {
    font-size: 1rem;
  }

  .module-content {
    padding: 1rem 0 0;
  }

  .module-badge {
    font-size: 0.68rem;
    padding: 0.4rem 1rem;
  }

  .profile {
    flex-direction: column;
    gap: 1rem;
  }

  .profile-image {
    width: 210px;
  }

  .profile-text {
    max-width: 100%;
  }

  .profile-text h3 {
    font-size: 1.2rem;
  }

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

  .book-image {
    min-height: 220px;
  }

  .book-text {
    padding: 2rem 1.4rem;
  }

  .book-script {
    font-size: 1.4rem;
  }

  .book-copy {
    max-width: 100%;
    font-size: 0.95rem;
    line-height: 1.7;
  }
}

@media (max-width: 640px) {
  .books-page {
    padding: 2rem 1rem 3rem;
  }

  .book-card {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    min-height: auto;
    border-radius: 24px;
  }

  .book-cover {
    justify-content: flex-start;
  }

  .book-cover img {
    width: 140px;
    height: 182px;
  }

  .book-meta {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .books-title {
    font-size: 1.9rem;
  }

  .books-intro {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}


/* =====================================================
RESPONSIVE FINAL PORTADA TALLER
===================================================== */

@media (max-width: 900px) {
  .hero-editorial,
  .hero-band,
  .definition-band {
    width: 100%;
    margin-left: 0;
    left: auto;
    transform: none;
  }

  .statement,
  .content-section {
    max-width: 100%;
  }

  .profile {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .top-nav {
    justify-content: flex-start;
    gap: 0.55rem;
    padding: 1rem;
  }

  .nav-btn {
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .intro-gif img {
    width: 84px;
  }

  .hero-intro {
    padding: 0 1.1rem 1.4rem;
  }

  .quote {
    font-size: 1.1rem;
    line-height: 1.45;
    letter-spacing: 0.06em;
  }

  .quote .script {
    display: inline-block;
    font-size: 1.35rem;
  }

  .author {
    font-size: 0.98rem;
  }

  .hero-image {
    height: 320px;
    min-height: 320px;
    padding-bottom: 0;
    align-items: center;
  }

  .hero-content h1 {
    font-size: 1.08rem;
    line-height: 1.35;
    letter-spacing: 0.08em;
  }

  .statement,
  .content-section {
    padding: 2.6rem 1.1rem;
  }

  .statement h2,
  .section-title {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .statement p,
  .module-content p,
  .profile-text p {
    font-size: 0.95rem;
    line-height: 1.68;
    text-align: left;
    hyphens: auto;
  }

  .module summary {
    max-width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .module-title {
    min-height: auto;
    font-size: 1rem;
    line-height: 1.35;
  }

  .module-content {
    padding: 1rem 0 0;
  }

  .module-badge {
    min-width: 0;
    min-height: 34px;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }

  .session-button {
    margin-top: 1rem;
  }

  .team {
    gap: 2.2rem;
  }

  .profile {
    flex-direction: column;
  }

  .profile-image {
    width: min(220px, 72vw);
  }

  .profile-text {
    max-width: 100%;
  }

  .profile-text h3 {
    font-size: 1.15rem;
  }

  .book-modal {
    padding: 1rem;
  }

  .book-close {
    top: 0.5rem;
    right: 0.5rem;
  }
}

@media (max-width: 480px) {
  .top-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-btn {
    text-align: center;
  }

  .hero-image {
    height: 360px;
    min-height: 360px;
  }

  .hero-content h1 {
    font-size: 0.98rem;
  }

  .btn,
  .session-button a {
    width: 100%;
    max-width: 260px;
    text-align: center;
  }
}
