/* ============================================
   homepage.css
   Estilos para la página principal de tpellicer.com
   Modo claro — Público 30-70+ años
   ============================================ */

/* --- Variables --- */
:root {
  /* Fondos */
  --color-bg-body: #f5f5f0;
  --color-bg-white: #ffffff;
  --color-bg-light: #fafaf7;

  /* Texto */
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #4a4a4a;
  --color-text-muted: #6b6b6b;
  --color-text-on-dark: #ffffff;
  --color-text-on-dark-muted: #d0d0d0;

  /* Botones — alto impacto */
  --color-amazon: #ff9900;
  --color-amazon-hover: #e68a00;
  --color-amazon-text: #1a1a1a;

  --color-ebook: #1a3a5c;
  --color-ebook-hover: #0f2a44;
  --color-ebook-text: #ffffff;

  --color-muestra: #3498db;
  --color-muestra-hover: #2980b9;
  --color-muestra-text: #ffffff;

  /* Acentos */
  --color-accent: #c0392b;
  --color-accent-light: #e74c3c;

  /* Bordes */
  --color-border: #e0e0e0;
  --color-border-dark: #cccccc;

  /* Sombras */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.14);

  /* Fuentes */
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --max-width: 1200px;
  --header-height: 60px;

  /* Tamaños — legibles 30-70+ */
  --fs-base: 18px;
  --fs-sm: 16px;
  --fs-md: 20px;
  --fs-lg: 24px;
  --fs-xl: 28px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg-body);
  color: var(--color-text-primary);
  line-height: 1.7;
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  background: var(--color-bg-white);
  border-bottom: 2px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: 0.5px;
}

.header__logo:hover {
  color: var(--color-accent);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__nav-link {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--color-text-secondary);
  padding: 0.5rem 0.75rem;
  transition: color 0.2s ease;
}

.header__nav-link:hover {
  color: var(--color-accent);
}

.header__nav-sep {
  color: var(--color-border-dark);
  font-size: var(--fs-sm);
}

.header__social {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header__social-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}

.header__social-link:hover {
  color: var(--color-accent);
}

.header__social-icon {
  width: 20px;
  height: 20px;
}

/* ============================================
   HERO — IMAGEN DE FONDO
   ============================================ */
