/*
 Theme Name:   Fofana Child
 Theme URI:    https://rga-guinee.org
 Description:  GeneratePress child theme for the official site of L'Honorable Ansoumane "Ouzby" Fofana — République Moderne design system.
 Author:       Ousbe
 Author URI:   https://rga-guinee.org
 Template:     generatepress
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  fofana-child
 Tags:          one-column, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, theme-options, translation-ready
*/

/* === RÉPUBLIQUE MODERNE — Design Tokens === */
/* Colours and typography are managed via generate_settings (GP Customizer).
   Only structural/layout overrides belong here. See plan §4 and G1. */

/* --- Tricolour Guinea accent bar (red → gold → green, 4px) --- */
.fofana-tricolour-bar {
  height: 4px;
  width: 100%;
  display: flex;
}
.fofana-tricolour-bar .rule-red {
  background: linear-gradient(90deg, #a01e23, #c23738);
  flex: 1;
}
.fofana-tricolour-bar .rule-gold {
  background: linear-gradient(90deg, #d6a526, #fcc748);
  flex: 1;
}
.fofana-tricolour-bar .rule-green {
  background: linear-gradient(90deg, #087a4b, #005f39);
  flex: 1;
}

/* --- Self-hosted variable fonts (woff2 latin, swap) --- */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("assets/fonts/SourceSerif4-Variable.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/HankenGrotesk-Variable.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

/* --- Layout overrides --- */

/* Full-bleed sections (G10) */
.fofana-full-width > .inside-content-area {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* --- Global UX (UI/UX Pro Max: a11y, touch, focus, motion) --- */

/* Smooth scroll for anchor navigation */
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Touch optimisation — remove 300ms tap delay */
a,
button,
input[type="submit"],
.wp-block-button__link,
.fofana-card {
  touch-action: manipulation;
}

/* Cursor pointer on all interactive elements */
a,
button,
input[type="submit"],
.wp-block-button__link,
.fofana-card,
.main-navigation a,
.menu-toggle {
  cursor: pointer;
}

/* Focus-visible ring — a11y keyboard navigation (4.5:1 contrast) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.wp-block-button__link:focus-visible,
.fofana-card:focus-visible,
.menu-toggle:focus-visible,
.main-navigation a:focus-visible {
  outline: 2px solid #005f39;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Ivory page background */
body {
  background-color: #faf8f2;
}

/* Content container */
.fofana-container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}
@media (max-width: 768px) {
  .fofana-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* --- Card styles (DESIGN.md §Elevation) --- */
.fofana-card {
  background: #ffffff;
  border: 1px solid #dee5df;
  border-radius: 8px;
  transition: border-color 0.3s ease;
}
.fofana-card:hover {
  border-color: #005f39;
}

/* Whisper shadow for primary CTA cards only */
.fofana-card-cta {
  box-shadow: 0px 4px 12px rgba(32, 37, 35, 0.05);
}

/* --- Stat number --- */
.fofana-stat-number {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 40px;
  color: #785a00; /* secondary gold */
}

/* --- Label caps --- */
.fofana-label-caps {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #626a66; /* text-muted */
}

/* --- Full-width page template (zero rogue content margins/padding) --- */
.fofana-template-full-width .site-content,
.page-template-page-full-width .site-content,
.fofana-template-full-width #content,
.page-template-page-full-width #content,
.fofana-template-full-width .content-area,
.page-template-page-full-width .content-area,
.fofana-template-full-width .site-main,
.page-template-page-full-width .site-main {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

body.fofana-template-full-width .site-content,
body.page-template-page-full-width .site-content {
  padding: 0 !important;
}

/* Remove stray paragraph margins injected at top of main */
.site-main > p:first-child:empty,
.site-main > p:has(> comment) {
  display: none !important;
}

/* --- Hero section --- */
body.home .fofana-hero {
  min-height: 82dvh; /* dvh accounts for mobile browser chrome */
}
body:not(.home) .fofana-hero {
  min-height: auto !important;
}
.fofana-hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(7, 92, 59, 0.92),
    rgba(8, 122, 75, 0.85)
  );
}
.fofana-hero-card {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
@media (max-width: 1023px) {
  .wp-block-column.fofana-hero-portrait {
    display: none;
  }
  .wp-block-column.fofana-hero-text {
    flex-basis: 100% !important;
  }
}

/* --- Section spacing (refined to prevent large empty white spaces) --- */
.fofana-section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
@media (max-width: 768px) {
  .fofana-section {
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
  }
}

/* --- Interactive card polish --- */
.fofana-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.fofana-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(0, 95, 57, 0.1);
}


/* --- Floating WhatsApp button --- */
.fofana-whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: #25d366;
  color: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  min-height: 48px;
}
.fofana-whatsapp-float:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.4);
  color: #ffffff;
}
.fofana-whatsapp-float svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}
.fofana-whatsapp-float .fofana-wa-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
@media (max-width: 640px) {
  .fofana-whatsapp-float .fofana-wa-label {
    display: none;
  }
}

