/* =============================================
   MATERIAIS EDUCATIVOS — DETALHE
   ============================================= */

*, *::before, *::after { box-sizing: border-box; }

.im {
  font-size: 32px;
  margin-right: 10px;
}



:root {
  --med-blue: #039BE5;
  --med-blue-dark: #0277BD;
  --med-blue-deeper: #01579B;
  --med-blue-light: #E3F4FD;
  --med-blue-cyan: #00C4F0;
  --med-dark: #0F1B2D;
  --med-gray-text: #475569;
  --med-gray-muted: #64748B;
  --med-gray-light: #F8FAFC;
  --med-gray-mid: #E2E8F0;
  --med-green: #10B981;
  --med-purple: #7C3AED;
  --med-pink: #EC4899;
  --med-radius: 12px;
  --med-radius-lg: 18px;
  --med-shadow: 0 4px 12px rgba(15,27,45,.06);
  --med-shadow-lg: 0 12px 32px rgba(15,27,45,.1);
}

/* HEADER */
.med-header {
  background: linear-gradient(140deg, #0d1b35 0%, #0F3460 60%, #0b4d75 100%);
  padding: clamp(2rem,4vw,3rem) clamp(1rem,5vw,3rem) clamp(8rem,12vw,12rem);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.med-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
          radial-gradient(ellipse 700px 400px at 90% 0%, rgba(3,155,229,.22) 0%, transparent 65%),
          radial-gradient(ellipse 500px 300px at 10% 100%, rgba(0,196,240,.12) 0%, transparent 60%);
  pointer-events: none;
}
.med-header-grid {
  position: absolute;
  inset: 0;
  opacity: .14;
  pointer-events: none;
  background-image:
          linear-gradient(rgba(174,233,255,.08) 1px, transparent 1px),
          linear-gradient(90deg, rgba(174,233,255,.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 90%);
}
.med-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* BREADCRUMB */
.med-breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 1.5rem;
  font-weight: 500;
  flex-wrap: wrap;
}
.med-breadcrumb a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: color .2s;
}
.med-breadcrumb a:hover { color: var(--med-blue-cyan); }
.med-breadcrumb-sep { color: rgba(255,255,255,.35); }
.med-breadcrumb-current { color: #fff; }

/* HEADER CONTENT */
.med-header-content { max-width: 780px; }
.med-header-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 5px 14px;
  background: rgba(174,233,255,.14);
  border: 1px solid rgba(174,233,255,.3);
  border-radius: 500px;
  font-size: .72rem;
  font-weight: 700;
  color: #aee9ff;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.med-header h1 {
  font-size: clamp(1.9rem,3.4vw,2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
  color: #fff;
  text-wrap: balance;
}
.med-header-sub {
  font-size: clamp(1rem,1.3vw,1.15rem);
  color: rgba(255,255,255,.82);
  line-height: 1.55;
  max-width: 720px;
  margin-bottom: 1.75rem;
}
.med-header-meta {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.med-header-meta-item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  font-weight: 500;
}
.med-header-meta-item svg { width: 16px; height: 16px; color: var(--med-blue-cyan); }
.med-header-meta-item strong { color: #fff; font-weight: 700; }

/* MAIN GRID */
.med-main {
  padding: 0 clamp(1rem,5vw,3rem) clamp(3rem,5vw,4rem);
  margin-top: -8rem;
  position: relative;
  z-index: 2;
}
.med-main-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.25rem;
  align-items: start;
}

/* COVER LARGE */
.med-cover-large {
  width: 100%;
  border-radius: var(--med-radius-lg);
  overflow: hidden;
  box-shadow: var(--med-shadow-lg);
  background: var(--med-gray-light);
}
.med-cover-large-img {
  width: 100%;
  height: auto;
  display: block;
}

/* CONTENT BLOCKS */
.med-block {
  background: #fff;
  border: 1px solid var(--med-gray-mid);
  border-radius: var(--med-radius-lg);
  padding: clamp(1.5rem,3vw,2.25rem);
  margin-top: 1.5rem;
  box-shadow: var(--med-shadow);
}
.med-block h2 {
  font-size: clamp(1.25rem,2vw,1.55rem);
  font-weight: 800;
  color: var(--med-dark);
  letter-spacing: -.015em;
  margin-bottom: 1.25rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.med-block h2 .med-num {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: var(--med-blue-light);
  color: var(--med-blue-deeper);
  border-radius: 8px;
  font-size: .78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.med-block p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--med-gray-text);
  margin-bottom: 1rem;
}
.med-block p:last-child { margin-bottom: 0; }
.med-block strong { color: var(--med-dark); font-weight: 700; }

/* LEARN LIST */
.med-learn-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: 1rem;
}
.med-learn-item {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  padding: .9rem 1rem;
  background: var(--med-gray-light);
  border: 1px solid var(--med-gray-mid);
  border-radius: 10px;
  font-size: .92rem;
  color: var(--med-gray-text);
  line-height: 1.5;
}
.med-learn-item::before {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--med-green);
  margin-top: 1px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.5"><path d="M5 12l5 5L20 7"/></svg>');
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
}
@media (max-width: 600px) { .med-learn-list { grid-template-columns: 1fr; } }

