/*
Theme Name: Mountain Gorilla Refuge
Theme URI: https://example.com/mountain-gorilla-refuge
Author: Kimi Agent / Codex repair
Author URI: https://example.com
Description: WordPress and Elementor-ready conversion of the Mountain Gorilla Refuge conservation website.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mountain-gorilla-refuge
Tags: custom-menu, custom-logo, featured-images, full-width-template, block-styles, editor-style
*/

:root {
  --mgr-primary: #1a2e1a;
  --mgr-accent: #d4a843;
  --mgr-bg: #faf8f2;
  --mgr-surface: #ffffff;
  --mgr-text: #1a2e1a;
  --mgr-muted: #5c6b5c;
  --mgr-light: #faf8f2;
  --mgr-light-muted: rgba(250, 248, 242, 0.72);
  --mgr-border: rgba(26, 46, 26, 0.12);
  --mgr-border-dark: rgba(250, 248, 242, 0.15);
  --mgr-radius: 12px;
  --mgr-content: 1200px;
  --mgr-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--mgr-bg);
  color: var(--mgr-text);
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.elementor-editor-active .mgr-reveal {
  opacity: 1;
  transform: none;
}

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

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

button,
input,
textarea,
select {
  font: inherit;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mgr-container {
  width: min(100% - 48px, var(--mgr-content));
  margin: 0 auto;
}

.mgr-main {
  min-height: 55vh;
}

.mgr-site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: rgba(250, 248, 242, 0.96);
  box-shadow: 0 1px 12px rgba(26, 46, 26, 0.08);
  backdrop-filter: blur(12px);
  transition: background 220ms var(--mgr-ease), box-shadow 220ms var(--mgr-ease);
}

.admin-bar .mgr-site-header {
  top: 32px;
}

.mgr-site-header.mgr-is-front:not(.is-scrolled) {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.mgr-header-inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.mgr-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--mgr-primary);
}

.mgr-brand-mark {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.mgr-brand-name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

.mgr-site-header.mgr-is-front:not(.is-scrolled) .mgr-brand,
.mgr-site-header.mgr-is-front:not(.is-scrolled) .mgr-primary-menu a,
.mgr-site-header.mgr-is-front:not(.is-scrolled) .mgr-menu-toggle {
  color: var(--mgr-light);
}

.mgr-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.mgr-primary-menu,
.mgr-primary-menu ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mgr-primary-menu a {
  color: var(--mgr-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 180ms var(--mgr-ease);
}

.mgr-primary-menu a:hover,
.mgr-primary-menu .current-menu-item > a {
  color: var(--mgr-accent);
}

.mgr-nav-donate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 24px;
  border-radius: var(--mgr-radius);
  background: var(--mgr-accent);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  transition: transform 180ms var(--mgr-ease), box-shadow 180ms var(--mgr-ease);
}

.mgr-nav-donate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 168, 67, 0.35);
}

.mgr-menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--mgr-primary);
  padding: 10px;
  cursor: pointer;
}

.mgr-menu-icon {
  display: block;
  width: 24px;
  height: 16px;
  position: relative;
}

.mgr-menu-icon::before,
.mgr-menu-icon::after,
.mgr-menu-icon span {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 180ms var(--mgr-ease), opacity 180ms var(--mgr-ease), top 180ms var(--mgr-ease);
}

.mgr-menu-icon::before {
  top: 0;
}

.mgr-menu-icon span {
  top: 7px;
}

.mgr-menu-icon::after {
  top: 14px;
}

.mgr-site-header.is-menu-open .mgr-menu-icon::before {
  top: 7px;
  transform: rotate(45deg);
}

.mgr-site-header.is-menu-open .mgr-menu-icon span {
  opacity: 0;
}

.mgr-site-header.is-menu-open .mgr-menu-icon::after {
  top: 7px;
  transform: rotate(-45deg);
}

.mgr-section {
  padding: 120px 0;
  background: var(--mgr-bg);
}

.mgr-section-sm {
  padding: 80px 0;
}

