/* =========================================================
   The Community Pulse Foundation - Professional Styles
   ========================================================= */

:root {
  --primary: #0d7377;
  --primary-dark: #0a5c5f;
  --primary-light: #14919b;
  --accent: #e67e22;
  --accent-soft: #f39c12;
  --maple: #c0392b;
  --dark: #1a1a2e;
  --text: #2d3436;
  --text-light: #636e72;
  --bg: #ffffff;
  --bg-alt: #f8fafb;
  --bg-dark: #0f172a;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== LANGUAGE SWITCHER ==================== */
.lang-switcher {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 1001;
  display: flex;
  background: white;
  border-radius: 50px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--primary);
  color: white;
}

.lang-btn:hover:not(.active) {
  background: var(--bg-alt);
}

/* ==================== HEADER ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

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

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
  line-height: 1.2;
}

.logo-tagline {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 8px;
}

.nav-link:hover {
  background: var(--bg-alt);
  color: var(--primary);
}

.nav-donate {
  background: var(--accent) !important;
  color: white !important;
  font-weight: 600;
  margin-left: 8px;
}

.nav-donate:hover {
  background: #d35400 !important;
  color: white !important;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: var(--transition);
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0d7377 0%, #0a5c5f 50%, #1a1a2e 100%);
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero-community.jpg') center/cover no-repeat;
  opacity: 0.25;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13,115,119,0.7), rgba(15,23,42,0.85));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 60px 24px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: white;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 36px;
  max-width: 560px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: #d35400;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(230,126,34,0.35);
}

.btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.5);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
}

.btn-donate {
  background: var(--maple);
  color: white;
}

.btn-donate:hover {
  background: #a93226;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(192,57,43,0.35);
}

.btn-large {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* ==================== SECTIONS ==================== */
.section {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 56px;
}

.section-header.center {
  text-align: center;
}

.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.25;
}

.section-desc {
  max-width: 640px;
  margin: 16px auto 0;
  color: var(--text-light);
  font-size: 1.05rem;
}

/* ==================== ABOUT ==================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.about-content p {
  margin-bottom: 20px;
  color: var(--text-light);
  font-size: 1.05rem;
}

.mission-vision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}

.mv-card {
  background: var(--bg-alt);
  padding: 28px;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

.mv-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.mv-card p {
  font-size: 0.95rem;
  margin: 0;
  color: var(--text-light);
}

.about-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* ==================== OBJECTIVES ==================== */
.objectives {
  background: var(--bg-alt);
}

.objectives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.objective-card {
  background: white;
  padding: 32px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
}

.objective-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.obj-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.objective-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--dark);
}

.objective-card p {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ==================== PROGRAMS ==================== */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.program-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.program-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.program-image {
  height: 220px;
  overflow: hidden;
}

.program-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.program-card:hover .program-image img {
  transform: scale(1.05);
}

.program-content {
  padding: 28px;
}

.program-subtitle {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.program-content h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--dark);
}

