/* ==========================================================================
   Oxton Education — Ebook (público)
   Container respeita header/footer (1200px / 1480px alinhado com .oxton-container)
   ========================================================================== */

.ebook-page, .ebook-single-page { background:#f6f7fb; min-height:60vh; }

.ebook-page .oe-container,
.ebook-single-page .oe-container {
  width:100%; max-width:1200px; margin:0 auto; padding:0 24px; box-sizing:border-box;
}
@media (max-width:768px){
  .ebook-page .oe-container, .ebook-single-page .oe-container { padding:0 16px; }
}

/* ===== HERO ===== */
.ebook-hero {
  position:relative; isolation:isolate; overflow:hidden;
  color:#fff; padding:72px 0 60px;
  background:#1e1f6b url("/assets/images/articles-hero.svg") center/cover no-repeat;
}
.ebook-hero::before{ content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:linear-gradient(135deg, rgba(15,23,42,.72), rgba(30,31,107,.58) 50%, rgba(47,53,216,.52)); }
.ebook-hero > .oe-container { position:relative; z-index:1; }
.ebook-hero .eyebrow{ display:inline-block;font-size:11px;font-weight:700;letter-spacing:.16em;
  text-transform:uppercase;background:rgba(255,255,255,.14);padding:6px 14px;border-radius:999px;color:#dbe1ff;margin-bottom:18px; }
.ebook-hero h1{ font-size:clamp(34px,5vw,52px);font-weight:700;letter-spacing:-.02em;margin:0 0 14px;color:#fff !important; }
.ebook-hero p{ font-size:17px;color:#e2e8f0;max-width:700px;line-height:1.6;margin:0; }

/* ===== LAYOUT ===== */
.ebook-section { padding:48px 0 80px; }
.ebook-layout, .ebook-single-layout {
  display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:32px; align-items:start;
}

/* ===== TOOLBAR ===== */
.ebook-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:22px;flex-wrap:wrap}
.ebook-toolbar h2{font-size:20px;font-weight:700;color:#111827;margin:0;letter-spacing:-.01em}
.ebook-toolbar-count{font-size:13px;color:#6b7280;font-weight:600;background:#fff;border:1px solid #e5e7eb;padding:6px 12px;border-radius:999px}

.ebook-chip{display:inline-flex;align-items:center;gap:10px;background:#eef0ff;color:#2f35d8;
  padding:8px 14px;border-radius:999px;font-size:13px;font-weight:600;margin-bottom:14px;border:1px solid #c6cdff}
.ebook-chip a{color:#2f35d8;text-decoration:none;width:20px;height:20px;border-radius:50%;
  display:inline-flex;align-items:center;justify-content:center;background:#fff;font-size:14px;font-weight:700}
.ebook-chip a:hover{background:#dc2626;color:#fff}

/* ===== GRID + CARD ===== */
.ebook-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}

.ebook-card{
  background:#fff;border:1px solid #e5e7eb;border-radius:18px;overflow:hidden;
  display:flex;flex-direction:column;transition:border-color .2s;
}
.ebook-card:hover{border-color:#2f35d8}

.ebook-cover{
  display:block;aspect-ratio:3/4;background:#eef0f6;overflow:hidden;position:relative;text-decoration:none;
}
.ebook-cover img{width:100%;height:100%;object-fit:cover;display:block}

.ebook-cover-fallback{
  width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#dbe1ff 0%,#eef0ff 60%,#fff 100%);color:#2f35d8;
}
.ebook-cover-fallback .fallback-mark{font-size:22px;font-weight:700;letter-spacing:.14em}
.ebook-cover-fallback .fallback-sub{font-size:11px;font-weight:600;letter-spacing:.18em;color:#6b7280;text-transform:uppercase;margin-top:6px}

.ebook-badge{
  position:absolute;top:10px;right:10px;padding:5px 10px;border-radius:999px;
  font-size:11.5px;font-weight:700;letter-spacing:.04em;
}
.ebook-badge-free{background:#10b981;color:#fff}
.ebook-badge-paid{background:#fff;color:#111827;border:1px solid #e5e7eb}

.ebook-card-body{padding:16px 18px;display:flex;flex-direction:column;gap:8px;flex:1}
.ebook-category{
  align-self:flex-start;display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;
  background:color-mix(in srgb, var(--cat-color,#2f35d8) 12%, white);
  color:var(--cat-color,#2f35d8);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;
}
.ebook-card-title{margin:2px 0 0;font-size:15.5px;font-weight:700;line-height:1.3;color:#111827}
.ebook-card-title a{color:inherit;text-decoration:none}
.ebook-card-title a:hover{color:#2f35d8}
.ebook-card-subtitle{margin:0;font-size:12.5px;line-height:1.5;color:#6b7280;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ebook-card-meta{display:flex;gap:10px;font-size:11.5px;color:#6b7280;flex-wrap:wrap;margin-top:auto}
.ebook-card-author{padding-top:8px;border-top:1px solid #f1f3f9;font-size:12.5px}
.ebook-card-author a{color:#111827;font-weight:600;text-decoration:none}
.ebook-card-author a:hover{color:#2f35d8}

.ebook-action-primary{
  display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 16px;
  border-radius:10px;background:#2f35d8;color:#fff;font-weight:700;font-size:13px;text-decoration:none;border:0;cursor:pointer;font-family:inherit;
}
.ebook-action-primary:hover{background:#262aa8;color:#fff}
.ebook-action-primary:disabled{opacity:.55;cursor:not-allowed}

/* ===== EMPTY ===== */
.ebook-empty{background:#fff;border:1px dashed #e5e7eb;border-radius:18px;padding:60px 24px;text-align:center}
.ebook-empty-icon{font-size:42px;margin-bottom:14px;opacity:.6}
.ebook-empty h3{margin:0 0 8px;font-size:18px;color:#111827}
.ebook-empty p{margin:0 0 20px;color:#6b7280}

/* ===== PAGINATION ===== */
.ebook-pagination{display:flex;justify-content:center;align-items:center;gap:6px;margin-top:36px;flex-wrap:wrap}
.ebook-pagination a, .ebook-pagination .current{
  display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:38px;padding:0 12px;
  border-radius:10px;background:#fff;border:1px solid #e5e7eb;color:#111827;font-weight:600;font-size:13.5px;text-decoration:none;
}
.ebook-pagination a:hover{border-color:#2f35d8;color:#2f35d8}
.ebook-pagination .current{background:#2f35d8;color:#fff;border-color:#2f35d8}

/* ===== SIDEBAR ===== */
.ebook-sidebar{position:sticky;top:96px;display:flex;flex-direction:column;gap:16px}
.ebook-sidebar-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:20px}
.ebook-sidebar-card h3{
  margin:0 0 12px;font-size:12.5px;font-weight:700;color:#111827;
  text-transform:uppercase;letter-spacing:.08em;padding-bottom:10px;border-bottom:1px solid #f1f3f9;
}

.ebook-side-search{display:flex;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden}
.ebook-side-search input{flex:1;border:0;padding:9px 12px;font:inherit;font-size:13px;outline:none;background:transparent}
.ebook-side-search button{border:0;background:#2f35d8;color:#fff;padding:0 14px;cursor:pointer;display:flex;align-items:center;justify-content:center}

.ebook-type-filter{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.ebook-type-filter a{
  text-align:center;padding:8px 0;border:1px solid #e5e7eb;border-radius:8px;background:#fff;
  font-size:12.5px;font-weight:600;color:#111827;text-decoration:none;
}
.ebook-type-filter a:hover{border-color:#2f35d8;color:#2f35d8}
.ebook-type-filter a.active{background:#2f35d8;color:#fff;border-color:#2f35d8}

.ebook-side-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:2px}
.ebook-side-list li a{display:flex;align-items:center;gap:10px;padding:8px;border-radius:8px;text-decoration:none;color:#111827;font-size:13.5px}
.ebook-side-list li a:hover{background:#f6f7fb;color:#2f35d8}
.ebook-side-list .dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.ebook-side-list .name{flex:1}
.ebook-side-list .count{font-size:11px;background:#eef0ff;color:#2f35d8;padding:2px 8px;border-radius:999px;font-weight:700}

.ebook-side-latest{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.ebook-side-latest li a{display:flex;gap:10px;align-items:center;text-decoration:none}
.ebook-side-latest img, .side-cover-fb{
  width:48px;height:60px;object-fit:cover;flex-shrink:0;border-radius:6px;background:#eef0f6;
  display:flex;align-items:center;justify-content:center;color:#2f35d8;font-weight:700;font-size:13px;
}
.ebook-side-latest .t{display:block;font-size:13px;font-weight:600;line-height:1.3;color:#111827}
.ebook-side-latest small{display:block;font-size:11px;color:#6b7280;margin-top:3px}

.ebook-tag-cloud{display:flex;flex-wrap:wrap;gap:6px}
.ebook-tag-cloud a{
  padding:4px 10px;background:#f6f7fb;border:1px solid #e5e7eb;border-radius:999px;
  font-size:12px;color:#374151;text-decoration:none;font-weight:500;
}
.ebook-tag-cloud a:hover{background:#2f35d8;color:#fff;border-color:#2f35d8}

.ebook-sidebar-cta{background:linear-gradient(135deg,#2f35d8,#1f25b3);color:#fff;border-color:transparent}
.ebook-sidebar-cta h3{color:#fff;border-bottom-color:rgba(255,255,255,.18)}
.ebook-sidebar-cta p{font-size:13px;color:rgba(255,255,255,.85);line-height:1.55;margin:0 0 12px}
.ebook-sidebar-cta a{display:inline-flex;background:#fff;color:#2f35d8;padding:8px 16px;border-radius:8px;font-weight:700;font-size:13px;text-decoration:none}

/* ===== PÁGINA INDIVIDUAL ===== */
.ebook-single-hero{background:#fff;border-bottom:1px solid #e5e7eb;padding:18px 0}
.ebook-single-hero .breadcrumb{display:flex;align-items:center;gap:8px;font-size:13px;color:#6b7280;flex-wrap:wrap}
.ebook-single-hero .breadcrumb a{color:#2f35d8;text-decoration:none}

.ebook-single-section{padding:40px 0 80px}
.ebook-single-content{background:#fff;border:1px solid #e5e7eb;border-radius:22px;padding:32px}

.ebook-single-grid{display:grid;grid-template-columns:280px 1fr;gap:28px;align-items:start;margin-bottom:24px}
.ebook-single-cover img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:14px;display:block;border:1px solid #e5e7eb}
.ebook-single-cover .ebook-cover-fallback{aspect-ratio:3/4;border-radius:14px}

.ebook-single-info h1{font-size:clamp(24px,3vw,32px);font-weight:700;color:#111827;margin:10px 0 8px;letter-spacing:-.01em}
.ebook-single-subtitle{font-size:15.5px;color:#4b5563;line-height:1.55;margin:0 0 14px}
.ebook-single-author{margin:0 0 18px;font-size:14px;color:#6b7280}
.ebook-single-author a{color:#2f35d8;font-weight:600;text-decoration:none}

.ebook-single-price{margin:14px 0 18px;font-size:30px;font-weight:700;display:flex;align-items:baseline;gap:12px}
.ebook-price-free{color:#10b981}
.ebook-price-paid{color:#111827}
.ebook-price-old{font-size:18px;font-weight:600;color:#9ca3af;text-decoration:line-through}

/* ===== AUTHOR BOX ===== */
.ebook-author-box{display:flex;gap:20px;margin-top:32px;padding:24px;background:#f6f7fb;border:1px solid #e5e7eb;border-radius:16px}
.ebook-author-avatar,
.ebook-author-avatar img{width:84px;height:84px;border-radius:50%;object-fit:cover;flex-shrink:0;border:3px solid #fff}
.ebook-author-info{flex:1;min-width:0}
.ebook-author-label{font-size:11px;font-weight:700;color:#6b7280;text-transform:uppercase;letter-spacing:.1em}
.ebook-author-info h3{margin:4px 0 6px;font-size:19px;color:#111827;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ebook-author-info h3 a{color:inherit;text-decoration:none}
.ebook-author-info h3 a:hover{color:#2f35d8}
.ebook-author-title{font-size:13.5px;color:#2f35d8;font-weight:600;margin:0 0 8px}
.ebook-author-bio{font-size:14px;line-height:1.6;color:#4b5563;margin:0 0 12px}
.ebook-author-stats{display:flex;gap:14px;font-size:12.5px;color:#6b7280;margin-bottom:14px;flex-wrap:wrap}
.ebook-author-stats strong{color:#111827;font-weight:700}
.ebook-author-link{display:inline-flex;align-items:center;gap:6px;color:#2f35d8;font-weight:700;font-size:13.5px;text-decoration:none}
.ebook-author-link:hover{gap:10px;transition:gap .2s}

.ebook-single-actions{margin-bottom:22px;display:flex;gap:10px;flex-wrap:wrap}
.ebook-single-actions .ebook-action-primary{min-height:48px;font-size:14px;padding:0 26px}

.ebook-single-specs{display:grid;grid-template-columns:repeat(2,1fr);gap:6px 16px;font-size:13px;margin:0;padding:14px 16px;background:#f6f7fb;border-radius:10px}
.ebook-single-specs div{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px dashed #e5e7eb}
.ebook-single-specs div:last-child{border-bottom:0}
.ebook-single-specs dt{color:#6b7280;font-weight:600}
.ebook-single-specs dd{margin:0;color:#111827;font-weight:600}

.ebook-single-block{margin-top:32px;padding-top:24px;border-top:1px solid #f1f3f9}
.ebook-single-block h2{font-size:22px;font-weight:700;color:#111827;margin:0 0 14px;letter-spacing:-.01em}
.ebook-body{font-size:15px;line-height:1.7;color:#374151}
.ebook-body p{margin:0 0 14px}
.ebook-body ul, .ebook-body ol{margin:0 0 14px;padding-left:22px}

.ebook-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:24px;padding-top:18px;border-top:1px solid #f1f3f9;align-items:center}
.ebook-tags-label{font-size:12px;font-weight:700;color:#6b7280;text-transform:uppercase;letter-spacing:.08em;margin-right:6px}
.ebook-tags a{padding:5px 12px;background:#f6f7fb;border:1px solid #e5e7eb;border-radius:999px;font-size:12.5px;color:#374151;text-decoration:none;font-weight:500}
.ebook-tags a:hover{background:#2f35d8;color:#fff;border-color:#2f35d8}

.ebook-related{margin-top:40px;padding-top:28px;border-top:1px solid #e5e7eb}
.ebook-related h2{font-size:22px;font-weight:700;color:#111827;margin:0 0 18px;letter-spacing:-.01em}
.ebook-related .ebook-grid{grid-template-columns:repeat(3,minmax(0,1fr))}

/* ===== MODAL DOWNLOAD GRATUITO ===== */
.ebook-modal-overlay{
  position:fixed; inset:0; z-index:1000; display:none;
  align-items:center; justify-content:center; padding:20px;
  background:rgba(15,23,42,.6); backdrop-filter:blur(3px);
}
.ebook-modal-overlay.open{display:flex; animation:ebFade .2s ease}
@keyframes ebFade{from{opacity:0}to{opacity:1}}
.ebook-modal{
  background:#fff; border-radius:18px; width:100%; max-width:480px; position:relative;
  padding:28px; box-shadow:0 24px 60px -12px rgba(15,23,42,.35);
  max-height:92vh; overflow-y:auto; animation:ebPop .22s ease;
}
@keyframes ebPop{from{transform:translateY(14px);opacity:0}to{transform:translateY(0);opacity:1}}
.ebook-modal-close{
  position:absolute; top:14px; right:16px; width:34px; height:34px; border:0; border-radius:50%;
  background:#f1f5f9; color:#475569; font-size:22px; line-height:1; cursor:pointer;
}
.ebook-modal-close:hover{background:#fee2e2; color:#dc2626}
.ebook-modal-head h3{margin:0 0 6px; font-size:20px; font-weight:700; color:#111827}
.ebook-modal-head p{margin:0 0 18px; font-size:13.5px; color:#6b7280; line-height:1.5}
.ebook-modal-field{display:flex; flex-direction:column; margin-bottom:12px}
.ebook-modal-field label{font-size:12.5px; font-weight:600; color:#374151; margin-bottom:5px}
.ebook-modal-field label span{color:#dc2626}
.ebook-modal-field input{
  border:1px solid #e5e7eb; border-radius:9px; padding:10px 12px; font:inherit; font-size:14px;
  outline:none; box-sizing:border-box; transition:border-color .15s, box-shadow .15s;
}
.ebook-modal-field input:focus{border-color:#2f35d8; box-shadow:0 0 0 3px rgba(47,53,216,.12)}
.ebook-modal-row{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.ebook-modal-check{display:flex; gap:8px; align-items:flex-start; font-size:12.5px; color:#475569; margin:6px 0 14px; cursor:pointer; line-height:1.45}
.ebook-modal-check input{margin-top:2px}
.ebook-modal-submit{width:100%; min-height:46px; font-size:14.5px}
.ebook-modal-msg{font-size:13px; margin:4px 0 12px; display:none}
.ebook-modal-msg.is-error{display:block; color:#dc2626}
.ebook-modal-msg.is-success{display:block; color:#0e9f6e}
.ebook-modal-fallback{font-size:12.5px; color:#6b7280; text-align:center; margin:12px 0 0}
.ebook-modal-fallback a{color:#2f35d8; font-weight:600}
.ebook-hp{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden}

/* ===== RESPONSIVO ===== */
@media (max-width:1200px){ .ebook-grid{grid-template-columns:repeat(2,minmax(0,1fr))} .ebook-related .ebook-grid{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:1024px){
  .ebook-layout, .ebook-single-layout{grid-template-columns:1fr}
  .ebook-sidebar{position:static}
}
@media (max-width:720px){
  .ebook-grid, .ebook-related .ebook-grid{grid-template-columns:1fr}
  .ebook-hero{padding:48px 0 40px}
  .ebook-single-grid{grid-template-columns:1fr}
  .ebook-single-cover{max-width:240px;margin:0 auto}
  .ebook-single-content{padding:22px}
  .ebook-single-specs{grid-template-columns:1fr}
  .ebook-author-box{flex-direction:column;text-align:center;align-items:center}
  .ebook-author-stats{justify-content:center}
}
