/* ===== EBOOKS PAGE ===== */

/* HERO da pagina */
.page-hero {
  position: relative;
  background:
    radial-gradient(at 78% 12%, rgba(42, 82, 152, 0.55), transparent 55%),
    radial-gradient(at 18% 88%, rgba(232, 160, 32, 0.16), transparent 55%),
    linear-gradient(160deg, var(--primary-darker) 0%, var(--primary-dark) 50%, var(--primary) 100%);
  color: var(--white);
  padding: 150px 0 90px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  z-index: -1;
}
.page-hero .container { max-width: 800px; position: relative; z-index: 1; }
.page-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(232, 160, 32, 0.16);
  border: 1px solid rgba(232, 160, 32, 0.3);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-hero p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  max-width: 680px;
  margin: 0 auto;
}

/* SECTION dos ebooks */
.ebooks-section {
  padding: 80px 0;
  background: #f6f8fb;
}
.ebooks-section .container {
  display: grid;
  gap: 40px;
}

/* CARD do ebook */
.ebook-card {
  position: relative;
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(15, 37, 72, 0.08);
  border: 1px solid #e5ebf3;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.ebook-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
  animation: ebookSheen 6s linear infinite;
}
@keyframes ebookSheen {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}
.ebook-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(15, 37, 72, 0.16);
}
@media (prefers-reduced-motion: reduce) {
  .ebook-card::before { animation: none; }
}

/* CORPO do ebook */
.ebook-body {
  padding: 32px 36px;
}
.ebook-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 10px;
}
.ebook-body h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.25;
  margin-bottom: 14px;
}
.ebook-lead {
  font-size: 1rem;
  line-height: 1.7;
  color: #4a5568;
  margin-bottom: 22px;
}

/* VALOR (lista de bullets) */
.ebook-value {
  background: #f6f8fb;
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 22px;
}
.ebook-value h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
}
.ebook-value ul {
  padding-left: 0;
  margin: 0;
}
.ebook-value li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #4a5568;
}
.ebook-value li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--accent-dark);
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 0.78rem;
}
.ebook-value li strong { color: var(--primary-dark); }

/* DESTAQUE (estatistica/dica) */
.ebook-stat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(26, 60, 110, 0.04), rgba(232, 160, 32, 0.04));
  border: 1px dashed rgba(26, 60, 110, 0.2);
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.92rem;
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 26px;
}
.ebook-stat i {
  color: var(--accent-dark);
  font-size: 1.1rem;
  margin-top: 3px;
}
.ebook-stat strong { color: var(--primary-dark); }

/* CTA */
.ebook-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  padding: 14px 26px;
}
.ebook-cta i { font-size: 0.95rem; }

/* MODAL */
.ebook-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.ebook-modal.open { display: flex; }
.ebook-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 37, 72, 0.55);
  backdrop-filter: blur(3px);
}
.ebook-modal-dialog {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  animation: ebookModalIn 0.25s ease;
}
@keyframes ebookModalIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ebook-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f6f8fb;
  color: #5a6a7a;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.ebook-modal-close:hover {
  background: var(--primary);
  color: var(--white);
}
.ebook-modal-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 8px;
}
.ebook-modal-dialog h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.3;
  margin-bottom: 8px;
}
.ebook-modal-sub {
  font-size: 0.95rem;
  color: #5a6a7a;
  line-height: 1.6;
  margin-bottom: 22px;
}

/* FORM */
.ebook-form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 6px; }
.form-row-2 {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-row-2 > div { display: grid; gap: 6px; }
.ebook-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
}
.ebook-form input {
  padding: 12px 14px;
  border: 1.5px solid #d6deea;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fafbfd;
  color: var(--primary-dark);
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s var(--ease-out);
}
.ebook-form input::placeholder { color: #99a5b8; }
.ebook-form input:hover { border-color: #c0cbdc; background: var(--white); }
.ebook-form input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(26, 60, 110, 0.12);
}
.ebook-form input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}
.ebook-form-privacy {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 4px 0 4px;
}
.ebook-form-privacy a { color: var(--primary); text-decoration: underline; }
.ebook-form-privacy a:hover { color: var(--primary-dark); }
.ebook-form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  padding: 14px 26px;
}
.ebook-form-submit:disabled { opacity: 0.7; cursor: wait; }

/* SUCESSO */
.ebook-modal-success {
  text-align: center;
  padding: 20px 0 10px;
  animation: ebookSuccessIn 0.4s var(--ease-out);
}
@keyframes ebookSuccessIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.ebook-modal-success > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.06));
  border: 2px solid rgba(16, 185, 129, 0.3);
  font-size: 2.4rem;
  color: #10b981;
  margin-bottom: 16px;
  animation: ebookSuccessPulse 0.6s var(--ease-out) 0.1s both;
}
@keyframes ebookSuccessPulse {
  0% { transform: scale(0.4); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}
.ebook-modal-success h2 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.ebook-modal-success p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.ebook-modal-success .btn { margin-bottom: 16px; }
.ebook-success-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}
@media (prefers-reduced-motion: reduce) {
  .ebook-modal-success, .ebook-modal-success > i { animation: none; }
}

/* NAV link ativo */
.nav-links a.active {
  color: var(--primary);
  font-weight: 700;
}

/* RESPONSIVO */
@media (max-width: 768px) {
  .page-hero { padding: 110px 0 60px; }
  .ebooks-section { padding: 50px 0; }
  .ebooks-section .container { gap: 28px; }

  .ebook-body {
    padding: 28px 24px;
  }
  .ebook-body h2 { font-size: 1.3rem; }

  .form-row-2 { grid-template-columns: 1fr; }
  .ebook-modal-dialog { padding: 28px 22px; }
}
