/*
Theme Name: LeituraKids
Theme URI: https://leiturakids.com
Author: LeituraKids
Description: Tema infantil premium em formato de streaming para catálogo e leitura de livros digitais.
Version: 1.2.2
Text Domain: leiturakids
*/

:root {
  --lk-bg: #080b14;
  --lk-bg-soft: #101522;
  --lk-card: #151b2b;
  --lk-text: #ffffff;
  --lk-muted: #aeb7cc;
  --lk-primary: #ff4f87;
  --lk-primary-2: #8b5cf6;
  --lk-green: #2bd67b;
  --lk-yellow: #ffd45b;
  --lk-radius: 18px;
  --lk-shell: 1500px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--lk-bg);
  color: var(--lk-text);
  font-family: Inter, ui-rounded, "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }

.lk-shell { width: min(100% - 48px, var(--lk-shell)); margin-inline: auto; }
.lk-hidden { display: none !important; }

/* Header */
.lk-header {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  height: 76px;
  display: flex;
  align-items: center;
  transition: background .25s ease, box-shadow .25s ease;
  background: linear-gradient(180deg, rgba(5,7,13,.88), rgba(5,7,13,.4), transparent);
}
.lk-header.is-scrolled { background: rgba(8,11,20,.96); box-shadow: 0 8px 30px rgba(0,0,0,.24); }
.lk-header-inner { display:flex; align-items:center; gap:24px; width:100%; min-height:76px; }
.lk-brand { display:flex; align-items:center; gap:10px; min-width:0; flex:0 0 auto; font-size:26px; font-weight:1000; letter-spacing:-1px; white-space:nowrap; line-height:1; }
.lk-brand-logo { height:46px; display:flex; align-items:center; }
.lk-brand .custom-logo { display:block; max-height:46px; width:auto; object-fit:contain; object-position:left center; }
.lk-brand-mark { width:38px; height:38px; border-radius:12px; display:grid; place-items:center; background:linear-gradient(135deg,var(--lk-primary),var(--lk-primary-2)); box-shadow:0 8px 20px rgba(255,79,135,.28); flex:0 0 auto; }
.lk-brand em { color: var(--lk-primary); font-style: normal; }
.lk-nav { display:flex; align-items:center; gap:22px; color:#e8ebf4; font-weight:700; font-size:14px; flex:0 1 auto; }
.lk-nav a:hover { color:#fff; }
.lk-header-actions { margin-left:auto; display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.lk-mobile-nav { display:none; }
.lk-icon-btn { width:42px; height:42px; border:0; border-radius:13px; background:rgba(255,255,255,.09); color:#fff; display:grid; place-items:center; transition:.2s ease; }
.lk-icon-btn:hover { background:rgba(255,255,255,.16); transform:translateY(-1px); }
.lk-pill { min-height:42px; padding:0 18px; border-radius:999px; display:flex; align-items:center; justify-content:center; font-weight:900; font-size:13px; background:#fff; color:#111; border:0; }

/* Hero */
.lk-hero { min-height: 690px; display:flex; align-items:flex-end; position:relative; overflow:hidden; background:#151828; }
.lk-hero::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg, rgba(6,9,16,.97) 0%, rgba(6,9,16,.84) 32%, rgba(6,9,16,.18) 68%, rgba(6,9,16,.48) 100%), linear-gradient(0deg,var(--lk-bg) 0%, transparent 34%); }
.lk-hero-bg { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.96; }
.lk-hero-content { position:relative; z-index:2; padding:160px 0 110px; width:min(640px, 55vw); }
.lk-eyebrow { display:inline-flex; align-items:center; gap:8px; font-size:12px; font-weight:1000; text-transform:uppercase; letter-spacing:1.2px; color:#fff; background:rgba(255,255,255,.12); padding:8px 11px; border-radius:999px; backdrop-filter:blur(10px); }
.lk-hero h1 { font-size:clamp(42px,5vw,76px); line-height:.94; letter-spacing:-3px; margin:18px 0 18px; }
.lk-hero p { font-size:18px; line-height:1.6; color:#d5dbea; max-width:600px; margin:0 0 28px; }
.lk-meta-line { display:flex; flex-wrap:wrap; gap:12px; color:#dfe5f2; font-size:13px; font-weight:800; margin-bottom:26px; }
.lk-meta-line span { display:inline-flex; align-items:center; gap:6px; }
.lk-action-row { display:flex; flex-wrap:wrap; gap:11px; }
.lk-btn { min-height:50px; border:0; border-radius:14px; padding:0 20px; display:inline-flex; align-items:center; justify-content:center; gap:9px; font-weight:1000; transition:.2s ease; }
.lk-btn:hover { transform:translateY(-2px); }
.lk-btn-primary { background:#fff; color:#0a0c12; }
.lk-btn-secondary { background:rgba(255,255,255,.14); color:#fff; backdrop-filter:blur(10px); }
.lk-btn-premium { background:linear-gradient(135deg,var(--lk-primary),#ff7b57); color:#fff; box-shadow:0 10px 28px rgba(255,79,135,.25); }

/* Home rails */
.lk-content { position:relative; z-index:3; margin-top:-50px; padding-bottom:80px; }
.lk-rail { margin:0 0 36px; position:relative; }
.lk-rail-head { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:14px; }
.lk-rail-title { margin:0; font-size:22px; line-height:1; letter-spacing:-.6px; }
.lk-rail-link { color:var(--lk-muted); font-size:13px; font-weight:800; }
.lk-rail-link:hover { color:#fff; }
.lk-track-wrap { position:relative; }
.lk-track { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(160px, 12.8vw); gap:13px; overflow-x:auto; overscroll-behavior-inline:contain; scroll-snap-type:x proximity; scrollbar-width:none; padding:5px 2px 18px; }
.lk-track::-webkit-scrollbar { display:none; }
.lk-rail-arrow { position:absolute; z-index:4; top:0; bottom:18px; width:54px; border:0; color:#fff; opacity:0; transition:.18s ease; display:grid; place-items:center; font-size:28px; }
.lk-track-wrap:hover .lk-rail-arrow { opacity:1; }
.lk-rail-prev { left:-10px; background:linear-gradient(90deg,rgba(8,11,20,.95),rgba(8,11,20,.02)); }
.lk-rail-next { right:-10px; background:linear-gradient(-90deg,rgba(8,11,20,.95),rgba(8,11,20,.02)); }

/* Book card */
.lk-book-card { scroll-snap-align:start; position:relative; min-width:0; }
.lk-book-cover { position:relative; aspect-ratio:2/3; overflow:hidden; background:linear-gradient(150deg,#242b41,#121623); box-shadow:0 12px 26px rgba(0,0,0,.27); transition:transform .22s ease, box-shadow .22s ease; }
.lk-book-cover img { width:100%; height:100%; object-fit:cover; }
.lk-book-card:hover .lk-book-cover { transform:translateY(-5px) scale(1.02); box-shadow:0 20px 38px rgba(0,0,0,.42); }
.lk-book-cover::after { content:""; position:absolute; inset:auto 0 0; height:38%; background:linear-gradient(0deg,rgba(5,7,13,.68),transparent); opacity:0; transition:.2s; }
.lk-book-card:hover .lk-book-cover::after { opacity:1; }
.lk-badge { position:absolute; z-index:2; top:9px; left:9px; display:inline-flex; align-items:center; min-height:25px; padding:0 9px; border-radius:999px; font-size:10px; font-weight:1000; text-transform:uppercase; letter-spacing:.5px; background:#fff; color:#111; }
.lk-badge-premium { background:linear-gradient(135deg,#ffd75b,#ff9d4d); }
.lk-badge-free { background:var(--lk-green); }
.lk-card-title { font-size:14px; font-weight:900; line-height:1.25; margin:10px 2px 3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lk-card-meta { color:#929db6; font-size:11px; font-weight:700; margin:0 2px; }
.lk-progress { height:4px; border-radius:99px; overflow:hidden; background:rgba(255,255,255,.15); margin-top:8px; }
.lk-progress > span { display:block; height:100%; width:0; background:var(--lk-primary); border-radius:inherit; }

/* Book detail */
.lk-book-detail { min-height:100vh; padding-top:120px; background:radial-gradient(circle at 76% 18%, rgba(139,92,246,.16), transparent 28%), radial-gradient(circle at 12% 30%, rgba(255,79,135,.11), transparent 24%), var(--lk-bg); }
.lk-detail-grid { display:grid; grid-template-columns:minmax(230px,340px) 1fr; gap:64px; align-items:center; padding-bottom:70px; }
.lk-detail-cover { position:relative; }
.lk-detail-cover img { width:100%; aspect-ratio:2/3; object-fit:cover; box-shadow:0 28px 70px rgba(0,0,0,.5); }
.lk-detail-copy { max-width:760px; }
.lk-detail-copy h1 { font-size:clamp(38px,5vw,66px); line-height:1; letter-spacing:-2.6px; margin:14px 0 20px; }
.lk-detail-copy .lk-description { color:#c4cada; font-size:17px; line-height:1.75; }
.lk-detail-copy .lk-meta-line { margin-top:18px; }
.lk-detail-actions { margin-top:30px; display:flex; flex-wrap:wrap; gap:12px; }
.lk-section { padding:36px 0 70px; }
.lk-section h2 { font-size:26px; margin:0 0 18px; }

/* Archive / grid */
.lk-page { padding:120px 0 80px; min-height:80vh; }
.lk-page-title { font-size:44px; margin:0 0 10px; letter-spacing:-1.7px; }
.lk-page-subtitle { color:var(--lk-muted); margin:0 0 30px; }
.lk-book-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:28px 15px; }
.lk-filter-row { display:flex; flex-wrap:wrap; gap:9px; margin-bottom:30px; }
.lk-filter { border:1px solid rgba(255,255,255,.12); background:#111725; color:#dfe5f2; min-height:38px; border-radius:999px; padding:0 14px; font-size:12px; font-weight:900; }
.lk-filter.is-active, .lk-filter:hover { background:#fff; color:#111; }

/* Search overlay */
.lk-search-overlay { position:fixed; z-index:3000; inset:0; background:rgba(4,6,11,.96); backdrop-filter:blur(14px); padding:90px 20px 30px; display:none; }
.lk-search-overlay.is-open { display:block; }
.lk-search-inner { width:min(920px,100%); margin:auto; }
.lk-search-close { position:absolute; right:25px; top:22px; }
.lk-search-box { display:flex; gap:10px; }
.lk-search-box input { width:100%; height:58px; border:1px solid rgba(255,255,255,.16); border-radius:16px; background:#111624; color:#fff; padding:0 18px; outline:none; font-size:18px; }
.lk-search-box input:focus { border-color:rgba(255,255,255,.4); }
.lk-search-results { margin-top:24px; display:grid; grid-template-columns:repeat(5,1fr); gap:14px; }

/* Reader */
body.lk-reader-body { overflow:hidden; background:#05070d; }
.lk-reader { min-height:100dvh; height:100dvh; display:flex; flex-direction:column; overflow:hidden; background:radial-gradient(circle at 50% 42%, #1b2130 0%, #0b0e16 50%, #04050a 100%); }
.lk-reader-top { height:58px; flex:0 0 58px; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; padding:0 18px; color:#fff; background:rgba(3,5,9,.72); backdrop-filter:blur(14px); z-index:20; }
.lk-reader-title { font-weight:900; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:50vw; }
.lk-reader-top .lk-reader-actions { justify-self:end; display:flex; gap:8px; }
.lk-reader-stage { flex:1; min-height:0; width:100%; display:flex; align-items:center; justify-content:center; padding:8px 72px; position:relative; overflow:hidden; }
#lk-book { margin:auto; display:flex; align-items:center; justify-content:center; max-width:100%; max-height:100%; }
.lk-reader-page { background:transparent !important; overflow:hidden; }
.lk-reader-page img { display:block; width:100%; height:100%; object-fit:contain; background:transparent !important; }
/* A biblioteca PageFlip cria wrappers próprios. Não deixe o branco do papel aparecer
   quando a imagem possui proporção diferente da configuração anterior. */
.lk-reader .stf__parent,
.lk-reader .stf__wrapper,
.lk-reader .stf__block,
.lk-reader .stf__item,
.lk-reader .stf__item.--left,
.lk-reader .stf__item.--right { background:transparent !important; }
.lk-reader-nav { position:absolute; top:50%; transform:translateY(-50%); width:48px; height:64px; border:0; border-radius:14px; background:rgba(255,255,255,.09); color:#fff; display:grid; place-items:center; font-size:25px; z-index:18; }
.lk-reader-prev { left:17px; }
.lk-reader-next { right:17px; }
.lk-reader-nav:hover { background:rgba(255,255,255,.17); }
.lk-reader-bottom { height:46px; min-height:46px; flex:0 0 46px; display:flex; align-items:center; justify-content:center; gap:18px; padding:5px 18px 8px; color:#c9cfdd; font-size:12px; font-weight:800; background:rgba(3,5,9,.40); }
.lk-reader-progress { width:min(520px,55vw); height:5px; border-radius:99px; background:rgba(255,255,255,.13); overflow:hidden; }
.lk-reader-progress > span { height:100%; display:block; width:0; border-radius:inherit; background:linear-gradient(90deg,var(--lk-primary),var(--lk-primary-2)); transition:width .2s ease; }
.lk-reader-lock { width:100%; height:100%; min-height:0; padding:clamp(22px,4vw,40px) clamp(18px,3.2vw,32px); box-sizing:border-box; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; text-align:center; background:linear-gradient(145deg,#fff,#f4f0ff); color:#17131e; overflow:hidden; }
.lk-reader-lock-icon { width:clamp(58px,8vw,70px); height:clamp(58px,8vw,70px); border-radius:22px; display:grid; place-items:center; background:#f4e8ff; font-size:clamp(24px,3vw,30px); margin-bottom:8px; flex:0 0 auto; }
.lk-reader-lock h2 { margin:0; font-size:clamp(24px,3.2vw,32px); line-height:1.05; letter-spacing:-1px; max-width:100%; overflow-wrap:anywhere; }
.lk-reader-lock p { color:#665d71; line-height:1.5; margin:0; max-width:30ch; }
.lk-reader-lock .lk-btn { width:min(100%, 320px); margin-top:4px; }
.lk-reader-loader { color:#fff; font-weight:800; }
/* Empty / footer */
.lk-empty { padding:50px 20px; text-align:center; border:1px dashed rgba(255,255,255,.16); border-radius:20px; color:var(--lk-muted); }
.lk-footer { border-top:1px solid rgba(255,255,255,.08); padding:38px 0 50px; color:#8993a9; font-size:12px; }
.lk-footer-inner { display:flex; align-items:center; justify-content:space-between; gap:20px; }

@media (max-width: 1100px) {
  .lk-book-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .lk-nav { display:none; }
  .lk-track { grid-auto-columns:minmax(150px,18vw); }
  .lk-detail-grid { grid-template-columns:260px 1fr; gap:40px; }
}

@media (max-width: 820px) {
  .lk-shell { width:min(100% - 28px, var(--lk-shell)); }
  .lk-header { height:auto; }
  .lk-header-inner { min-height:64px; gap:12px; }
  .lk-brand { font-size:21px; }
  .lk-brand-logo { height:38px; }
  .lk-brand .custom-logo { max-height:38px; }
  .lk-brand-mark { width:34px; height:34px; }
  .lk-pill { display:none; }
  .lk-mobile-nav { display:flex; align-items:center; gap:8px; overflow-x:auto; white-space:nowrap; padding:0 14px 12px; -ms-overflow-style:none; scrollbar-width:none; }
  .lk-mobile-nav::-webkit-scrollbar { display:none; }
  .lk-mobile-nav a { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:0 14px; border-radius:999px; background:rgba(255,255,255,.10); color:#fff; font-weight:800; font-size:13px; }
  .lk-mobile-nav a:hover { background:rgba(255,255,255,.16); }
  .lk-hero { min-height:570px; }
  .lk-hero::after { background:linear-gradient(0deg,var(--lk-bg) 0%,rgba(8,11,20,.78) 42%,rgba(8,11,20,.2) 100%); }
  .lk-hero-bg { object-position:center; }
  .lk-hero-content { width:100%; padding:180px 0 80px; }
  .lk-hero h1 { font-size:44px; letter-spacing:-2px; }
  .lk-hero p { font-size:15px; max-width:90%; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
  .lk-content { margin-top:-32px; }
  .lk-track { grid-auto-columns:34vw; gap:10px; }
  .lk-rail-arrow { display:none; }
  .lk-book-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px 10px; }
  .lk-detail-grid { grid-template-columns:1fr; gap:30px; }
  .lk-detail-cover { width:min(56vw,280px); margin:auto; }
  .lk-detail-copy { text-align:center; }
  .lk-detail-copy .lk-meta-line, .lk-detail-actions { justify-content:center; }
  .lk-detail-copy h1 { font-size:42px; }
  .lk-search-results { grid-template-columns:repeat(3,1fr); }
  .lk-reader-top { height:50px; flex-basis:50px; padding-inline:10px; }
  .lk-reader-stage { padding:0; }
  .lk-reader-nav { display:none; }
  .lk-reader-title { max-width:50vw; }
  .lk-reader-bottom { height:40px; min-height:40px; flex-basis:40px; padding:4px 10px max(4px, env(safe-area-inset-bottom)); }
  .lk-reader-progress { width:60vw; }
}

@media (max-width: 520px) {
  .lk-shell { width:min(100% - 22px, var(--lk-shell)); }
  .lk-header-inner { gap:10px; }
  .lk-header-actions { gap:6px; }
  .lk-mobile-nav { padding:0 11px 10px; }
  .lk-icon-btn { width:38px; height:38px; }
  .lk-hero { min-height:540px; }
  .lk-hero-content { padding-bottom:66px; }
  .lk-hero h1 { font-size:38px; }
  .lk-action-row .lk-btn { flex:1; padding-inline:12px; }
  .lk-rail { margin-bottom:26px; }
  .lk-rail-title { font-size:19px; }
  .lk-track { grid-auto-columns:41vw; }
  .lk-card-title { font-size:13px; }
  .lk-book-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px 11px; }
  .lk-page { padding-top:94px; }
  .lk-page-title { font-size:34px; }
  .lk-detail-cover { width:min(68vw,270px); }
  .lk-detail-copy h1 { font-size:36px; }
  .lk-detail-copy .lk-description { font-size:15px; }
  .lk-search-results { grid-template-columns:repeat(2,1fr); }
  .lk-reader-lock { min-height:100%; width:100%; }
}

/* Fallback reader when the optional page-flip script cannot be loaded */
.lk-simple-reader { display:flex; align-items:center; justify-content:center; gap:2px; width:100%; height:100%; }
.lk-simple-reader .lk-reader-page { display:none; height:var(--lk-simple-page-h, 100%); width:var(--lk-simple-page-w, 50%); max-height:100%; max-width:50%; background:transparent; box-shadow:0 18px 50px rgba(0,0,0,.35); }
.lk-simple-reader .lk-reader-page.is-simple-visible { display:block; animation:lkSimplePage .2s ease; }
@keyframes lkSimplePage { from { opacity:.45; transform:translateX(10px); } to { opacity:1; transform:none; } }
@media(max-width:820px){ .lk-simple-reader{width:100%;height:100%;gap:0}.lk-simple-reader .lk-reader-page{max-width:100%;width:var(--lk-simple-page-w,100%);height:var(--lk-simple-page-h,100%)}.lk-simple-reader .lk-reader-page img{object-fit:contain} }
@media (max-width:1100px){ .lk-reader-lock p{max-width:26ch} }