/* --- WhatsApp share link on posts/events --- */
.fofana-wa-share {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: #25d366;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
  min-height: 48px;
}
.fofana-wa-share:hover {
  background: #20bd5a;
  color: #ffffff;
}

/* --- Reveal animation (Progressive enhancement: visible by default) --- */
.fofana-reveal {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.fofana-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fofana-reveal,
  .fofana-whatsapp-float,
  .fofana-wa-share,
  .fofana-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Selection colour --- */
::selection {
  background-color: #087a4b;
  color: #ffffff;
}

/* --- Focus ring on dark backgrounds (hero, values, CTA) --- */
.fofana-hero a:focus-visible,
.fofana-hero button:focus-visible,
.wp-block-group[style*="background-color:#087a4b"] a:focus-visible,
.wp-block-group[style*="background-color:#075C3B"] a:focus-visible {
  outline-color: #fcc748;
}

/* --- Skip-to-content link (a11y) --- */
.screen-reader-text,
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.screen-reader-text:focus,
.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1.5rem;
  background: #005f39;
  color: #ffffff;
  z-index: 9999;
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
}

/* --- Site Footer (deep-forest, 4-column) --- */

/* Override GP default footer wrapper */
.site-footer {
  background: transparent;
  padding: 0;
}
.site-footer .inside-footer {
  max-width: none;
  padding: 0;
}

.fofana-site-footer {
  background-color: #075c3b;
  color: #ffffff;
  margin-top: 5rem;
}
.fofana-site-footer .fofana-tricolour-bar {
  /* Tricolour accent at top of footer */
}
.fofana-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}
@media (max-width: 1023px) {
  .fofana-footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .fofana-footer-inner {
    grid-template-columns: 1fr;
    padding: 3rem 1.25rem;
  }
}

/* Footer brand */
.fofana-footer-brand {
  font-family: "Source Serif 4", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: #ffffff;
}
.fofana-footer-desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 1rem;
}
.fofana-footer-motto {
  font-family: "Source Serif 4", serif;
  font-size: 13px;
  font-style: italic;
  color: #fcc748;
  margin: 0;
}

/* Footer headings */
.fofana-footer-heading {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 0.75rem;
}

/* Footer links */
.fofana-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.fofana-footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.fofana-footer-links a:hover {
  color: #fcc748;
}

/* Footer contact info */
.fofana-footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.fofana-footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.fofana-footer-contact svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #fcc748;
}

/* Footer bottom bar */
.fofana-footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.fofana-footer-bottom p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}
@media (max-width: 640px) {
  .fofana-footer-bottom {
    padding: 1.5rem 1.25rem;
    flex-direction: column;
    text-align: center;
  }
}