.mgr-section-lg {
  padding: 160px 0;
}

.mgr-section-white {
  background: #fff;
}

.mgr-section-dark {
  background: var(--mgr-primary);
  color: var(--mgr-light);
}

.mgr-eyebrow {
  display: inline-block;
  color: var(--mgr-accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.mgr-heading,
.mgr-entry h1,
.mgr-entry h2,
.mgr-entry h3,
.mgr-entry h4 {
  margin: 0;
  color: var(--mgr-text);
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  line-height: 1.18;
}

.mgr-heading-xl {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1.05;
}

.mgr-heading-lg,
.mgr-entry h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  line-height: 1.1;
}

.mgr-heading-md,
.mgr-entry h2 {
  font-size: clamp(2rem, 3.5vw, 2.25rem);
}

.mgr-heading-sm,
.mgr-entry h3 {
  font-size: clamp(1.45rem, 2.5vw, 1.75rem);
}

.mgr-heading-dark {
  color: var(--mgr-light);
}

.mgr-copy {
  margin: 0;
  color: var(--mgr-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.mgr-copy-lg {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.mgr-copy-light {
  color: var(--mgr-light-muted);
}

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

.mgr-max-copy {
  max-width: 720px;
}

.mgr-center {
  margin-left: auto;
  margin-right: auto;
}

.mgr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.mgr-actions-center {
  justify-content: center;
}

.mgr-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 32px;
  border-radius: var(--mgr-radius);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 180ms var(--mgr-ease), box-shadow 180ms var(--mgr-ease), background 180ms var(--mgr-ease), color 180ms var(--mgr-ease);
}

.mgr-button-primary {
  background: var(--mgr-accent);
  color: #fff;
}

.mgr-button-dark {
  background: var(--mgr-primary);
  color: var(--mgr-light);
}

.mgr-button-outline-light {
  border-color: var(--mgr-light);
  color: var(--mgr-light);
}

.mgr-button-outline-light:hover {
  background: var(--mgr-light);
  color: var(--mgr-primary);
}

.mgr-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 168, 67, 0.25);
}

.mgr-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mgr-accent);
  font-size: 0.92rem;
  font-weight: 700;
  transition: gap 180ms var(--mgr-ease);
}

.mgr-link-arrow::after {
  content: "->";
}

.mgr-link-arrow:hover {
  gap: 12px;
}

.mgr-hero,
.mgr-page-hero,
.mgr-cta-media {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.mgr-hero {
  min-height: 100vh;
}

.mgr-page-hero {
  min-height: 60vh;
  justify-content: center;
  text-align: center;
}

.mgr-hero-bg,
.mgr-hero video,
.mgr-hero img,
.mgr-page-hero img,
.mgr-page-hero .mgr-bg,
.mgr-cta-media img,
.mgr-cta-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.mgr-page-hero .mgr-bg {
  background-size: cover;
  background-position: center;
}

.mgr-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 46, 26, 0.55);
  z-index: -1;
}

.mgr-overlay-strong {
  background: rgba(26, 46, 26, 0.72);
}

.mgr-hero-content {
  position: relative;
  z-index: 1;
  padding: 128px 0 96px;
}

.mgr-hero .mgr-heading {
  max-width: 780px;
  color: var(--mgr-light);
}

.mgr-hero .mgr-copy {
  max-width: 580px;
  margin-top: 24px;
}

.mgr-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: var(--mgr-light-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: mgr-bob 2s ease-in-out infinite;
}

@keyframes mgr-bob {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 8px);
  }
}

.mgr-breadcrumb {
  margin-top: 24px;
  color: var(--mgr-light-muted);
  font-size: 0.9rem;
}

.mgr-breadcrumb a:hover {
  color: var(--mgr-accent);
}

.mgr-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}

.mgr-split-even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mgr-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.mgr-card-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mgr-card-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mgr-card {
  background: var(--mgr-surface);
  border: 1px solid var(--mgr-border);
  border-radius: var(--mgr-radius);
  overflow: hidden;
  transition: transform 220ms var(--mgr-ease), box-shadow 220ms var(--mgr-ease), border-color 220ms var(--mgr-ease);
}

