/* ============================================================
   pages/detail.css — Scholarship Detail-ONLY Specifics
   Migrated: CTA strips use core cta-banner--purple/whatsapp,
   apply button uses core btn-apply, related grid uses grid--3.
   Only unique layout (2-col, sidebar, header) remains here.
   ============================================================ */

@keyframes sd-pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* -- Breadcrumb bar -- */
.sd-breadcrumb-bar {
  padding: 16px 0 0;
  background: var(--color-bg);
}

/* -- Header -- */
.sd-header {
  padding: 0 0 0;
  background: var(--color-bg);
}

.sd-cartola {
  background: rgba(172, 50, 138, 0.08);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.sd-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  max-width: 750px;
}

/* -- Meta pills -- */
.sd-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.sd-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  line-height: 1;
}

a.sd-meta-pill:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  text-decoration: none;
}

.sd-meta-pill__flag {
  font-size: 15px;
  line-height: 1;
}

.sd-meta-pill--open {
  background: rgba(21, 148, 134, 0.08);
  border-color: var(--color-teal);
  color: var(--color-teal);
}

.sd-meta-pill--open::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--color-teal);
  border-radius: 50%;
  animation: sd-pulse-dot 2s infinite;
}

.sd-meta-pill--closed {
  background: #f0f0f0;
  border-color: #ddd;
  color: #888;
}

/* -- Hero image -- */
.sd-hero-image {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  max-height: 420px;
  margin-bottom: 0;
}

.sd-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* -- 2-Column Layout -- */
.sd-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 40px 0 48px;
  align-items: start;
}

.sd-content {
  min-width: 0;
}

/* Content body extensions (on top of core .content-body) */
.sd-content-body blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 16px 20px;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--color-text-secondary);
  background: rgba(172, 50, 138, 0.03);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.sd-content-body img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 1.5em 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.sd-content-body h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin: 2.5em 0 0.75em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--color-border-light);
}

.sd-content-body h2:first-child {
  margin-top: 0;
}

.sd-content-body ul,
.sd-content-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

.sd-content-body ul { list-style: disc; }
.sd-content-body ol { list-style: decimal; }

.sd-content-body li {
  margin-bottom: 0.4em;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.sd-content-body li::marker {
  color: var(--color-primary);
}

/* -- Bottom CTA -- */
.sd-cta-bottom {
  margin-top: 40px;
  margin-bottom: 32px;
}

.sd-cta-bottom-inner {
  background: linear-gradient(135deg, #2d1f3d, #1a1625);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.sd-cta-bottom-text h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 6px;
}

.sd-cta-bottom-text p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

/* -- Sidebar -- */
.sd-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 80px;
}

.sd-sidebar-card {
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(26, 22, 37, 0.06);
}

.sd-sidebar-card__header {
  padding: 14px 20px;
  background: #1a1625;
  color: #fff;
}

.sd-sidebar-card__header h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.sd-sidebar-card__body {
  padding: 4px 0;
}

.sd-sidebar-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-border-light);
  gap: 12px;
}

.sd-sidebar-row:last-child {
  border-bottom: none;
}

.sd-sidebar-row__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.sd-sidebar-row__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
}

.sd-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

.sd-badge--open {
  background: rgba(21, 148, 134, 0.1);
  color: var(--color-teal);
}

.sd-badge--closed {
  background: #f0f0f0;
  color: #888;
}

.sd-pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--color-teal);
  border-radius: 50%;
  animation: sd-pulse-dot 2s infinite;
}

.sd-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}

.sd-pill:hover { text-decoration: none; }

.sd-pill--country {
  border: 1px solid var(--color-teal);
  color: var(--color-teal);
  background: rgba(21, 148, 134, 0.06);
}

.sd-pill--country:hover {
  background: var(--color-teal);
  color: #fff;
}

.sd-pill--type {
  background: #f5f3fa;
  color: var(--color-accent-light);
  border: 1px solid transparent;
}

.sd-pill--type:hover {
  background: var(--color-accent);
  color: #fff;
}

