/* ============================================
   Zhooniya Makak Limited Partnership
   Global Stylesheet
   ============================================ */

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

:root {
  --brand-primary: #9c0c24;
  --brand-primary-light: #bc1b36;
  --brand-primary-dark: #6d0818;
  --brand-secondary: #c8903c;
  --brand-secondary-light: #d89c48;
  --brand-accent: #b47824;
  --brand-bg: #faf8f5;
  --brand-bg-alt: #f0ebe4;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Lexend', sans-serif;
  color: var(--gray-800);
  background: var(--brand-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--brand-secondary);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 600;
  color: var(--gray-900);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}

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

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--brand-primary-dark);
  text-decoration: none;
}

.nav-brand-mark {
  width: auto;
  height: 42px;
  display: block;
  flex-shrink: 0;
}

.nav-brand span {
  max-width: 180px;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-secondary);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--brand-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--brand-primary);
  color: var(--white) !important;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--brand-primary-light);
  color: var(--white) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-800);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* --- Manager dropdown --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--brand-bg-alt);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brand-primary-dark);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle,
.nav-dropdown-toggle[aria-expanded="true"] {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--white);
}

.nav-dropdown-caret {
  transition: transform var(--transition);
}

.nav-dropdown.open .nav-dropdown-caret,
.nav-dropdown-toggle[aria-expanded="true"] .nav-dropdown-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  min-width: 220px;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 1000;
}

.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: calc(var(--radius) - 0.15rem);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.nav-dropdown-menu a::after {
  display: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a[aria-current="page"] {
  background: var(--brand-bg);
  color: var(--brand-primary);
}

.nav-dropdown-sep {
  height: 1px;
  background: var(--gray-200);
  margin: 0.35rem 0.4rem;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  margin-top: 72px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14,58,32,0.85) 0%, rgba(26,86,50,0.7) 50%, rgba(139,69,19,0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 4rem 1.5rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(200,145,46,0.2);
  border: 1px solid rgba(200,145,46,0.4);
  color: var(--brand-secondary-light);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-secondary);
  color: var(--white);
  border-color: var(--brand-secondary);
}

.btn-primary:hover {
  background: var(--brand-secondary-light);
  border-color: var(--brand-secondary-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Outline buttons sit on light surfaces nearly everywhere — admin screens,
   auth cards, account pages — so that is the default. The dark hero and CTA
   bands re-declare the white treatment below. */
.btn-outline {
  background: transparent;
  color: var(--gray-800);
  border-color: var(--gray-300);
}

.btn-outline:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
  color: var(--brand-primary);
}

.hero-buttons .btn-outline,
.page-hero .btn-outline,
.cta-section .btn-outline {
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}

.hero-buttons .btn-outline:hover,
.page-hero .btn-outline:hover,
.cta-section .btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  color: var(--white);
}

.btn-dark {
  background: var(--brand-primary);
  color: var(--white);
  border-color: var(--brand-primary);
}

.btn-dark:hover {
  background: var(--brand-primary-light);
  border-color: var(--brand-primary-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* --- Section Styles --- */
.section {
  padding: 5rem 0;
}

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

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-secondary);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--gray-600);
}

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.about-image-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background: var(--brand-primary);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--gray-600);
  margin-bottom: 1.25rem;
}

.about-stats {
  display: grid;
  /* auto-fit rather than a fixed 3 — the stat count changes with the copy */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-primary);
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
}

/* --- Services Section --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Five-card variant: a 6-column track lets the trailing row of two sit centred
   rather than orphaned to the left. */
.services-grid-5 {
  grid-template-columns: repeat(6, 1fr);
}

.services-grid-5 > .service-card {
  grid-column: span 2;
}

.services-grid-5 > .service-card:nth-child(4) {
  grid-column: 2 / span 2;
}

.services-grid-5 > .service-card:nth-child(5) {
  grid-column: 4 / span 2;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-primary);
  transform: scaleX(0);
  transition: transform var(--transition);
}

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

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Team Section --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.team-grid + .team-group-title {
  margin-top: 3rem;
}

.team-group-title {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-secondary);
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
}

.team-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* A single card in a full-width grid reads as a mistake — cap and centre it.
   Double class so the responsive .team-grid rules below don't stretch it. */
.team-grid.team-grid-solo {
  grid-template-columns: minmax(0, 320px);
  justify-content: center;
}

