/* =============================================
   KKN DUSUN KEMIRI — STYLESHEET
   Nature-inspired palette: greens, whites, earthy tones
   ============================================= */

/* -----------------------------------------
   CSS CUSTOM PROPERTIES (Color Palette)
   Ubah nilai di sini untuk menyesuaikan warna.
   ----------------------------------------- */
:root {
  /* === Primary Greens === */
  --green-dark:    #1b4332;
  --green-mid:     #2d6a4f;
  --green-light:   #40916c;
  --green-soft:    #52b788;
  --green-pale:    #b7e4c7;
  --green-mist:    #d8f3dc;

  /* === Earthy Tones === */
  --earth-brown:   #6b4226;
  --earth-tan:     #c9a96e;
  --earth-sand:    #f5e6ca;

  /* === Neutrals === */
  --white:         #ffffff;
  --off-white:     #f8fdf9;
  --gray-light:    #e8ede9;
  --gray-mid:      #8a9a8c;
  --gray-dark:     #3a3f3b;
  --black:         #1a1e1a;

  /* === Accent === */
  --accent-gold:   #d4a843;

  /* === Typography === */
  --font-heading:  'Playfair Display', Georgia, serif;
  --font-body:     'Poppins', 'Segoe UI', sans-serif;

  /* === Spacing === */
  --section-padding: 100px 0;
  --container-max:   1200px;

  /* === Transitions === */
  --transition:    0.3s ease;
}

/* -----------------------------------------
   RESET & BASE
   ----------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  color: var(--gray-dark);
  background: var(--off-white);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

.container {
  width: 90%;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* -----------------------------------------
   SECTION COMMON STYLES
   ----------------------------------------- */
.section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--green-soft);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--green-dark);
  margin-bottom: 16px;
}

.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--green-soft), var(--accent-gold));
  margin: 0 auto;
  border-radius: 2px;
}

/* =============================================
   NAVIGATION BAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  transition: all var(--transition);
}

/* Transparent on top, solid on scroll */
.navbar.scrolled {
  background: rgba(27, 67, 50, 0.95);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
  width: 90%;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
}

.nav-logo span {
  color: var(--green-pale);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-pale);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger menu (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background image layer */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.15); }
}

/* Dark overlay for readability */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(27, 67, 50, 0.85) 0%,
    rgba(45, 106, 79, 0.7) 50%,
    rgba(27, 67, 50, 0.85) 100%
  );
}

/* Hero text content */
.hero-content {
  position: relative;
  text-align: center;
  color: var(--white);
  padding: 0 20px;
  animation: fadeInUp 1s ease-out;
}

.hero-date {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--green-pale);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-style: italic;
  color: var(--earth-sand);
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btn {
  display: inline-block;
  padding: 14px 36px;
  background: transparent;
  color: var(--white);
  border: 2px solid var(--green-pale);
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all var(--transition);
}

.hero-btn:hover {
  background: var(--green-pale);
  color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(183, 228, 199, 0.3);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.hero-scroll span {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.scroll-indicator {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  margin: 0 auto;
  position: relative;
}

.scroll-indicator::after {
  content: '';
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollBounce 1.8s infinite;
}

@keyframes scrollBounce {
  0%, 100% { opacity: 1; top: 6px; }
  50%      { opacity: 0.3; top: 18px; }
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about {
  background: var(--white);
}

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

.about-image {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.about-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.about-image-accent {
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--green-soft), var(--accent-gold));
  border-radius: 16px;
  z-index: -1;
  opacity: 0.6;
}

.about-text h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--green-dark);
  margin-bottom: 20px;
}

.about-text p {
  color: var(--gray-mid);
  margin-bottom: 16px;
  font-size: 0.98rem;
}

/* Stats row */
.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-light);
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--green-mid);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =============================================
   WORK PROGRAMS SECTION
   ============================================= */
.programs {
  background: linear-gradient(180deg, var(--off-white) 0%, var(--green-mist) 100%);
}

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

.program-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

/* Top accent bar */
.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--green-soft), var(--accent-gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.program-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.program-card:hover::before {
  transform: scaleX(1);
}

.program-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 24px;
  background: var(--green-mist);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.program-icon svg {
  width: 32px;
  height: 32px;
  color: var(--green-mid);
  transition: color var(--transition);
}

.program-card:hover .program-icon {
  background: var(--green-mid);
}

.program-card:hover .program-icon svg {
  color: var(--white);
}

.program-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--green-dark);
  margin-bottom: 14px;
}

