/* ===== CSS Variables & Theme ===== */
@font-face {
  font-family: 'Kiona';
  src: url('../fonts/kiona-regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Primary Colors */
  --primary: #1a5f7a;
  --primary-dark: #134b61;
  --primary-light: #2d7d9a;
  
  /* Secondary Colors */
  --secondary: #57c5b6;
  --secondary-dark: #3fa99a;
  
  /* Accent */
  --accent: #159895;
  
  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', var(--font-sans);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Borders */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Layout */
  --max-width: 1280px;
  --header-height: 80px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gray-700);
  background-color: var(--gray-50);
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--gray-800);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
}

/* ===== Layout Utilities ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}

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

/* ===== Header & Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: box-shadow var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: 'Kiona', var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.header__logo img {
  height: 38px;
  width: 38px;
  object-fit: contain;
}

.header__logo span {
  line-height: 1;
  font-family: 'Kiona', var(--font-display);
  font-weight: 400;
  letter-spacing: 0.08em;
}

.nav {
  display: none;
}

@media (min-width: 992px) {
  .nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
  }
}

.nav__link {
  position: relative;
  font-weight: 500;
  color: var(--gray-600);
  padding: var(--space-sm) 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-base);
}

.nav__link:hover,
.nav__link.active {
  color: var(--primary);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

@media (min-width: 992px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gray-700);
  transition: var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  padding: var(--space-xl);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  z-index: 999;
}

.mobile-nav.active {
  transform: translateX(0);
}

.mobile-nav__link {
  display: block;
  padding: var(--space-md) 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
}

/* ===== Hero Section ===== */

.logo {
  width: 120px;
  height: 120px;
  background-image: url("../images/logos/logowhite.png");
  background-size: cover;
  background-position: center;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: 520px 520px;
  background-repeat: no-repeat;
  background-position: center 12%;
  opacity: 0.08;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
}

.hero__logo {
  width: 160px;
  height: 160px;
  margin: 20px auto var(--space-lg);
  /* ===== 
  background: var(--white);
  border-radius: var(--radius-full);
  padding: var(--space-lg);
  box-shadow: var(--shadow-xl);
   ===== */
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__logo img {
  max-width: 100%;
  max-height: 100%;
}

.hero__title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-lg);
}

.hero__title--notrace {
  font-family: 'Kiona', var(--font-display);
  font-weight: 400;
  letter-spacing: 0.08em;
}

.hero__full-title {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 400;
  color: rgba(255,255,255,0.95);
}

.hero__title-spacer {
  width: 6px;
  height: 6px;
  margin: var(--space-md) auto;
  background: var(--white);
  border-radius: var(--radius-full);
  opacity: 0.95;
}

@media (min-width: 768px) {
  .hero__title {
    font-size: 3.5rem;
  }
  .hero__full-title {
    font-size: 1.5rem;
  }
}

.hero__subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

/* ===== Stats Cards ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
  }
}

.stat-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: transform var(--transition-base), background var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.2);
}

.stat-card__number {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-card__label {
  font-size: 0.875rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Info Cards Grid ===== */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card__image img {
  transform: scale(1.05);
}

.card__content {
  padding: var(--space-lg);
}

.card__title {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.card__text {
  color: var(--gray-600);
  margin-bottom: var(--space-md);
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 500;
  color: var(--primary);
}

.card__link svg {
  transition: transform var(--transition-fast);
}

.card__link:hover svg {
  transform: translateX(4px);
}

/* ===== Updates Timeline ===== */
.updates {
  max-width: 800px;
  margin: 0 auto;
}

.update-item {
  position: relative;
  padding-left: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-left: 2px solid var(--gray-200);
}

.update-item:last-child {
  padding-bottom: 0;
}

.update-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: var(--radius-full);
  border: 2px solid var(--white);
}

.update-item__date {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: var(--space-xs);
}

