/* =========================================================
   Chibozu Community Trust — shared styles
   Brand variables also mapped into Tailwind config (see each
   page's <head> for the tailwind.config block).
   ========================================================= */

:root {
  --color-primary: #602c77;
  --color-accent: #8224e3;
  --color-cta: #9900db;
  --color-cta-hover: #fca800;
  --color-ink: #262626;
  --color-muted: #6b6b6b;
  --color-surface: #f4f4f4;
  --font-sans: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

/* -----------------------------------------------------------
   Heading accent underline (matches original purple underline)
   ----------------------------------------------------------- */
.heading-accent {
  position: relative;
  padding-bottom: 0.9rem;
  margin-bottom: 1.5rem;
}

.heading-accent::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 50px;
  background-color: var(--color-primary);
}

.heading-accent.center::after {
  left: 50%;
  transform: translateX(-50%);
}

.heading-accent.light::after {
  background-color: #ffffff;
}

/* -----------------------------------------------------------
   Sticky header
   ----------------------------------------------------------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #ffffff;
  transition: box-shadow 0.25s ease, padding 0.25s ease;
}

#site-header.scrolled {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* -----------------------------------------------------------
   Nav link underline hover animation
   ----------------------------------------------------------- */
.nav-link {
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-cta);
  transition: width 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-primary);
  font-weight: 600;
}

/* -----------------------------------------------------------
   Dropdown menu — "Our Work"
   ----------------------------------------------------------- */
.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 60;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.55rem 1.25rem;
  color: var(--color-ink);
  font-size: 0.95rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-menu a:hover {
  background-color: var(--color-surface);
  color: var(--color-primary);
}

.dropdown-caret {
  display: inline-block;
  margin-left: 0.25rem;
  transition: transform 0.2s ease;
  font-size: 0.7rem;
}

.has-dropdown.open .dropdown-caret {
  transform: rotate(180deg);
}

/* -----------------------------------------------------------
   Mobile menu
   ----------------------------------------------------------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

#mobile-menu.open {
  max-height: 600px;
}

#mobile-menu .mobile-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#mobile-menu .mobile-dropdown.open {
  max-height: 300px;
}

/* -----------------------------------------------------------
   Hero
   ----------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(38, 38, 38, 0.55);
}

.hero-content {
  position: relative;
  z-index: 10;
}

/* -----------------------------------------------------------
   Card hover lift
   ----------------------------------------------------------- */
.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
}

/* -----------------------------------------------------------
   Buttons
   ----------------------------------------------------------- */
.btn-primary {
  display: inline-block;
  background-color: var(--color-cta);
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 0.375rem;
  transition: background-color 0.25s ease, transform 0.15s ease;
}

.btn-primary:hover {
  background-color: var(--color-cta-hover);
  color: var(--color-ink);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-block;
  background-color: transparent;
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 0.375rem;
  border: 2px solid #ffffff;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease;
}

.btn-outline:hover {
  background-color: #ffffff;
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* -----------------------------------------------------------
   Back to top button
   ----------------------------------------------------------- */
#back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--color-cta);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.25s ease;
  z-index: 60;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background-color: var(--color-cta-hover);
  color: var(--color-ink);
}

/* -----------------------------------------------------------
   Footer link hover
   ----------------------------------------------------------- */
.footer-link {
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-link:hover {
  color: var(--color-cta-hover);
  padding-left: 4px;
}

/* -----------------------------------------------------------
   Misc / responsive helpers
   ----------------------------------------------------------- */
.section-divider {
  width: 60px;
  height: 4px;
  background-color: var(--color-primary);
  border-radius: 2px;
}

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

.gallery-figure figcaption {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: 0.5rem;
}
