/* ==========================================================================
   Instituto Promessas - Global Design System
   Based on design.md (Professional-Humanist Aesthetic)
   ========================================================================== */

:root {
  /* Color Tokens */
  --color-surface: #fff8f4;
  --color-surface-dim: #e8d7c9;
  --color-surface-bright: #fff8f4;
  --color-surface-lowest: #ffffff;
  --color-surface-low: #fff1e7;
  --color-surface-container: #fdebdc;
  --color-surface-high: #f7e5d7;
  --color-surface-highest: #f1dfd1;
  --color-on-surface: #231a11;
  --color-on-surface-variant: #56423c;
  --color-inverse-surface: #392f25;
  --color-inverse-on-surface: #ffeee0;
  
  --color-primary: #9c3c1e; /* Terracotta Clay */
  --color-on-primary: #ffffff;
  --color-primary-container: #bc5434;
  --color-on-primary-container: #fffaf9;
  --color-inverse-primary: #ffb59f;
  
  --color-secondary: #2c694e; /* Hope Green */
  --color-on-secondary: #ffffff;
  --color-secondary-container: #aeeecb;
  --color-on-secondary-container: #316e52;
  
  --color-tertiary: #605b46;
  --color-on-tertiary: #ffffff;
  --color-tertiary-container: #79735d;
  --color-on-tertiary-container: #fffaf3;
  
  --color-error: #ba1a1a;
  --color-on-error: #ffffff;
  --color-error-container: #ffdad6;
  --color-on-error-container: #93000a;
  
  --color-outline: #8a726b;
  --color-outline-variant: #ddc0b8;
  
  --color-background: #fff8f4;
  --color-on-background: #231a11;

  /* Font Families */
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Border Radius */
  --rounded-sm: 0.25rem;       /* 4px */
  --rounded-default: 0.5rem;   /* 8px */
  --rounded-md: 0.75rem;       /* 12px */
  --rounded-lg: 1rem;         /* 16px */
  --rounded-xl: 1.5rem;       /* 24px */
  --rounded-full: 9999px;

  /* Spacing & Layout */
  --spacing-unit: 8px;
  --container-max: 1280px;
  --gutter: 24px;
  --margin-desktop: 64px;
  --margin-mobile: 20px;
  --stack-sm: 8px;
  --stack-md: 16px;
  --stack-lg: 32px;
  --section-gap: 80px;

  /* Shadows */
  --shadow-soft: 0px 4px 20px rgba(74, 63, 53, 0.08);
  --shadow-hover: 0px 10px 30px rgba(74, 63, 53, 0.14);
  --shadow-inset: inset 0px 2px 4px rgba(74, 63, 53, 0.06);

  /* Animation Speeds */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Resets & Base Styles
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-background);
  color: var(--color-on-background);
  line-height: 1.5;
  overflow-x: hidden;
}

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-background);
}
::-webkit-scrollbar-thumb {
  background: var(--color-surface-dim);
  border-radius: var(--rounded-full);
  border: 2px solid var(--color-background);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-outline-variant);
}

/* ==========================================================================
   Typography Utilities (Strictly matching design.md)
   ========================================================================== */

.display-lg {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 700;
  line-height: 56px;
  letter-spacing: -0.02em;
}

.headline-md {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  line-height: 40px;
}

.title-lg {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
}

.body-lg {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
}

.body-md {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.label-md {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.01em;
}

.caption {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

@media (max-width: 768px) {
  .display-lg {
    font-size: 36px;
    line-height: 44px;
  }
  .headline-md {
    font-size: 28px;
    line-height: 36px;
  }
}

/* ==========================================================================
   Layout & Container Architecture
   ========================================================================== */

.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--margin-desktop);
  padding-right: var(--margin-desktop);
}

@media (max-width: 768px) {
  .container {
    padding-left: var(--margin-mobile);
    padding-right: var(--margin-mobile);
  }
}

.section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding-top: calc(var(--section-gap) * 0.7);
    padding-bottom: calc(var(--section-gap) * 0.7);
  }
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gutter);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: var(--gutter);
}

