/* ==========================================================================
   B&F ENTRE BOURBONNAIS ET FOREZ - OFFICIAL STYLESHEET
   Salado Engine Non-Profit Design System
   Architecture: Association Loi 1901 Public Interest Platform
   ========================================================================== */

:root {
  --navy: #1B2232;
  --coral: #FF5B2E;
  --burnt-orange: #E0481D;
  --off-white: #F8F9FA;
  --white: #FFFFFF;
  --charcoal: #212529;
  --slate: #64748B;
  --slate-dark: #334155;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.06);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--charcoal);
  background-color: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--off-white);
  color: var(--charcoal);
}

/* Typography Standards */
h1, h2, h3, h4, h5, h6 {
  color: var(--navy);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin-top: 1.75rem;
}

h3 {
  font-size: 1.4rem;
  margin-top: 1.25rem;
}

h4 {
  font-size: 1.15rem;
}

p {
  margin-bottom: 1.25rem;
  color: #374151;
  font-size: 1.05rem;
}

p.lead {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--slate-dark);
}

strong {
  color: var(--navy);
  font-weight: 600;
}

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

a:hover {
  color: var(--burnt-orange);
}

/* Layout Containers & Sectioning */
.site-wrapper {
  flex: 1 0 auto;
  padding-top: 118px; /* Required offset for sticky header */
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 60px 0;
}

