/* ============================================
   Loveworld Source — Global styles
   Palette sampled from public/images/logo.png
============================================ */

:root {
  --navy: #00016d;
  --navy-dark: #000148;
  --cyan: #00dfdf;
  --blue: #0054f2;
  --source-blue: #2382dc;
  --ink: #0b0b12;
  --ink-soft: #4a4d5c;
  --paper: #ffffff;
  --paper-soft: #f5f7fb;
  --line: #e7e9f2;
  --danger: #d1293d;

  --gradient-brand: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 55%, var(--navy) 100%);
  --gradient-dark: linear-gradient(180deg, rgba(0,1,60,.35) 0%, rgba(0,1,45,.78) 60%, rgba(0,1,35,.95) 100%);

  --font-display: 'Poppins', 'Manrope', sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 1, 109, 0.25);
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
  color: #fff;
  box-shadow: 0 10px 25px -8px rgba(0, 1, 109, 0.55);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -8px rgba(0, 1, 109, 0.6); }
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}
.btn--ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn--light {
  background: #fff;
  color: var(--navy);
}
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(0,0,0,0.35); }
.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn--sm { padding: 10px 20px; font-size: 0.85rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
}
.topbar__inner {
  padding: 8px 24px;
  font-size: 0.78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: center;
  font-weight: 600;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  flex-wrap: wrap;
}
.brand__logo { height: 52px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0 auto;
}
.nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

.site-header__actions { display: flex; align-items: center; gap: 20px; }

.header-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}
.header-link:hover { color: var(--blue); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.hero--compact { min-height: 46vh; }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: var(--gradient-dark); }

.hero__inner { position: relative; z-index: 1; padding-top: 90px; padding-bottom: 90px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--source-blue);
  margin-bottom: 14px;
}
.eyebrow--light { color: var(--cyan); }

.hero__title {
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  max-width: 900px;
  margin-bottom: 22px;
}
.hero__lead {
  color: rgba(255,255,255,0.88);
  font-size: 1.08rem;
  max-width: 680px;
  margin-bottom: 36px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }

.hero__stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin: 0;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.25);
}
.hero__stats div { display: flex; flex-direction: column; }
.hero__stats dt {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}
.hero__stats dd {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ---------- Sections generic ---------- */
.section { padding: 110px 0; }
.section--muted { background: var(--paper-soft); }
.section--tight { padding: 70px 0; }

.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.section-head__lead { font-size: 1.05rem; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 64px;
  align-items: center;
}
.about__media { position: relative; }
.about__media img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.about__media-badge {
  position: absolute;
  bottom: -28px;
  left: -28px;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: 0 16px 40px -14px rgba(0,1,109,0.35);
}
.about__media-badge img { height: 30px; width: auto; }

.about__copy h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }

.purpose-card {
  margin-top: 28px;
  padding: 28px 30px;
  border-radius: var(--radius);
  background: var(--gradient-brand);
  color: #fff;
}
.purpose-card h3 {
  color: #fff;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}
.purpose-card p { color: rgba(255,255,255,0.92); margin: 0; }

/* ---------- Content grid ---------- */
.grid--content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 34px -20px rgba(0,1,109,0.28);
  border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px -18px rgba(0,1,109,0.35); }
.card__media { aspect-ratio: 4/3; overflow: hidden; position: relative; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 20px 22px 24px; display: flex; align-items: flex-start; gap: 14px; }
.card__icon {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--paper-soft);
  display: flex; align-items: center; justify-content: center;
}
.card__icon svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card__body h3 { font-size: 1rem; margin: 0; color: var(--ink); font-family: var(--font-display); font-weight: 600; }
.card__body p { font-size: .88rem; margin: 4px 0 0; }
.card--link { display: block; }

/* ---------- Key functions ---------- */
.functions {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}
.functions__media { position: sticky; top: 110px; }
.functions__media img {
  width: 100%;
  height: 620px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.functions__copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }

.functions__list { margin-top: 40px; display: flex; flex-direction: column; gap: 30px; }
.functions__list li {
  display: flex;
  gap: 20px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.functions__list li:last-child { border-bottom: none; padding-bottom: 0; }
.functions__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: var(--gradient-brand);
  flex: none;
  width: 40px;
}
.functions__list h3 { font-size: 1.1rem; margin-bottom: 6px; }
.functions__list p { margin: 0; }