@media (max-width: 768px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
    gap: var(--stack-lg);
  }
}

/* ==========================================================================
   Interactive Header & Navigation
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(35, 26, 17, 0.95); /* Deep rich clay charcoal brown */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  transition: var(--transition-normal);
}

.header--scrolled {
  box-shadow: var(--shadow-soft);
  background: rgba(23, 17, 11, 0.98);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: var(--stack-sm);
}

.logo-img {
  height: 64px;
  width: auto;
  object-fit: contain;
  opacity: 1 !important;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: #fff8f4; /* Sand cream white for perfect contrast */
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--stack-lg);
  list-style: none;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 248, 244, 0.85); /* Highly visible light text */
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-inverse-primary); /* Shines beautifully on dark */
  transition: var(--transition-normal);
}

.nav-link:hover, .nav-link--active {
  color: var(--color-inverse-primary);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--stack-md);
}

/* Language Swapper Selector */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.07);
  padding: 4px;
  border-radius: var(--rounded-default);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lang-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--rounded-sm);
  cursor: pointer;
  color: rgba(255, 248, 244, 0.75);
  transition: var(--transition-fast);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.lang-btn.active {
  background: var(--color-primary);
  color: #ffffff;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  z-index: 1010;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #fff8f4; /* Sand white for dark header */
  border-radius: var(--rounded-full);
  transition: var(--transition-normal);
}

@media (max-width: 992px) {
  .mobile-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 90px;
    left: 100%;
    width: 100%;
    height: calc(100vh - 90px);
    background: var(--color-background);
    flex-direction: column;
    padding: var(--stack-lg) var(--margin-mobile);
    gap: var(--stack-md);
    transition: var(--transition-slow);
    border-top: 1px solid var(--color-surface-dim);
  }

  .nav-menu.open {
    left: 0;
  }

  .nav-actions {
    margin-left: auto;
    margin-right: 16px;
  }
}

@media (max-width: 576px) {
  .logo-text {
    display: none;
  }
  .nav-actions {
    gap: var(--stack-sm);
  }
  .lang-btn {
    padding: 6px 8px;
    font-size: 11px;
  }
  .header-btn {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }
}

/* ==========================================================================
   Buttons (Matching design.md Button Guidelines)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--rounded-default);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition-normal);
  gap: var(--stack-sm);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  border: 1px solid var(--color-primary);
}

.btn--primary:hover {
  background-color: var(--color-primary-container);
  border-color: var(--color-primary-container);
}

.btn--secondary {
  background-color: var(--color-secondary);
  color: var(--color-on-secondary);
  border: 1px solid var(--color-secondary);
}

.btn--secondary:hover {
  background-color: var(--color-on-secondary-container);
  border-color: var(--color-on-secondary-container);
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-on-surface-variant);
  border: 1px solid var(--color-outline);
  box-shadow: none;
}

.btn--ghost:hover {
  background-color: var(--color-surface-dim);
  color: var(--color-on-surface);
  box-shadow: var(--shadow-soft);
}

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

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 130px;
  padding-bottom: 80px;
  background-color: var(--color-surface);
  position: relative;
  overflow: hidden;
}

.hero-bg-art {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: url('assets/valley_dark.png');
  background-size: cover;
  background-position: center;
  opacity: 1;
  filter: brightness(0.65) contrast(1.05); /* Balanced dark backdrop */
}

.hero-grid {
  position: relative;
  z-index: 2;
  align-items: center;
}

.hero-content {
  grid-column: span 7;
}

.hero-visual {
  grid-column: span 5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo-box {
  background: transparent !important; /* Make the logo box container transparent */
  padding: 16px;
  box-shadow: none !important; /* Remove card shadow for direct floating effect */
  max-width: 380px;
  animation: float 6s ease-in-out infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1 !important;
}

.hero-logo-box img {
  opacity: 1 !important; /* 100% solid opacity for the logo graphic */
  filter: drop-shadow(0px 2px 6px rgba(35, 26, 17, 0.04)) !important; /* Premium organic contrast shadow */
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-secondary-container);
  color: var(--color-on-secondary-container);
  padding: 6px 12px;
  border-radius: var(--rounded-full);
  margin-bottom: var(--stack-md);
}