.team-card {
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

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

.team-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  border: 4px solid var(--brand-bg-alt);
}

/* Stand-in for a headshot until the board supplies photography. */
.team-monogram {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  border: 4px solid var(--brand-bg-alt);
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.team-card h3,
.team-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.team-role {
  font-size: 0.85rem;
  color: var(--brand-secondary);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.team-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--brand-primary-dark) 0%, var(--brand-primary) 50%, var(--brand-accent) 100%);
  padding: 5rem 0;
  text-align: center;
  color: var(--white);
}

.cta-section h2 {
  color: var(--white);
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 550px;
  margin: 0 auto 2rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand-mark {
  width: auto;
  height: 38px;
  display: block;
  flex-shrink: 0;
}

.footer-brand-name {
  font-weight: 700;
  color: var(--white);
  font-size: 1rem;
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul a {
  color: var(--gray-400);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col ul a:hover {
  color: var(--brand-secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
}

/* --- Interested Page --- */
.page-hero {
  margin-top: 72px;
  background: linear-gradient(135deg, var(--brand-primary-dark), var(--brand-primary));
  padding: 4rem 0;
  text-align: center;
  color: var(--white);
}

.page-hero h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 550px;
  margin: 0 auto;
}

.form-section {
  padding: 4rem 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: flex-start;
}

.form-wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.form-wrapper h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.form-wrapper > p {
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition);
  background: var(--brand-bg);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: var(--white);
}

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

.form-success {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
}

.form-success h3 {
  font-size: 1.5rem;
  color: var(--brand-primary);
  margin-bottom: 0.75rem;
}

.form-success p {
  color: var(--gray-600);
}

.form-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.included-section {
  background: var(--brand-bg-alt);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.included-section h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--brand-primary-dark);
}

.included-list {
  list-style: none;
}

.included-list li {
  padding: 0.6rem 0;
  padding-left: 2rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--gray-700);
}

.included-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 1rem;
}

.included-list li + li {
  border-top: 1px solid var(--gray-200);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Mobile Responsive --- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid-5 > .service-card,
  .services-grid-5 > .service-card:nth-child(4),
  .services-grid-5 > .service-card:nth-child(5) {
    grid-column: auto;
  }

  .team-grid,
  .team-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-cta {
    text-align: center;
    margin-top: 0.5rem;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    border-radius: var(--radius);
    padding: 0.75rem 0.85rem;
  }

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    border: 0;
    border-top: 1px solid var(--gray-100);
    border-radius: 0;
    padding: 0.25rem 0 0;
    margin-top: 0.5rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-menu a {
    padding: 0.65rem 0.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: 70vh;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-content {
    padding: 2.5rem 1.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .page-hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .nav-brand span {
    font-size: 0.95rem;
  }
}

/* =====================================================
   Additions for sub-pages (about, gallery, contact, news, admin)
   ===================================================== */

/* --- Page hero (used on all sub-pages) --- */
.page-hero {
  position: relative;
  padding: 8rem 0 4rem;
  color: var(--white);
  background: var(--brand-primary-dark);
  overflow: hidden;
}
.page-hero.page-hero-compact {
  padding: 7rem 0 3rem;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}
.page-hero .container {
  position: relative;
  z-index: 1;
}
.page-hero-content {
  /* No max-width — let content fill the container so the heading sits
     naturally within the centered 1200px grid instead of hugging the
     left edge of a narrower inner box. The <p> inside self-limits at
     max-width 640px so paragraph length stays readable. */
}
.page-hero-content h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  color: var(--white);
  margin: 1rem 0 1rem;
}
.page-hero-content p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 640px;
}
.page-hero .hero-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
}