.program-content p {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ==================== EVENTS ==================== */
.events {
  background: var(--bg-alt);
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 60px;
}

.event-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 40px;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.event-image {
  height: 100%;
  min-height: 280px;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-content {
  padding: 36px 36px 36px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.event-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.event-date {
  color: var(--primary);
}

.event-location {
  color: var(--text-light);
}

.event-content h3 {
  font-size: 1.4rem;
  margin-bottom: 14px;
  color: var(--dark);
}

.event-summary {
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text);
}

.event-details {
  font-size: 0.95rem;
  color: var(--text-light);
}

.action-plan {
  background: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
}

.action-plan h3 {
  margin-bottom: 28px;
  font-size: 1.4rem;
  color: var(--dark);
}

.action-plan-image img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 0 auto;
}

/* ==================== TEAM ==================== */
.team-photo {
  max-width: 800px;
  margin: 0 auto 48px;
  text-align: center;
}

.team-photo img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.team-photo-caption {
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--text-light);
  font-style: italic;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.team-card {
  background: white;
  padding: 36px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.team-avatar {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 auto 20px;
}

.team-card h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: var(--dark);
}

.team-role {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 14px;
}

.team-bio {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ==================== VOLUNTEER ==================== */
.volunteer {
  background: linear-gradient(135deg, #0d7377 0%, #0a5c5f 100%);
  color: white;
}

.volunteer .section-label {
  color: rgba(255,255,255,0.8);
}

.volunteer .section-title {
  color: white;
}

.volunteer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.volunteer-text p {
  margin-bottom: 16px;
  color: rgba(255,255,255,0.9);
  font-size: 1.05rem;
}

.volunteer-benefits {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 32px 0;
}

.benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.benefit-icon {
  font-size: 1.3rem;
}

.volunteer-image img {
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* ==================== DONATE ==================== */
.donate {
  background: var(--bg-alt);
}

.donate-box {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 60px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.donate-box .section-label {
  color: var(--maple);
}

.donate-box .section-title {
  margin-bottom: 20px;
}

.donate-box > .donate-content > p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 36px;
}

.donate-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
  text-align: left;
}

.donate-method {
  display: flex;
  gap: 16px;
  background: var(--bg-alt);
  padding: 24px;
  border-radius: var(--radius);
}

.method-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.donate-method h4 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--dark);
}

.donate-method p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

.donate-email {
  display: inline-block;
  margin-top: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-all;
}

.donate-email:hover {
  text-decoration: underline;
}

/* ==================== CONTACT ==================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  background: var(--bg-alt);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.contact-item a {
  color: var(--primary);
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
}

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

.social-btn {
  width: 44px;
  height: 44px;
  background: var(--bg-alt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--dark);
  transition: var(--transition);
}

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

.contact-cta {
  background: var(--bg-alt);
  padding: 48px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.contact-cta h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--dark);
}

.contact-cta p {
  color: var(--text-light);
  margin-bottom: 28px;
}

/* ==================== FOOTER ==================== */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-brand p {
  font-size: 0.95rem;
  max-width: 280px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links a:hover {
  color: white;
}

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

.footer-note {
  margin-top: 6px;
  opacity: 0.7;
  font-size: 0.85rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 960px) {
  .about-grid,
  .volunteer-content,
  .contact-grid,
  .donate-methods {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .donate-box {
    padding: 40px 28px;
  }
  
  .event-card {
    grid-template-columns: 1fr;
  }
  
  .event-image {
    min-height: 220px;
  }
  
  .event-content {
    padding: 28px;
  }
  
  .mission-vision {
    grid-template-columns: 1fr;
  }
  
  .about-image img {
    height: 320px;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
  }
  
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .nav-link {
    padding: 14px 16px;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .lang-switcher {
    top: 16px;
    right: 70px;
  }
  
  .hero-content {
    padding: 40px 0;
  }
  
  .section {
    padding: 70px 0;
  }
  
  .logo-text {
    display: none;
  }
  
  .programs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .contact-cta {
    padding: 32px 24px;
  }
}

/* =========================================================
   ADMIN-CREATED PAGES (page.html)
   ========================================================= */
.page-wrap {
  padding: 140px 0 80px;
  min-height: 70vh;
}

.page-body {
  max-width: 760px;
}

.page-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 1.4rem;
  padding-bottom: 1.1rem;
  border-bottom: 3px solid var(--primary);
}

.page-body h2 {
  font-size: 1.35rem;
  color: var(--primary-dark);
  margin: 2rem 0 .6rem;
}

.page-body p {
  margin-bottom: 1.1rem;
  color: var(--text);
}

.page-body ul {
  margin: 0 0 1.2rem 1.2rem;
  color: var(--text);
}

.page-body li {
  margin-bottom: .45rem;
}

.page-state {
  color: var(--text-light);
}

.page-back {
  display: inline-block;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .page-wrap { padding: 110px 0 60px; }
}