.hero-title {
  color: #ffffff; /* Beautiful clean white for dark backdrop */
  margin-bottom: var(--stack-md);
}

.hero-description {
  color: rgba(255, 248, 244, 0.9); /* Creamy sand white text */
  margin-bottom: var(--stack-lg);
}

.hero-ctas {
  display: flex;
  gap: var(--stack-md);
  flex-wrap: wrap;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@media (max-width: 992px) {
  .hero-content {
    grid-column: span 12;
    text-align: center;
  }
  .hero-visual {
    grid-column: span 12;
    margin-top: var(--stack-lg);
  }
  .hero-ctas {
    justify-content: center;
  }
  .hero-bg-art {
    width: 100%;
    height: 100%;
    top: 0;
    mask-image: none;
    -webkit-mask-image: none;
  }
}

/* ==========================================================================
   Biblical Quote Banner
   ========================================================================== */

.quote-banner {
  background-color: var(--color-surface-low);
  border-top: 1px solid var(--color-outline-variant);
  border-bottom: 1px solid var(--color-outline-variant);
  padding: var(--stack-lg) 0;
  position: relative;
  z-index: 5;
}

.quote-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--gutter);
}

.quote-icon {
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: var(--stack-sm);
  opacity: 0.6;
}

.quote-text {
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  line-height: 32px;
  color: var(--color-on-surface);
  margin-bottom: var(--stack-sm);
}

.quote-author {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  text-transform: uppercase;
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about-grid {
  align-items: center;
}

.about-img-frame {
  position: relative;
  border-radius: var(--rounded-xl);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-surface-dim);
}

.about-philosophy {
  border-left: 4px solid var(--color-primary);
  padding-left: 20px;
  margin: var(--stack-md) 0 var(--stack-lg);
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-on-surface-variant);
}

.custom-list {
  list-style: none;
  display: grid;
  gap: var(--stack-md);
}

.custom-list-item {
  display: flex;
  gap: var(--stack-md);
  align-items: flex-start;
  font-family: var(--font-sans);
  color: var(--color-on-surface);
}

/* Terracotta leaf or geometric clay-dot as per design.md */
.custom-list-bullet {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  background-color: var(--color-primary);
  border-radius: 50% 0 50% 50%; /* Curved organic shape like a clay petal/leaf */
  transform: rotate(-45deg);
}

/* ==========================================================================
   Socioeconomic Stats Dashboard (Interactive)
   ========================================================================== */

.stats-section {
  background-color: var(--color-surface-container);
  border-radius: var(--rounded-xl);
  padding: 60px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-surface-high);
}

@media (max-width: 768px) {
  .stats-section {
    padding: 30px 20px;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--stack-lg);
  }
}

.stat-header {
  max-width: 480px;
}

.stat-header .badge {
  background: var(--color-primary-fixed);
  color: var(--color-on-primary-fixed-variant);
  padding: 6px 12px;
  border-radius: var(--rounded-full);
  display: inline-block;
  margin-bottom: var(--stack-sm);
}

.stat-card-list {
  display: flex;
  flex-direction: column;
  gap: var(--stack-md);
}

.stat-item {
  background: var(--color-surface-lowest);
  padding: 24px;
  border-radius: var(--rounded-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-surface-dim);
  transition: var(--transition-normal);
}

.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.stat-flex {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--stack-sm);
}

.stat-label {
  font-weight: 600;
  color: var(--color-on-surface);
}

.stat-val {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
}

/* Custom Progress Bar in Hope Green as requested in design.md */
.stat-progress-bg {
  width: 100%;
  height: 12px;
  background-color: var(--color-surface-low);
  border-radius: var(--rounded-full);
  overflow: hidden;
  position: relative;
}