/* --- Gallery grid + lightbox --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--gray-200);
  aspect-ratio: 4 / 3;
  border: none;
  padding: 0;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0));
  color: var(--white);
  text-align: left;
}
.gallery-category {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--brand-secondary);
  color: var(--white);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}
.gallery-caption {
  font-size: 0.95rem;
  font-weight: 500;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}
.lightbox.is-open {
  display: flex;
}
.lightbox-content {
  max-width: 92vw;
  max-height: 86vh;
  text-align: center;
}
.lightbox img {
  max-width: 92vw;
  max-height: 78vh;
  object-fit: contain;
  margin: 0 auto;
}
.lightbox-caption {
  color: var(--white);
  margin-top: 1rem;
  font-size: 0.95rem;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.25);
}
.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev  { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); }

/* --- Contact page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}
.contact-info h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.contact-info p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}
.contact-info-block {
  padding: 1rem 0;
  border-top: 1px solid var(--gray-200);
}
.contact-info-block:last-child {
  border-bottom: 1px solid var(--gray-200);
}
.contact-info-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-primary);
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.contact-info-list {
  margin: 0.25rem 0 0 1.1rem;
  color: var(--gray-700);
}
.contact-info-list li {
  margin: 0.2rem 0;
}

.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}
.contact-form .form-row,
.admin-form .form-row {
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
}
.contact-form label,
.admin-form label {
  font-weight: 500;
  color: var(--gray-800);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.contact-form label small,
.admin-form label small {
  font-weight: 400;
  color: var(--gray-600);
  margin-left: 0.4rem;
}
.contact-form input,
.contact-form textarea,
.contact-form select,
.admin-form input,
.admin-form textarea,
.admin-form select {
  font: inherit;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-900);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 50, 0.15);
}
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-success,
.contact-errors {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.contact-success {
  background: rgba(26, 86, 50, 0.08);
  border: 1px solid var(--brand-primary-light);
  color: var(--brand-primary-dark);
}
.contact-errors {
  background: rgba(200, 30, 30, 0.06);
  border: 1px solid #d93030;
  color: #8a1c1c;
}
.contact-errors ul {
  margin: 0.5rem 0 0 1.25rem;
}

/* --- News grid + cards --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}
.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-200);
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.news-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-200);
}
.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.news-card:hover .news-card-image img {
  transform: scale(1.05);
}
.news-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-primary-dark);
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.news-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.news-card-date {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.news-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
  line-height: 1.35;
}
.news-card-title a {
  color: var(--gray-900);
}
.news-card-title a:hover {
  color: var(--brand-primary);
}
.news-card-excerpt {
  color: var(--gray-600);
  font-size: 0.95rem;
  flex-grow: 1;
}
.news-card-link {
  margin-top: 1rem;
  font-weight: 500;
  font-size: 0.95rem;
}
.news-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-600);
}
.news-empty h1,
.news-empty h2 {
  margin-bottom: 0.75rem;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}
.pagination a,
.pagination-current {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-300);
  font-size: 0.95rem;
  color: var(--gray-700);
}
.pagination a:hover {
  background: var(--gray-100);
  color: var(--brand-primary);
}
.pagination-current {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--white);
}

/* --- Single post --- */
.post-article {
  background: var(--white);
}
.post-hero {
  position: relative;
  color: var(--white);
  min-height: 360px;
  padding: 7rem 0 3rem;
  overflow: hidden;
}
.post-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  z-index: 0;
}
.post-hero .container {
  position: relative;
  z-index: 1;
}
.post-hero-content h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  color: var(--white);
  max-width: 800px;
  margin: 0.75rem 0 0;
}
.post-header {
  padding: 7rem 1.5rem 1.5rem;
}
.post-header h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
}
.post-meta {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}
.post-header .post-meta {
  color: var(--brand-primary);
}
.post-draft-badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.3rem 0.7rem;
  background: rgba(200, 145, 46, 0.25);
  border: 1px solid var(--brand-secondary);
  border-radius: var(--radius);
  font-size: 0.8rem;
}
.post-body {
  max-width: 760px;
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.post-content {
  font-size: 1.05rem;
  color: var(--gray-800);
}
.post-content p {
  margin-bottom: 1.2rem;
}
.post-content h2,
.post-content h3 {
  margin: 2rem 0 0.75rem;
}
.post-content blockquote {
  border-left: 4px solid var(--brand-secondary);
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  color: var(--gray-700);
  font-style: italic;
}
.post-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.post-share {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.post-share span {
  font-size: 0.85rem;
  color: var(--gray-600);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 0.25rem;
}
.post-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-700);
  transition: background var(--transition), color var(--transition);
}
.post-share a:hover {
  background: var(--brand-primary);
  color: var(--white);
}

/* --- Footer socials --- */
.footer-socials {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.65rem;
}
.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  transition: background var(--transition), color var(--transition);
}
.footer-socials a:hover {
  background: var(--brand-secondary);
  color: var(--white);
}