.mgr-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26, 46, 26, 0.09);
}

.mgr-card-body {
  padding: clamp(24px, 4vw, 40px);
}

.mgr-card h3,
.mgr-card h4 {
  margin: 0 0 12px;
  color: var(--mgr-primary);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.32;
}

.mgr-card p {
  margin: 0;
  color: var(--mgr-muted);
}

.mgr-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.mgr-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms var(--mgr-ease);
}

.mgr-card:hover .mgr-card-image img,
.mgr-gallery-item:hover img,
.mgr-team-card:hover img {
  transform: scale(1.04);
}

.mgr-image-rounded {
  width: 100%;
  border-radius: var(--mgr-radius);
  overflow: hidden;
}

.mgr-image-rounded img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.mgr-image-tall img {
  height: clamp(380px, 52vw, 520px);
}

.mgr-stat-stack {
  display: grid;
  gap: 40px;
}

.mgr-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

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

.mgr-stat-card {
  padding: clamp(28px, 4vw, 48px) 20px;
  background: var(--mgr-surface);
  border: 1px solid var(--mgr-border);
  border-radius: 18px;
}

.mgr-stat-number {
  color: var(--mgr-accent);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.4rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
}

.mgr-stat-label {
  margin-top: 10px;
  color: var(--mgr-muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mgr-section-dark .mgr-stat-label {
  color: var(--mgr-light-muted);
}

.mgr-story-meta {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(212, 168, 67, 0.15);
  color: var(--mgr-accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.mgr-cta-media {
  min-height: 520px;
  padding: 140px 0;
  text-align: center;
}

.mgr-newsletter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.mgr-form-row {
  display: flex;
  gap: 12px;
  width: min(100%, 520px);
}

.mgr-input,
.mgr-textarea,
.mgr-select {
  width: 100%;
  border: 1px solid var(--mgr-border);
  border-radius: 10px;
  background: #fff;
  color: var(--mgr-primary);
  padding: 14px 16px;
  outline: none;
  transition: border-color 180ms var(--mgr-ease), box-shadow 180ms var(--mgr-ease);
}

.mgr-section-dark .mgr-input,
.mgr-section-dark .mgr-textarea {
  border-color: rgba(250, 248, 242, 0.3);
  background: transparent;
  color: var(--mgr-light);
}

.mgr-input:focus,
.mgr-textarea:focus,
.mgr-select:focus {
  border-color: var(--mgr-accent);
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

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

.mgr-gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.mgr-gallery-page-grid {
  gap: 24px;
}

.mgr-gallery-item {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--mgr-primary);
}

.mgr-gallery-page-grid .mgr-gallery-item {
  border-radius: var(--mgr-radius);
}

.mgr-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms var(--mgr-ease);
}

.mgr-values-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.mgr-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: rgba(212, 168, 67, 0.15);
  color: var(--mgr-accent);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.mgr-team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.mgr-team-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--mgr-radius);
  transition: transform 300ms var(--mgr-ease);
}

.mgr-team-card h3 {
  margin-top: 20px;
  font-size: 1.18rem;
}

.mgr-role {
  display: inline-block;
  margin: 4px 0 12px;
  color: var(--mgr-accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mgr-partner-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.mgr-partner-badge {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border: 1px solid var(--mgr-border);
  border-radius: var(--mgr-radius);
  background: #fff;
  color: var(--mgr-muted);
  font-weight: 700;
  text-align: center;
  transition: color 180ms var(--mgr-ease), border-color 180ms var(--mgr-ease);
}

.mgr-partner-badge:hover {
  color: var(--mgr-accent);
  border-color: var(--mgr-accent);
}

.mgr-activity-list {
  margin: 18px 0 26px;
  padding: 0;
  list-style: none;
}

.mgr-activity-list li {
  display: flex;
  gap: 10px;
  margin: 9px 0;
  color: var(--mgr-muted);
  font-size: 0.95rem;
}

.mgr-activity-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--mgr-accent);
}

.mgr-simple-page {
  min-height: 74vh;
  padding: 160px 0 100px;
  text-align: center;
}

.mgr-simple-panel {
  width: min(100%, 780px);
  margin: 0 auto;
}

.mgr-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: start;
  text-align: left;
}

