/* KawokoWebz - Global Styles */
:root {
  --primary: #1a5f2a;
  --primary-dark: #0d3d18;
  --primary-light: #2e8b3d;
  --accent: #f4a261;
  --accent-dark: #e76f51;
  --bg: #f8f9fa;
  --bg-dark: #1a1a2e;
  --text: #212529;
  --text-light: #6c757d;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* ========== HEADER / NAVBAR ========== */
.top-bar {
  background: var(--primary-dark);
  color: var(--white);
  padding: 8px 0;
  font-size: 0.85rem;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar a {
  color: rgba(255,255,255,0.9);
}

.top-bar a:hover {
  color: var(--accent);
}

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

.toolbar {
  background: var(--white);
  border-bottom: 1px solid #e9ecef;
  padding: 6px 0;
  font-size: 0.9rem;
}

.toolbar .container {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.toolbar a {
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
}

.logo-placeholder {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(26,95,42,0.3);
}

.logo span {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-menu > li {
  position: relative;
}

.nav-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text);
}

.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(26,95,42,0.1);
  color: var(--primary);
}

.nav-menu .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 100;
}

.nav-menu li:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .dropdown a {
  padding: 10px 14px;
  font-size: 0.9rem;
}

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

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ========== CONTAINER ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-primary:hover {
  background: var(--accent-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(231,111,81,0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
  margin-left: 12px;
}

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

/* ========== MAIN CONTENT ========== */
main {
  flex: 1;
  padding: 50px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.section-title p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

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

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

.card-img {
  height: 180px;
  background: linear-gradient(135deg, #a8e6cf, #dcedc1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.card-img::after {
  content: attr(data-label);
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.card-body {
  padding: 22px;
}

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

.card-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.card-body a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.card-body a:hover {
  color: var(--accent-dark);
}

/* Page Header for subpages */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 50px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.page-header p {
  opacity: 0.9;
  font-size: 1.1rem;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.9rem;
  opacity: 0.85;
}

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

/* Content sections */
.content-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.content-section h2 {
  color: var(--primary-dark);
  margin-bottom: 20px;
  font-size: 1.6rem;
}

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

.content-section ul {
  margin: 16px 0 16px 24px;
}

.content-section li {
  margin-bottom: 8px;
}

/* Image Placeholder */
.img-placeholder {
  background: linear-gradient(135deg, #e0f2e9, #c8e6c9);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  min-height: 250px;
  margin: 20px 0;
  border: 2px dashed var(--primary-light);
  font-size: 1.1rem;
  text-align: center;
  padding: 20px;
}

.img-placeholder i {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

/* Gallery / Slideshow */
.gallery-section {
  margin: 50px 0;
}

.slideshow-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.slide {
  display: none;
  animation: fade 0.8s ease;
}

.slide.active {
  display: block;
}

.slide .img-placeholder {
  min-height: 400px;
  margin: 0;
  border: none;
  border-radius: 0;
  background: linear-gradient(135deg, #2e8b3d, #1a5f2a);
  color: white;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: white;
  padding: 30px 24px 20px;
  font-size: 1.1rem;
}

.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
  color: var(--primary-dark);
}

.slide-nav:hover {
  background: white;
  box-shadow: var(--shadow);
}

.slide-prev { left: 16px; }
.slide-next { right: 16px; }

.slide-dots {
  text-align: center;
  padding: 20px 0;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  margin: 0 6px;
  cursor: pointer;
  transition: var(--transition);
}

.dot.active,
.dot:hover {
  background: var(--primary);
  transform: scale(1.2);
}

@keyframes fade {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* Thumbnails gallery */
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.thumb {
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.thumb:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow);
}

.thumb .img-placeholder {
  min-height: 100%;
  margin: 0;
  border: none;
  font-size: 0.9rem;
}

/* Info boxes */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin: 30px 0;
}

.info-box {
  background: #f0f7f2;
  border-left: 4px solid var(--primary);
  padding: 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

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

/* ========== FOOTER ========== */
footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  color: white;
  margin-bottom: 18px;
  font-size: 1.15rem;
}

.footer-col p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

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

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

.footer-col a {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-logo .logo-placeholder {
  width: 42px;
  height: 42px;
  font-size: 1rem;
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 16px;
    display: none;
  }

  .nav-menu li:hover .dropdown,
  .nav-menu li.open .dropdown {
    display: block;
  }

  .menu-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .content-section {
    padding: 28px 20px;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 50px 0 70px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .btn-outline {
    margin-left: 0;
    margin-top: 12px;
  }

  .slide .img-placeholder {
    min-height: 280px;
  }

  .slide-nav {
    width: 40px;
    height: 40px;
  }
}

/* Utility */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.highlight { color: var(--primary); font-weight: 600; }

/* News cards from database */
.news-grid {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.news-card {
  background: #f0f7f2;
  border-left: 4px solid var(--primary);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

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

.news-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.news-card p:last-child {
  margin-bottom: 0;
  color: var(--text);
}

/* ===== Success Stories ===== */
.stories-section { margin: 40px 0; }
.stories-feed {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}
.story-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-left: 4px solid var(--primary);
}
.story-card.confidential {
  border-left-color: #7c3aed;
}
.story-card .story-photo {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
  background: #e8f5e9;
}
.story-card .story-body {
  padding: 20px 22px;
}
.story-card h3 {
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-size: 1.15rem;
}
.story-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.story-meta .badge-conf {
  background: #ede9fe;
  color: #5b21b6;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.story-text {
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
}
.story-form-card {
  background: #f0f7f2;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
  border: 1px solid #c8e6c9;
}
.story-form-card h3 {
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.story-form-card .hint {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 16px;
}
.story-form-card label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.9rem;
}
.story-form-card input[type="text"],
.story-form-card input[type="email"],
.story-form-card input[type="file"],
.story-form-card select,
.story-form-card textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 12px;
  box-sizing: border-box;
}
.story-form-card textarea { min-height: 110px; resize: vertical; }
.confidential-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 16px;
  padding: 12px;
  background: #f5f3ff;
  border-radius: 8px;
  border: 1px solid #ddd6fe;
}
.confidential-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}
.confidential-row label {
  font-weight: 500;
  margin: 0;
  font-size: 0.9rem;
  color: #4c1d95;
}
.confidential-row small {
  display: block;
  color: #6b7280;
  font-size: 0.8rem;
  margin-top: 2px;
}