/* --- Admin --- */
.admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-header h1 {
  margin-top: 0.25rem;
}
.admin-table-wrap {
  overflow-x: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.95rem;
}
.admin-table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table code {
  background: var(--gray-100);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
}
.admin-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  white-space: nowrap;
}
.admin-actions a,
.admin-actions button.link-danger {
  font-size: 0.9rem;
  color: var(--brand-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.admin-actions .link-danger {
  color: #b32020;
}

/* Standalone too — the delete control on the gallery edit screen sits outside
   .admin-actions, where it would otherwise render as an unstyled button. */
.link-danger {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  color: #b32020;
  cursor: pointer;
  text-decoration: underline;
}
.admin-actions a:hover {
  text-decoration: underline;
}
.inline-form {
  display: inline;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}
.badge-success {
  background: rgba(26, 86, 50, 0.12);
  color: var(--brand-primary-dark);
}
.badge-muted {
  background: var(--gray-200);
  color: var(--gray-700);
}

.admin-form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  max-width: 920px;
}
.admin-form .form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.admin-form .form-grid-2 > div {
  display: flex;
  flex-direction: column;
}
.admin-form textarea {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.92rem;
  line-height: 1.6;
}
.form-actions {
  flex-direction: row !important;
  gap: 0.75rem;
  align-items: center;
}
.admin-flash {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.admin-flash-success {
  background: rgba(26, 86, 50, 0.10);
  border: 1px solid var(--brand-primary-light);
  color: var(--brand-primary-dark);
}
.admin-flash-error {
  background: rgba(200, 30, 30, 0.08);
  border: 1px solid #d93030;
  color: #8a1c1c;
}

/* --- Responsive for new pages --- */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .admin-form .form-grid-2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .page-hero {
    padding: 6rem 0 3rem;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
  }
  .lightbox-close { top: 0.75rem; right: 0.75rem; }
  .lightbox-prev,
  .lightbox-next { width: 40px; height: 40px; }
  .post-hero,
  .post-header {
    padding-top: 6rem;
  }
  .contact-form-wrap,
  .admin-form {
    padding: 1.5rem;
  }
}

/* --- Admin settings page --- */
.settings-intro {
  color: var(--gray-600);
  margin-top: 0.5rem;
  max-width: 640px;
}
.settings-form fieldset {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--white);
}
.settings-form legend {
  padding: 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brand-primary);
}
.settings-row label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.settings-key {
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-weight: 400;
}
.settings-notes {
  color: var(--gray-600);
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

/* --- Footer login link --- */
.footer-auth {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}
.footer-auth a {
  color: rgba(255, 255, 255, 0.85);
  margin-left: 0.5rem;
}
.footer-auth a:hover {
  color: var(--brand-secondary);
}
.footer-auth .footer-auth-sep {
  margin: 0 0.5rem;
  color: rgba(255, 255, 255, 0.3);
}
.footer-auth a.footer-signin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-weight: 500;
  margin-left: 0;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.footer-auth a.footer-signin:hover {
  background: var(--brand-secondary);
  border-color: var(--brand-secondary);
  color: var(--brand-primary-dark);
}
.footer-auth a.footer-signin::before {
  content: "";
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/><polyline points='10 17 15 12 10 7'/><line x1='15' y1='12' x2='3' y2='12'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}
.footer-auth a.footer-signin:hover::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d0818' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/><polyline points='10 17 15 12 10 7'/><line x1='15' y1='12' x2='3' y2='12'/></svg>");
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* --- Auth pages (login, etc.) --- */
.auth-page {
  min-height: calc(100vh - 80px);
  padding: 6rem 0 4rem;
  background:
    linear-gradient(135deg, rgba(26, 86, 50, 0.06), rgba(200, 145, 46, 0.05)),
    var(--brand-bg);
  display: flex;
  align-items: center;
}
.auth-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2.25rem;
}
.auth-card-header {
  text-align: center;
  margin-bottom: 1.75rem;
}
.auth-brand-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: var(--brand-primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow-md);
}
.auth-card-header h1 {
  font-size: 1.6rem;
  margin: 0 0 0.4rem;
}
.auth-subtitle {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin: 0;
}

