/* ========================================
   ELLA FOUNDATION TANZANIA - ALTERNATIVE DESIGN
   Theme: Elegant, Trustworthy, Compassionate
   Structure: Split hero, Timeline objectives, Compact footer
   ======================================== */

/* === Variables === */
:root {
  /* Primary - Rose (Original) */
  --primary: #8d3160;
  --primary-light: #a84b7a;
  --primary-dark: #6a2548;
  --primary-faded: rgba(141, 49, 96, 0.1);
  
  --accent: #8d3160;
  --accent-light: #a84b7a;
  --accent-dark: #6a2548;
  --accent-faded: rgba(141, 49, 96, 0.1);
  
  /* Text */
  --text: #2a2f33;
  --text-light: #5a6169;
  --text-muted: #8a9199;
  
  /* Backgrounds */
  --bg: #faf9f7;
  --bg-alt: #f0ece6;
  --bg-dark: #1a2025;
  --white: #ffffff;
  
  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  
  /* Sizing */
  --container-max: 1200px;
  --border-radius: 8px;
  --border-radius-lg: 20px;
  
  /* Transitions */
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
}

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

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

a:hover {
  color: var(--primary-light);
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; font-family: var(--font-main); font-weight: 600; }

p {
  margin-bottom: var(--space-sm);
}

/* === Layout === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section--alt {
  background-color: var(--bg-alt);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.25rem;
  font-family: var(--font-main);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(141, 49, 96, 0.3);
}

.btn--primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(141, 49, 96, 0.4);
}

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

.btn--outline:hover {
  background-color: var(--primary);
  color: var(--white);
}

/* === Header/Navigation === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) 0;
  transition: all var(--transition);
}

.header--scrolled {
  background-color: var(--white);
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo img {
  height: 40px;
  position: relative;
  right: 1em;
  width: auto;
}

.header__logo .logo-scrolled {
  display: none;
}

.header--scrolled .header__logo .logo-transparent {
  display: none;
}

.header--scrolled .header__logo .logo-scrolled {
  display: block;
}

/* Responsive logo visibility */
.header__logo .logo-tablet-only {
  display: none;
}

.header__logo .logo-mobile-only {
  display: none;
}

.header__logo .logo-desktop-only {
  display: block;
}

/* Hide both transparent logos when scrolled */
.header--scrolled .header__logo .logo-transparent {
  display: none !important;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__link {
  font-weight: 500;
  color: var(--text);
  padding: var(--space-xs) 0;
  position: relative;
  font-size: 0.9375rem;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width var(--transition);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__link:hover {
  color: var(--primary);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--white);
  transition: all var(--transition);
  position: absolute;
}

.header--scrolled .nav-toggle span {
  background-color: var(--text);
}

.nav-toggle span:nth-child(1) { transform: translateY(-7px); }
.nav-toggle span:nth-child(2) { transform: translateY(0); }
.nav-toggle span:nth-child(3) { transform: translateY(7px); }

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translateY(0); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translateY(0); }

.nav-toggle.active span { background-color: var(--primary); }

/* === Hero Section - Split Screen === */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.hero__image {
  position: relative;
  overflow: hidden;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl);
  background: var(--bg);
}

.hero__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--text);
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.hero__title em {
  font-style: italic;
  color: var(--primary);
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: var(--space-md);
  max-width: 450px;
  line-height: 1.7;
}

.hero__cta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

/* === Vision & Mission Banner === */
.vision-mission-banner {
  background: var(--primary);
  color: var(--white);
  padding: var(--space-lg) 0;
}

.vm-banner__grid {
  display: flex;
  align-items: stretch;
  gap: var(--space-lg);
}

.vm-banner__item {
  flex: 1;
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.vm-banner__icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
}

.vm-banner__icon svg {
  width: 28px;
  height: 28px;
  fill: var(--white);
}

.vm-banner__title {
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: var(--space-xs);
}

.vm-banner__text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

.vm-banner__divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: -1rem 0;
}

/* === About Section - Centered === */
.about-section {
  padding-top: var(--space-xl);
}

.about-centered {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-lg);
}

.about-centered__title {
  margin-bottom: var(--space-md);
}

.about-centered__text {
  color: var(--text-light);
  font-size: 1.0625rem;
}

.about-centered__text p:last-child {
  margin-bottom: 0;
}

.about-image-wide {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
}

.about-image-wide img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

/* === Section Headers === */
.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto var(--space-lg);
}

.section-header__title {
  margin-bottom: var(--space-sm);
}

.section-header__text {
  color: var(--text-light);
  font-size: 1.0625rem;
}

/* === Objectives Timeline === */
.objectives-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.objectives-timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-light));
  border-radius: 2px;
}

.objectives-timeline::after {
  content: '';
  position: absolute;
  left: 21px;
  bottom: 0;
  width: 8px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 50%;
}

.timeline-item {
  display: flex;
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
  position: relative;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  width: 50px;
  height: 50px;
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  z-index: 1;
  box-shadow: 0 4px 15px rgba(141, 49, 96, 0.3);
}