.update-item__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.update-item__text {
  color: var(--gray-600);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn--primary {
  background: var(--secondary);
  color: var(--gray-900);
}

.btn--primary:hover {
  background: var(--secondary-dark);
  color: var(--gray-900);
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn--outline:hover {
  background: var(--white);
  color: var(--primary);
}

.btn--secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn--secondary:hover {
  background: var(--gray-200);
}

/* ===== Page Header ===== */
.page-header {
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-3xl);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  text-align: center;
}

.page-header__title {
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.page-header__subtitle {
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Center Cards ===== */
.center-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .center-card {
    flex-direction: row;
    align-items: center;
  }
}

.center-card__info {
  flex: 1;
}

.center-card__name {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

.center-card__location {
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.center-card__stats {
  display: flex;
  gap: var(--space-xl);
}

.center-card__stat {
  text-align: center;
}

.center-card__stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.center-card__stat-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge--active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-badge--inactive {
  background: rgba(148, 163, 184, 0.2);
  color: var(--gray-500);
}

.status-badge--pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.status-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: currentColor;
}

/* ===== Investigator Cards ===== */
.operator-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  text-align: center;
}

.operator-card__image {
  width: 120px;
  height: 120px;
  margin: var(--space-lg) auto var(--space-md);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 4px solid var(--gray-100);
}

.operator-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.operator-card__content {
  padding: 0 var(--space-lg) var(--space-lg);
}

.operator-card__name {
  font-size: 1.125rem;
  margin-bottom: var(--space-xs);
}

.operator-card__role {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
}

.operator-card__affiliation {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
}

.operator-card__contact {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
}

.operator-card__contact a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  color: var(--gray-600);
  transition: all var(--transition-fast);
}

.operator-card__contact a:hover {
  background: var(--primary);
  color: var(--white);
}

/* ===== Progress Charts ===== */
.progress-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.progress-section__title {
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.chart-container {
  position: relative;
  height: 300px;
}

.progress-bar-container {
  margin-bottom: var(--space-lg);
}

.progress-bar__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.progress-bar__label {
  font-weight: 500;
}

.progress-bar__value {
  color: var(--gray-500);
}

.progress-bar {
  height: 12px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

/* ===== Case Cards ===== */
.case-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.case-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--gray-900);
}

.case-card__media video,
.case-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.case-card__play:hover {
  background: var(--white);
  transform: translate(-50%, -50%) scale(1.1);
}

.case-card__content {
  padding: var(--space-lg);
}

.case-card__id {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.case-card__title {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

.case-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.case-card__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  color: var(--gray-500);
}

.case-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.tag {
  padding: var(--space-xs) var(--space-sm);
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--gray-600);
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal__content {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 900px;
  max-height: 90vh;
  overflow: auto;
  margin: var(--space-lg);
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.modal.active .modal__content {
  transform: scale(1);
}

.modal__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 40px;
  height: 40px;
  background: var(--white);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--gray-600);
  transition: all var(--transition-fast);
}

.modal__close:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

/* ===== CMS Admin ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--gray-900);
  color: var(--white);
  padding: var(--space-lg);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
}

.admin-sidebar__logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-2xl);
  color: var(--white);
}

.admin-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  color: var(--gray-400);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  transition: all var(--transition-fast);
}

.admin-nav__link:hover,
.admin-nav__link.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.admin-main {
  flex: 1;
  margin-left: 260px;
  padding: var(--space-xl);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.admin-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

/* Form Styles */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--gray-700);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Table Styles */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.data-table th {
  font-weight: 600;
  color: var(--gray-600);
  font-size: 0.875rem;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background: var(--gray-50);
}

.data-table__actions {
  display: flex;
  gap: var(--space-sm);
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon--edit {
  background: var(--info);
  color: var(--white);
}

.btn-icon--delete {
  background: var(--error);
  color: var(--white);
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-md);
}

.footer__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--space-md);
}

.footer__links {
  list-style: none;
}

