/*
 * ThePita design tokens & shared component styles.
 * Nuansa: tenang, hangat, minimal - cocok untuk platform terapi wicara anak.
 * Dipakai bersama BulmaCSS (mengganti aksen warna/shape, bukan reset penuh).
 */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
  /* Primary - biru dari wordmark logo ThePita (#0B8ED8) */
  --color-primary: #0b8ed8;
  --color-primary-dark: #0871ac; /* versi gelap - dipakai untuk teks/ikon kecil agar kontras aman */
  --color-primary-soft: #e4f3fc;

  /* Aksen "pelangi" dari bentuk logo - dipakai secukupnya sebagai identitas warna
     per konteks (bukan dominan di seluruh UI). Setiap aksen punya versi -dark
     (untuk teks/ikon di atas tint lembut) dan -soft (untuk background tint). */
  --color-pink: #ec008c;
  --color-pink-dark: #c80077;
  --color-pink-soft: #fde6f2;

  --color-yellow: #fddd04;
  --color-yellow-dark: #7e6e02; /* untuk ikon/teks kecil di atas kuning - kuning murni terlalu terang untuk kontras aman */
  --color-yellow-soft: #fff9db;

  --color-green: #99d420;
  --color-green-dark: #547411; /* untuk ikon/teks kecil di atas hijau muda */
  --color-green-soft: #f1fae0;

  --color-cyan: #00adef;
  --color-cyan-dark: #00709b;
  --color-cyan-soft: #e0f6ff;

  --color-bg: #f7fafc;
  --color-surface: #ffffff;
  --color-border: #e5ecf1;

  --color-text: #22313f;
  --color-text-muted: #74838f;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(20, 45, 40, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 45, 40, 0.08);

  --font-body: 'Nunito', sans-serif;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
}

.title,
.subtitle,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-body);
  color: var(--color-text);
}

