/* About Us Page Styles */

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero Section */
.about-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.about-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../images/kigali (2).webp') center/cover;
  opacity: 0.1;
  z-index: 1;
}

.about-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.about-hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 3rem;
  opacity: 0.9;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #00ca00;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.9;
}

/* Story Section */
.story-section {
  padding: 6rem 0;
  background: #f8f9fa;
}

.story-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.story-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #333;
}

.story-intro {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 3rem;
  color: #666;
}

.story-timeline {
  position: relative;
}

.story-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #00ca00, #667eea);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 15px;
  height: 15px;
  background: #00ca00;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 3px #00ca00;
}

.timeline-year {
  position: absolute;
  left: -120px;
  top: -5px;
  background: #00ca00;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
}

.timeline-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #333;
}

.timeline-content p {
  color: #666;
  line-height: 1.6;
}

.story-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Mission Section */
.mission-section {
  padding: 6rem 0;
  background: white;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.mission-card {
  text-align: center;
  padding: 3rem 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #f0f0f0;
}

.mission-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.mission-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #00ca00, #667eea);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: white;
  font-size: 2rem;
}

.mission-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #333;
}

.mission-card p {
  color: #666;
  line-height: 1.6;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #333;
}

.section-header p {
  font-size: 1.2rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* Team Section */
.team-section {
  padding: 6rem 0;
  background: #f8f9fa;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjusted min-width for better fit */
  gap: 2rem;
}

.team-member {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.team-member:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 202, 0, 0.2);
}

.member-image {
  width: 100%;
  aspect-ratio: 4 / 5; /* Ensures consistent aspect ratio */
  overflow: hidden;
  position: relative;
}

.member-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; /* Prioritizes top of image (e.g., face) */
  transition: transform 0.4s ease;
}

.team-member:hover .member-image img {
  transform: scale(1.05); /* Reduced scale to prevent overflow */
}

.member-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 202, 0, 0.9), rgba(77, 168, 255, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-member:hover .member-overlay {
  opacity: 1;
}

.member-contact {
  text-align: center;
  color: white;
}

.member-contact a {
  display: block;
  color: white;
  text-decoration: none;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s ease;
}

.member-contact a:hover {
  transform: scale(1.05);
}

.member-contact i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.member-info {
  padding: 2rem;
  position: relative;
}

.member-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #333;
}

.member-role {
  color: #00ca00;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.member-bio {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.member-contact-info {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #00ca00;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item i {
  color: #00ca00;
  margin-right: 0.8rem;
  width: 16px;
  font-size: 0.9rem;
}

.contact-item span {
  color: #555;
  font-weight: 500;
}

.member-social {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}

.member-social a {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #00ca00, #4da8ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.member-social a:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 202, 0, 0.3);
}

/* Offices Section */
.offices-section {
  padding: 6rem 0;
  background: white;
}

.offices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.office-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #f0f0f0;
}

.office-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.office-image {
  height: 200px;
  overflow: hidden;
}

.office-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.office-card:hover .office-image img {
  transform: scale(1.05);
}

.office-content {
  padding: 2rem;
}

.office-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #333;
}

.office-role {
  color: #00ca00;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.office-address, .office-contact {
  color: #666;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.office-address i, .office-contact i {
  color: #00ca00;
  margin-right: 0.5rem;
  width: 16px;
}

/* CTA Section */
.cta-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  padding: 1rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.cta-btn.primary {
  background: #00ca00;
  color: white;
}

.cta-btn.primary:hover {
  background: #00a000;
  transform: translateY(-2px);
}

.cta-btn.secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.cta-btn.secondary:hover {
  background: white;
  color: #667eea;
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .about-hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .story-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .timeline-year {
    position: static;
    display: inline-block;
    margin-bottom: 0.5rem;
  }
  
  .timeline-item {
    padding-left: 2rem;
  }
  
  .story-timeline::before {
    left: 0;
  }
  
  .timeline-item::before {
    left: -6px;
  }
  
  .mission-grid {
    grid-template-columns: 1fr;
  }
  
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .offices-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-btn {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .about-hero {
    padding: 4rem 1rem;
  }
  
  .about-hero h1 {
    font-size: 2rem;
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .story-section,
  .mission-section,
  .team-section,
  .offices-section,
  .cta-section {
    padding: 4rem 0;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .story-text h2 {
    font-size: 2rem;
  }

  .member-image {
    aspect-ratio: 4 / 5;
    height: auto; /* Let height adjust based on aspect ratio */
  }
}