/* Copiado de NIDDS-SISTEMA/public/css/nidds-ui.css (HEAD 7adeb72) em 15/11/2026.
   Base visual do ecossistema. Ajustes de marca do Mestres do Cuidado vão em
   cursos-*.css, não aqui, para a comparação com a origem continuar simples. */
/* =========================================================
   NIDDS — Design System
   Base compartilhada: tokens, tipografia, botoes, cabecalho,
   rodape e campos de formulario.
   Carregue este arquivo ANTES do CSS especifico da pagina.
   ========================================================= */

:root {
  --navy: #0a1f3d;
  --navy-deep: #06111f;
  --navy-light: #17335c;
  --gold: #c9a24b;
  --gold-bright: #e3c27e;
  /* Dourado para TEXTO sobre fundo claro: o de marca mede 2,18:1 no
     marfim; este mede 5,25:1. */
  --gold-text: #7d6220;
  --ivory: #f7f4ec;
  --ivory-2: #efeade;
  --line: #e0d6bf;
  --line-dark: rgba(201, 162, 75, 0.22);
  --ink: #0f1a2b;
  --ink-soft: #4a5468;
  --cream: #f2ede0;
  --danger: #9b2c2c;
  --success: #2f6b4f;

  --font-display: "Playfair Display", Georgia, serif;
  --font-logo: "Cinzel", "Playfair Display", serif;
  --font-body: "Montserrat", system-ui, sans-serif;

  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 92px;

  /* aliases da paleta antiga: alguns scripts injetam <style> usando
     estes nomes (ex.: o modal de agendamento do perfil). */
  --gold-primary: var(--gold);
  --gold-secondary: var(--navy);
  --dark-text: var(--ink);
  --medium-text: var(--ink-soft);
  --light-text: #7a8299;
  --cream-text: var(--cream);
  --ivory-line: var(--line);
  --white-90: var(--line);
  --white-95: var(--ivory-2);
  --pure-white: #ffffff;
  --transition: all 0.4s var(--ease);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul {
  list-style: none;
}

::selection {
  background: var(--gold);
  color: var(--navy);
}

/* ---------- layout ---------- */

.wrap,
.container {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- tipografia ---------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.display em,
h1 em,
h2 em {
  font-style: italic;
  color: var(--gold);
}

h2.display,
.page-title {
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--gold);
  flex: none;
}

.eyebrow.is-centered {
  justify-content: center;
}

.lead {
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 56ch;
}

.section-head {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(36px, 5vw, 72px);
}

/* ---------- botoes ---------- */

.btn {
  --btn-fg: var(--ivory);
  --btn-bg: var(--navy);
  --btn-bd: var(--navy);
  --btn-wipe: var(--gold);
  --btn-wipe-fg: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border: 1px solid var(--btn-bd);
  color: var(--btn-fg);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  border-radius: 2px;
  cursor: pointer;

  /* o preenchimento sobe por background-position: sem pseudo-elemento,
     entao funciona tambem em botoes gerados por JS (texto solto). */
  background-color: var(--btn-bg);
  background-image: linear-gradient(
    to top,
    var(--btn-wipe) 50%,
    transparent 50%
  );
  background-size: 100% 200%;
  background-position: 0 0;
  background-repeat: no-repeat;
  transition:
    background-position 0.5s var(--ease),
    color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.btn:hover {
  background-position: 0 100%;
  color: var(--btn-wipe-fg);
  border-color: var(--btn-wipe);
}

.btn i {
  font-size: 0.9em;
}

/* aliases: markup antigo e HTML gerado por JS continuam valendo */
.btn-primary {
  --btn-bg: var(--navy);
  --btn-fg: var(--ivory);
  --btn-bd: var(--navy);
}

.btn-ghost,
.btn-secondary {
  --btn-bg: transparent;
  --btn-fg: var(--navy);
  --btn-bd: rgba(15, 26, 43, 0.32);
  --btn-wipe: var(--navy);
  --btn-wipe-fg: var(--ivory);
}

.btn-danger {
  --btn-bg: transparent;
  --btn-fg: var(--danger);
  --btn-bd: rgba(155, 44, 44, 0.4);
  --btn-wipe: var(--danger);
  --btn-wipe-fg: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 11px 20px;
  font-size: 0.68rem;
}

.btn:disabled,
.btn.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

/* contexto escuro */
.on-navy .btn,
.on-navy .btn-primary {
  --btn-bg: var(--gold);
  --btn-fg: var(--navy);
  --btn-bd: var(--gold);
  --btn-wipe: var(--cream);
  --btn-wipe-fg: var(--navy);
}

.on-navy .btn-ghost,
.on-navy .btn-secondary {
  --btn-bg: transparent;
  --btn-fg: var(--cream);
  --btn-bd: rgba(242, 237, 224, 0.32);
  --btn-wipe: var(--cream);
  --btn-wipe-fg: var(--navy);
}

/* link com sublinhado que cresce do centro */
.link-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  position: relative;
  padding-bottom: 5px;
}

.link-line::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition:
    width 0.45s var(--ease),
    left 0.45s var(--ease);
}

.link-line:hover::after {
  width: 100%;
  left: 0;
}

.icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- cabecalho ---------- */

header#header,
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 900;
  padding: 20px 0;
  background: var(--navy-deep);
  border-bottom: 1px solid var(--line-dark);
  transition:
    padding 0.5s var(--ease),
    background-color 0.5s var(--ease);
}

header#header.scrolled,
.nav.is-stuck {
  padding: 12px 0;
  background: rgba(6, 17, 31, 0.94);
  backdrop-filter: blur(14px);
}

