/* ============================================================================
   Uganda Museums — Research Hub
   File: wp-content/themes/uganda-museums/assets/css/research.css
   ----------------------------------------------------------------------------
   Design language: KGM-Inspired Light Editorial — matches all other pages.

   Sections:
   1. Hero
   2. Research Areas (grid cards)
   3. Recent Publications (integrates with Publications page styling)
   4. Research Facilities (dark forest band)
   5. Current Projects
   6. Research Request Form (comprehensive multi-step)

   Namespace: .res- (Research module)
   ============================================================================ */

.research-page {
  --res-ink:        #1A1A18;
  --res-ink-soft:   #4A4945;
  --res-ink-muted:  #7A7873;
  --res-rule:       #E2DED5;
  --res-rule-soft:  #ECE8DF;
  font-family: var(--font-body);
  color: var(--res-ink);
}


/* ============================================================================
   1. HERO
   ============================================================================ */
.res-hero {
  position: relative;
  padding: clamp(80px, 11vw, 140px) 6vw clamp(50px, 7vw, 80px);
  background:
    radial-gradient(ellipse at 80% -20%, rgba(160, 82, 45, 0.06), transparent 55%),
    linear-gradient(180deg, var(--bg-warm) 0%, var(--bg-white) 100%);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 60px;
  gap: 40px;
}
.res-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(26, 26, 24, 0.04) 1px, transparent 0);
  background-size: 18px 18px;
  opacity: 0.5;
  pointer-events: none;
}

.res-hero__inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.res-hero .breadcrumb { margin-bottom: 24px; }
.res-hero .breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--res-ink-muted);
}
.res-hero .breadcrumb__item:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  opacity: 0.5;
}
.res-hero .breadcrumb__item a {
  color: var(--res-ink-soft);
  text-decoration: none;
}
.res-hero .breadcrumb__item a:hover { color: var(--terracotta); }
.res-hero .breadcrumb__item--active { color: var(--terracotta); }

.res-hero__eyebrow {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
}
.res-rule {
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--terracotta);
  margin-right: 14px;
}
.res-eyebrow-text {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--res-ink-soft);
  font-weight: 500;
}

.res-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--res-ink);
  margin: 0 0 32px;
  max-width: 18ch;
}
.res-hero__title em {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 400;
}

.res-hero__lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--res-ink-soft);
  max-width: 60ch;
  line-height: 1.65;
  margin: 0;
}

.res-hero__sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}
.res-hero__folio {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 13px;
  color: var(--res-ink-muted);
  letter-spacing: 0.06em;
}
.res-hero__vertical {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--res-ink-muted);
}


/* ============================================================================
   2. SECTION HEADER (reusable)
   ============================================================================ */
.res-section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.res-section-head .res-rule {
  margin: 0 auto 18px;
}
.res-section-head__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--res-ink);
  margin: 0 0 18px;
}
.res-section-head__title em {
  font-style: italic;
  color: var(--terracotta);
  font-weight: 500;
}
.res-section-head__sub {
  font-size: 1.05rem;
  color: var(--res-ink-soft);
  line-height: 1.7;
  margin: 0;
}

/* Light variant for dark backgrounds */
.res-section-head--light .res-section-head__title { color: #fff; }
.res-section-head--light .res-section-head__sub { color: rgba(255, 255, 255, 0.75); }
.res-section-head--light .res-rule { background: rgba(255, 255, 255, 0.55); }


/* ============================================================================
   3. RESEARCH AREAS (warm section)
   ============================================================================ */
.res-areas {
  background: var(--bg-section);
  padding: clamp(80px, 10vw, 140px) 6vw;
}
.res-areas__inner {
  max-width: 1280px;
  margin: 0 auto;
}

.res-areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px 32px;
}

.res-area-card {
  background: var(--bg-white);
  padding: 36px 32px;
  border-left: 2px solid var(--terracotta);
  transition: all 300ms cubic-bezier(.2,.7,.2,1);
}
.res-area-card:hover {
  transform: translateY(-4px);
  border-left-color: var(--forest);
  box-shadow: 0 12px 32px -8px rgba(26, 26, 24, 0.12);
}

.res-area-card__icon {
  color: var(--terracotta);
  margin-bottom: 24px;
}

