/* =========================
   1) BASE
========================= */
html {
  overflow-x: clip; 
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  background: #f9f9f9;
  font-family: 'Montserrat', sans-serif;
}

/* =========================
   2) HEADER / NAV
========================= */
/* ── Ficha Técnica ── */
.ficha-tecnica { margin-top: 32px; }

.ficha-titulo {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #aaa;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff5e62;
    display: inline-block;
}

.ficha-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.ficha-campo {
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
}

.ficha-clave {
    font-size: 11px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 4px 0;
}

.ficha-valor {
    font-size: 14px;
    color: #333;
    margin: 0;
    font-weight: 500;
}

.navbar {
  background: #000;
  width: 100%;
  box-sizing: border-box;
  height: fit-content;
}

header.navbar {
  background: #000;
  width: 100%;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  width: 100%;
  box-sizing: border-box;
  background: #000;
}

.nav-logo {
  height: 65px;
  width: auto;
}

/* Menú (por defecto oculto, se abre en móvil) */
.nav-menu {
  display: none;
  position: fixed;
  top: 85px;
  right: 20px;
  background: #111;
  padding: 20px;
  border-radius: 8px;
  z-index: 1000;
}

/* Links */
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.nav-links li a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  transition: color .2s;
}

.nav-links li a:hover {
  color: #ff5e62;
}

/* Link activo (página actual) */
.nav-activo {
  color: #ff5e62 !important;
}

/* Submenú en móvil */
.submenu-list {
  display: none;
  list-style: none;
  padding-left: 15px;
  margin: 10px 0 0 0;
}

.submenu-list li {
  margin: 8px 0;
}

/* Iconos */
.mobile-icons {
  display: flex;
  align-items: center;
  gap: 15px;
  color: white;
}

.fa-bars, .fa-search {
  color: white !important;
  font-size: 24px;
  cursor: pointer;
}

/* =========================
   3) BUSCADOR (animado)
========================= */
.search-container {
  position: fixed;
  top: 85px;
  right: 20px;
  background: #111;
  border-radius: 10px;
  z-index: 3000;
  width: 0;
  opacity: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  transition: width .3s ease, opacity .2s ease, padding .3s ease;
}

.search-container.active {
  width: 260px;
  opacity: 1;
  padding: 10px;
  pointer-events: auto;
  overflow: visible;
}

.search-container input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: none;
  outline: none;
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 3001;
}

.search-result-item {
  display: block;
  padding: 12px 15px;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background-color: #f5f5f5;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin-bottom: 2px;
}

.search-result-author {
  font-size: 12px;
  color: #777;
}

/* =========================
   4) HERO
========================= */
.hero h1 {
  color: #ff5e62;
  font-size: 48px;
  font-weight: 700;
  text-align: center;
  line-height: 1.1;
  margin: 50px 20px 10px 20px;
}

.hero-description {
  color: #555;
  font-size: 18px;
  text-align: center;
  max-width: 650px;
  margin: 0 auto 30px auto;
  line-height: 1.5;
  margin-bottom: 0;
}

/* =========================
  5) LIBROS
========================= */

.portada-wrapper { position: relative; }

.portada-wrapper img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    display: block;
    border: 3px solid #e0e0e0;
}

.divider {
    margin: 0px 0;
}

.badge-genero {
    display: inline-block;
    background: #ff5e62;
    color: white;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
}

.portada-wrapper .badge-genero {
    position: absolute !important;
    top: -8px !important;
    left: -8px !important;
    background: #ff5e62;
    color: white;}