.footer__links li {
  margin-bottom: var(--space-sm);
}

.footer__links a {
  color: var(--gray-400);
}

.footer__links a:hover {
  color: var(--white);
}

.footer__bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--gray-700);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-400 { animation-delay: 400ms; }

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.mt-0 { margin-top: 0; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.hidden { display: none; }

@media (max-width: 767px) {
  .hide-mobile { display: none; }
}

@media (min-width: 768px) {
  .hide-desktop { display: none; }
}


/* ===== Case detail movies ===== */
.case-detail-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}
.case-video-list { display: flex; flex-direction: column; gap: var(--space-xl); }
.case-video-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: var(--space-xl);
  align-items: start;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-lg);
}
.case-video-row__movie video {
  width: 100%;
  max-height: 560px;
  border-radius: var(--radius-md);
  background: var(--gray-900);
}
.case-video-row__legend {
  border-left: 3px solid var(--primary);
  padding-left: var(--space-lg);
}
.case-video-row__legend h3 { margin-bottom: var(--space-sm); }
.case-video-admin-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr) auto;
  gap: var(--space-md);
  align-items: start;
  padding: var(--space-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}
.case-video-admin-row textarea { min-height: 76px; }
@media (max-width: 768px) {
  .case-video-row, .case-video-admin-row { grid-template-columns: 1fr; }
  .case-video-row__legend { border-left: 0; border-top: 3px solid var(--primary); padding-left: 0; padding-top: var(--space-md); }
}



/* Align inclusion/exclusion bullet lists with their section titles */
.criteria-list ul {
  padding-left: 0;
  margin-left: 0;
  list-style-position: inside;
}

.criteria-list li {
  margin-bottom: 0.5rem;
}

/* ===== Team Page Layout ===== */
.pi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.pi-tile {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  text-align: center;
}

.pi-tile__photo,
.site-investigator-photo {
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--gray-100);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: 0 0 auto;
}

.pi-tile__photo {
  width: 128px;
  height: 128px;
  margin: 0 auto var(--space-md);
  border: 4px solid var(--gray-100);
  font-size: 2rem;
}

.site-investigator-photo {
  width: 56px;
  height: 56px;
  border: 3px solid var(--gray-100);
  font-size: 1rem;
}

.pi-tile__photo img,
.site-investigator-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pi-tile__name {
  margin-bottom: var(--space-xs);
}

.pi-tile__affiliation {
  color: var(--gray-600);
  margin-bottom: var(--space-xs);
}

.pi-tile__email a {
  overflow-wrap: anywhere;
}

.site-investigator-table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}

.site-investigator-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.site-investigator-table th,
.site-investigator-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
  vertical-align: middle;
}

.site-investigator-table th {
  color: var(--gray-500);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gray-50);
}

.site-investigator-table tbody tr:last-child td {
  border-bottom: none;
}

.site-investigator-table__photo-cell {
  width: 88px;
}

.site-investigator-table__name {
  font-weight: 600;
  color: var(--gray-800);
}


/* ===== Admin access button ===== */
.admin-top-link {
  margin-left: var(--space-sm);
  padding: 0.55rem 1rem !important;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--white) !important;
  box-shadow: var(--shadow-sm);
}
.admin-top-link::after {
  display: none;
}
.admin-top-link:hover {
  background: var(--primary-dark);
  color: var(--white) !important;
}
.mobile-nav__link--admin {
  margin-top: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--white) !important;
  text-align: center;
}


.table-sort {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.drag-handle {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: grab;
  user-select: none;
}

tr.is-dragging {
  opacity: 0.45;
}

.admin-logo-preview {
  margin-top: var(--space-sm);
  width: 96px;
  height: 96px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
}

.admin-logo-preview img {
  max-width: 80px;
  max-height: 80px;
}

.about-page-image {
  margin: 0 0 1.5rem 0;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.about-page-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: none;
}
.about-page-image--flow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
}
.about-page-image--flow img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}