/* Focus ring on dark footer background */
.fofana-site-footer a:focus-visible {
  outline-color: #fcc748;
}

/* =========================================================================
 * UI/UX PRO ENHANCEMENTS — Functional Micro-Animations & Interactive Tokens
 * ========================================================================= */

/* --- Keyframe Animations --- */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes floatBadge {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes shimmerGold {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* --- Card Micro-Elevations (GeneratePress Enhancer) --- */
.fofana-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}
.fofana-card:hover {
  transform: translateY(-4px);
  border-color: #005f39;
  box-shadow: 0 12px 28px -6px rgba(7, 92, 59, 0.1);
}

/* --- Entity Pills & Badges --- */
.fofana-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}
.fofana-pill-badge:hover {
  transform: translateY(-1px);
}

.fofana-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #005f39;
  background: rgba(0, 95, 57, 0.08);
  border: 1px solid rgba(0, 95, 57, 0.18);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.fofana-tag:hover {
  background: rgba(0, 95, 57, 0.15);
  transform: translateY(-1px);
}

/* --- Interactive Tab Switcher --- */
.fofana-tab-btn {
  font-family: "Hanken Grotesk", sans-serif;
  cursor: pointer;
  outline: none;
}
.fofana-tab-btn:hover:not(.active) {
  background: #f1f5f2 !important;
  border-color: #005f39 !important;
}

.fofana-tab-panel {
  animation: fofanaFadeIn 0.35s ease;
}
@keyframes fofanaFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Interactive Accordions (Civic FAQ & Details) --- */
.fofana-accordion-item {
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.fofana-accordion-item.is-open {
  border-color: #005f39;
  box-shadow: 0 8px 24px -4px rgba(7, 92, 59, 0.08);
}
.fofana-accordion-header:hover {
  color: #005f39 !important;
}

/* --- Toast Notification Banner --- */
.fofana-toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #075C3B;
  color: #ffffff;
  padding: 0.85rem 1.75rem;
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid #fcc748;
  font-size: 14px;
  font-weight: 700;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.fofana-toast-notification.is-shown {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --- Back to Top Floating Button --- */
.fofana-back-to-top {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 45;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #005f39;
  border: 1px solid #DEE5DF;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  text-decoration: none;
}
.fofana-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.fofana-back-to-top:hover {
  background: #005f39;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 95, 57, 0.25);
}

/* --- Live Scroll Progress Bar --- */
.fofana-scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, #a01e23 0%, #fcc748 50%, #005f39 100%);
  z-index: 99999;
  transition: width 0.08s ease-out;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* --- Image Lightbox Modal --- */
.fofana-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.fofana-lightbox-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.fofana-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 12, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.fofana-lightbox-container {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fofana-lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.fofana-lightbox-caption {
  color: #faf8f2;
  margin-top: 1rem;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.fofana-lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  padding: 0 8px;
  transition: transform 0.2s ease, color 0.2s ease;
}
.fofana-lightbox-close:hover {
  transform: scale(1.15);
  color: #fcc748;
}

/* --- Shimmer & Micro-Interactions --- */
@keyframes fofanaShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.fofana-shimmer-gold {
  background: linear-gradient(90deg, #fcc748 0%, #ffffff 50%, #fcc748 100%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: fofanaShimmer 5s ease infinite;
}

/* Floating interactive stat cards */
.fofana-floating-stat-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #DEE5DF;
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow: 0 10px 25px -5px rgba(0, 95, 57, 0.08);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}
.fofana-floating-stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px -8px rgba(0, 95, 57, 0.16);
  border-color: #005f39;
}

/* --- Print styles --- */
@media print {
  .fofana-scroll-progress-bar,
  .fofana-lightbox-modal,
  .fofana-whatsapp-float,
  .fofana-back-to-top,
  .fofana-toast-notification,
  .fofana-tricolour-bar,
  .fofana-hero-overlay,
  .fofana-site-footer {
    display: none !important;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
}