.auth-messages {
  margin-bottom: 1.25rem;
}
.auth-flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  margin-bottom: 0.6rem;
}
.auth-flash:last-child { margin-bottom: 0; }
.auth-flash-error {
  background: rgba(200, 30, 30, 0.08);
  border: 1px solid #d93030;
  color: #8a1c1c;
}
.auth-flash-success {
  background: rgba(26, 86, 50, 0.10);
  border: 1px solid var(--brand-primary-light);
  color: var(--brand-primary-dark);
}
.auth-flash-info {
  background: rgba(200, 145, 46, 0.10);
  border: 1px solid var(--brand-secondary);
  color: var(--brand-primary-dark);
}

.auth-form .form-row,
.auth-form .form-row label {
  display: flex;
  flex-direction: column;
}
.auth-form .form-row {
  margin-bottom: 1.1rem;
}
.auth-form label {
  font-weight: 500;
  color: var(--gray-800);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.auth-form label small {
  color: var(--gray-600);
  font-weight: 400;
  margin-left: 0.3rem;
}
.auth-form input {
  font: inherit;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-900);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.auth-form input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 50, 0.15);
}
.auth-code-input {
  font-size: 1.4rem !important;
  text-align: center;
  letter-spacing: 0.4em;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.auth-password-wrap {
  position: relative;
  display: flex;
}
.auth-password-wrap input {
  flex: 1;
  padding-right: 4.5rem;
}
.auth-toggle-password {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gray-100);
  color: var(--gray-700);
  border: none;
  border-radius: var(--radius);
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.auth-toggle-password:hover {
  background: var(--gray-200);
}

.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}
.auth-totp-inline {
  background: var(--gray-50);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px dashed var(--gray-300);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.75rem 0 1.25rem;
  color: var(--gray-600);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}
.auth-divider span {
  padding: 0 0.85rem;
}

.auth-social-block {
  margin: 1.5rem 0;
}
.auth-passkey-block {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.auth-bottom {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-200);
  font-size: 0.92rem;
}
.auth-bottom a {
  color: var(--brand-primary);
}
.auth-bottom .auth-cancel {
  color: #b32020;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .auth-page {
    padding-top: 5rem;
  }
  .auth-card {
    padding: 1.75rem 1.5rem;
  }
}

/* --- Account page --- */
.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 2rem;
  align-items: start;
}
.account-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
}
.account-identity { text-align: center; }
.account-avatar {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
}
.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-avatar-initials {
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 2.4rem;
  letter-spacing: 0.05em;
}
.account-name {
  font-size: 1.4rem;
  margin: 0 0 0.15rem;
  color: var(--gray-900);
}
.account-handle {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin: 0 0 0.85rem;
}
.account-title {
  color: var(--brand-primary);
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0 0 0.35rem;
  letter-spacing: 0.01em;
}
.account-since {
  color: var(--gray-600);
  font-size: 0.85rem;
  margin: 0 0 1.5rem;
}
.account-since strong { color: var(--gray-800); font-weight: 600; }
.account-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.account-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
}
.account-hooks {
  border-top: 1px solid var(--gray-200);
  margin-top: 1rem;
  padding-top: 1rem;
  font-size: 0.9rem;
}
.account-hooks:empty {
  display: none;
}

.account-card-header { margin-bottom: 1.5rem; }
.account-card-header h2 {
  font-size: 1.4rem;
  margin: 0 0 0.35rem;
  color: var(--gray-900);
}
.account-card-header p {
  color: var(--gray-600);
  font-size: 0.92rem;
  margin: 0;
}

.account-form { display: block; }
.account-photo-row {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-100);
}
.account-photo-preview {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--gray-100);
  border: 1px dashed var(--gray-300);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 0.75rem;
}
.account-photo-preview img {
  width: 100%; height: 100%; object-fit: cover;
}
.account-photo-input { flex: 1; }

.account-field { margin-bottom: 1.25rem; }
.account-label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--gray-800);
  margin-bottom: 0.35rem;
}
.account-file,
.account-textarea {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-900);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.account-textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.account-file:focus,
.account-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 50, 0.15);
}
.account-hint {
  color: var(--gray-600);
  font-size: 0.82rem;
  margin: 0.35rem 0 0;
}
.account-form-actions {
  padding-top: 0.5rem;
  display: flex;
  justify-content: flex-end;
}
.account-form-actions .btn {
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
}