/* ===== Admin responsive sidebar and mobile form safety ===== */
.admin-sidebar__toggle {
  width: 100%;
  margin: 0 0 var(--space-lg) 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  cursor: pointer;
}

.admin-layout.admin-collapsed .admin-sidebar { width: 76px; padding: var(--space-md); }
.admin-layout.admin-collapsed .admin-main { margin-left: 76px; }
.admin-layout.admin-collapsed .admin-sidebar__logo { font-size: 0; margin-bottom: var(--space-md); }
.admin-layout.admin-collapsed .admin-sidebar__logo::after { content: 'NT'; font-size: 1.1rem; }
.admin-layout.admin-collapsed .admin-nav__link { justify-content: center; gap: 0; font-size: 0; padding: var(--space-sm); }
.admin-layout.admin-collapsed .admin-nav__link svg { width: 22px; height: 22px; min-width: 22px; }
.admin-layout.admin-collapsed .admin-sidebar .btn { font-size: 0; padding-left: 0; padding-right: 0; }
.admin-layout.admin-collapsed .admin-sidebar .btn::first-letter { font-size: 1rem; }

.form-input,
.form-textarea,
.form-select { max-width: 100%; min-width: 0; }
.admin-card { max-width: 100%; overflow-x: auto; }
.admin-card form div[style*="grid-template-columns"] { max-width: 100%; }

@media (max-width: 768px) {
  .admin-sidebar { width: 240px; padding: var(--space-md); z-index: 20; transition: width var(--transition-fast); }
  .admin-main { margin-left: 240px; padding: var(--space-md); transition: margin-left var(--transition-fast); min-width: 0; width: auto; }
  .admin-layout.admin-collapsed .admin-sidebar { width: 68px; }
  .admin-layout.admin-collapsed .admin-main { margin-left: 68px; }
  .admin-header { align-items: flex-start; gap: var(--space-sm); flex-direction: column; }
  .admin-card { padding: var(--space-md); }
  .admin-card form div[style*="grid-template-columns"] { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; }
  .data-table { min-width: 560px; }
}

.team-grouped-sections .team-section-title { margin-top: var(--space-2xl); }
.team-grouped-sections .team-section-title:first-child { margin-top: 0; }

/* Keep inactive admin sections fully hidden so lists/tables do not bleed into other admin panels. */
body.admin-page .admin-section:not(.active) {
  display: none !important;
}
body.admin-page .admin-section.active {
  display: block;
}
.admin-sidebar__logo {
  font-family: 'Kiona', var(--font-display);
  font-weight: 400;
  letter-spacing: 0.08em;
}


/* Join the Trial form */
.join-card {
  max-width: 860px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

.join-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.join-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.join-form__message {
  min-height: 1.4rem;
  margin: 0.75rem 0 1rem;
  font-weight: 600;
}

.join-form__message--success { color: var(--success); }
.join-form__message--error { color: var(--danger); }

@media (max-width: 700px) {
  .join-card { padding: 1.25rem; }
  .join-form__grid { grid-template-columns: 1fr; }
}

.join-form__message a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}


/* Extra spacing between mobile stat tiles and the next Home section */
@media (max-width: 767px) {
  .hero .stats-grid { margin-bottom: var(--space-2xl); }
}

.case-card__actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-lg);
}

.quote-card {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--space-2xl);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.quote-card__quote {
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--gray-800);
  margin-bottom: var(--space-lg);
}

.quote-card__person {
  margin-top: var(--space-lg);
  font-weight: 700;
  color: var(--primary);
  text-align: right;
}

.quote-card__affiliation {
  margin-top: var(--space-xs);
  font-weight: 400;
  color: var(--gray-600);
  text-align: right;
}

@media (max-width: 767px) {
  .quote-card { padding: var(--space-xl); }
  .quote-card__quote { font-size: 1.1rem; }
}