.res-area-card__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--res-ink);
  margin: 0 0 16px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.res-area-card__desc {
  font-size: 1rem;
  color: var(--res-ink-soft);
  line-height: 1.7;
  margin: 0 0 24px;
}

.res-area-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--terracotta);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: gap 280ms cubic-bezier(.2,.7,.2,1);
}
.res-area-card:hover .res-area-card__link {
  gap: 12px;
}


/* ============================================================================
   4. RECENT PUBLICATIONS (white section, integrates with Publications page)
   ============================================================================ */
.res-publications {
  background: var(--bg-white);
  padding: clamp(80px, 10vw, 140px) 6vw;
}
.res-publications__inner {
  max-width: 1280px;
  margin: 0 auto;
}

.res-pubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px 28px;
  margin-bottom: 48px;
}

.res-pub-card {
  background: transparent;
  padding: 32px 0;
  border-top: 1px solid var(--res-rule);
  transition: border-color 300ms ease;
}
.res-pub-card:hover {
  border-top-color: var(--terracotta);
}

.res-pub-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.res-pub-card__type {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
}
.res-pub-card__year {
  font-size: 12px;
  color: var(--res-ink-muted);
  font-weight: 500;
}

.res-pub-card__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.res-pub-card__title a {
  color: var(--res-ink);
  text-decoration: none;
  transition: color 200ms ease;
}
.res-pub-card__title a:hover { color: var(--terracotta); }

.res-pub-card__author {
  font-size: 14px;
  color: var(--res-ink-soft);
  margin: 0 0 16px;
}

.res-pub-card__download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--terracotta);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: gap 200ms ease;
}
.res-pub-card:hover .res-pub-card__download {
  gap: 12px;
}

.res-pubs-cta {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--res-rule);
}


/* ============================================================================
   5. RESEARCH FACILITIES (dark forest band)
   ============================================================================ */
.res-facilities {
  background: var(--forest);
  color: #fff;
  padding: clamp(80px, 10vw, 140px) 6vw;
  position: relative;
  overflow: hidden;
}
.res-facilities::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(160, 82, 45, 0.15), transparent 60%),
    radial-gradient(ellipse at 10% 90%, rgba(232, 201, 168, 0.08), transparent 50%);
  pointer-events: none;
}
.res-facilities__inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
}

.res-facilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px 32px;
}

.res-facility-card {
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 300ms cubic-bezier(.2,.7,.2,1);
}
.res-facility-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(232, 201, 168, 0.3);
  transform: translateY(-4px);
}

.res-facility-card__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 500;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.2;
}

.res-facility-card p {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  margin: 0;
}


/* ============================================================================
   6. CURRENT PROJECTS
   ============================================================================ */
.res-projects {
  background: var(--bg-section);
  padding: clamp(80px, 10vw, 140px) 6vw;
}
.res-projects__inner {
  max-width: 1280px;
  margin: 0 auto;
}

.res-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.res-project-card {
  background: var(--bg-white);
  padding: 32px 28px;
  border: 1px solid var(--res-rule);
  transition: all 300ms cubic-bezier(.2,.7,.2,1);
}
.res-project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -8px rgba(26, 26, 24, 0.12);
  border-color: var(--terracotta);
}

.res-project-card__discipline {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
  margin-bottom: 14px;
}

.res-project-card__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.res-project-card__title a {
  color: var(--res-ink);
  text-decoration: none;
  transition: color 200ms ease;
}
.res-project-card__title a:hover { color: var(--terracotta); }

.res-project-card__excerpt {
  font-size: 0.95rem;
  color: var(--res-ink-soft);
  line-height: 1.65;
  margin: 0 0 20px;
}

.res-project-card__footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--res-rule-soft);
  font-size: 13px;
  color: var(--res-ink-muted);
}


/* ============================================================================
   7. RESEARCH REQUEST FORM
   ============================================================================ */
.res-request {
  background: var(--bg-white);
  padding: clamp(80px, 10vw, 140px) 6vw;
}
.res-request__inner {
  max-width: 900px;
  margin: 0 auto;
}

.res-request__intro {
  text-align: center;
  margin-bottom: 56px;
}

.res-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
  margin-bottom: 22px;
}

.res-request__title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--res-ink);
  margin: 0 0 22px;
}
.res-request__title em {
  font-style: italic;
  color: var(--terracotta);
}