.account-flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}
.account-flash-success {
  background: rgba(26, 86, 50, 0.10);
  border: 1px solid var(--brand-primary-light);
  color: var(--brand-primary-dark);
}
.account-flash-error {
  background: rgba(200, 30, 30, 0.08);
  border: 1px solid #d93030;
  color: #8a1c1c;
}
.account-flash-info {
  background: rgba(200, 145, 46, 0.10);
  border: 1px solid var(--brand-secondary);
  color: var(--brand-primary-dark);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
}
.account-uncloak-btn {
  background: var(--brand-primary);
  color: var(--white);
  border: 0;
  border-radius: var(--radius);
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.account-uncloak-btn:hover { background: var(--brand-primary-light); }

.account-hooks-bottom {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.account-hooks-bottom:empty { display: none; }

@media (max-width: 768px) {
  .account-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .account-card { padding: 1.5rem; }
  .account-photo-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .account-form-actions { justify-content: stretch; }
  .account-form-actions .btn { width: 100%; }
}

/* --- Account settings page --- */
.settings-wrap {
  max-width: 720px;
  margin: 0 auto;
}
.settings-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}
.settings-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.settings-avatar img { width: 100%; height: 100%; object-fit: cover; }
.settings-avatar .account-avatar-initials { font-size: 1.2rem; }
.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.settings-row .account-field { margin-bottom: 0; }
.settings-row .form-row { margin-bottom: 0; }
.settings-divider {
  border: 0;
  border-top: 1px solid var(--gray-200);
  margin: 1.5rem 0 1rem;
}

.account-input {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-900);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.account-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 50, 0.15);
}
.account-input[readonly] {
  background: var(--gray-50);
  color: var(--gray-600);
  cursor: default;
}

.settings-pw-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.settings-pw-row .account-input,
.settings-pw-row input { flex: 1; }
.settings-pw-toggle {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0 1rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.settings-pw-toggle:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

/* Wider auth card for the join form */
.auth-card-wide { max-width: 640px; }

.auth-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}
.auth-link:hover {
  color: var(--brand-primary-dark);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .settings-row { grid-template-columns: 1fr; }
  .settings-pw-row { flex-direction: column; align-items: stretch; }
  .settings-pw-toggle { padding: 0.55rem 1rem; }
}

/* --- Sections that sit directly under the fixed nav (e.g. admin pages
       without a page-hero) need extra top padding so content doesn't
       slide under the 72px navbar, especially on mobile. --- */
.site-nav + section.section {
  padding-top: 7rem;
}
@media (max-width: 768px) {
  .site-nav + section.section {
    padding-top: 6rem;
  }
}

/* --- Admin editor floating toolbar --- */
.form-row-editor {
  position: relative;
}
.editor-toolbar {
  position: sticky;
  /* 72px nav + small gap so it sits below the navbar when scrolling */
  top: 80px;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-bottom: none;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.editor-toolbar + textarea,
.editor-toolbar + .editor-preview {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  margin-top: 0;
}
.ed-btn {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
  min-width: 34px;
  background: var(--gray-50);
  color: var(--gray-800);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.ed-btn:hover {
  background: var(--brand-primary);
  color: var(--white);
  border-color: var(--brand-primary);
}
.ed-btn:active {
  transform: translateY(1px);
}
.ed-btn b, .ed-btn i {
  font-style: inherit;
}
.ed-btn b { font-weight: 700; }
.ed-btn i { font-style: italic; }
.ed-sep {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: var(--gray-200);
  margin: 0 0.2rem;
}
.editor-preview {
  min-height: 320px;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--gray-300);
  background: var(--white);
  border-radius: var(--radius);
  font-size: 1.02rem;
  line-height: 1.7;
}
.editor-preview p { margin-bottom: 1em; }
.editor-preview h2 { font-size: 1.6rem; margin: 1.2em 0 0.5em; }
.editor-preview h3 { font-size: 1.3rem; margin: 1em 0 0.4em; }
.editor-preview blockquote {
  border-left: 4px solid var(--brand-secondary);
  padding: 0.4rem 0 0.4rem 1rem;
  margin: 1rem 0;
  color: var(--gray-700);
  font-style: italic;
}
.editor-preview img { max-width: 100%; border-radius: var(--radius); margin: 1rem 0; }
.editor-preview ul, .editor-preview ol { margin: 0 0 1em 1.25rem; }
.editor-preview hr { border: 0; border-top: 1px solid var(--gray-200); margin: 1.5rem 0; }

@media (max-width: 600px) {
  .editor-toolbar {
    top: 72px;
    gap: 0.25rem;
    padding: 0.4rem 0.4rem;
  }
  .ed-btn {
    font-size: 0.78rem;
    padding: 0.3rem 0.5rem;
    min-width: 30px;
  }
}

/* =====================================================
   Leadership cards + individual bio page (person.php)
   ===================================================== */
.team-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.team-card-link:hover h3,
.team-card-link:hover h4 {
  color: var(--brand-primary);
}

.team-card-more {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-primary);
  opacity: 0;
  transform: translateY(4px);
  transition: all var(--transition);
}

