/*
 * Emergent Services Initiative website stylesheet
 *
 * This stylesheet defines a calm, professional color palette and clear
 * typography to convey trust and inspiration. It also includes
 * responsive design rules to ensure the site is usable on devices of
 * any size.
 */

/* CSS variables for easy theme customization */
:root {
  --primary-color: #044e48; /* dark teal for headings and accents */
  --secondary-color: #0c837d; /* medium teal for buttons and highlights */
  --accent-color: #d2ebe6; /* very light teal for backgrounds */
  --text-color: #333333; /* dark grey for body text */
  --light-text: #ffffff; /* white for text on dark backgrounds */
  --font-sans: 'Open Sans', sans-serif;
  --font-serif: 'Lora', serif;
}

/* Reset some default styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--accent-color);
}

html {
  scroll-behavior: smooth;
}

/* Container centers content and limits max width */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navigation bar */
.navbar {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-color);
}
.brand-logo {
  height: 48px;
  width: auto;
  margin-right: 0.5rem;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Navigation links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}
.nav-links a:hover {
  color: var(--secondary-color);
}

/* Mobile navigation toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  border: none;
  background: none;
}
.nav-toggle .hamburger {
  width: 24px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 3px 0;
  transition: transform 0.3s ease;
}

/* Animate hamburger icon when open */
.nav-toggle.open .hamburger:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle.open .hamburger:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open .hamburger:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Hero section */
.hero {
  position: relative;
  height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--light-text);
  background-image: url('assets/hero-bg.png');
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 78, 72, 0.6); /* dark overlay for readability */
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}
.cta-button {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--light-text);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.cta-button:hover {
  background-color: var(--primary-color);
}
.cta-button.alt {
  background-color: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
  margin-right: 1rem;
}
.cta-button.alt:hover {
  background-color: var(--secondary-color);
  color: var(--light-text);
}

/* Sections */
.section {
  padding: 4rem 0;
}
.section h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  text-align: center;
}
.about-section p {
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.about-section .note {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-style: italic;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.service-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}
.service-card h3 {
  font-family: var(--font-serif);
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}
.service-card p {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Involvement */
.involvement-section p {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2rem auto;
}
.involvement-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Contact */
.contact-section p {
  text-align: center;
  margin-bottom: 2rem;
}
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
}
.form-group label {
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-family: var(--font-sans);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(12, 131, 125, 0.2);
}
.direct-contact {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.direct-contact a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
}
.direct-contact a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background-color: #ffffff;
  border-top: 1px solid #e5e5e5;
  padding: 1rem 0;
  text-align: center;
}
.footer p {
  font-size: 0.9rem;
  color: var(--primary-color);
}

/* Responsive design */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    flex-direction: column;
    display: none;
    border-bottom: 1px solid #e5e5e5;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links li {
    margin: 0.5rem 0;
    text-align: center;
  }
}