.sd-pill--tag {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.sd-pill--tag:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.sd-sidebar-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

/* Sidebar deadline urgency */
.sd-sidebar-deadline {
  padding: 14px 20px;
  border-top: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sd-sidebar-deadline__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sd-sidebar-deadline__icon svg { color: #fff; }

.sd-sidebar-deadline__text {
  font-size: 13px;
  line-height: 1.4;
}

.sd-sidebar-deadline__text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 1px;
}

.sd-sidebar-deadline__text span {
  color: var(--color-text-muted);
  font-size: 12px;
}

.sd-sidebar-deadline--urgent { background: rgba(255, 107, 53, 0.08); }
.sd-sidebar-deadline--urgent .sd-sidebar-deadline__icon { background: #FF6B35; }
.sd-sidebar-deadline--urgent .sd-sidebar-deadline__text strong { color: #FF6B35; }

.sd-sidebar-deadline--soon { background: rgba(255, 107, 53, 0.05); }
.sd-sidebar-deadline--soon .sd-sidebar-deadline__icon { background: #d97706; }
.sd-sidebar-deadline--soon .sd-sidebar-deadline__text strong { color: #b45309; }

.sd-sidebar-deadline--calm { background: rgba(21, 148, 134, 0.05); }
.sd-sidebar-deadline--calm .sd-sidebar-deadline__icon { background: var(--color-teal); }
.sd-sidebar-deadline--calm .sd-sidebar-deadline__text strong { color: var(--color-teal); }

.sd-sidebar-deadline--closed { background: rgba(0, 0, 0, 0.03); }
.sd-sidebar-deadline--closed .sd-sidebar-deadline__icon { background: #999; }
.sd-sidebar-deadline--closed .sd-sidebar-deadline__text strong { color: var(--color-text-muted); }

.sd-sidebar-cta {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border-light);
  text-align: center;
}

.sd-sidebar-cta__hint {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 8px;
}

.sd-sidebar-share {
  padding: 12px 20px;
  border-top: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sd-sidebar-share__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.sd-sidebar-share__icons {
  display: flex;
  gap: 6px;
}

.sd-sidebar-share__icons a {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all 0.2s;
}

.sd-sidebar-share__icons a:hover {
  background: var(--color-primary);
  color: #fff;
}

.sd-sidebar-newsletter {
  padding: 20px;
  border-top: 1px solid var(--color-border-light);
  background: #1a1625;
  border-radius: 0 0 14px 14px;
}

.sd-sidebar-newsletter h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.sd-sidebar-newsletter p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  margin-bottom: 10px;
}

.sd-sidebar-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sd-sidebar-newsletter__input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  transition: border-color 0.2s;
}

.sd-sidebar-newsletter__input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.sd-sidebar-newsletter__input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.sd-sidebar-views {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 0 4px;
}

.sd-sidebar-views svg { flex-shrink: 0; }

/* -- Section spacing -- */
.sd-mentoria-section {
  padding: 16px 0 40px;
}

.sd-whatsapp-section {
  padding: 0 0 48px;
}

/* -- Floating mobile CTA -- */
.sd-floating-cta {
  display: none;
}

/* -- Responsive -- */
@media (max-width: 768px) {
  .sd-title {
    font-size: 24px;
  }

  .sd-hero-image {
    border-radius: 14px;
    max-height: 240px;
  }

  .sd-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sd-sidebar {
    position: static;
  }

  .sd-cta-bottom-inner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }

  .sd-meta-pills {
    gap: 6px;
  }

  .sd-meta-pill {
    padding: 4px 10px;
    font-size: 12px;
  }

  .sd-sidebar-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .sd-pill {
    font-size: 11px;
    padding: 3px 8px;
  }

  /* ── Floating bar (dark, matches buscador) ── */
  .sd-floating-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 22, 37, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px 16px 0 0;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    color: #fff;
  }

  /* Top row: status + deadline + "Ver detalhes" */
  .sd-floating-cta__info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
  }

  .sd-floating-cta__chip {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    white-space: nowrap;
  }

  .sd-floating-cta__sep {
    color: rgba(255, 255, 255, 0.25);
    font-size: 13px;
  }

  .sd-floating-cta__info {
    overflow: hidden;
  }

  .sd-floating-cta__days {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .sd-floating-cta__days--urgent {
    color: #fca5a5;
  }

  .sd-floating-cta__days--soon {
    color: #fcd34d;
  }

  .sd-floating-cta__days--calm {
    color: #86efac;
  }

  .sd-floating-cta__days--closed {
    color: rgba(255, 255, 255, 0.45);
  }

  .sd-floating-cta__spacer {
    flex: 1;
  }

  .sd-floating-cta__expand {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    flex-shrink: 0;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: none;
    font-family: var(--font-body);
  }

  .sd-floating-cta__expand:active {
    background: rgba(255, 255, 255, 0.06);
  }

  .sd-floating-cta__expand svg {
    transition: transform 0.25s ease;
  }

  .sd-floating-cta.is-expanded .sd-floating-cta__expand svg {
    transform: rotate(180deg);
  }

  .sd-floating-cta__expand-text--more { display: inline; }
  .sd-floating-cta__expand-text--less { display: none; }
  .sd-floating-cta.is-expanded .sd-floating-cta__expand-text--more { display: none; }
  .sd-floating-cta.is-expanded .sd-floating-cta__expand-text--less { display: inline; }

  /* Expandable details panel */
  .sd-floating-details {
    display: none;
    padding: 0 16px;
  }

  .sd-floating-details__sep {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 0 0 10px;
  }

  .sd-floating-cta.is-expanded .sd-floating-details {
    display: block;
  }

  .sd-floating-details__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }

  .sd-floating-details__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .sd-floating-details__label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
  }

  .sd-floating-details__value {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
  }

  .sd-floating-details__deadline {
    grid-column: 1 / -1;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
  }

  .sd-floating-details__deadline--urgent {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
  }

  .sd-floating-details__deadline--soon {
    background: rgba(217, 119, 6, 0.15);
    color: #fcd34d;
  }

  .sd-floating-details__deadline--calm {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
  }

  .sd-floating-details__deadline--closed {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
  }

  /* Edital button (always visible) */
  .sd-floating-cta__edital {
    padding: 0 16px 12px;
  }

  .sd-floating-cta__edital .btn-apply {
    width: 100%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: 10px;
    font-size: 14px;
  }
}
