/* Maisha Bora Youth Foundation - Custom Styles */

/* Color Palette */
:root {
  --primary-color: #2E7D32; /* Green - growth and hope */
  --secondary-color: #FF6F00; /* Orange - energy and enthusiasm */
  --accent-color: #1565C0; /* Blue - trust and stability */
  --text-dark: #212121;
  --text-light: #757575;
  --bg-light: #F5F5F5;
  --white: #FFFFFF;
  --success: #4CAF50;
  --warning: #FFC107;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
}

/* Header and Navigation */
.site-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1B5E20 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.site-logo {
  height: 60px;
  width: auto;
  transition: transform 0.3s ease;
}

.site-logo:hover {
  transform: scale(1.05);
}

.site-title {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-title .tagline {
  font-size: 0.75rem;
  font-weight: 300;
  opacity: 0.9;
  font-style: italic;
}

/* Navigation Menu */
.main-navigation {
  display: flex;
  gap: 5px;
}

.main-navigation a {
  color: var(--white);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.main-navigation a:hover,
.main-navigation a.active {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.main-navigation a:hover::after {
  width: 80%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(46, 125, 50, 0.8), rgba(27, 94, 32, 0.9)),
              url('/photos/group1.jpeg') center/cover;
  color: var(--white);
  padding: 100px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 111, 0, 0.1) 100%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 30px;
  opacity: 0.95;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.4s both;
}

.btn {
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(255, 111, 0, 0.3);
}

.btn-primary:hover {
  background-color: #E65100;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 111, 0, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

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

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.content-wrapper {
  background-color: var(--white);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Sections */
.section {
  margin-bottom: 60px;
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--secondary-color);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100px;
  height: 3px;
  background-color: var(--accent-color);
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border-top: 4px solid var(--primary-color);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 25px;
}

.card-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.card-text {
  color: var(--text-light);
  line-height: 1.6;
}

/* Image Gallery */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: var(--white);
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

/* Stats Section */
.stats-section {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: var(--white);
  padding: 60px 20px;
  margin: 60px 0;
  border-radius: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.stat-item {
  padding: 20px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  display: block;
  margin-bottom: 10px;
  color: var(--secondary-color);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.95;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 40px auto;
  padding: 40px;
  background: var(--bg-light);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.site-footer {
  background: linear-gradient(135deg, #1B5E20 0%, #0D47A1 100%);
  color: var(--white);
  padding: 60px 20px 20px;
  margin-top: 80px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.footer-section p,
.footer-section ul {
  line-height: 1.8;
  opacity: 0.9;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
}

.footer-section a:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px) scale(1.1);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.8;
}

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

.fade-in {
  animation: fadeInUp 0.8s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--primary-color);
    flex-direction: column;
    padding: 20px;
    transition: left 0.3s ease;
    overflow-y: auto;
  }

  .main-navigation.active {
    left: 0;
  }

  .main-navigation a {
    width: 100%;
    text-align: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .section-title {
    font-size: 2rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .site-title {
    font-size: 1.2rem;
  }

  .site-logo {
    height: 50px;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .hero-buttons,
  .menu-toggle {
    display: none;
  }
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Loading Animation */
.loader {
  border: 4px solid var(--bg-light);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

/* Success/Error Messages */
.alert {
  padding: 15px 20px;
  border-radius: 5px;
  margin: 20px 0;
  font-weight: 500;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}
