/*
Theme Name: GFLF Foundation Theme
Theme URI: https://gflf-foundation.org
Author: GFLF Development Team
Author URI: https://gflf-foundation.org
Description: Professional WordPress theme for the Gbadamosi-Folarin Legacy Foundation. Mobile-first, Elementor-ready, multilingual and NGO-optimized.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gflf-foundation-theme
Tags: custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, sticky-post, theme-options, translation-ready, block-styles, wide-blocks, accessibility-ready, blog, education, one-column, two-columns, right-sidebar, flexible-header

Gbadamosi-Folarin Legacy Foundation — Legacy in Service. Impact for Generations.
*/

/* ==========================================================================
   CSS Variables (Design Tokens)
   ========================================================================== */
:root {
  --gflf-primary: #1a5f4a;
  --gflf-primary-dark: #0f3d32;
  --gflf-secondary: #c9a227;
  --gflf-accent: #2d8b6f;
  --gflf-text: #2c2c2c;
  --gflf-text-light: #5a5a5a;
  --gflf-bg: #ffffff;
  --gflf-bg-alt: #f5f5f5;
  --gflf-border: #e0e0e0;
  --gflf-header-height: 72px;
  --gflf-container: min(1200px, 100vw - 2rem);
  --gflf-radius: 8px;
  --gflf-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --gflf-transition: 0.25s ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gflf-text);
  background: var(--gflf-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gflf-primary); text-decoration: none; transition: color var(--gflf-transition); }
a:hover { color: var(--gflf-accent); }

/* ==========================================================================
   Layout
   ========================================================================== */
.site-container { min-height: 100vh; display: flex; flex-direction: column; }
.site-content { flex: 1; }
.gflf-container { width: 100%; max-width: var(--gflf-container); margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }

/* ==========================================================================
   Header — Mobile First
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--gflf-bg);
  box-shadow: var(--gflf-shadow);
  min-height: var(--gflf-header-height);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--gflf-header-height);
  padding: 0.5rem 1rem;
}
.site-branding { display: flex; align-items: center; gap: 0.75rem; }
.site-title { margin: 0; font-size: 1.125rem; font-weight: 700; color: var(--gflf-primary); }
.site-description { display: none; margin: 0; font-size: 0.75rem; color: var(--gflf-text-light); }
.custom-logo-link { display: block; }
.custom-logo { max-height: 48px; width: auto; }

/* Language switcher (GTranslate) */
.gflf-lang-switcher { margin-left: auto; margin-right: 0.5rem; }
.gflf-lang-switcher .gtranslate_wrapper { font-size: 0.875rem; }

/* Hamburger */
.gflf-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.gflf-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gflf-primary);
  transition: var(--gflf-transition);
}
.gflf-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.gflf-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.gflf-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Navigation */
.main-navigation { display: none; }
.main-navigation.toggled { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--gflf-bg); box-shadow: var(--gflf-shadow); }
.main-navigation ul { list-style: none; margin: 0; padding: 0; }
.main-navigation li { border-bottom: 1px solid var(--gflf-border); }
.main-navigation a { display: block; padding: 1rem 1.25rem; font-weight: 500; color: var(--gflf-text); }
.main-navigation a:hover { background: var(--gflf-bg-alt); color: var(--gflf-primary); }
.main-navigation .sub-menu { list-style: none; margin: 0; padding: 0; background: var(--gflf-bg-alt); }
.main-navigation .sub-menu a { padding-left: 2rem; font-size: 0.9375rem; }

@media (min-width: 768px) {
  .gflf-menu-toggle { display: none; }
  .main-navigation { display: block; }
  .main-navigation.toggled { position: static; box-shadow: none; }
  .main-navigation ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
  .main-navigation li { border: none; position: relative; }
  .main-navigation > ul > li > a { padding: 0.5rem 0.75rem; }
  .main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--gflf-bg);
    box-shadow: var(--gflf-shadow);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--gflf-transition);
  }
  .main-navigation li:hover .sub-menu { opacity: 1; visibility: visible; }
  .main-navigation .sub-menu a { padding: 0.6rem 1.25rem; padding-left: 1.25rem; }
}

