/*
  This stylesheet defines the modern look and feel for the Greengates Bio
  website.  A cohesive colour palette, responsive grid layouts and subtle
  animations create a professional yet approachable aesthetic.  CSS custom
  properties are used throughout to make it easy to tweak colours and fonts.
*/

:root {
  --color-primary: #0E4B81;
  --color-secondary: #297d61;
  --color-accent: #F7FAFB;
  --color-muted: #f9fefe;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Open Sans', sans-serif;
}

/* Global reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.6;
  color: #333;
  background-color: #ffffff;
  scroll-behavior: smooth;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  margin-top: 0;
  color: var(--color-primary);
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Utility classes */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 4rem 1rem;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.section-subtitle {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2rem auto;
  color: #555;
  font-weight: 400;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background-color: #083028;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #1a5e4a;
}

/* Header */
.site-header {
  background: var(--color-accent);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 700;
}

.brand-logo {
  height: 100px;
  width: auto;
}

.main-nav {
  position: relative;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger to X animation */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  padding-left: 0;
  margin: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}

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

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

/* Hero section */
.hero-section {
  position: relative;
  background-image: url('images/hero_background.png');
  background-size: cover;
  background-position: center;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
}

.hero-overlay {
  background: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  border-radius: 8px;
  backdrop-filter: blur(3px);
  max-width: 700px;
}

.hero-overlay h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.hero-overlay p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: #f3f3f3;
}

/* Value section */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.value-card {
  background: var(--color-accent);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.value-card .card-icon {
  font-size: 2rem;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

.value-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: var(--color-primary);
}

.value-card p {
  margin-bottom: 0.75rem;
  color: #555;
  font-size: 0.95rem;
}

.metric {
  display: block;
  font-weight: 600;
  color: var(--color-secondary);
  font-size: 0.9rem;
}

/* Risk section */
.risk-section {
  background-color: var(--color-muted);
}

.risk-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}

.risk-item {
  flex: 1 1 30%;
  min-width: 250px;
  background: var(--color-accent);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.risk-item:hover {
  transform: translateY(-5px);
}

.item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.item-header i {
  font-size: 1.5rem;
  color: var(--color-secondary);
}

.risk-item h3 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--color-primary);
}