.res-request__desc {
  font-size: 1.05rem;
  color: var(--res-ink-soft);
  line-height: 1.7;
  margin: 0;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* Form sections */
.res-form-section {
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--res-rule);
}
.res-form-section:last-of-type {
  border-bottom: none;
}

.res-form-section__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--res-ink);
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}

/* Form rows & fields */
.res-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.res-form-row:last-child { margin-bottom: 0; }

.res-form-field {
  margin-bottom: 24px;
}
.res-form-field:last-child { margin-bottom: 0; }

.res-form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--res-ink);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.res-form-required {
  color: var(--terracotta);
}

/* Form inputs */
.res-form-input,
.res-form-select,
.res-form-textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--res-ink);
  background: var(--bg-section);
  border: 1px solid transparent;
  border-radius: 0;
  outline: none;
  transition: all 200ms ease;
}

.res-form-input:focus,
.res-form-select:focus,
.res-form-textarea:focus {
  background: var(--bg-white);
  border-color: var(--terracotta);
}

.res-form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%234A4945' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

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

.res-form-file {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--res-ink-soft);
  background: var(--bg-section);
  border: 1px solid var(--res-rule);
  border-radius: 0;
  cursor: pointer;
  transition: all 200ms ease;
}
.res-form-file:hover {
  border-color: var(--terracotta);
}

.res-form-help {
  display: block;
  font-size: 13px;
  color: var(--res-ink-muted);
  margin-top: 8px;
  font-style: italic;
}

/* Checkboxes */
.res-form-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.res-form-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  color: var(--res-ink-soft);
  transition: color 200ms ease;
}
.res-form-checkbox:hover { color: var(--res-ink); }

.res-form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 1px solid var(--res-rule);
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  background: var(--bg-white);
  position: relative;
  transition: all 200ms ease;
}
.res-form-checkbox input[type="checkbox"]:checked {
  background: var(--terracotta);
  border-color: var(--terracotta);
}
.res-form-checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Form actions */
.res-form-actions {
  text-align: center;
  padding-top: 40px;
}

.res-form-notice {
  font-size: 13px;
  color: var(--res-ink-muted);
  line-height: 1.7;
  margin: 24px 0 0;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* Form response messages */
.res-form-response {
  margin-top: 32px;
  padding: 20px 24px;
  border-radius: 0;
  font-size: 15px;
  line-height: 1.6;
}
.res-form-response.success {
  background: rgba(46, 125, 50, 0.08);
  border: 1px solid rgba(46, 125, 50, 0.3);
  color: #2E7D32;
}
.res-form-response.error {
  background: rgba(211, 47, 47, 0.08);
  border: 1px solid rgba(211, 47, 47, 0.3);
  color: #D32F2F;
}


/* ============================================================================
   8. BUTTONS
   ============================================================================ */
.res-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: all 280ms cubic-bezier(.2,.7,.2,1);
  white-space: nowrap;
}

.res-btn--primary {
  background: var(--terracotta);
  color: #fff;
  border-color: var(--terracotta);
}
.res-btn--primary:hover {
  background: #8a4525;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(160, 82, 45, 0.4);
}

.res-btn--ghost {
  background: transparent;
  color: var(--res-ink);
  border-color: var(--res-rule);
}
.res-btn--ghost:hover {
  border-color: var(--res-ink);
  background: var(--bg-section);
}

.res-btn--ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.res-btn--ghost-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.res-btn--lg { padding: 18px 32px; font-size: 15px; }


/* ============================================================================
   9. RESPONSIVE
   ============================================================================ */
@media (max-width: 1024px) {
  .res-hero { grid-template-columns: 1fr; }
  .res-hero__sidebar { display: none; }

  .res-areas-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .res-facilities-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 720px) {
  .res-pubs-grid { grid-template-columns: 1fr; }
  .res-projects-grid { grid-template-columns: 1fr; }
  .res-form-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .res-area-card,
  .res-facility-card,
  .res-project-card,
  .res-pub-card__download,
  .res-area-card__link,
  .res-btn {
    transition: none !important;
  }
  .res-area-card:hover,
  .res-facility-card:hover,
  .res-project-card:hover {
    transform: none;
  }
}