.hero {
  position: relative;
  background: url('../images/IMAGEN_PENDIENTE.jpg') center/cover no-repeat;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.hero__container {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  width: 100%;
}

.hero__content {
  flex: 1;
  max-width: 550px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--color-text-on-dark);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.hero__subtitle {
  font-size: var(--fs-xl);
  color: var(--color-text-on-dark);
  margin-bottom: 0.5rem;
}

.hero__description {
  font-size: var(--fs-md);
  color: var(--color-text-on-dark-muted);
  margin-bottom: 2.5rem;
}

/* Botones de compra */
.hero__purchase {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero__btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-size: var(--fs-sm);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  font-weight: 600;
}

.hero__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero__btn-icon {
  font-size: 1.3rem;
  font-weight: 700;
  font-style: italic;
  flex-shrink: 0;
}

.hero__btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.hero__btn-text strong {
  font-size: var(--fs-sm);
  letter-spacing: 0.5px;
}

.hero__btn-text small {
  font-size: 14px;
  opacity: 0.9;
}

.hero__btn--amazon {
  background: var(--color-amazon);
  color: var(--color-amazon-text);
}

.hero__btn--amazon:hover {
  background: var(--color-amazon-hover);
}

.hero__btn--ebook {
  background: var(--color-ebook);
  color: var(--color-ebook-text);
}

.hero__btn--ebook:hover {
  background: var(--color-ebook-hover);
}

.hero__link-libros {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--color-text-on-dark);
  margin-bottom: 1.5rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hero__link-libros:hover {
  border-color: var(--color-text-on-dark);
  background: rgba(255, 255, 255, 0.1);
}

.hero__quote {
  font-size: var(--fs-md);
  color: var(--color-text-on-dark-muted);
  font-style: italic;
}

.hero__quote em {
  opacity: 0.7;
}

/* Portada del libro */
.hero__book {
  flex-shrink: 0;
  text-align: center;
}

.hero__book-cover {
  position: relative;
  width: 300px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hero__book-cover img {
  width: 100%;
  display: block;
  border-radius: 4px;
}

.hero__badge {
  position: absolute;
  top: -12px;
  left: -12px;
  background: var(--color-amazon);
  color: var(--color-amazon-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero__book-author {
  margin-top: 1rem;
  font-size: var(--fs-md);
  color: var(--color-text-on-dark-muted);
}

/* ============================================
   CATÁLOGO DE OBRAS
   ============================================ */
.catalogo {
  background: var(--color-bg-white);
  padding: 3.5rem 2rem;
  border-bottom: 1px solid var(--color-border);
}

.catalogo__title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  text-align: center;
  color: var(--color-text-primary);
  margin-bottom: 2.5rem;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.catalogo__grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.libro {
  display: flex;
  background: var(--color-bg-light);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.libro:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.libro__cover {
  flex-shrink: 0;
  width: 200px;
}

.libro__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.libro__info {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.libro__author-small {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.libro__title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.15rem;
}

.libro__author {
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

.libro__desc {
  font-size: var(--fs-base);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.libro__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.libro__btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
  text-align: center;
  transition: background 0.2s ease, transform 0.15s ease;
}

.libro__btn:hover {
  transform: translateY(-1px);
}

.libro__btn--amazon {
  background: var(--color-amazon);
  color: var(--color-amazon-text);
}

.libro__btn--amazon:hover {
  background: var(--color-amazon-hover);
}

.libro__btn--digital {
  background: var(--color-ebook);
  color: var(--color-ebook-text);
}

.libro__btn--digital:hover {
  background: var(--color-ebook-hover);
}

.libro__btn--muestra {
  background: var(--color-muestra);
  color: var(--color-muestra-text);
}

.libro__btn--muestra:hover {
  background: var(--color-muestra-hover);
}

.libro__formats {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.libro__formats span {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.catalogo__error {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--fs-md);
  padding: 2rem;
}

/* ============================================
   OTROS AUTORES (cards pequeñas 4x4)
   ============================================ */
.catalogo--otros {
  background: var(--color-bg-light);
}

.catalogo__grid--otros {
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.libro--pequeno {
  flex-direction: column;
}

.libro--pequeno .libro__cover {
  width: 100%;
  height: 160px;
}

.libro--pequeno .libro__info {
  padding: 0.85rem;
  align-items: center;
  text-align: center;
}

.libro--pequeno .libro__title {
  font-size: var(--fs-base);
  margin-bottom: 0.5rem;
}

.libro--pequeno .libro__btn {
  width: 100%;
  font-size: var(--fs-xs);
  padding: 0.45rem 0.6rem;
}

/* ============================================
   SECCIONES INFERIORES
   ============================================ */
.main {
  background: var(--color-bg-body);
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
}

.section--dark {
  background: var(--color-bg-light);
  max-width: 100%;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section--dark .section__title,
.section--dark .section__grid {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.section__title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--color-accent);
}

.section__title--light {
  color: var(--color-text-primary);
}

.section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ============================================
   CARDS (Reseñas de prensa)
   ============================================ */
.card {
  background: var(--color-bg-white);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card__body {
  padding: 1.25rem;
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
}

.card__meta {
  font-size: var(--fs-sm);
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card__text {
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ============================================
   TESTIMONIOS (Lectores)
   ============================================ */
.testimonial {
  background: var(--color-bg-white);
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
}

.testimonial__text {
  font-size: var(--fs-md);
  color: var(--color-text-secondary);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.testimonial__author {
  font-size: var(--fs-base);
  color: var(--color-text-muted);
  font-style: normal;
  font-weight: 700;
}

/* ============================================
   CTA — VER MÁS
   ============================================ */
.section__cta {
  text-align: center;
  margin-top: 2rem;
}

.section__cta-btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--color-bg-white);
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 1px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.section__cta-btn:hover {
  background: var(--color-accent);
  color: var(--color-text-on-dark);
  transform: translateY(-2px);
}

.section__cta-btn--dark {
  background: var(--color-bg-light);
  border-color: var(--color-accent);
}

.section__cta-btn--dark:hover {
  background: var(--color-accent);
  color: var(--color-text-on-dark);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-bg-white);
  border-top: 2px solid var(--color-border);
  text-align: center;
  padding: 2rem;
}

.footer__text {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .header__container {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .header__nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .header__social {
    order: 2;
  }

  .hero__container {
    flex-direction: column;
    text-align: center;
    padding: 3rem 1.5rem;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__title {
    font-size: 2.4rem;
  }

  .hero__purchase {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero__link-libros {
    display: inline-block;
  }

  .hero__book-cover {
    width: 220px;
  }

  .catalogo__grid {
    grid-template-columns: 1fr;
  }

  .catalogo__grid--otros {
    grid-template-columns: repeat(2, 1fr);
  }

  .libro {
    flex-direction: column;
  }

  .libro__cover {
    width: 100%;
    height: 280px;
  }

  .libro__cover img {
    height: 100%;
  }
}

@media (max-width: 600px) {
  :root {
    --fs-base: 16px;
    --fs-sm: 14px;
    --fs-md: 18px;
    --fs-lg: 22px;
    --fs-xl: 26px;
  }

  .header__container {
    padding: 1rem;
  }

  .header__logo {
    font-size: var(--fs-lg);
  }

  .header__nav-link {
    font-size: 14px;
    padding: 0.4rem 0.5rem;
  }

  .header__social-link span {
    display: none;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__subtitle {
    font-size: var(--fs-md);
  }

  .hero__purchase {
    flex-direction: column;
  }

  .section__grid {
    grid-template-columns: 1fr;
  }

  .catalogo__title {
    font-size: var(--fs-lg);
  }

  .catalogo__grid--otros {
    grid-template-columns: repeat(2, 1fr);
  }

  .libro__buttons {
    flex-direction: column;
  }

  .libro__btn {
    width: 100%;
  }
}