a.tarjeta-libro {
    text-decoration: none;
    color: inherit;
    display: flex;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

a.tarjeta-libro .badge-genero {
    position: static;
    margin-bottom: 0;
}

.tarjeta-catalogo {
    width: 160px;
}

.contenedor-libros {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 40px 20px;
}

a.tarjeta-libro {
    text-decoration: none;
    color: inherit;
    display: flex;
}

.tarjeta-libro {
  background: white;
  border-radius: 12px;
  width: 250px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tarjeta-libro:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.tarjeta-libro h2 {
  flex: 1;
  margin: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tarjeta-libro img {
  width: 100%;
  border-radius: 8px;
}

.tarjeta-libro p {
  font-size: 16px;
  color: #444;
  margin: 0;
}

.tarjeta-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tarjeta-footer p {
  margin: 0;
  font-size: 15px;
  color: #444;
}

.btn-descargar {
  display: inline-block;
  margin-top: auto;
  padding: 10px 20px;
  background: #e04a4e;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
}

.btn-descargar:hover {
  background: #c0392b;
}

/* Géneros de libros */
.tarjeta-genero {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 6px;
    background: #f4f4f4;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    color: #555;
    font-family: 'Montserrat', sans-serif;
}

.tarjeta-genero i {
    color: #ff5e62;
    font-size: 11px;
}

.tarjeta-libro {
    border: 1px solid #e0e0e0;
}
/* =========================
   6) FOOTER
========================= */
.footer {
  background: #000;
  color: #aaa;
  text-align: center;
  padding: 20px;
  font-size: 16px;
  margin-top: 0;
}

/* =========================
   7) DMCA
========================= */
.dmca-contenido {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 30px;
  font-family: 'Montserrat', sans-serif;
}

.dmca-contenido h1 {
  color: #ff5e62;
  font-size: 36px;
  margin-bottom: 5px;
}

.dmca-fecha {
  color: #aaa;
  font-size: 13px;
  margin-bottom: 40px;
}

.dmca-contenido h2 {
  color: #222;
  font-size: 18px;
  margin-top: 35px;
  border-left: 4px solid #ff5e62;
  padding-left: 12px;
}

.dmca-contenido p,
.dmca-contenido li {
  color: #555;
  font-size: 15px;
  line-height: 1.7;
}

.dmca-contenido ul {
  padding-left: 20px;
  margin: 10px 0;
}

.dmca-email {
  background: #f4f4f4;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  color: #333 !important;
}

/* =========================
   8) FORMULARIOS
========================= */
.formulario-contenido {
  max-width: 600px;
  margin: 60px auto;
  padding: 0 30px;
}

.formulario-contenido h1 {
  color: #ff5e62;
  font-size: 32px;
  margin-bottom: 8px;
}

.formulario-descripcion {
  color: #777;
  font-size: 15px;
  margin-bottom: 35px;
}

.campo {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.campo label {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.campo input,
.campo textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Montserrat', sans-serif;
  outline: none;
  transition: border .2s;
}

.campo input:focus,
.campo textarea:focus {
  border-color: #ff5e62;
}

.campo textarea {
  height: 120px;
  resize: vertical;
}

.btn-formulario {
  background: #ff5e62;
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background .2s;
}

.btn-formulario:hover {
  background: #c0392b;
}

.formulario-exito {
  margin-top: 15px;
  color: green;
  font-size: 15px;
}

.campos-requeridos {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 20px;
}

/* =========================
   9) LAYOUT BASE
========================= */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
}

.sidebar-generos {
  display: none;
}

/* nav-desktop oculto por defecto (móvil) */
.nav-desktop {
  display: none;
}

/* =========================
   CÓMO LEER
========================= */
.como-leer-contenido {
  max-width: 750px;
  margin: 60px auto;
  padding: 0 30px;
}

.como-leer-contenido h1 {
  color: #ff5e62;
  font-size: 32px;
  margin-bottom: 8px;
}

.como-leer-descripcion {
  color: #777;
  font-size: 15px;
  margin-bottom: 40px;
}

.app-seccion {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.app-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}

.app-icono {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  flex-shrink: 0;
}

.app-icono img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.app-icono.google { background: #4285f4; }
.app-icono.apple  { background: #333; }

.app-header h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
  color: #222;
}

.app-dispositivos {
  margin: 0;
  font-size: 13px;
  color: #888;
}

.app-descripcion {
  color: #555;
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.pasos {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.paso {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.paso-numero {
  background: #ff5e62;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  flex-shrink: 0;
}

.paso-texto {
  color: #444;
  font-size: 15px;
  line-height: 1.5;
  padding-top: 3px;
}

.nota-app {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f0f6ff;
  border-left: 4px solid #4285f4;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.nota-app i {
  color: #4285f4;
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.nota-app p {
  margin: 0;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

.btn-app {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  color: white;
  transition: opacity .2s;
}

.btn-app:hover { opacity: 0.85; }
.google-btn { background: #4285f4; }
.apple-btn  { background: #333; }

.como-leer-nota {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff8f8;
  border-left: 4px solid #ff5e62;
  padding: 15px 20px;
  border-radius: 8px;
  margin-top: 10px;
}

.como-leer-nota i {
  color: #ff5e62;
  font-size: 18px;
}

.como-leer-nota p {
  margin: 0;
  font-size: 14px;
  color: #555;
}

.como-leer-nota a {
  color: #ff5e62;
  font-weight: bold;
}

/* =========================
   10) LAPTOP / DESKTOP
========================= */
@media (min-width: 768px) {

  #menu-icon {
    display: none !important;
  }

  /* ✅ ocultar nav móvil en desktop */
  .nav-menu {
    display: none !important;
  }

  /* ✅ mostrar nav desktop */
  .nav-desktop {
    display: block;
  }

  .nav-desktop .nav-links {
    display: flex;
    flex-direction: row;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .nav-desktop .nav-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    transition: color .2s;
  }

  .nav-desktop .nav-links li a:hover {
    color: #ff5e62;
  }

  .main-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    padding: 0;
    align-items: start;
  }

  .sidebar-fondo {
    background: #d4d4d4;
    border-right: 1px solid rgba(255,255,255,0.18);
    min-height: 100%;
    align-self: stretch;
  }

  .sidebar-generos {
    display: block;
    padding: 45px 28px;
    box-sizing: border-box;
    position: sticky;
    top: 85px;
  }

  .sidebar-generos h3 {
    color: #222;
    font-size: 18px;
    margin: 0 0 20px 0;
  }

  .sidebar-generos ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .sidebar-generos li {
    margin-bottom: 30px;
  }

  .sidebar-generos a {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #222;
    text-decoration: none;
  }

  .sidebar-generos a i {
    width: 18px;
    text-align: center;
    color: #222;
  }

  .sidebar-generos a:hover,
  .sidebar-generos a:hover i {
    color: #ff5e62;
  }

  .contenido-principal {
    padding-top: 0;
  }
}

/* =========================
   11) MÓVIL
========================= */
@media (max-width: 768px) {

  .sidebar-generos {
    display: none;
  }

  .sidebar-fondo {
    display: none;
  }

  #menu-icon {
    display: block !important;
    font-size: 26px;
    cursor: pointer;
  }

  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }

  .menu-overlay.show {
    display: block;
  }

  .nav-menu {
    z-index: 1000;
  }

  .nav-menu.show {
    display: block;
    background: #111;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  }

  .nav-links {
    flex-direction: column !important;
    gap: 15px;
  }

  .nav-links-mobile {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

   .nav-links-mobile .submenu {
    display: block; /* ✅ mostrar géneros en móvil */
  }

  .nav-links-mobile li a {
  color: #fff !important;
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
}

.nav-links-mobile li a:hover {
  color: #ff5e62 !important;
}

  .hero h1 {
    font-size: 28px;
    margin-top: 30px;
  }

  .hero-description {
    font-size: 14px;
    padding: 0 15px;
    margin-bottom: 0;
  }

  .contenedor-libros {
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding: 20px;
  }

  .tarjeta-libro {
    width: 90%;
    max-width: 320px;
  }

  .btn-descargar {
    width: auto;
    display: block;
    margin: 0 auto;
  }
}