@import url("styles-base.css");

/* ===== Valientes Editores — tema claro marfil/blanco ===== */
:root{
  --ivory:#f3eee4;
  --ivory2:#fbf8f2;
  --paper:#fffdf8;
  --navy:#173a63;
  --text:#4f5c66;
  --line:#ded4c4;
  --gold-soft:#b8860b;
}

/* Base */
body:not(.books-page){
  background:var(--ivory)!important;
  color:var(--navy)!important;
}
.site-header,.mobile-nav{
  color:#fff!important;
}
.site-footer{
  background:#003743!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.12)!important;
}
.footer-nav a,.footer-social a,.footer-bottom,.footer-bottom a{color:#fff!important}
.footer-tagline{color:#f2cf3a!important}
.footer-bottom b{color:#f2cf3a!important}

/* La flecha se distingue del nombre de la sección. */
.nav-books-label {display:inline-flex;align-items:center;gap:.45em;white-space:nowrap}
.nav-chevron {display:block;width:.65em;height:.65em;flex:none}
.contact-fact .contact-email {display:inline-block;white-space:nowrap;font-size:clamp(16px,1.8vw,18px)}
@media(min-width:901px) and (max-width:1100px) {
  .contact-side {padding-left:34px;padding-right:34px}
}

/* ===== INICIO ===== */
.hero{
  background:linear-gradient(180deg,var(--ivory2),var(--ivory))!important;
  border-bottom:1px solid var(--line)!important;
}
.hero-copy{
  background:linear-gradient(90deg,rgba(255,253,248,.98),rgba(243,238,228,.90) 74%,rgba(243,238,228,.12))!important;
}
.hero-copy h1,
.hero-copy h1 strong{color:var(--navy)!important}
.hero-copy p{color:var(--text)!important}

.stories{
  background:var(--paper)!important;
  color:var(--navy)!important;
}
.section-heading h2,.book-info h3{color:var(--navy)!important}
.section-heading>a{color:#8d6a00!important}
.book-info p{color:var(--text)!important}
.stories .button.outline{color:var(--navy)!important;border-color:#d6b44b!important}

.benefits{
  background:var(--ivory)!important;
  color:var(--navy)!important;
  border-color:var(--line)!important;
}
.benefit{border-color:var(--line)!important}
.benefit h3{color:var(--navy)!important}
.benefit p{color:var(--text)!important}
.benefit-icon{color:var(--gold-soft)!important}

.category-card,.category-card.thriller{
  background:var(--paper)!important;
  border:1px solid var(--line)!important;
}
.category-card .shade,.category-card.thriller .shade{
  background:linear-gradient(90deg,rgba(255,253,248,.98) 0,rgba(255,253,248,.93) 36%,rgba(255,253,248,.15) 72%,rgba(255,253,248,0) 100%)!important;
}
.category-copy h2{color:var(--navy)!important}
.category-copy p{color:var(--text)!important}
.category-copy .button.outline{color:var(--navy)!important;border-color:#d6b44b!important}

.about{
  background:var(--paper)!important;
  color:var(--navy)!important;
  border-color:var(--line)!important;
}
.about-copy h2{color:var(--navy)!important}
.about-copy p{color:var(--text)!important}

.author-teaser{
  background:linear-gradient(90deg,var(--paper),var(--ivory))!important;
  border-top:1px solid var(--line)!important;
  border-bottom:1px solid var(--line)!important;
}
.author-teaser-photo:after{
  background:linear-gradient(90deg,transparent 58%,rgba(243,238,228,.95) 100%)!important;
}
.author-eyebrow{color:var(--gold-soft)!important}
.author-teaser-copy h2{color:var(--navy)!important}
.author-teaser-copy p{color:var(--text)!important}

.stores{
  background:var(--ivory)!important;
  color:var(--navy)!important;
  border-top:1px solid var(--line)!important;
  border-bottom:1px solid var(--line)!important;
}
.stores-copy h2{color:var(--navy)!important}
.stores-copy p{color:var(--text)!important}
.store:not(.fce){color:var(--navy)!important}
.store small,.store strong{color:inherit!important}
.store.fce{color:#fff!important}
.store.amazon{color:#70757c!important}
.store.amazon span{color:#d39e00!important}

/* ===== FICHAS DE LIBROS ===== */
.book-detail-page:not(.cazadores-page),
.cazadores-page{
  background:var(--ivory)!important;
  color:var(--navy)!important;
}
.mango-hero,.cazadores-hero{
  background:linear-gradient(180deg,var(--ivory2),var(--ivory))!important;
  border-bottom:1px solid var(--line)!important;
}
.mango-hero:after,.cazadores-hero:after{
  background:linear-gradient(90deg,rgba(255,253,248,.22),transparent 48%,rgba(243,238,228,.06))!important;
}
.mango-copy h1,.mango-copy h1 span,.cazadores-copy h1{color:var(--navy)!important}
.mango-lead,.cazadores-lead{color:var(--text)!important}
.mango-kicker,.cazadores-kicker{
  color:#8d6a00!important;
  border-color:#d6b44b!important;
  background:#fff9eb!important;
}
.mango-quote,.cazadores-quote{
  color:#8d6a00!important;
  border-left-color:#d6b44b!important;
}

.mango-facts,.cazadores-facts,
.mango-related,.cazadores-related{
  background:var(--ivory)!important;
  color:var(--navy)!important;
  border-color:var(--line)!important;
}
.mango-fact,.cazadores-fact{border-color:var(--line)!important}
.mango-fact small,.cazadores-fact small{color:#7f8991!important}
.mango-fact strong,.cazadores-fact strong{color:var(--navy)!important}

.mango-content,.cazadores-content,
.mango-store-head,.cazadores-store-head{
  background:var(--paper)!important;
  color:var(--navy)!important;
}
.mango-section+.mango-section,.cazadores-section+.cazadores-section{border-top-color:var(--line)!important}
.mango-copy-block h2,.mango-preview h2,.mango-related h2,.mango-store-head h2,
.cazadores-copy-block h2,.cazadores-preview h2,.cazadores-related h2,.cazadores-store-head h2{
  color:var(--navy)!important;
}
.mango-copy-block p,.mango-preview-copy p,.mango-related p,.mango-store-head p,
.cazadores-copy-block p,.cazadores-preview-copy p,.cazadores-related p,.cazadores-store-head p{
  color:var(--text)!important;
}
.mango-preview-card,.cazadores-preview-card{
  background:var(--paper)!important;
  color:var(--navy)!important;
  border:1px solid var(--line)!important;
  box-shadow:0 10px 24px rgba(34,45,55,.06)!important;
}
.mango-preview-card p,.cazadores-preview-card p{color:var(--navy)!important}
.mango-content .button.outline,.mango-related .button.outline,
.cazadores-content .button.outline,.cazadores-related .button.outline{
  color:var(--navy)!important;border-color:#d6b44b!important;
}

/* ===== AUTOR ===== */
.author-page{background:var(--ivory)!important;color:var(--navy)!important}
.author-hero{
  background:linear-gradient(180deg,var(--ivory2),var(--ivory))!important;
  border-bottom:1px solid var(--line)!important;
}
.author-photo:after{
  background:linear-gradient(90deg,rgba(255,253,248,.02),rgba(243,238,228,.08) 72%,rgba(243,238,228,.92) 100%)!important;
}
.author-kicker{
  color:#8d6a00!important;border-color:#d6b44b!important;background:#fff9eb!important;
}
.author-hero-copy h1,.author-hero-copy h1 strong{color:var(--navy)!important}
.author-lead{color:var(--text)!important}
.author-signature{color:#8d6a00!important}

.author-intro,.author-editorial{
  background:var(--paper)!important;color:var(--navy)!important;
}
.author-worlds,.author-books,.author-press{
  background:var(--ivory)!important;color:var(--navy)!important;border-color:var(--line)!important;
}
.author-world{
  background:var(--paper)!important;color:var(--navy)!important;border-color:var(--line)!important;
}
.author-world:after{display:none!important}
.author-world h3,.author-world p,.author-world strong,
.author-intro-title h2,.author-books-copy h2,.author-editorial-copy h2,.author-press h2{
  color:var(--navy)!important;
}
.author-intro-copy p,.author-books-copy p,.author-editorial-copy p,.author-press p{color:var(--text)!important}
.author-book-pair a{color:var(--navy)!important}
.author-actions .button.outline,.author-books .button.outline,.author-press .button.outline{
  color:var(--navy)!important;border-color:#d6b44b!important;
}

/* ===== NOSOTROS ===== */
.about-page{background:var(--ivory)!important;color:var(--navy)!important}
.about-hero{
  background:linear-gradient(180deg,var(--ivory2),var(--ivory))!important;
  border-bottom:1px solid var(--line)!important;
}
.about-hero-copy{background:transparent!important}
.about-hero-copy h1,.about-hero-copy h1 strong{color:var(--navy)!important}
.about-hero-copy p{color:var(--text)!important}
.about-hero-art:after{
  background:linear-gradient(90deg,rgba(243,238,228,.92) 0,transparent 24%)!important;
}

.about-manifesto,.about-catalog,.about-founder{
  background:var(--paper)!important;color:var(--navy)!important;
}
.about-values,.about-process,.about-press{
  background:var(--ivory)!important;color:var(--navy)!important;border-color:var(--line)!important;
}
.about-values article{border-color:var(--line)!important}
.about-line{
  background:var(--paper)!important;
  color:var(--navy)!important;
  border:1px solid var(--line)!important;
}
.about-line h3,.about-line p,.about-line small,.about-line span,
.about-manifesto-copy h2,.about-values h3,.about-catalog-head h2,
.about-process-copy h2,.about-founder-copy h2,.about-press h2{
  color:var(--navy)!important;
}
.about-manifesto-copy p,.about-values p,.about-catalog-head p,
.about-process-copy p,.about-founder-copy p,.about-press p{
  color:var(--text)!important;
}
.about-process-steps{border-color:var(--line)!important}
.about-process-steps div{
  background:var(--paper)!important;color:var(--navy)!important;border-color:var(--line)!important;
}
.about-process-steps b{color:var(--gold-soft)!important}
.about-process .button.outline,.about-founder .button.outline,.about-press .button.outline{
  color:var(--navy)!important;border-color:#d6b44b!important;
}

/* ===== PRENSA ===== */
.press-page{background:var(--ivory)!important;color:var(--navy)!important}
.press-hero{
  background:linear-gradient(180deg,var(--ivory2),var(--ivory))!important;
  border-bottom:1px solid var(--line)!important;
}
.press-hero h1,.press-hero h1 strong{color:var(--navy)!important}
.press-hero p{color:var(--text)!important}

.press-featured,.press-contact{
  background:var(--paper)!important;color:var(--navy)!important;
}
.press-list{
  background:var(--ivory)!important;color:var(--navy)!important;
}
.press-featured h2,.press-list h2,.press-contact h2,.event-card h3{color:var(--navy)!important}
.press-featured p,.press-list-head p,.press-contact p,.event-card p{color:var(--text)!important}
.event-card{
  background:var(--paper)!important;color:var(--navy)!important;border:1px solid var(--line)!important;
}
.event-card-body small{color:#78848c!important}
.event-meta span{
  background:#fff9eb!important;color:#8d6a00!important;border-color:#d6b44b!important;
}
/* Fotos reales de eventos */
.event-card-top.has-photo{padding:0!important;overflow:hidden!important;align-items:flex-end!important;background:#ede4d6!important}
.event-card-top.has-photo img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
.event-card-top.has-photo:before{content:""!important;position:absolute!important;inset:0!important;background:linear-gradient(180deg,rgba(0,0,0,.03),rgba(0,0,0,.46) 82%,rgba(0,0,0,.62) 100%)!important;z-index:0!important}
.event-card-top.has-photo span{padding:22px!important;display:block!important;width:100%!important;color:#fff!important;position:relative!important;z-index:2!important}
.press-featured-visual img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
.press-contact .button.outline{color:var(--navy)!important;border-color:#d6b44b!important}

/* ===== CONTACTO ===== */
.contact-page{background:var(--ivory)!important;color:var(--navy)!important}
.contact-hero{
  background:linear-gradient(180deg,var(--ivory2),var(--ivory))!important;
  border-bottom:1px solid var(--line)!important;
}
.contact-hero h1,.contact-hero h1 strong{color:var(--navy)!important}
.contact-hero p{color:var(--text)!important}
.contact-hero-panel,.contact-side,.contact-form-wrap{
  background:var(--paper)!important;color:var(--navy)!important;border-color:var(--line)!important;
}
.contact-main,.contact-social{
  background:var(--ivory)!important;color:var(--navy)!important;border-color:var(--line)!important;
}
.contact-route{
  background:var(--ivory2)!important;border-color:var(--line)!important;
}
.contact-route b,.contact-route span,.contact-social h2,.contact-social p,.contact-social-links a{
  color:var(--navy)!important;
}
.contact-side h2,.contact-form-wrap h2{color:var(--navy)!important}
.contact-side>p,.contact-form-wrap>p,.contact-note{color:var(--text)!important}
.contact-social-links a{
  background:#fff9eb!important;border-color:#d6b44b!important;
}

/* ===== LEGALES ===== */
.legal-page{background:var(--ivory)!important;color:var(--navy)!important}
.legal-hero{
  background:linear-gradient(180deg,var(--ivory2),var(--ivory))!important;
  border-bottom:1px solid var(--line)!important;
}
.legal-hero h1,.legal-hero p,.legal-hero small{color:var(--navy)!important}
.legal-content{background:var(--paper)!important}
.legal-copy h2{color:var(--navy)!important}
.legal-copy p{color:var(--text)!important}
.legal-note{
  background:#fff9e0!important;color:#5c5544!important;border-left-color:#d6b44b!important;
}

/* ===== GRACIAS ===== */
.thanks-page{background:var(--ivory)!important;color:var(--navy)!important}
.thanks-main{
  background:linear-gradient(180deg,var(--ivory2),var(--ivory))!important;
}
.thanks-card{
  background:var(--paper)!important;color:var(--navy)!important;border-color:var(--line)!important;box-shadow:0 18px 42px rgba(34,45,55,.08)!important;
}
.thanks-card h1,.thanks-box h2{color:var(--navy)!important}
.thanks-lead,.thanks-box p,.thanks-card>small{color:var(--text)!important}
.thanks-box{
  background:var(--ivory2)!important;border-color:var(--line)!important;
}
.thanks-mark{color:var(--gold-soft)!important;border-color:#d6b44b!important}

/* Botones */
.button.primary{
  background:linear-gradient(#ffe66b,#ffd11b)!important;
  color:#101820!important;
  border-color:#e4b900!important;
}
.button.outline{
  color:var(--navy)!important;
  border-color:#d6b44b!important;
  background:transparent!important;
}

/* Mantener botones alineados en inicio móvil */
@media(max-width:560px){
  .stories .book-grid{align-items:stretch}
  .stories .book-card{height:100%;align-self:stretch;grid-template-rows:260px 1fr}
  .stories .book-info{display:flex;flex-direction:column;height:100%}
  .stories .book-actions{margin-top:auto;width:100%}
  .hero-copy{
    background:rgba(255,253,248,.96)!important;
  }
  .category-card .shade,.category-card.thriller .shade{
    background:linear-gradient(90deg,rgba(255,253,248,.98) 0,rgba(255,253,248,.92) 50%,rgba(255,253,248,.16) 84%,rgba(255,253,248,0) 100%)!important;
  }
}

/* Las tarjetas crecen con su contenido para no recortar los botones. */
.category-grid > .category-card {height:auto;min-height:175px}
.category-copy .button {max-width:100%;white-space:normal;text-align:center}
.category-copy .button span {flex-shrink:0}
@media(max-width:900px) {
  .category-grid > .category-card {min-height:165px}
}
@media(max-width:560px) {
  .category-grid > .category-card {min-height:118px}
}

/* Adaptación del ancho: las columnas no crecen por el tamaño de su contenido. */
main :where(section, article, aside, div) {min-width:0}
main :where(h1, h2, h3) {overflow-wrap:anywhere}
.button {max-width:100%;white-space:normal;text-align:center}
.button span {flex-shrink:0}
.book-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
.book-card {grid-template-columns:minmax(0,260px) minmax(0,1fr)}
.store-logos {min-width:0;flex-wrap:wrap}
.store {flex:0 0 auto}
.catalog-covers::before {max-width:100%}
.author-book-pair a {min-width:0}
.author-book-pair img,.author-editorial-mark img {max-width:100%}
.contact-fact,.purchase-legal {overflow-wrap:anywhere}
.about-catalog-grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,610px),1fr))}
.about-hero-art {height:auto;aspect-ratio:3 / 1;align-self:center}
.about-hero-art img {object-fit:contain}

/* En anchos intermedios, cada portada dispone de una columna legible. */
@media(min-width:561px) and (max-width:1360px) {
  .book-card {grid-template-columns:minmax(0,1fr);gap:16px;align-content:start}
  .book-cover {max-width:260px;margin:0 auto}
  .book-actions {align-items:flex-start}
}
@media(min-width:561px) and (max-width:1200px) {
  .hero-inner {grid-template-columns:minmax(0,1fr);min-height:0}
  .hero-copy {padding:36px 40px}
  .hero-copy h1 {font-size:48px;line-height:1}
  .hero-copy p {max-width:720px;font-size:19px;line-height:1.4}
  .hero-copy .button {align-self:flex-start}
  .hero-visual {aspect-ratio:621 / 239}
  .hero-visual img {display:block;width:100%;height:100%;object-fit:contain}
  .about-hero-inner {grid-template-columns:minmax(0,1fr);min-height:0}
  .about-hero-copy {padding:40px}
  .about-hero-copy h1 {font-size:52px;line-height:1}
  .about-hero-art {aspect-ratio:3 / 1}
  .about-hero-art img {display:block;width:100%;height:100%;object-fit:contain}
  .author-hero-copy {padding:44px 32px}
  .author-hero-copy h1 {font-size:clamp(42px,5vw,60px);line-height:1}
  .event-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .event-card:last-child {grid-column:auto}
  .mango-hero-inner,.cazadores-hero-inner {
    grid-template-columns:minmax(0,280px) minmax(0,1fr);gap:32px;padding:42px 32px;
  }
  .mango-cover-wrap img,.cazadores-cover-wrap img {width:240px;max-width:100%}
  .mango-copy h1,.cazadores-copy h1 {font-size:52px}
}

/* Las librerías pasan a otra fila antes de forzar el ancho de la página. */
@media(min-width:901px) and (max-width:1100px) {
  .nav-shell {padding:0 24px;gap:18px}
  .brand img {width:190px}
  .main-nav {gap:20px}
  .main-nav a {font-size:14px}
  .social-actions {gap:10px}
}
@media(min-width:561px) and (max-width:1100px) {
  .stores {grid-template-columns:minmax(0,1fr)}
  .store-logos {gap:18px;justify-content:space-around}
  body.books-page .catalog-covers {padding:10px 24px 24px!important;gap:20px!important}
  body.books-page .catalog-book,body.books-page .catalog-book.thriller {
    grid-template-columns:minmax(0,35%) minmax(0,1fr)!important;
    gap:24px!important;padding:24px!important;
  }
  body.books-page .catalog-book-art img {max-width:100%!important}
}
@media(min-width:901px) and (max-width:1100px) {
  .about-values article {padding:28px 20px}
  .about-values h3 {font-size:24px}
}
@media(min-width:561px) and (max-width:900px) {
  .catalog-hero-inner,.author-books,.author-editorial {grid-template-columns:minmax(0,1fr)}
  body.books-page .catalog-hero-inner {min-height:0!important}
  .about-values {grid-template-columns:repeat(2,minmax(0,1fr))}
  .about-process-steps {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:561px) and (max-width:760px) {
  .author-hero-inner,.contact-hero-inner,.mango-hero-inner,.cazadores-hero-inner {
    grid-template-columns:minmax(0,1fr);min-height:0;
  }
  .author-photo {height:500px}
  .author-worlds {grid-template-columns:minmax(0,1fr)}
  .mango-copy h1,.cazadores-copy h1 {font-size:44px}
  .author-actions .button,.mango-hero-actions .button,.cazadores-hero-actions .button {min-width:0}
  body.books-page .catalog-book,body.books-page .catalog-book.thriller {grid-template-columns:minmax(0,1fr)!important}
  .catalog-heading {flex-wrap:wrap;gap:20px}
  .mango-preview,.cazadores-preview {grid-template-columns:minmax(0,1fr)}
}
@media(max-width:560px) {
  .book-card {grid-template-columns:minmax(0,1fr)}
  .author-book-pair {gap:18px}
  .author-book-pair a {flex:0 1 145px}
  .mango-related-inner,.cazadores-related-inner {grid-template-columns:minmax(0,1fr) 110px}
  .mango-facts .mango-fact strong,.cazadores-facts .cazadores-fact strong {overflow-wrap:anywhere;white-space:normal}
  .book-info h3 {font-size:clamp(16px,4.2vw,18px)}
  .thanks-actions .button {min-width:0}
}
@media(max-width:380px) {
  .nav-shell {gap:8px}
  .menu-toggle {width:30px;flex-basis:30px}
  .brand img {width:clamp(120px,38vw,145px)}
  .social-actions {gap:6px}
  .icon-link,.search-btn {width:24px;height:24px}
  .icon-link svg,.search-btn svg {width:22px;height:22px}
  .category-copy h2 {font-size:25px}
  .press-hero h1 {font-size:38px}
  .event-card h3 {font-size:22px}
  .book-grid {grid-template-columns:minmax(0,1fr);gap:28px}
  .stories .book-info h3 {font-size:24px}
  .stories .book-info p {font-size:14px;line-height:1.4}
}