/* SUMÁRIO */
.med-chapter-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1rem;
}
.med-chapter-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--med-gray-light);
  border: 1px solid var(--med-gray-mid);
  border-radius: var(--med-radius);
  transition: border-color .2s;
}
.med-chapter-row:hover { border-color: var(--med-blue); background: #fff; }
.med-chapter-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--med-blue-light);
  color: var(--med-blue-deeper);
  font-weight: 700;
  font-size: .82rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.med-chapter-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--med-dark);
  margin-bottom: .2rem;
  line-height: 1.3;
}
.med-chapter-info p {
  font-size: .9rem;
  color: var(--med-gray-muted);
  margin: 0;
  line-height: 1.55;
}

/* AUTHOR */
.med-author-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--med-gray-light);
  border: 1px solid var(--med-gray-mid);
  border-radius: 12px;
  margin-top: 1rem;
}
.med-author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.med-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.med-author-info strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--med-dark);
  display: block;
  margin-bottom: .2rem;
}
.med-author-info span { font-size: .88rem; color: var(--med-gray-muted); }

/* SIDEBAR */
.med-sidebar { position: sticky; top: 90px; }
.med-form-card {
  background: #fff;
  border: 1px solid var(--med-gray-mid);
  border-radius: var(--med-radius-lg);
  box-shadow: var(--med-shadow-lg);
  overflow: hidden;
}
.med-form-card-header {
  padding: 1.5rem 1.75rem 1.25rem;
  background: linear-gradient(180deg, var(--med-blue-light), #fff);
  border-bottom: 1px solid var(--med-gray-mid);
}
.med-form-card-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: 4px 10px;
  background: var(--med-green);
  color: #fff;
  border-radius: 500px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.med-form-card-header strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--med-dark);
  line-height: 1.2;
  letter-spacing: -.005em;
  margin-bottom: .35rem;
}
.med-form-card-header span {
  font-size: .88rem;
  color: var(--med-gray-muted);
  line-height: 1.45;
}
.med-form-body { padding: 1.5rem 1.75rem 1.75rem; }
.med-form-btn {
  width: 100%;
  background: linear-gradient(135deg, #0f3460 0%, var(--med-blue) 55%, var(--med-blue-cyan) 100%);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: 13px;
  border-radius: 500px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15,52,96,.35);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  text-decoration: none;
}
.med-form-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(3,155,229,.45);
}
.med-form-btn svg { width: 16px; height: 16px; }
.med-form-disclaimer {
  font-size: .72rem;
  color: var(--med-gray-muted);
  text-align: center;
  margin-top: .85rem;
  line-height: 1.5;
}
.med-form-trust {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--med-gray-mid);
}
.med-form-trust-item {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--med-gray-text);
  font-size: .82rem;
  font-weight: 500;
}
.med-form-trust-item svg { width: 14px; height: 14px; color: var(--med-green); flex-shrink: 0; }

/* FORM EMBED SECTION */
.med-form-section {
  padding: clamp(2.5rem,4vw,3.5rem) clamp(1rem,5vw,3rem);
  background: #fff;
  border-top: 1px solid var(--med-gray-mid);
}
.med-form-section-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.med-form-eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--med-blue);
  display: inline-block;
  margin-bottom: 1rem;
}
.med-form-section h2 {
  font-size: clamp(1.5rem,2.4vw,2rem);
  font-weight: 800;
  color: var(--med-dark);
  letter-spacing: -.015em;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.med-form-section p {
  color: var(--med-gray-text);
  font-size: 1rem;
  margin-bottom: 2rem;
}
.med-form-embed-placeholder {
  background: var(--med-gray-light);
  border: 1px dashed var(--med-gray-mid);
  border-radius: var(--med-radius-lg);
  padding: 2.5rem;
  color: var(--med-gray-muted);
  font-size: .9rem;
}

/* RELATED */
.med-related {
  padding: clamp(3rem,5vw,4rem) clamp(1rem,5vw,3rem);
  background: #fff;
  border-top: 1px solid var(--med-gray-mid);
}
.med-related-inner { max-width: 1200px; margin: 0 auto; }
.med-section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}
.med-section-eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--med-blue);
  margin-bottom: 1rem;
}
.med-section-title {
  font-size: clamp(1.6rem,2.6vw,2.1rem);
  font-weight: 800;
  color: var(--med-dark);
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: .75rem;
  text-wrap: balance;
}
.med-section-sub { color: var(--med-gray-muted); font-size: 1rem; }
.med-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.med-rel-card {
  background: #fff;
  border: 1px solid var(--med-gray-mid);
  border-radius: var(--med-radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
}
.med-rel-card:hover { transform: translateY(-4px); box-shadow: var(--med-shadow-lg); border-color: rgba(3,155,229,.3); }
.med-rel-cover {
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
  background: var(--med-gray-light);
}
.med-rel-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.med-rel-card:hover .med-rel-cover-img {
  transform: scale(1.04);
}
.med-rel-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 11px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-radius: 500px;
  font-size: .68rem;
  font-weight: 700;
  color: var(--med-dark);
  letter-spacing: .04em;
  text-transform: uppercase;
  z-index: 3;
}
.med-rel-body { padding: 1.25rem 1.25rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.med-rel-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--med-dark);
  line-height: 1.3;
  margin-bottom: .55rem;
  letter-spacing: -.005em;
  flex: 1;
}
.med-rel-body p { font-size: .86rem; color: var(--med-gray-muted); line-height: 1.5; margin-bottom: 1rem; }
.med-rel-cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--med-blue);
  font-weight: 700;
  font-size: .82rem;
  margin-top: auto;
}
.med-rel-cta svg { width: 13px; height: 13px; transition: transform .2s; }
.med-rel-card:hover .med-rel-cta svg { transform: translateY(2px); }