.mgr-donate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.mgr-amount {
  padding: 20px;
  border: 1px solid var(--mgr-border);
  border-radius: var(--mgr-radius);
  background: #fff;
  color: var(--mgr-primary);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.55rem;
  text-align: center;
}

.mgr-entry {
  width: min(100% - 48px, 900px);
  margin: 0 auto;
  padding: 140px 0 96px;
}

.mgr-entry > * + * {
  margin-top: 24px;
}

.mgr-entry p,
.mgr-entry li {
  color: var(--mgr-muted);
}

.mgr-post-list {
  display: grid;
  gap: 28px;
}

.mgr-post-card {
  padding: 32px;
}

.mgr-site-footer {
  background: var(--mgr-primary);
  color: var(--mgr-light);
}

.mgr-footer-main {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 48px;
  padding: 80px 0 64px;
}

.mgr-footer-title {
  margin: 0 0 18px;
  color: var(--mgr-light);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mgr-footer-text,
.mgr-site-footer p,
.mgr-site-footer a {
  color: var(--mgr-light-muted);
  font-size: 0.92rem;
}

.mgr-site-footer a:hover {
  color: var(--mgr-accent);
}

.mgr-footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mgr-footer-links li + li {
  margin-top: 9px;
}

.mgr-social {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.mgr-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--mgr-border-dark);
  border-radius: 999px;
  font-weight: 800;
}

.mgr-footer-bottom {
  padding: 28px 0;
  border-top: 1px solid var(--mgr-border-dark);
  text-align: center;
}

.mgr-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.mgr-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1024px) {
  .mgr-nav {
    position: fixed;
    inset: 80px 0 auto 0;
    display: none;
    min-height: calc(100vh - 80px);
    padding: 48px 24px;
    background: var(--mgr-primary);
    color: var(--mgr-light);
  }

  .admin-bar .mgr-nav {
    top: 112px;
  }

  .mgr-site-header.is-menu-open .mgr-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .mgr-primary-menu,
  .mgr-primary-menu ul {
    flex-direction: column;
    gap: 24px;
  }

  .mgr-primary-menu a,
  .mgr-site-header.mgr-is-front:not(.is-scrolled) .mgr-primary-menu a {
    color: var(--mgr-light);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
  }

  .mgr-menu-toggle {
    display: inline-flex;
  }

  .mgr-split,
  .mgr-split-even,
  .mgr-contact-grid {
    grid-template-columns: 1fr;
  }

  .mgr-card-grid-4,
  .mgr-stat-grid,
  .mgr-team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mgr-footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  .admin-bar .mgr-site-header {
    top: 46px;
  }

  .admin-bar .mgr-nav {
    top: 126px;
  }
}

@media (max-width: 720px) {
  .mgr-container {
    width: min(100% - 32px, var(--mgr-content));
  }

  .mgr-brand-name {
    display: none;
  }

  .mgr-section,
  .mgr-section-lg {
    padding: 88px 0;
  }

  .mgr-section-sm {
    padding: 64px 0;
  }

  .mgr-card-grid,
  .mgr-card-grid-3,
  .mgr-card-grid-4,
  .mgr-values-grid,
  .mgr-team-grid,
  .mgr-partner-grid,
  .mgr-donate-grid {
    grid-template-columns: 1fr;
  }

  .mgr-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mgr-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mgr-newsletter,
  .mgr-form-row {
    flex-direction: column;
    align-items: stretch;
  }

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

  .mgr-actions {
    align-items: stretch;
  }

  .mgr-button {
    width: 100%;
  }

  .mgr-simple-page,
  .mgr-entry {
    padding-top: 128px;
  }
}