.risk-item p {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

/* Quadrant diagram */
.diagram-wrapper {
  position: relative;
  margin-top: 3rem;
  text-align: center;
}

.diagram-bg {
  width: 100%;
  max-width: 500px;
  opacity: 0.1;
  border-radius: 8px;
}

.bcsc-diagram {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0.5rem;
  width: 60%;
  max-width: 300px;
  text-align: center;
}

.bcsc-diagram .quadrant {
  /* Use the accent colour to provide subtle contrast against the muted background */
  background: var(--color-accent);
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  padding: 0.5rem;
}

.bcsc-diagram .quadrant span {
  display: block;
  font-weight: 600;
  color: var(--color-primary);
}

.bcsc-diagram .quadrant small {
  font-size: 0.7rem;
  color: #555;
  line-height: 1.2;
}

/* Challenges grid */
.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.challenge {
  background: var(--color-accent);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.challenge h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.challenge i {
  color: var(--color-secondary);
  font-size: 1.25rem;
}

.challenge p {
  color: #555;
  margin: 0;
  font-size: 0.95rem;
}

/* Opportunities section */
.opportunities-section {
  background-color: var(--color-accent);
}

.triangle-wrapper {
  position: relative;
  width: 200px;
  margin: 0 auto;
  margin-bottom: 3rem;
}

.triangle-diagram {
  width: 100%;
  height: auto;
}

.triangle-label {
  position: absolute;
  font-weight: 500;
  color: var(--color-primary);
  font-size: 0.9rem;
  white-space: nowrap;
}

.triangle-label.top {
  top: -1.5em;
  left: 50%;
  transform: translateX(-50%);
}

.triangle-label.left {
  left: -3.2em;
  bottom: -1.2em; 
}

.triangle-label.right {
  right: -3.2em;
  bottom: -1.2em; 
}

.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.opportunity {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  min-height: 220px;
}

.opportunity-number {
  position: absolute;
  top: -20px;
  left: -20px;
  background: var(--color-secondary);
  color: #ffffff;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  font-size: 1rem;
}

.opportunity h3 {
  margin-top: 0;
  color: var(--color-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.opportunity i {
  color: var(--color-secondary);
  font-size: 1.25rem;
}

.opportunity p {
  margin-top: 0.5rem;
  color: #555;
  font-size: 0.95rem;
}

/* Services section */
.services-section {
  background-color: var(--color-muted);
}

.capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.capability {
  background: var(--color-accent);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card .card-icon {
  font-size: 2rem;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

.service-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: var(--color-primary);
}

.service-card p {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

/* Assessment section */
.assessment-section {
  background-image: url('images/pattern_background.png');
  background-size: cover;
  background-position: center;
  color: var(--color-primary);
  position: relative;
  overflow: hidden;
}

.assessment-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Lighten the patterned background behind the assessment section */
.assessment-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(2px);
  z-index: 0;
}

/* .assessment-content {
  flex: 1 1 350px;
  background: rgba(255, 255, 255, 0.85);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
} */

.assessment-content {
  flex: 1 1 350px;
  background: rgba(255, 255, 255, 0.85);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.assessment-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.assessment-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.assessment-list i {
  color: var(--color-secondary);
}

.assessment-card {
  flex: 1 1 250px;
  display: flex;
  justify-content: center;
}

.contact-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.avatar {
  background: var(--color-accent);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
  color: var(--color-secondary);
}

.contact-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--color-primary);
}

.contact-card p {
  margin: 0.25rem 0;
  color: #555;
  font-size: 0.9rem;
}

.contact-card a {
  color: var(--color-secondary);
  text-decoration: none;
}

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

/* Contact section */
.contact-section {
  background: var(--color-muted);
}

.contact-form {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-group {
  flex: 1 1 250px;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.form-group label span {
  color: #d9534f;
  margin-left: 2px;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(38, 115, 94, 0.2);
}

.form-group .error-message {
  color: #d9534f;
  font-size: 0.8rem;
  min-height: 1rem;
}

.form-feedback {
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background: var(--color-accent);
  color: var(--color-primary);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* Animations */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Navigation responsive behaviour */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-accent);
    width: 200px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links li {
    margin-bottom: 0.5rem;
  }
  .hero-section {
    height: 60vh;
  }
}

/* Team page styles */
.team-intro {
  background: var(--color-accent);
  padding: 3rem 1rem;
  text-align: center;
}

.team-section {
  padding: 4rem 1rem;
  background: #ffffff;
}

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

.team-card {
  background: var(--color-accent);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  position: relative;
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
}

/* Ensure icons inside team avatars inherit the secondary colour */
.team-avatar i {
  color: var(--color-secondary);
}

/* When using an inline image for the team avatar instead of an icon, constrain its
   size to fit nicely within the circle and preserve aspect ratio. */
.team-avatar img {
  width: 50%;
  height: 50%;
  object-fit: contain;
}

img.profile-photo {
  width: 100px; /* or whatever size you're using */
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 auto; /* centers image in card */
}

.team-card h3 {
  margin-bottom: 0.25rem;
  color: var(--color-primary);
  text-align: center;
  font-size: 1.2rem;
}

.team-card .role {
  font-size: 0.9rem;
  color: var(--color-secondary);
  text-align: center;
  margin-bottom: 0.75rem;
}

.team-card .short-bio {
  color: #555;
  flex-grow: 1;
  text-align: center;
  font-size: 0.95rem;
}

.team-card button.read-more {
  background: none;
  border: none;
  color: var(--color-secondary);
  font-weight: 600;
  cursor: pointer;
  margin: 0.5rem auto;
  font-size: 0.9rem;
}

.team-card button.read-more:hover {
  text-decoration: underline;
}

.team-card .full-bio {
  display: none;
  margin-top: 0.75rem;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: left;
}

.team-card .full-bio.show {
  display: block;
}

html {
  scroll-behavior: smooth;      /* optional, makes it smooth when clicking links */
  scroll-padding-top: 80px;     /* adjust to your actual header height */
}