/* ---------- CTA ---------- */
.cta {
  background: var(--navy);
  background-image: radial-gradient(circle at 15% 20%, rgba(0,223,223,0.18), transparent 45%),
                     radial-gradient(circle at 85% 80%, rgba(0,84,242,0.28), transparent 50%);
  color: #fff;
  padding: 100px 0;
  text-align: center;
}
.cta__inner { max-width: 640px; margin: 0 auto; }
.cta h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.cta p { color: rgba(255,255,255,0.82); margin-bottom: 30px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.75); }
.site-footer__inner {
  padding: 70px 24px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.site-footer__brand img { height: 34px; margin-bottom: 14px; }
.site-footer__brand p { color: rgba(255,255,255,0.6); max-width: 260px; }
.site-footer__nav h4, .site-footer__contact h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
}
.site-footer__nav, .site-footer__contact { display: flex; flex-direction: column; gap: 10px; }
.site-footer__nav a, .site-footer__contact a { color: rgba(255,255,255,0.68); font-size: 0.92rem; }
.site-footer__nav a:hover, .site-footer__contact a:hover { color: var(--cyan); }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 22px 0; }
.site-footer__bottom p { margin: 0; font-size: 0.82rem; color: rgba(255,255,255,0.5); text-align: center; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-brand);
  box-shadow: 0 12px 24px -8px rgba(0,84,242,0.5);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 90;
}
.to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Auth forms ---------- */
.auth-section { padding: 90px 0; min-height: 70vh; display: flex; align-items: center; }
.auth-card {
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
}
.auth-card h1 { font-size: 1.6rem; text-align: center; }
.auth-card__lead { text-align: center; margin-bottom: 28px; }
.auth-card__foot { text-align: center; margin-top: 20px; font-size: .92rem; }
.auth-card__foot a { color: var(--blue); font-weight: 600; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,84,242,0.15);
}
.field textarea { resize: vertical; min-height: 100px; }
.field__hint { font-size: .8rem; color: var(--ink-soft); margin-top: 4px; }

.form-error {
  background: rgba(209,41,61,0.08);
  border: 1px solid rgba(209,41,61,0.25);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  margin-bottom: 20px;
}
.form-success {
  background: rgba(0,223,223,0.1);
  border: 1px solid rgba(0,84,242,0.2);
  color: var(--navy);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  margin-bottom: 20px;
}

/* ---------- Dashboard / Admin ---------- */
.dash {
  padding: 60px 0 110px;
}
.dash__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.dash__header h1 { margin-bottom: 4px; }
.dash-grid { display: grid; grid-template-columns: 380px 1fr; gap: 40px; align-items: start; }
.dash-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 14px 34px -24px rgba(0,1,109,0.28);
}
.dash-panel h2 { font-size: 1.15rem; margin-bottom: 20px; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge--pending { background: rgba(230,162,0,0.14); color: #8a6100; }
.badge--approved { background: rgba(0,163,92,0.14); color: #0a7a4c; }
.badge--rejected { background: rgba(209,41,61,0.12); color: var(--danger); }
.badge--admin { background: rgba(0,1,109,0.1); color: var(--navy); }
.badge--user { background: var(--paper-soft); color: var(--ink-soft); }

.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table th { font-family: var(--font-display); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.data-table td.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.data-table td.actions details { position: relative; }
.data-table td.actions summary { list-style: none; }
.data-table td.actions summary::-webkit-details-marker { display: none; }
.data-table td.actions details form { position: absolute; right: 0; z-index: 10; background: #fff; padding: 10px; border-radius: var(--radius-sm); box-shadow: var(--shadow); border: 1px solid var(--line); }
.data-table tr:last-child td { border-bottom: none; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--ink-soft); }

/* ---------- Content detail ---------- */
.content-detail__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 32px; }
.content-detail__media img { width: 100%; max-height: 560px; object-fit: cover; }
.content-detail__meta { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }

/* ============================================
   Responsive
============================================ */
@media (max-width: 980px) {
  .about { grid-template-columns: 1fr; }
  .about__media img { height: 340px; }
  .functions { grid-template-columns: 1fr; }
  .functions__media { position: static; order: -1; }
  .functions__media img { height: 320px; }
  .grid--content { grid-template-columns: repeat(3, 1fr); }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }

  .hero { min-height: auto; }
  .hero__inner { padding-top: 60px; padding-bottom: 60px; }
  .hero__stats { gap: 32px; }

  .section { padding: 70px 0; }
  .grid--content { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .about__media-badge { left: 16px; bottom: -20px; padding: 10px 14px; }
  .site-footer__inner { grid-template-columns: 1fr; padding-top: 50px; }
  .dash__header { flex-direction: column; align-items: stretch; }
  .auth-card { padding: 28px; }
}

@media (max-width: 460px) {
  .grid--content { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
}