@media (min-width: 1200px) {
  .site-header-inner { padding-left: 0; padding-right: 0; }
  .site-title { font-size: 1.25rem; }
  .site-description { display: block; }
}

/* ==========================================================================
   Hero Slider
   ========================================================================== */
.gflf-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gflf-primary-dark);
  color: #fff;
  overflow: hidden;
}
.gflf-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.gflf-hero-slide.active { opacity: 1; z-index: 1; }
.gflf-hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
}
.gflf-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1rem;
  max-width: 720px;
  margin: 0 auto;
}
.gflf-hero-title { font-size: 1.75rem; margin: 0 0 1rem; font-weight: 700; line-height: 1.2; }
.gflf-hero-text { font-size: 1rem; margin: 0 0 1.5rem; opacity: 0.95; }
.gflf-hero-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.gflf-hero-buttons .button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  min-width: 160px;
  text-align: center;
  font-weight: 600;
  border-radius: var(--gflf-radius);
  transition: var(--gflf-transition);
  border: none;
  cursor: pointer;
}
.gflf-hero-buttons .button-primary { background: var(--gflf-secondary); color: #1a1a1a; }
.gflf-hero-buttons .button-primary:hover { background: #d4ad2a; color: #1a1a1a; }
.gflf-hero-buttons .button-secondary { background: transparent; color: #fff; border: 2px solid #fff; }
.gflf-hero-buttons .button-secondary:hover { background: rgba(255,255,255,0.15); color: #fff; }

@media (min-width: 768px) {
  .gflf-hero { min-height: 480px; }
  .gflf-hero-title { font-size: 2.5rem; }
  .gflf-hero-text { font-size: 1.125rem; }
}

@media (min-width: 1024px) {
  .gflf-hero { min-height: 560px; }
  .gflf-hero-title { font-size: 3rem; }
}

/* ==========================================================================
   Buttons (Full width on mobile)
   ========================================================================== */
.gflf-btn, .button {
  display: inline-block;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--gflf-radius);
  transition: var(--gflf-transition);
  cursor: pointer;
  border: 2px solid transparent;
  min-height: 48px;
}
@media (max-width: 479px) {
  .gflf-hero-buttons .button { width: 100%; min-width: 0; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.gflf-section { padding: 3rem 0; }
.gflf-section-alt { background: var(--gflf-bg-alt); }
.gflf-section-title { font-size: 1.75rem; margin: 0 0 1rem; color: var(--gflf-primary); font-weight: 700; }
.gflf-section-subtitle { font-size: 1rem; color: var(--gflf-text-light); margin: 0 0 2rem; max-width: 640px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--gflf-primary-dark);
  color: rgba(255,255,255,0.9);
  padding: 2rem 1rem;
  margin-top: auto;
}
.site-footer a { color: rgba(255,255,255,0.9); }
.site-footer a:hover { color: var(--gflf-secondary); }
.footer-inner { max-width: var(--gflf-container); margin: 0 auto; text-align: center; }
.site-info { font-size: 0.875rem; margin: 0; }

/* ==========================================================================
   Live Chat Placeholders (Floating)
   ========================================================================== */
.gflf-chat-placeholder {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}
.gflf-chat-placeholder .gflf-whatsapp,
.gflf-chat-placeholder .gflf-tidio {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform var(--gflf-transition);
}
.gflf-chat-placeholder .gflf-whatsapp { background: #25D366; }
.gflf-chat-placeholder .gflf-tidio { background: var(--gflf-primary); }
.gflf-chat-placeholder a:hover { transform: scale(1.05); color: #fff; }

/* ==========================================================================
   Utility
   ========================================================================== */
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute; height: 1px; width: 1px; overflow: hidden; }
.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(-50vw + 50%); }
