@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --color-primary: #115e3b; /* Deep forest green */
  --color-primary-light: #208655; /* Emerald tone */
  --color-primary-dark: #0a3d25;
  --color-accent: #f2a65a; /* Warm subtle contrast */
  --color-text-main: #1e293b;
  --color-text-muted: #475569;
  --color-bg-main: #f8fafc;
  --color-bg-alt: #ffffff;
  --color-white: #ffffff;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-bg-main);
  line-height: 1.6;
  overflow-x: hidden;
  /* Sticky footer: full-height column so the footer stays at the bottom
     even on short pages (e.g. contact page with the form disabled). */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Let the main content grow to fill available space, pushing the footer down. */
#main-content {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary-dark);
}

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

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- NAVIGATION --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  transition: var(--transition-smooth);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.5px;
  z-index: 10;
}

.navbar.scrolled .logo {
  color: var(--color-primary-dark);
}

.logo span {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-white);
  font-weight: 500;
  position: relative;
}

.navbar.scrolled .nav-links a {
  color: var(--color-text-main);
}

.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active {
  color: var(--color-primary);
}

.navbar:not(.scrolled) .nav-links a.active {
  color: var(--color-white);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary-light);
  transition: var(--transition-smooth);
}

.navbar:not(.scrolled) .nav-links a::after {
  background-color: var(--color-white);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--color-white);
  margin-bottom: 5px;
  transition: var(--transition-smooth);
}

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

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-family: var(--font-heading);
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-smooth);
}

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

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

/* --- HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background-image: url('assets/hero_bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(17, 94, 59, 0.8), rgba(0, 0, 0, 0.3));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  color: var(--color-white);
}

.hero h1 {
  color: var(--color-white);
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn-white {
  background-color: var(--color-white);
  color: var(--color-primary-dark);
}
.btn-white:hover {
  background-color: #f1f5f9;
  color: var(--color-primary);
  transform: translateY(-2px);
}
.btn-outline-white {
  background-color: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}
.btn-outline-white:hover {
  background-color: var(--color-white);
  color: var(--color-primary-dark);
}

/* --- SECTION PADDING --- */
.section {
  padding: 6rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--color-primary-light);
  border-radius: 2px;
}

/* --- ABOUT SECTION --- */
/* The "Meet Joy" title is left-aligned and uses a manual divider below it,
   so suppress the default centered .section-title underline here. */
.about-content .section-title::after {
  display: none;
}

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

.about-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

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

.about-content h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* --- PLATFORM CARDS (Home Page Preview) --- */
.bg-light {
  background-color: var(--color-bg-alt);
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.platform-card {
  background: var(--color-bg-main);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: var(--transition-smooth);
  border: 1px solid rgba(0,0,0,0.03);
}

.platform-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(32, 134, 85, 0.2);
}

.card-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(32, 134, 85, 0.1);
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
  transition: var(--transition-smooth);
}

.platform-card:hover .card-icon {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.platform-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.platform-card p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* --- PAGE HEADERS --- */
.page-header {
  padding: 8rem 0 4rem;
  background: linear-gradient(to right, var(--color-primary-dark), var(--color-primary));
  color: var(--color-white);
  text-align: center;
}

.page-header h1 {
  color: var(--color-white);
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

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

/* --- PLATFORM PAGE DETAILED --- */
.policy-section {
  display: flex;
  gap: 3rem;
  margin-bottom: 4rem;
}

.policy-section:nth-child(even) {
  flex-direction: row-reverse;
}

.policy-content {
  flex: 1;
}

.policy-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.policy-content p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

/* --- CONTACT SECTION --- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  background: var(--color-bg-alt);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.contact-info {
  background-color: var(--color-primary-dark);
  color: var(--color-white);
  padding: 3rem;
}

.contact-info h3 {
  color: var(--color-white);
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Links in the dark sidebar need to be white to stay legible. */
.contact-item a {
  color: var(--color-white);
}

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

.contact-form-wrap {
  padding: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(32, 134, 85, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

.form-status {
  margin-top: 1rem;
  text-align: center;
  font-weight: 500;
}

.form-status:empty {
  display: none;
}

.form-status.success {
  color: var(--color-primary);
}

.form-status.error {
  color: #dc2626;
}

/* --- FOOTER --- */
footer {
  background-color: var(--color-primary-dark);
  color: #94a3b8;
  padding: 4rem 0 2rem;
  flex-shrink: 0;
}

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

.footer-brand h4 {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-brand a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
}

.footer-brand a:hover {
  color: var(--color-white);
}

.footer-links h5 {
  color: var(--color-white);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

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

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: -1;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
  }
  
  .nav-links a {
    color: var(--color-text-main);
  }

  /* Keep the active link visible on the white mobile dropdown,
     even when the navbar is in its transparent (non-scrolled) state. */
  .navbar:not(.scrolled) .nav-links a.active {
    color: var(--color-primary);
  }

  .navbar:not(.scrolled) .nav-links a::after {
    background-color: var(--color-primary-light);
  }

  .hero h1 {
    font-size: 2.5rem;
  }
  
  .about-grid, .contact-wrapper, .policy-section, .policy-section:nth-child(even) {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
  
  .contact-info, .contact-form-wrap {
    padding: 2rem;
  }
}