/* ---------- Buttons ---------- */
.button.is-primary {
  background-color: var(--color-primary);
  border: none;
  font-weight: 700;
  border-radius: 999px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.button.is-primary:hover,
.button.is-primary:focus {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
}

/* ---------- Inputs / selects ---------- */
.input,
.select select,
.textarea {
  border-radius: var(--radius-sm);
  border-color: var(--color-border);
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.select select:focus,
.textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

/* ---------- Cards / boxes ---------- */
.box,
.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.card .card-header {
  box-shadow: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ---------- Notifications (messages) ---------- */
.notification {
  border-radius: var(--radius-md);
}

.notification.is-success {
  background-color: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

/* ---------- Progress bar ---------- */
.progress.is-primary::-webkit-progress-value {
  background-color: var(--color-primary);
}

.progress.is-primary::-moz-progress-bar {
  background-color: var(--color-primary);
}

/* ================================================
   Form card - dipakai di halaman registrasi / auth
   ================================================ */
.tp-form-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
}

.tp-form-card .tp-form-eyebrow {
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.tp-form-card .tp-form-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.tp-form-card .tp-form-subtitle {
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
}

.tp-form-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 1.75rem 0 0.9rem;
}

.tp-form-section-label:first-of-type {
  margin-top: 0;
}

.tp-form-card .field:not(:last-child) {
  margin-bottom: 1.1rem;
}

.tp-form-card .label {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-text);
}

/* ================================================
   Dashboard shell (sidepanel + header)
   ================================================ */
.tp-sidepanel {
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
}

.tp-sidepanel .tp-brand {
  padding: 0.5rem 0 1.5rem;
}

.tp-sidepanel .menu-label {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.tp-sidepanel .menu-list a {
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tp-sidepanel .menu-list a .icon,
.tp-sidepanel .menu-list a .iconify {
  color: var(--color-text-muted);
  margin-right: 0.6rem;
}

.tp-sidepanel .menu-list a:hover {
  background-color: var(--color-bg);
}

.tp-sidepanel .menu-list a.is-active {
  background-color: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.tp-sidepanel .menu-list a.is-active .icon,
.tp-sidepanel .menu-list a.is-active .iconify {
  color: var(--color-primary-dark);
}

.tp-header {
  background: var(--color-surface);
}

.tp-header .navbar-item .icon {
  color: var(--color-text-muted);
}

.tp-header-icon-btn {
  border-radius: 999px;
  width: 2.5rem;
  height: 2.5rem;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.tp-header-icon-btn:hover {
  background-color: var(--color-bg);
}

.tp-profile-link {
  border-radius: 999px;
  padding: 0.25rem !important;
}

.tp-profile-link:hover {
  background-color: var(--color-bg);
}

/* ================================================
   Stat tiles - dashboard ringkasan
   ================================================ */
.tp-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tp-stat-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.tp-stat-tile .tp-stat-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.tp-stat-tile .tp-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.tp-stat-tile .tp-stat-label {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.tp-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--color-text-muted);
}

.tp-empty-state .icon {
  color: var(--color-border);
  margin-bottom: 0.75rem;
}

/* ================================================
   Situs publik - navbar, hero & section marketing
   ================================================ */
.tp-public-navbar {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.tp-public-navbar .navbar-item:not(.has-dropdown):not(.navbar-brand *) {
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tp-public-navbar .navbar-item:hover:not(.has-dropdown) {
  background-color: var(--color-bg);
  color: var(--color-primary-dark);
}

.tp-section {
  padding: 4.5rem 1.5rem;
}

.tp-section-alt {
  background: var(--color-surface);
}

.tp-badge-pill {
  display: inline-block;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.tp-section-heading {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto 3rem;
}

.tp-section-heading h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.tp-section-heading p {
  color: var(--color-text-muted);
}

/* Hero */
.tp-hero {
  padding: 3.5rem 1.5rem 4.5rem;
  overflow: hidden;
}

.tp-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.tp-hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.tp-hero-subtitle {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 34rem;
}

.tp-hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.tp-btn-ghost {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
  font-weight: 700;
}

.tp-btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.tp-hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.tp-hero-stats strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-text);
}

.tp-hero-stats span {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.tp-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.tp-hero-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.7;
}

.tp-hero-blob-1 {
  width: 280px;
  height: 280px;
  background: var(--color-primary-soft);
  top: -10px;
  right: 10px;
}

.tp-hero-blob-2 {
  width: 200px;
  height: 200px;
  background: var(--color-yellow-soft);
  bottom: -20px;
  left: 0;
}

.tp-hero-blob-3 {
  width: 120px;
  height: 120px;
  background: var(--color-pink-soft);
  top: 40%;
  left: -30px;
}

.tp-hero-photo {
  position: relative;
  z-index: 1;
  width: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.tp-hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.tp-hero-mock-card {
  position: relative;
  z-index: 1;
  width: 280px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.tp-hero-mock-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.tp-hero-mock-header .iconify {
  color: var(--color-pink-dark);
}

.tp-hero-mock-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 1rem auto;
  background: conic-gradient(var(--color-primary) 306deg, var(--color-border) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.tp-hero-mock-ring::before {
  content: '';
  position: absolute;
  inset: 12px;
  background: var(--color-surface);
  border-radius: 50%;
}

.tp-hero-mock-ring span {
  position: relative;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--color-primary-dark);
}

.tp-hero-mock-stars {
  color: var(--color-yellow-dark);
  font-size: 1.1rem;
  display: flex;
  gap: 0.15rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.tp-hero-mock-caption {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* Feature cards */
.tp-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.tp-feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tp-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.tp-feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.tp-feature-card h3 {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.tp-feature-card p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Role cards */
.tp-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.tp-role-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
}

.tp-role-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 1rem;
}

.tp-role-card h3 {
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.tp-role-card p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Modifier warna aksen - variasi warna-warni dari bentuk logo ThePita,
   dipakai bergantian di ikon stat/fitur/role (tidak dominan, sekadar identitas). */
.tp-stat-icon.is-pink,
.tp-feature-icon.is-pink {
  background: var(--color-pink-soft);
  color: var(--color-pink-dark);
}

.tp-stat-icon.is-cyan,
.tp-feature-icon.is-cyan {
  background: var(--color-cyan-soft);
  color: var(--color-cyan-dark);
}

.tp-stat-icon.is-yellow,
.tp-feature-icon.is-yellow {
  background: var(--color-yellow);
  color: var(--color-text);
}

.tp-stat-icon.is-green,
.tp-feature-icon.is-green {
  background: var(--color-green);
  color: var(--color-text);
}

.tp-role-icon.is-pink {
  color: var(--color-pink-dark);
}

.tp-role-icon.is-cyan {
  color: var(--color-cyan-dark);
}

.tp-role-icon.is-yellow {
  color: var(--color-yellow-dark);
}

.tp-role-icon.is-green {
  color: var(--color-green-dark);
}

/* Article cards */
.tp-article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.tp-article-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tp-article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.tp-article-date {
  display: inline-block;
  align-self: flex-start;
  background: var(--color-pink-soft);
  color: var(--color-pink-dark);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.tp-article-card h3 {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.tp-article-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.tp-article-link {
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Blog carousel */
.tp-carousel {
  position: relative;
  padding: 0 3rem;
}

.tp-carousel-viewport {
  overflow: hidden;
}

.tp-carousel-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.4s ease;
}

.tp-carousel-slide {
  flex: 0 0 100%;
  max-width: 100%;
}

.tp-carousel-slide .tp-article-card {
  height: 100%;
}

.tp-carousel-slide-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-md, 8px);
}

@media (min-width: 769px) {
  .tp-carousel-slide {
    flex-basis: calc(50% - 0.75rem);
    max-width: calc(50% - 0.75rem);
  }
}

@media (min-width: 1024px) {
  .tp-carousel-slide {
    flex-basis: calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
  }
}

.tp-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.tp-carousel-prev {
  left: 0;
}

.tp-carousel-next {
  right: 0;
}

.tp-carousel-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.tp-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tp-carousel-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  padding: 0;
}

.tp-carousel-dot.is-active {
  background: var(--color-primary);
  width: 1.5rem;
  border-radius: 999px;
}

/* Newsletter */
.tp-newsletter-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  color: #fff;
}

.tp-newsletter-card h2 {
  font-weight: 800;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.tp-newsletter-card p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.75rem;
}

.tp-newsletter-form {
  max-width: 30rem;
  margin: 0 auto;
}

.tp-newsletter-form .input {
  border-radius: 999px 0 0 999px !important;
  border: none !important;
}

.tp-newsletter-form .button {
  border-radius: 0 999px 999px 0 !important;
  background-color: var(--color-pink) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 700;
}

.tp-newsletter-form .button:hover {
  background-color: var(--color-pink-dark) !important;
}

/* Footer */
.tp-public-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 3rem 1.5rem 2rem;
  color: var(--color-text-muted);
}

.tp-public-footer .tp-footer-brand {
  font-weight: 800;
  color: var(--color-text);
  font-size: 1.1rem;
}

.tp-public-footer a {
  color: var(--color-text-muted);
}

.tp-public-footer a:hover {
  color: var(--color-primary-dark);
}

@media (max-width: 900px) {
  .tp-hero-grid {
    grid-template-columns: 1fr;
  }
  .tp-hero-visual {
    order: -1;
    min-height: 280px;
  }
  .tp-hero-title {
    font-size: 2rem;
  }
}
