/* Books landing */
.books-landing-hero {
  padding: 72px 0 28px 0;
  background: linear-gradient(180deg, rgba(44,62,145,0.08), rgba(44,62,145,0));
}
.books-landing-hero h1 { font-weight: 700; margin: 0 0 6px 0; }
.books-landing-hero p { margin: 0; color: var(--color-muted); }

.books-landing-grid {
  padding: 28px 0 72px 0;
}
/* Root and resets */
:root {
  --color-bg: #ffffff;
  --color-surface: #F5F5F5;
  --color-accent: #2C3E91;
  --color-ink: #1e1e1e;
  --color-muted: #6b6b6b;
  --color-books-bg: #EAE4DA;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8ff 35%, #f4f6ff 100%);
  color: var(--color-ink);
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout */
.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  background: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 200ms ease;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-dot {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.brand .logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: 1.25rem;
}

.main-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid transparent;
  font-size: 1.5rem;
  padding: 6px 10px;
}

.menu {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.menu a {
  text-decoration: none;
  color: var(--color-ink);
  font-weight: 600;
  position: relative;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.menu a:hover::after,
.menu a:focus::after {
  transform: scaleX(1);
}

.menu .has-submenu {
  position: relative;
}

.submenu {
  list-style: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  padding: 8px 0;
  min-width: 180px;
  display: none;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.submenu li a {
  display: block;
  padding: 10px 14px;
  color: var(--color-ink);
}

.submenu li a:hover {
  background: var(--color-surface);
}

.menu li.has-submenu:hover > .submenu,
.menu li.has-submenu:focus-within > .submenu,
.menu li.has-submenu.focus > .submenu {
  display: block;
}

/* Hero */
.hero {
  position: relative;
  min-height: 62vh;
  display: grid;
  background-image: var(--hero-image, url('assets/bg1.jpeg'));
  background-size: cover;
  background-position: var(--hero-position, center);
  background-repeat: no-repeat;
  max-height: 62vh;
}

.hero-image { 
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 45%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: none;
  display: flex;
  align-items: flex-start;
  padding-top: clamp(8px, 4vh, 40px);
  flex-direction: column;
}

/* Accent blur behind hero */
.hero::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 70vw;
  height: 70vw;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  color: #fff;
  text-align: center;
  margin: 0 auto;
  max-width: 90ch;
}

.hero-content.frame {
  width: 295px;
  position: absolute;
  bottom: 100px;
  left: 12%;
}

.hero h1 {
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 16px 0 10px 0;
}

.hero p {
  margin: 0 0 18px 0;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-ink);
  color: var(--color-ink);
  background: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.btn-primary {
  background: #DDB7AB;
  border-color: #DDB7AB;
  color: #fff;
}

.btn-primary:hover {
  box-shadow: 0 10px 22px rgba(221, 183, 171, 0.45);
}

.btn-secondary {
  background: var(--color-surface);
  border-color: var(--color-surface);
  color: var(--color-ink);
}

.btn-invert {
  background: #fff;
  border-color: #fff;
  color: var(--color-accent);
}

/* Books / Carousel */
.books-section {
  background: var(--color-books-bg);
  padding: 56px 0 72px 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

h2 {
  font-weight: 700;
  margin: 0;
  font-size: 30px;
}

.link-all {
  text-decoration: none;
  color: var(--color-ink);
  font-weight: 700;
}

.books-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.books-cta {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.book-card {
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  justify-items: center;
}

.book-card h3 {
  text-decoration: underline;
  font-size: 20px;
}

p {
  font-size: 15px;
}

.book-card img {
  height: 400px;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
}

/* Neutralizar estilos de enlaces de los textos de libros */
.book-text-link {
  color: inherit;
  text-decoration: none;
}
.book-text-link:visited {
  color: inherit;
}
.book-text-link:hover,
.book-text-link:focus,
.book-text-link:active {
  color: inherit;
  text-decoration: none;
}

/* Specific focus areas for book covers */
.book-focus-misterio {
  object-position: center 65%;
}

.book-focus-paris {
  object-position: center 40%;
}

.book-info {
  padding: 18px 18px 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.book-card.reverse {
  grid-template-columns: 1fr 0.8fr;
}

.book-card.reverse img {
  order: 2;
}

.book-actions {
  margin-top: 10px;
}

.rating {
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 12px;
}

.rating .stars {
  letter-spacing: 2px;
  margin-right: 6px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  cursor: pointer;
}

.carousel-btn.prev {
  left: -8px;
}

.carousel-btn.next {
  right: -8px;
}

/* About */
.about-section {
  padding: 56px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
}

.about-text h2 {
  font-weight: 700;
  margin-top: 0;
}

.about-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.about-photo img {
  border-radius: 14px;
  height: 360px;
  object-fit: cover;
}

/* Categories */
.categories-section {
  background: var(--color-surface);
  padding: 48px 0 60px 0;
}

.categories-section h2 {
  font-weight: 700;
  margin: 0 0 18px 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.category-card {
  display: grid;
  grid-template-rows: 160px auto;
  background: #fff;
  border-radius: 14px;
  text-decoration: none;
  color: var(--color-ink);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}

.category-media {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Naturaleza: enfocar parte inferior */
.categories-grid .category-card:nth-child(2) .category-media {
  background-position: center 95%;
}

.category-body {
  padding: 14px 14px 16px 14px;
}

.category-body h3 {
  margin: 0 0 8px 0;
}

/* Footer */
.site-footer {
  background: linear-gradient(135deg, var(--color-accent), #1b285e);
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
  padding: 32px 0 10px 0;
}

.footer-grid h4 {
  margin: 0 0 8px 0;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid a {
  color: #fff;
  text-decoration: none;
}

/* Ensure footer CTA readable */
.site-footer .btn-invert {
  color: var(--color-accent) !important;
}

.brand-invert {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.35);
  padding: 10px 0 20px 0;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 960px) {
  .book-card,
  .book-card.reverse {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .categories-grid {
    grid-template-columns: 1fr 1fr;
  }
  .books-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 10px;
    min-width: 220px;
  }
  .main-nav.open .menu {
    display: flex;
  }
  .nav-toggle {
    display: inline-block;
  }
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
}