.header-container,
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo,
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo img,
.brand img {
  height: 48px;
  width: auto;
  transition: height 0.5s var(--ease);
}

header#header.scrolled .logo img,
.nav.is-stuck .brand img {
  height: 38px;
}

.logo-text,
.brand-name {
  font-family: var(--font-logo);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--cream);
  line-height: 1.1;
  text-transform: uppercase;
}

.logo-text span,
.brand-name span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.48rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-top: 4px;
}

header#header nav ul,
.nav-links ul {
  display: flex;
  gap: 34px;
}

header#header nav a,
.nav-link {
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream);
  position: relative;
  padding: 6px 0;
  transition: color 0.4s var(--ease);
}

header#header nav a::after,
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition:
    width 0.45s var(--ease),
    left 0.45s var(--ease);
}

header#header nav a:hover::after,
header#header nav a.active::after,
.nav-link:hover::after {
  width: 100%;
  left: 0;
}

header#header nav a:hover,
header#header nav a.active,
.nav-link:hover {
  color: var(--gold);
}

.header-actions,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions .btn,
.nav-actions .btn {
  padding: 12px 22px;
  --btn-bg: transparent;
  --btn-fg: var(--cream);
  --btn-bd: rgba(242, 237, 224, 0.32);
  --btn-wipe: var(--gold);
  --btn-wipe-fg: var(--navy);
}

.header-actions .btn:last-child,
.nav-actions .btn:last-child {
  --btn-bg: var(--gold);
  --btn-fg: var(--navy);
  --btn-bd: var(--gold);
  --btn-wipe: var(--cream);
}

.menu-toggle,
.burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(242, 237, 224, 0.3);
  border-radius: 2px;
  color: var(--cream);
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
}

/* menu do usuario logado */

.user-menu {
  position: relative;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.4s var(--ease);
}

.user-avatar:hover {
  background: var(--gold);
  color: var(--navy);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 218px;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.4s var(--ease);
  box-shadow: 0 24px 60px rgba(6, 17, 31, 0.28);
}

.user-menu:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.user-dropdown a,
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.user-dropdown a:hover,
.user-dropdown-item:hover {
  background: var(--ivory-2);
  color: var(--gold);
}

.user-dropdown i {
  color: var(--gold);
  width: 15px;
  font-size: 0.85rem;
}

.user-dropdown hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 6px 0;
}

/* ---------- menu mobile (markup do catalogo/perfis) ---------- */

.mobile-menu-sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(400px, 88vw);
  background: var(--navy-deep);
  z-index: 1000;
  padding: 28px var(--pad);
  transform: translateX(100%);
  transition: transform 0.7s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow-y: auto;
}

.mobile-menu-sidebar.active {
  transform: none;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-close {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(242, 237, 224, 0.3);
  border-radius: 2px;
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-nav {
  display: grid;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(242, 237, 224, 0.08);
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--cream);
  transition: all 0.4s var(--ease);
}

.mobile-nav-item i {
  font-size: 0.85rem;
  color: var(--gold);
  width: 20px;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--gold);
  padding-left: 10px;
}

.mobile-menu-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.mobile-user-info {
  color: rgba(242, 237, 224, 0.7);
  font-size: 0.85rem;
  font-weight: 300;
}

.mobile-menu-overlay,
.sidebar-overlay,
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(6, 17, 31, 0.6);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s var(--ease);
  z-index: 999;
}

.mobile-menu-overlay.active,
.sidebar-overlay.active,
.scrim.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---------- campos ---------- */

.form-group {
  position: relative;
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 15px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: none;
  transition:
    border-color 0.4s var(--ease),
    background-color 0.4s var(--ease);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--ink-soft);
  opacity: 0.55;
  font-weight: 300;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  background: rgba(201, 162, 75, 0.05);
}

.form-control.is-invalid,
input.is-invalid {
  border-color: var(--danger);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) calc(50% + 1px),
    calc(100% - 14px) calc(50% + 1px);
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
  cursor: pointer;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1px;
  padding: 0;
  border: none;
  background: var(--line);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--gold);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--gold);
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  width: 17px;
  height: 17px;
  flex: none;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.3s var(--ease);
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  border-color: var(--gold);
  background: var(--gold);
}

input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid var(--navy);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--navy);
}

/* ---------- rodape ---------- */

footer {
  background: var(--navy-deep);
  color: rgba(242, 237, 224, 0.66);
  border-top: 1px solid rgba(242, 237, 224, 0.1);
  padding: clamp(40px, 5vw, 64px) 0 30px;
}

footer h5 {
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

footer a {
  transition: color 0.4s var(--ease);
}

footer a:hover {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 300;
  color: rgba(242, 237, 224, 0.45);
}

/* ---------- estados ---------- */

.empty-state,
.loading-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: clamp(50px, 8vw, 100px) 20px;
  text-align: center;
  color: var(--ink-soft);
}

.empty-state i,
.loading-state i {
  font-size: 1.8rem;
  color: var(--gold);
}

.empty-state h3 {
  font-size: 1.5rem;
  color: var(--ink);
}

.empty-state p,
.loading-state p {
  font-weight: 300;
  max-width: 40ch;
}

/* ---------- responsivo ---------- */

@media (max-width: 900px) {
  header#header nav,
  .nav-links {
    display: none;
  }

  .header-actions .btn,
  .nav-actions .btn {
    display: none;
  }

  .menu-toggle,
  .burger {
    display: flex;
  }
}

@media (max-width: 600px) {
  .logo-text,
  .brand-name {
    font-size: 1rem;
    letter-spacing: 0.22em;
  }

  .logo img,
  .brand img {
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