.timeline-content {
  background: var(--white);
  padding: var(--space-md);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  flex: 1;
  transition: all var(--transition);
}

.timeline-content:hover {
  transform: translateX(8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.timeline-title {
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.timeline-text {
  color: var(--text-light);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin: 0;
}

/* === Footer - Compact === */
.footer {
  background: var(--bg-dark);
  color: var(--white);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--space-md);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer__logo {
  height: 50px;
  width: auto;
}

.footer__tagline {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
  margin: 0;
  max-width: 300px;
}

.footer__social {
  display: flex;
  gap: var(--space-xs);
}

.social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: var(--white);
  transition: all var(--transition);
}

.social__link:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.social__link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer__info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-md);
  gap: var(--space-lg);
}

.footer__contact-inline {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.contact-item {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.contact-item strong {
  color: var(--white);
}

.contact-item a {
  color: rgba(255, 255, 255, 0.6);
}

.contact-item a:hover {
  color: var(--primary-light);
}

.footer__partner-inline {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer__partner-inline span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

.footer__partner-inline img {
  height: 40px;
  opacity: 0.7;
}

.footer__bottom {
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.875rem;
}

/* === Responsive Design === */
@media (max-width: 992px) {
  /* Show secondary logo on tablet (dark background) */
  .header__logo .logo-desktop-only {
    display: none;
  }
  
  .header__logo .logo-tablet-only {
    display: block;
  }

  .hero {
    grid-template-columns: 1fr;
  }
  
  .hero__image {
    height: 50vh;
  }
  
  .hero__content {
    padding: var(--space-lg);
  }
  
  .vm-banner__grid {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .vm-banner__divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }
  
  .footer__info {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Nav links white on tablet (unified hero) */
  .nav__link {
    color: var(--white);
  }

  .header--inner-page .nav__link {
    color: var(--text);
  }
  
  .nav__link:hover {
    color: var(--white);
    opacity: 0.9;
  }

  .header--scrolled .nav__link {
    color: var(--text);
  }
  
  .header--scrolled .nav__link:hover {
    color: var(--primary);
  }
}


@media (max-width: 768px) {
  /* Mobile logo logic */
  .header__logo .logo-tablet-only {
    display: none;
  }
  
  .header__logo .logo-mobile-only {
    display: block;
  }

  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
  }
  
  .nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    z-index: 1000;
  }
  
  .nav--open {
    display: flex;
  }
  
  .nav__link {
    color: var(--text) !important;
    font-size: 1.5rem;
    padding: var(--space-sm) 0;
  }
  
  .nav__link:hover {
    color: var(--primary-light) !important;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero__image {
    height: 40vh;
  }
  
  .hero__image img {
    object-position: 75% 10%;
  }
  
  .objectives-timeline::before {
    left: 20px;
  }
  
  .timeline-marker {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 1rem;
  }
  
  .footer__top {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
  
  .footer__brand {
    flex-direction: column;
  }
  
  .footer__contact-inline {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .footer__partner-inline {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero__cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

/* === Page Header === */
.page-header {
  position: relative;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center 20%;
  margin-top: 72px;
}

.page-header__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(141, 49, 96, 0.85) 0%, rgba(26, 32, 37, 0.8) 100%);
}

.page-header__content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: var(--space-lg) var(--space-md);
}

.page-header__content .section-label {
  color: rgba(255, 255, 255, 0.7);
}

.page-header__title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.page-header__breadcrumb {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.page-header__breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
}

.page-header__breadcrumb a:hover {
  color: var(--white);
}

/* === Blog Grid === */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* === Blog Cards === */
.blog-card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  transition: all var(--transition);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.blog-card__image-link {
  display: block;
}

.blog-card__image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.blog-card:hover .blog-card__image img {
  transform: scale(1.05);
}

.blog-card__date {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--primary);
  color: var(--white);
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.blog-card__content {
  padding: var(--space-md);
}

.blog-card__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  background: var(--primary-faded);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  margin-bottom: var(--space-sm);
}

.blog-card__title {
  font-size: 1.125rem;
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

.blog-card__title a {
  color: var(--text);
  transition: color var(--transition);
}

.blog-card__title a:hover {
  color: var(--primary);
}

.blog-card__excerpt {
  font-size: 0.9375rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  transition: all var(--transition);
}

.blog-card__link:hover {
  color: var(--primary-dark);
}

/* === Post Article === */
.post {
  max-width: 800px;
  margin: 0 auto;
  padding: calc(72px + var(--space-xl)) var(--space-md) var(--space-xl);
}

.post__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.post__meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.post__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.25;
}

.post__featured-image {
  margin-bottom: var(--space-lg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.post__featured-image img {
  width: 100%;
  display: block;
}

.post__content {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text);
}

.post__content h2 {
  font-size: 1.5rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--primary);
}

.post__content p {
  margin-bottom: var(--space-md);
}

.post__content ul,
.post__content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-md);
}

.post__content li {
  margin-bottom: var(--space-xs);
}

.post__content strong {
  color: var(--text);
}

.post__content em {
  font-style: italic;
}

.post__back {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--bg-alt);
}

/* === Utility Classes === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