.team-card-link:hover .team-card-more,
.team-card-link:focus-visible .team-card-more {
  opacity: 1;
  transform: translateY(0);
}

/* Keep the affordance visible on touch, where there is no hover */
@media (hover: none) {
  .team-card-more { opacity: 1; transform: none; }
}

.person-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

.person-aside {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  position: sticky;
  top: 100px;
}

.person-photo,
.person-monogram {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  border: 4px solid var(--brand-bg-alt);
}

.person-photo { object-fit: cover; }

.person-monogram {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.person-aside-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--gray-800);
}

.person-aside-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-secondary);
  margin-bottom: 1.25rem;
}

.person-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--gray-600);
  text-decoration: none;
}

.person-back:hover { color: var(--brand-primary); }

.person-body {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--gray-700);
  max-width: 68ch;
}

/* Brand rule above the prose so the column reads as a designed block
   rather than an unanchored wall of text. */
.person-body::before {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--brand-secondary);
  margin-bottom: 1.75rem;
}

.person-body p { margin-bottom: 1.4rem; }
.person-body p:last-of-type { margin-bottom: 0; }

/* Lead paragraph carries the opening summary */
.person-body > p:first-of-type {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--gray-800);
}

/* The client's bios open with the person's name in caps — let it act as
   the entry point instead of shouting. */
.person-body > p:first-of-type::first-line {
  font-weight: 500;
}

.person-bio-pending {
  color: var(--gray-600);
  font-style: italic;
}

.person-glance {
  text-align: left;
  margin: 1.5rem 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-200);
}

.person-glance-title {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-secondary);
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.person-glance-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.person-glance-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.7rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--gray-600);
}

.person-glance-list li:last-child { margin-bottom: 0; }

.person-glance-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-primary);
}

.person-cta {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--gray-200);
}

.person-cta p {
  font-size: 0.95rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.person-others {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--gray-200);
}

.admin-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray-600);
}

@media (max-width: 900px) {
  .person-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .person-aside { position: static; }
}

/* =====================================================
   Gallery manager (admin/gallery.php)
   ===================================================== */
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.gallery-admin-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-admin-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-admin-thumb-lg {
  width: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.gallery-admin-noimg {
  font-size: 0.8rem;
  color: var(--gray-400);
}

.gallery-admin-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
}

.gallery-admin-body {
  padding: 0.85rem 1rem 1rem;
}

.gallery-admin-caption {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--gray-800);
  text-decoration: none;
  line-height: 1.4;
}

.gallery-admin-caption:hover { color: var(--brand-primary); }

.gallery-admin-cat {
  font-size: 0.78rem;
  color: var(--brand-secondary);
  font-weight: 600;
  margin-top: 0.2rem;
}

.gallery-admin-order {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
  font-size: 0.78rem;
  color: var(--gray-600);
}

.gallery-admin-order input {
  width: 72px;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.3rem;
  font: inherit;
}

.admin-danger-row {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-200);
}

/* --- Form submissions log (admin/forms.php) --- */
.submission-message {
  max-width: 320px;
  color: var(--gray-600);
  font-size: 0.85rem;
}

.submission-error {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: #991b1b;
  max-width: 260px;
  word-break: break-word;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.link-action {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--brand-primary);
  cursor: pointer;
  text-decoration: underline;
}

/* --- Turnstile widget --- */
.form-captcha {
  margin-bottom: 1.25rem;
}

.form-captcha-noscript {
  font-size: 0.85rem;
  color: #991b1b;
}

.badge-warn {
  background: #fef3c7;
  color: #78350f;
}