/* BOTTOM CTA */
.med-bottom-cta {
  padding: clamp(3rem,5vw,4rem) clamp(1rem,5vw,3rem);
  background: var(--med-gray-light);
}
.med-bottom-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2.5rem,5vw,4rem) clamp(2rem,5vw,4rem);
  border-radius: 28px;
  background: linear-gradient(135deg, #0d1b35 0%, #0F3460 50%, #0b4d75 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(15,27,45,.18);
  text-align: center;
}
.med-bottom-cta-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
          radial-gradient(ellipse 600px 400px at 90% 10%, rgba(0,196,240,.22), transparent 70%),
          radial-gradient(ellipse 500px 350px at 0% 100%, rgba(3,155,229,.18), transparent 70%);
}
.med-bottom-cta-content { position: relative; z-index: 1; }
.med-bottom-cta-content h2 {
  font-size: clamp(1.6rem,2.8vw,2.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -.02em;
  text-wrap: balance;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.med-bottom-cta-content p {
  color: rgba(255,255,255,.78);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.med-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: #fff;
  color: var(--med-blue-deeper);
  padding: .9rem 1.8rem;
  border-radius: 500px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
  transition: transform .2s, box-shadow .2s;
}
.med-btn-primary:hover { transform: translateY(-2px); background: var(--med-blue-light); }

/* =============================================
   MODAL FORMULÁRIO
   ============================================= */
.med-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15, 27, 45, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.med-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.med-modal {
  background: #fff;
  border-radius: var(--med-radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(15, 27, 45, 0.28);
  position: relative;
  transform: translateY(20px) scale(.97);
  transition: transform .28s ease;
}
.med-modal-overlay.is-open .med-modal {
  transform: translateY(0) scale(1);
}

/* Botão fechar */
.med-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--med-gray-mid);
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--med-gray-muted);
  transition: background .15s, color .15s, border-color .15s;
  z-index: 1;
}
.med-modal-close:hover {
  background: var(--med-gray-light);
  color: var(--med-dark);
  border-color: var(--med-gray-text);
}
.med-modal-close svg { width: 18px; height: 18px; }

/* Header do modal */
.med-modal-header {
  padding: 2rem 2rem 1.25rem;
  background: linear-gradient(180deg, var(--med-blue-light) 0%, #fff 100%);
  border-bottom: 1px solid var(--med-gray-mid);
  border-radius: var(--med-radius-lg) var(--med-radius-lg) 0 0;
}
.med-modal-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--med-blue);
  margin-bottom: .65rem;
}
.med-modal-header h2 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 800;
  color: var(--med-dark);
  letter-spacing: -.015em;
  line-height: 1.2;
  margin-bottom: .5rem;
}
.med-modal-header p {
  font-size: .92rem;
  color: var(--med-gray-muted);
  line-height: 1.5;
  margin: 0;
}

/* Body do modal */
.med-modal-body {
  padding: 1.75rem 2rem 2rem;
}

@media (max-width: 600px) {
  .med-modal-header { padding: 1.5rem 1.25rem 1rem; }
  .med-modal-body   { padding: 1.25rem; }
}

/* =============================================
   RESPONSIVO GERAL
   ============================================= */
@media (max-width: 980px) {
  .med-main-grid { grid-template-columns: 1fr; }
  .med-sidebar { position: static; }
}
@media (max-width: 920px) { .med-related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .med-related-grid { grid-template-columns: 1fr; } }