.program-desc {
  font-size: 0.92rem;
  color: var(--gray-mid);
  margin-bottom: 20px;
  line-height: 1.7;
}

.program-tag {
  display: inline-block;
  padding: 5px 16px;
  background: var(--green-mist);
  color: var(--green-mid);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =============================================
   TEAM SECTION
   ============================================= */
.team {
  background: var(--white);
}

.team-role-heading {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--green-mid);
  text-align: center;
  margin-bottom: 24px;
  margin-top: 40px;
  position: relative;
}

.team-role-heading::before,
.team-role-heading::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--green-pale);
  vertical-align: middle;
  margin: 0 16px;
}

.team-role-heading:first-of-type {
  margin-top: 0;
}

/* Grid layouts for different team sizes */
.team-grid {
  display: grid;
  gap: 30px;
  margin-bottom: 20px;
}

.team-grid--small {
  grid-template-columns: repeat(1, 280px);
  justify-content: center;
}

.team-grid--medium {
  grid-template-columns: repeat(auto-fit, minmax(260px, max-content));
  justify-content: center;
}

.team-card {
  background: var(--off-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  transition: all var(--transition);
  width: 280px;
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
}

.team-photo {
  width: 100%;
  height: 280px;
  overflow: hidden;
  position: relative;
}

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

.team-card:hover .team-photo img {
  transform: scale(1.08);
}

/* Gradient overlay on photo */
.team-photo::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(27, 67, 50, 0.4), transparent);
}

.team-info {
  padding: 20px 24px 24px;
  text-align: center;
}

.team-info h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 4px;
}

.team-nim {
  font-size: 0.82rem;
  color: var(--gray-mid);
  margin-bottom: 12px;
}

/* Role badge */
.team-role {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Role-specific colors */
.role-coordinator  { background: var(--green-dark);   color: var(--white); }
.role-vice         { background: var(--green-mid);    color: var(--white); }
.role-secretary    { background: var(--earth-tan);    color: var(--green-dark); }
.role-treasurer    { background: var(--accent-gold);  color: var(--white); }
.role-event        { background: var(--green-soft);   color: var(--white); }
.role-pr           { background: var(--green-light);  color: var(--white); }
.role-logistics    { background: var(--earth-sand);   color: var(--earth-brown); }

/* =============================================
   GALLERY SECTION
   ============================================= */
.gallery {
  background: linear-gradient(180deg, var(--green-mist) 0%, var(--off-white) 100%);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
}

.gallery-item--wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

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

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Hover overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27, 67, 50, 0.8), transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 70px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1fr;
  gap: 40px;
}

.footer-logo img {
  height: 60px;
  margin-bottom: 16px;
  border-radius: 8px;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--green-soft);
}

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

.footer-col ul li a {
  font-size: 0.9rem;
  transition: all var(--transition);
}

.footer-col ul li a:hover {
  color: var(--green-pale);
  padding-left: 6px;
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-contact svg {
  flex-shrink: 0;
  color: var(--green-soft);
}

/* Social links */
.footer-social {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--green-soft);
  border-color: var(--green-soft);
  color: var(--white);
  transform: translateY(-3px);
}

.social-link svg {
  color: inherit;
}

/* Footer bottom bar */
.footer-bottom {
  margin-top: 50px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
}

/* =============================================
   BACK TO TOP BUTTON
   ============================================= */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--green-mid);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--green-dark);
  transform: translateY(-3px);
}

/* =============================================
   SCROLL ANIMATIONS
   Elements with .reveal class animate on scroll
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   FADE-IN-UP KEYFRAMES
   ============================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

/* Tablet and below (≤ 992px) */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image img {
    height: 320px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item--wide {
    grid-column: span 2;
  }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
  :root {
    --section-padding: 70px 0;
  }

  /* Hamburger menu visible */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--green-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px;
    gap: 24px;
    transition: right var(--transition);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.05rem;
  }

  /* Close icon animation */
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .about-stats {
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
  }

  .programs-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .team-grid--medium {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-item--wide {
    grid-column: span 2;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-contact li {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }
}

/* Small mobile (≤ 480px) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item--wide {
    grid-column: span 1;
    aspect-ratio: 16 / 9;
  }

  .team-card {
    width: 260px;
  }

  .team-photo {
    height: 240px;
  }
}