.stat-progress-bar {
  height: 100%;
  background-color: var(--color-secondary); /* Hope Green Completion */
  border-radius: var(--rounded-full);
  width: 0%; /* Animated on scroll */
  transition: width 1.5s cubic-bezier(0.1, 1, 0.1, 1);
}

.stat-footer-text {
  color: var(--color-on-surface-variant);
  font-size: 14px;
  margin-top: var(--stack-sm);
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   Pillars & Projects Showcase (Tabs / Interactive Grid)
   ========================================================================== */

.projects-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--stack-lg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gutter);
}

/* Premium Organic Shaped Card from design.md */
.project-card {
  background: var(--color-surface-lowest);
  border-radius: var(--rounded-lg); /* 16px corner radius */
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-surface-dim);
  overflow: hidden;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transition: var(--transition-normal);
  transform-origin: left;
}

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

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

.project-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 50% 0 50% 50%;
  background: var(--color-surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 24px 16px;
  color: var(--color-primary);
  font-size: 24px;
  transition: var(--transition-normal);
  transform: rotate(-45deg);
}

.project-icon-box svg {
  transform: rotate(45deg); /* correct visual angle */
}

.project-card:hover .project-icon-box {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.project-body {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  color: var(--color-on-surface);
  margin-bottom: var(--stack-sm);
}

.project-desc {
  color: var(--color-on-surface-variant);
  margin-bottom: var(--stack-md);
  flex-grow: 1;
}

.project-pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.project-pill {
  background: var(--color-surface-low);
  color: var(--color-on-surface-variant);
  padding: 4px 10px;
  border-radius: var(--rounded-sm);
  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================================
   Why Caçaratiba? Section
   ========================================================================== */

.cacarativa-container {
  background: var(--color-surface-container);
  border-radius: var(--rounded-xl);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-surface-dim);
}

.cacarativa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.cacarativa-content {
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cacarativa-art {
  background-image: linear-gradient(135deg, rgba(44, 105, 78, 0.15) 0%, rgba(156, 60, 30, 0.15) 100%), url('assets/valley.png');
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 350px;
}

@media (max-width: 768px) {
  .cacarativa-grid {
    grid-template-columns: 1fr;
  }
  .cacarativa-content {
    padding: 30px 20px;
  }
  .cacarativa-art {
    height: 250px;
  }
}

/* ==========================================================================
   How to Help - Custom Interactive Donation Tool
   ========================================================================== */

.help-section {
  background-color: var(--color-surface-low);
  border-radius: var(--rounded-xl);
  padding: 60px;
  border: 1px solid var(--color-outline-variant);
}

@media (max-width: 768px) {
  .help-section {
    padding: 30px 20px;
  }
}

.help-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
}

@media (max-width: 992px) {
  .help-grid {
    grid-template-columns: 1fr;
    gap: var(--stack-lg);
  }
}

.donation-tabs {
  display: grid;
  gap: var(--stack-md);
}

.donation-tab-card {
  background: var(--color-surface-lowest);
  border-radius: var(--rounded-lg);
  border: 2px solid transparent;
  padding: 20px;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-soft);
}

.donation-tab-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-outline-variant);
}

.donation-tab-card.active {
  border-color: var(--color-primary);
  background-color: var(--color-surface-container);
}

.donation-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--rounded-default);
  background: var(--color-surface-dim);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: var(--transition-normal);
}

.donation-tab-card.active .donation-icon-box {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.donation-card-info {
  flex-grow: 1;
}

.donation-card-title {
  color: var(--color-on-surface);
  font-weight: 700;
  margin-bottom: 2px;
}

.donation-card-desc {
  color: var(--color-on-surface-variant);
  font-size: 14px;
}

/* Donation Planner Widget (Right Column) */
.donation-planner {
  background: var(--color-surface-lowest);
  border-radius: var(--rounded-lg);
  padding: 30px;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--color-surface-dim);
  display: flex;
  flex-direction: column;
  gap: var(--stack-md);
}

.planner-header {
  border-bottom: 1px solid var(--color-surface-dim);
  padding-bottom: var(--stack-md);
}

.planner-title {
  color: var(--color-on-surface);
  font-family: var(--font-serif);
  font-size: 24px;
}

