/* ========================================
   SDDO – Sahan Developmental Disability Organization
   Professional NGO Website Stylesheet
   ======================================== */

:root {
  --primary: #1a5f9e;
  --primary-dark: #0f3d6b;
  --primary-light: #2b7bc7;
  --accent: #e8f1f8;
  --secondary: #2c3e50;
  --text: #333333;
  --text-light: #555555;
  --white: #ffffff;
  --bg: #f7f9fc;
  --border: #d0e0ef;
  --success: #27ae60;
  --shadow: 0 4px 20px rgba(26, 95, 158, 0.08);
  --shadow-hover: 0 8px 30px rgba(26, 95, 158, 0.15);
  --radius: 10px;
  --transition: 0.25s ease;
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, sans-serif;
}

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

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

a:hover, a:focus {
  color: var(--primary-dark);
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--primary);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
}

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

/* ========== HEADER ========== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--secondary);
}

.logo:hover {
  text-decoration: none;
  color: var(--secondary);
}

.logo-mark {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -1px;
  flex-shrink: 0;
}

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

.logo-text strong {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

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

/* Navigation */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
}

.main-nav a {
  display: block;
  padding: 10px 16px;
  color: var(--secondary);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 6px;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--accent);
  color: var(--primary);
  text-decoration: none;
}

.nav-cta {
  background: var(--primary) !important;
  color: var(--white) !important;
  margin-left: 8px;
}

.nav-cta:hover {
  background: var(--primary-dark) !important;
  color: var(--white) !important;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
  border-radius: 6px;
}

.menu-toggle:hover {
  background: var(--accent);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--secondary);
  margin: 5px auto;
  border-radius: 2px;
  transition: var(--transition);
}

/* ========== MAIN CONTENT ========== */
main {
  flex: 1;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
  color: var(--white);
  padding: 72px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 18px;
  max-width: 700px;
}

.hero .tagline {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 28px;
  max-width: 560px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

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

.btn-primary:hover {
  background: var(--accent);
  color: var(--primary-dark);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.7);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  color: var(--white);
}

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

.btn-dark:hover {
  background: var(--primary-dark);
  color: var(--white);
  box-shadow: var(--shadow-hover);
}

/* Section styles */
.section {
  padding: 64px 0;
}

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

.section-title {
  font-size: 1.75rem;
  color: var(--primary-dark);
  margin-bottom: 12px;
  font-weight: 700;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 36px;
  max-width: 640px;
}

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

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
}

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

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--primary);
}

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

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

.card ul {
  margin-top: 12px;
  padding-left: 18px;
  color: var(--text-light);
  font-size: 0.92rem;
}

.card ul li {
  margin-bottom: 6px;
}

/* Values list */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.value-item {
  background: var(--white);
  border-left: 4px solid var(--primary);
  padding: 20px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}

.value-item h3 {
  color: var(--primary-dark);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.value-item p {
  color: var(--text-light);
  font-size: 0.93rem;
}

/* Info boxes */
.info-box {
  background: var(--accent);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.info-box h3 {
  color: var(--primary-dark);
  margin-bottom: 10px;
}

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* Timeline / structure */
.structure-list {
  list-style: none;
}

.structure-list li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.structure-list h3 {
  color: var(--primary);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

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

/* Stats bar */
.stats-bar {
  background: var(--primary-dark);
  color: var(--white);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-item span {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Page header (inner pages) */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 48px 0 52px;
}

.page-header h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  margin-bottom: 8px;
}

.page-header p {
  opacity: 0.9;
  max-width: 560px;
  font-size: 1.05rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 12px;
  opacity: 0.8;
}

.breadcrumb a {
  color: var(--white);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Content prose */
.prose {
  max-width: 720px;
}

.prose p {
  margin-bottom: 16px;
  color: var(--text);
}

.prose ul, .prose ol {
  margin: 12px 0 20px 22px;
  color: var(--text);
}

.prose li {
  margin-bottom: 8px;
}

.prose h2 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin: 32px 0 12px;
}

.prose h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin: 24px 0 10px;
}

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}

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

.contact-info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.contact-info-card h3 {
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.contact-detail {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  align-items: flex-start;
}

.contact-detail .icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-detail strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 2px;
}

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

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

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.98rem;
  transition: border-color var(--transition);
  background: var(--bg);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 95, 158, 0.15);
}

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

.form-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 12px;
}

/* Call to action band */
.cta-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 56px 0;
  text-align: center;
}

.cta-band h2 {
  font-size: 1.7rem;
  margin-bottom: 12px;
}

.cta-band p {
  max-width: 520px;
  margin: 0 auto 24px;
  opacity: 0.95;
}

/* Footer */
.site-footer {
  background: var(--secondary);
  color: #c8d0d8;
  padding: 52px 0 28px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

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

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

.footer-brand .logo-mark {
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 10px;
  max-width: 280px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 16px;
  font-weight: 600;
}

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

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: #a8b4c0;
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}

/* Principles badge */
.principle-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 16px;
}

/* Governance highlight */
.governance-highlight {
  background: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 24px 0;
}

.governance-highlight strong {
  color: var(--primary-dark);
}

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

  .main-nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.open {
    max-height: 420px;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 12px 16px 20px;
    gap: 2px;
  }

  .main-nav a {
    padding: 12px 16px;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
  }
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Focus styles for accessibility */
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}