/*
Theme Name: Wawezeshe Wasome Foundation
Theme URI: https://wawezeshewasome.org
Author: Wawezeshe Wasome Foundation
Author URI: https://wawezeshewasome.org
Description: Custom, high-performance WordPress Theme for Wawezeshe Wasome Foundation. Designed to empower children through equitable, quality education across Tanzania.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: wawezeshe-wasome
Tags: custom-theme, education, charity, non-profit, foundation, responsive-layout, modern-design
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Colors */
  --primary-color: #0B2F52;
  --primary-light: #102A43;
  --secondary-color: #C5A059;
  --secondary-light: #D4AF37;
  --accent-color: #04432A;
  --accent-light: #0A5C36;

  /* Neutrals */
  --bg-color: #F8FAFC;
  --surface-color: #FFFFFF;
  --text-primary: #1E293B;
  --text-secondary: #475569;
  --text-light: #F8FAFC;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-hover: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  
  /* Layout */
  --max-width: 1200px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

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

ul {
  list-style: none;
}

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

/* App Wrapper */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1 0 auto;
}

/* Site Preloader */
#site-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#site-loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-img {
  width: 250px;
  height: auto;
  animation: loaderPulse 1.5s infinite ease-in-out;
}

@keyframes loaderPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.loader-spinner {
  margin-top: 20px;
  width: 40px;
  height: 40px;
  border: 4px solid #CBD5E1;
  border-top-color: #C5A059;
  border-radius: 50%;
  animation: loaderSpin 1s linear infinite;
}

@keyframes loaderSpin {
  100% { transform: rotate(360deg); }
}

/* Image Fade In */
.img-fade-in {
  opacity: 0;
  animation: imgFadeIn 1.5s forwards ease-out;
}

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

/* Form Modernization Globals */
input, textarea, select {
  transition: all var(--transition-fast);
  font-family: inherit;
}

input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.2);
  outline: none;
}

/* Containers and Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

.section-title span {
  color: var(--secondary-color);
}

.section-subtitle {
  display: block;
  font-family: var(--font-heading);
  color: var(--secondary-color);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--secondary-light);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--text-light);
}

.btn-accent:hover {
  background-color: var(--accent-light);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1.1rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Helper Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-4 { gap: 2rem; }
.gap-8 { gap: 4rem; }
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.bg-light { background-color: var(--surface-color); }
.bg-light-blue { background-color: #f1f5f9; }

/* Navigation Bar */
.navbar {
  background-color: var(--surface-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

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

.navbar-logo-img {
  height: 50px;
  width: auto;
}

.navbar-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: var(--font-heading);
  font-weight: 800;
}

.navbar-logo-text span:first-child {
  font-size: 1.2rem;
  color: var(--primary-color);
}

.navbar-logo-text span:last-child {
  font-size: 0.9rem;
  color: var(--secondary-color);
  letter-spacing: 1px;
}

.menu-icon {
  display: none;
  cursor: pointer;
  color: var(--primary-color);
  background: none;
  border: none;
  padding: 8px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-item {
  display: flex;
  align-items: center;
}

.nav-links {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: color var(--transition-fast);
  padding: 0.5rem 0;
  position: relative;
  text-decoration: none;
}

.nav-links:hover, 
.nav-links.active-link,
.nav-item.current-menu-item > a,
.nav-item.current_page_item > a {
  color: var(--primary-color);
}

.nav-links::after,
.nav-item.current-menu-item > a::after,
.nav-item.current_page_item > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width var(--transition-normal);
}

.nav-links:hover::after, 
.nav-links.active-link::after,
.nav-item.current-menu-item > a::after,
.nav-item.current_page_item > a::after {
  width: 100%;
}

.nav-btn {
  margin-left: 1rem;
}

@media screen and (max-width: 960px) {
  .menu-icon {
    display: block;
  }

  .nav-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 80px;
    left: -100%;
    opacity: 1;
    transition: all 0.5s ease;
    background-color: var(--surface-color);
    box-shadow: var(--shadow-md);
    padding: 2rem 0;
    gap: 1.5rem;
  }

  .nav-menu.active {
    left: 0;
    opacity: 1;
    transition: all 0.5s ease;
    z-index: 1000;
  }

  .nav-links {
    font-size: 1.3rem;
  }

  .nav-btn {
    margin-left: 0;
    margin-top: 1rem;
  }
}

/* Page Header Banner */
.page-header {
  background-color: var(--primary-light);
  color: var(--text-light);
  padding: 6rem 0;
  margin-bottom: 2rem;
}

.page-header h1 {
  color: var(--surface-color);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.page-header h1 span {
  color: var(--secondary-color);
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  color: var(--text-light);
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 5rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo-img {
  height: 60px;
  width: auto;
  margin-bottom: 1.5rem;
  background-color: var(--surface-color);
  padding: 5px;
  border-radius: 4px;
}

.footer-desc {
  color: #CBD5E1;
  margin-bottom: 1.5rem;
  max-width: 400px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-reg {
  background-color: rgba(255,255,255,0.1);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--surface-color);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-3px);
}

.footer h4 {
  color: var(--surface-color);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--secondary-color);
}

.footer-links ul li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #CBD5E1;
  transition: all var(--transition-fast);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.footer-contact ul li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.2rem;
  color: #CBD5E1;
}

.contact-icon {
  color: var(--secondary-color);
  flex-shrink: 0;
  margin-top: 3px;
  width: 18px;
  height: 18px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #94A3B8;
  font-size: 0.9rem;
}

@media screen and (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Floating WhatsApp Button */
.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.whatsapp-btn svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-hover);
  background-color: #128C7E;
}

@media screen and (max-width: 768px) {
  .whatsapp-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  .whatsapp-btn svg {
    width: 26px;
    height: 26px;
  }
}