.planner-subtitle {
  color: var(--color-on-surface-variant);
  font-size: 14px;
}

.planner-body {
  display: flex;
  flex-direction: column;
  gap: var(--stack-md);
}

.multiplier-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface-low);
  padding: 12px 20px;
  border-radius: var(--rounded-default);
  border: 1px solid var(--color-outline-variant);
}

.multiplier-label {
  font-weight: 600;
  font-size: 14px;
}

.multiplier-controls {
  display: flex;
  align-items: center;
  gap: var(--stack-md);
}

.multiplier-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--rounded-full);
  background: var(--color-surface-lowest);
  border: 1px solid var(--color-outline);
  color: var(--color-on-surface);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.multiplier-btn:hover {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
}

.multiplier-val {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  width: 30px;
  text-align: center;
}

/* Impact Statement box */
.impact-box {
  background: var(--color-secondary-container);
  color: var(--color-on-secondary-container);
  padding: 20px;
  border-radius: var(--rounded-default);
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
  border: 1px dashed var(--color-secondary);
  transition: var(--transition-normal);
}

.planner-footer {
  border-top: 1px solid var(--color-surface-dim);
  padding-top: var(--stack-md);
  display: flex;
  flex-direction: column;
  gap: var(--stack-md);
}

.planner-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-label {
  font-weight: 700;
  color: var(--color-on-surface);
}

.summary-val {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-secondary); /* Hope Green Success representing growth */
}

/* Form field styling (Focus uses Hope Green as requested in design.md) */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--rounded-default);
  background-color: var(--color-surface-low);
  border: 1px solid var(--color-outline-variant);
  color: var(--color-on-surface);
  font-family: var(--font-sans);
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: var(--color-secondary); /* Hope Green focus signal */
  background-color: var(--color-surface-lowest);
  box-shadow: 0 0 0 3px rgba(44, 105, 78, 0.15);
}

/* Modal and feedback style */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(35, 26, 17, 0.6);
  z-index: 2000;
  display: none; /* Controlled in JS */
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}

.modal-content {
  background: var(--color-surface-lowest);
  border-radius: var(--rounded-lg);
  padding: 40px;
  max-width: 500px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--color-surface-dim);
  text-align: center;
  animation: modalPop 0.4s cubic-bezier(0.1, 1, 0.1, 1);
}

@keyframes modalPop {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  cursor: pointer;
  font-size: 20px;
  color: var(--color-on-surface-variant);
}

/* ==========================================================================
   Footer Section
   ========================================================================== */

.footer {
  background-color: var(--color-inverse-surface);
  color: var(--color-inverse-on-surface);
  padding: 80px 0 40px;
  border-top: 4px solid var(--color-primary);
}

.footer-grid {
  margin-bottom: 60px;
}

.footer-brand {
  grid-column: span 4;
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: var(--stack-sm);
  margin-bottom: var(--stack-md);
}

.footer-logo-img {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.footer-desc {
  color: var(--color-outline-variant);
  font-size: 14px;
  line-height: 22px;
  margin-bottom: var(--stack-md);
}

.footer-links {
  grid-column: span 3;
}

.footer-links-title {
  font-family: var(--font-serif);
  font-size: 18px;
  margin-bottom: var(--stack-md);
  color: #ffffff;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: var(--color-outline-variant);
  font-size: 14px;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.footer-contact {
  grid-column: span 5;
}

.footer-contact-item {
  display: flex;
  gap: var(--stack-md);
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--color-outline-variant);
}

.footer-contact-icon {
  color: var(--color-primary-fixed-dim);
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--stack-md);
}

.copyright {
  font-size: 14px;
  color: var(--color-outline-variant);
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--rounded-full);
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-outline-variant);
  transition: var(--transition-normal);
}

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

@media (max-width: 992px) {
  .footer-brand, .footer-links, .footer-contact {
    grid-column: span 12;
  }
}

/* Back to top float */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: var(--rounded-full);
  background: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-hover);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-primary-container);
  transform: translateY(-3px);
}