.section-alt {
  background-color: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Header & Utility Bar */
.top-utility-bar {
  background-color: var(--navy);
  height: 38px;
  color: var(--white);
  font-size: 13px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10001;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-utility-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.utility-reg {
  color: #CBD5E1;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.utility-reg strong {
  color: #FFFFFF;
}

.utility-link {
  color: #E2E8F0;
  font-weight: 500;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.utility-link:hover {
  color: var(--coral);
}

.main-header {
  background-color: var(--white);
  height: 80px;
  position: fixed;
  top: 38px;
  left: 0;
  width: 100%;
  z-index: 10000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-badge {
  background-color: var(--coral);
  color: var(--white);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(255, 91, 46, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.brand-sub {
  color: var(--slate);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Primary Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 0;
  position: relative;
  transition: var(--transition);
}

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

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--coral);
  border-radius: 2px;
}

.header-cta-btn {
  background-color: var(--coral);
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  box-shadow: 0 3px 10px rgba(255, 91, 46, 0.25);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-cta-btn:hover {
  background-color: var(--burnt-orange);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(255, 91, 46, 0.35);
}

.mobile-toggle-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-size: 1.25rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

/* Hero Section */
.hero-banner {
  background-color: var(--navy);
  color: var(--white);
  padding: 70px 0 80px;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--coral);
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(255, 91, 46, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 860px;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-block;
  background-color: rgba(255, 91, 46, 0.15);
  color: #FFA085;
  border: 1px solid rgba(255, 91, 46, 0.35);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.hero-banner h1 {
  color: var(--white);
  font-size: 2.85rem;
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: 800;
}

.hero-summary-box {
  background-color: rgba(255, 255, 255, 0.07);
  border-left: 4px solid var(--coral);
  padding: 18px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 28px;
}

.hero-summary-text {
  color: #F1F5F9;
  font-size: 1.15rem;
  line-height: 1.7;
  font-weight: 500;
  margin: 0;
}

.hero-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  padding-top: 10px;
}

.btn-primary {
  background-color: var(--coral);
  color: var(--white);
  font-weight: 700;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(255, 91, 46, 0.3);
  font-size: 1rem;
}

.btn-primary:hover {
  background-color: var(--burnt-orange);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 91, 46, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
  padding: 12px 26px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-size: 1rem;
}

.btn-secondary:hover {
  border-color: var(--white);
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

/* Metric / Counter Ribbon */
.metric-ribbon {
  background-color: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 32px 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.metric-card {
  padding: 12px 16px;
  border-right: 1px solid var(--border);
}

.metric-card:last-child {
  border-right: none;
}

.metric-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 6px;
}

.metric-number span {
  color: var(--coral);
}

.metric-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Mandatory Mission Block */
.mandatory-mission-container {
  background: linear-gradient(135deg, #1B2232 0%, #2A364F 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px;
  margin: 40px 0;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 8px solid var(--coral);
}

.mandatory-mission-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.mission-badge {
  background-color: var(--coral);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.mandatory-mission-title {
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0;
}

.mandatory-mission-body {
  color: #E2E8F0;
  font-size: 1.12rem;
  line-height: 1.85;
  margin: 0;
  font-weight: 400;
}

.mission-compliance-note {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.88rem;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Documentary Photography Styling */
.doc-figure {
  margin: 24px 0 16px 0;
  display: block;
}

.doc-img {
  width: 100%;
  height: 380px;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  object-fit: cover;
  display: block;
  background-color: #E2E8F0;
}

.doc-img-sm {
  height: 240px;
}

.doc-caption {
  font-size: 0.875rem;
  color: #64748B;
  font-style: italic;
  margin-top: 8px;
  margin-bottom: 20px;
  line-height: 1.5;
  display: block;
}

/* Cards & Content Grid Systems */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
  border-color: #CBD5E1;
}

.card-badge {
  display: inline-block;
  background-color: #EEF2F6;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  align-self: flex-start;
}

.card-badge.active-2026 {
  background-color: rgba(255, 91, 46, 0.12);
  color: var(--coral);
}

.card-title {
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.card-text {
  color: #475569;
  font-size: 1rem;
  line-height: 1.7;
  flex-grow: 1;
}

.card-action {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* Disclosure Callout Boxes */
.disclosure-box {
  background-color: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-left: 5px solid var(--navy);
  padding: 22px 26px;
  border-radius: var(--radius-md);
  margin: 28px 0;
}

.disclosure-box h4 {
  color: var(--navy);
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.disclosure-box p {
  font-size: 0.95rem;
  color: #475569;
  margin-bottom: 0;
  line-height: 1.7;
}

/* Reinvestment Notice Banner */
.reinvestment-banner {
  background-color: #FFF7ED;
  border: 1px solid #FED7AA;
  border-left: 5px solid var(--coral);
  padding: 18px 24px;
  border-radius: var(--radius-md);
  margin: 24px 0;
}

.reinvestment-text {
  color: #9A3412;
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.6;
}

/* Forms & Interactive Inputs */
.form-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-label span.req {
  color: var(--coral);
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  font-size: 1rem;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md);
  background-color: #FFFFFF;
  color: var(--charcoal);
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 91, 46, 0.15);
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.btn-submit {
  background-color: var(--coral);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(255, 91, 46, 0.25);
}

.btn-submit:hover {
  background-color: var(--burnt-orange);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 91, 46, 0.35);
}

/* AJAX Modal Popup */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(27, 34, 50, 0.7);
  backdrop-filter: blur(4px);
  z-index: 20000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 36px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  position: relative;
  animation: modalPop 0.25s ease-out;
  border-top: 6px solid var(--coral);
}

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

.modal-icon {
  width: 64px;
  height: 64px;
  background-color: #ECFDF5;
  color: #059669;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 18px;
}

.modal-title {
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.modal-text {
  color: #475569;
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 24px;
}

.btn-modal-close {
  background-color: var(--navy);
  color: var(--white);
  font-weight: 700;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.btn-modal-close:hover {
  background-color: var(--slate-dark);
}

/* Event List Styling */
.event-item {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  transition: var(--transition);
}

.event-item:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
}

.event-date-badge {
  background-color: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 90px;
  border-bottom: 3px solid var(--coral);
}

.event-date-month {
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #94A3B8;
}

.event-date-day {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: #FFFFFF;
}

.event-date-year {
  font-size: 0.75rem;
  color: #CBD5E1;
}

.event-details {
  flex-grow: 1;
}

.event-title {
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.event-meta {
  color: var(--slate);
  font-size: 0.88rem;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Table Design for Transparency / Metrics */
.data-table-wrapper {
  overflow-x: auto;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin: 24px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.data-table th {
  background-color: #F1F5F9;
  color: var(--navy);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  color: #334155;
}

.data-table tr:hover td {
  background-color: #F8FAFC;
}

/* Responsiveness */
@media (max-width: 992px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-card:nth-child(2) {
    border-right: none;
  }
  .metric-card {
    border-bottom: 1px solid var(--border);
    padding: 16px;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-wrapper {
    padding-top: 118px;
  }
  .top-utility-inner {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    font-size: 11.5px;
  }
  .top-utility-bar {
    height: auto;
    padding: 6px 0;
  }
  .main-header {
    top: auto;
    height: 70px;
  }
  .mobile-toggle-btn {
    display: block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    flex-direction: column;
    padding: 20px 24px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid var(--coral);
  }
  .main-nav.open {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 16px;
    margin-bottom: 18px;
  }
  .nav-link {
    font-size: 1.05rem;
    padding: 8px 0;
  }
  .hero-banner h1 {
    font-size: 2rem;
  }
  .metric-grid, .grid-2, .grid-3, .grid-4, .form-row {
    grid-template-columns: 1fr;
  }
  .metric-card {
    border-right: none;
  }
  .event-item {
    flex-direction: column;
  }
  .mandatory-mission-container {
    padding: 24px;
  }
  .doc-img {
    height: 250px;
  }
}
