/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Geologica', sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background-color: #05152e;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 2rem;
  background-color: rgba(220, 230, 255, 0.9); /* Much lighter blue/off-white */
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 100px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: #03264b; /* darker blue for contrast */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

nav a:hover {
  color: #249bc6;
}

/* Hero section stays full width */
.hero {
  position: relative;
  width: 100vw;         /* full viewport width */
  height: 75vh;         /* reduced height */
  margin: 0;            /* eliminate spacing */
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* Ensure hero spans full screen width and is not constrained by section margins */
.hero {
  width: 100vw;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* General layout for all sections except hero */
section {
  padding: 5rem 2rem;
}

section:not(.hero) {
  max-width: 1100px;
  margin: 0 auto;
}

#bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* this ensures full fill */
  z-index: -2;
  background-color: #05152e;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(5, 21, 46, 0.5), rgba(5, 21, 46, 0.85));
}

.hero-content {
  z-index: 10;
  color: #ffffff;
  width: 100%;
  padding: 2rem;
}


.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.hero-content h2 {
  color: #ffffff;
}

.hero-content p {
  font-size: 1.3rem;
  color: #ffffff;
}

/* Section Styling */
/* Fine-tuned spacing for first section under hero */
section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

#about {
  margin-top: -2rem;
  padding-top: 4rem; /* pull up slightly closer to hero only */
}

#about p {
  font-size: 1.2rem;
  line-height: 1.8;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #249bc6;
  text-align: center;
}

ul {
  list-style-type: disc;
  padding-left: 2rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea {
  padding: 0.75rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
}

button {
  padding: 0.75rem;
  border: none;
  background-color: #249bc6;
  color: white;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #013d71;
}

/* Footer fix — restore banner look, center content */
footer {
  background-color: rgba(220, 230, 255, 0.9);
  backdrop-filter: blur(6px);
  padding: 1.5rem;
  text-align: center;
  color: #03264b;
  border-top: 1px solid #ccc;
}


footer .attribution {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #555;
}

.social a {
  margin: 0 1rem;
  color: #03264b; /* match footer */
  text-decoration: none;
  font-weight: 500;
}

.social a:hover {
  color: #249bc6;
}

/* Animations */
.fade-in {
  animation: fadeInUp 1s ease-in both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Services Grid Layout */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-column: 1 / -1;
  margin-bottom: 1rem;
  gap: 2rem;
}

.services-grid .tile {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
  text-align: center;
  color: white;                     /* Force white text for headings */
  text-decoration: none; 	    /* Remove underline */
}

.services-grid .tile:hover {
  transform: scale(1.02);
  background-color: rgba(255, 255, 255, 0.1);
}

.services-grid .tile i {
  margin-bottom: 1rem;
  color: #249bc6;
  display: block;
}

.services-grid .tile:visited h3 {
  color: white;                     /* Prevent purple on visited */
}

.services-grid .tile:hover h3 {
  color: #249bc6;                   /* Optional: hover effect */
}

.services-grid .tile h3 {
  margin-top: 0.5rem;
  font-size: 1.3rem;
  color: white;
  transition: color 0.3s ease;
}

.service-icon {
  max-height: 120px;
  max-width: 150px;
  width: auto;
  height: auto;
  margin-bottom: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.services-grid .tile {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.light-mode .services-grid .tile h3 {
  color: #000;
}

/* ==== Services Page Enhancements ==== */

.services-detailed-page {
  max-width: 1500px;
  margin: 6rem auto 2rem;
  padding: 2rem;
}

.page-title {
  font-size: 3rem;
  color: #249bc6;
  text-align: center;
  margin-top: 2rem;     /* ⬅️ Add more space above the title */
  margin-bottom: 2rem; /* Keep or adjust this for space below */
}

.service-box {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 2rem;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  margin-bottom: 0; /* no need for internal margin if wrapper is spacing */
  flex-direction: row;
  flex-wrap: wrap;
}

.service-box:hover {
  transform: translateY(-4px);
  background-color: rgba(255, 255, 255, 0.08);
}

.service-box .service-icon {
  width: 100px;
  height: auto;
  transition: transform 0.6s ease-in-out;
  transform-origin: center;
}

.service-box:hover .service-icon {
  transform: rotate(10deg) scale(1.05);
}

.service-box h2 {
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.service-box p {
  font-size: 1.1rem;
  color: #dddddd;
  line-height: 1.6;
}

.service-icon-container {
  flex: 0 0 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-icon {
  width: 80px;
  height: auto;
  transition: transform 0.6s ease-in-out;
  transform-origin: center;
}

.service-wrapper {
  margin-bottom: 3rem; /* spacing *outside* the box background */
}

.service-box:hover .service-icon {
  transform: scale(1.20) rotateY(360deg);
}

.service-text {
  flex: 1;
  min-width: 250px;
}

.service-text h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.service-text p {
  line-height: 1.7;
  color: #e0e0e0;
}

/* Light mode overrides */
body.light-mode .service-text h2 {
  color: #013d71;
}

body.light-mode .service-text p {
  color: #333333;
}

body.light-mode .page-title {
  color: #013d71;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Value Chain Labels === */
.service-icon-container {
  flex: 0 0 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem; /* Reduce spacing between label and icon */
  margin-top: -0.5rem; /* Adjust to visually lift label if needed */
}

.phase-label {
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
  margin-bottom: 0.2rem;
}

.phase-label.guidance       { background-color: #3498db; }  /* Orange */
.phase-label.design         { background-color: #9b59b6; }  /* Purple */
.phase-label.wetlab         { background-color: #2980b9; }  /* Blue */
.phase-label.analysis       { background-color: #f39c12; }  /* Light Blue */
.phase-label.output         { background-color: #e74c3c; }  /* Red */
.phase-label.deployment          { background-color: #27ae60; }  /* Green */

/* Case Study and Publication Logos */
.publication-list {
  list-style-type: none;
  padding-left: 0;
}

.publication-list li {
  margin-bottom: 1rem;
}

.publication-list a {
  color: #ffffff;
  text-decoration: underline;
}

.publication-list a:hover {
  color: #249bc6;
}


/* Collaborative Partner Logos */
.partners {
  text-align: center;
  padding: 4rem 2rem;
}

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

.partner-logos img {
  max-height: 80px;
  max-width: 160px;
  object-fit: contain;
  background-color: #ffffff;
  padding: 4px;
  border-radius: 6px;
}

/* === Map Styling === */
#leaflet-map {
  height: 500px;
  border-radius: 10px;
  overflow: hidden;
}

/* Keep map centered and prevent unwanted scrollbars */
.leaflet-container {
  width: 100%;
  background: #e2ecf5;
}

#map-section h1 {
  text-align: center;
  color: #249bc6;
  font-size: 2.5rem;
  margin-top: 6rem;
}

#map-section h3 {
  text-align: center;
  color: #cccccc;
  font-weight: 400;
  max-width: 900px;
  margin: 1rem auto 2rem;
}

body.light-mode #map-section h3 {
  color: #333333;
}

/* === Publications Section === */
#publications {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 3rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.publication-list {
  list-style: none;
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
}

.publication-list li {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #249bc6;
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  transition: background 0.3s ease;
}

.publication-list li:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.01);
}

.publication-list a {
  color: #ffffff;
  text-decoration: none;
}

.publication-list a:hover {
  color: #249bc6;
}

body.light-mode .publication-list a {
  color: #013d71;
}

/* Responsive */
@media (max-width: 768px) {
  .logo img {
    height: 70px;
  }

  header {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
  }

  nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    padding-left: 0;
    margin-top: 0.5rem;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  nav ul li {
    margin: 0;
  }

  .hero-content h1 {
    font-size: 2.4rem;
    font-weight: 700;
  }

  .hero-content h2 {
    font-size: 1.4rem;
    font-weight: 400;
  }

  .hero-content p {
    font-size: 1rem;
    padding: 1rem;
  }

  body::before {
    height: 150px; /* keep space under fixed header */
  }

  .contact-page,
  .partners,
  .services-detailed-page,
  #about,
  main,
  section {
    margin-top: 1rem;
  }
}

/* === Contact Form Specific === */
/* Limit form width and align center */
.contact-page {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 2rem;
}

/* Ensure contact intro text is visible and styled */
.contact-intro {
  margin-top: 5rem;       /* Adds space at the top of the page */
  margin-bottom: 2.5rem;  /* Extra space before the form */
  text-align: center;
}

.contact-intro h1 {
  font-size: 2.5rem;
  color: #249bc6;
  margin-bottom: 0.5rem;
}

.contact-intro p {
  font-size: 1.2rem;
  color: #ffffff;
  line-height: 1.6;
}

/* Light mode tweaks for contact */
body.light-mode .contact-intro p {
  color: #000;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin-top: 2rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.85rem;
  font-size: 1rem;
  background-color: #ffffff;
  color: #05152e;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #249bc6;
  box-shadow: 0 0 0 2px rgba(36, 155, 198, 0.2);
}

.contact-form button {
  padding: 0.9rem 1.5rem;
  background-color: #249bc6;
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #013d71;
}

.g-recaptcha {
  margin-top: 1rem;
}

/* === Light Mode Theme === */
body.light-mode {
  background-color: #ffffff;
  color: #000000;
}

body.light-mode header,
body.light-mode footer {
  background-color: #e2ecf5;
  color: #03264b;
}

body.light-mode nav a {
  color: #03264b;
}

body.light-mode .contact-form {
  background-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .contact-form input,
body.light-mode .contact-form textarea {
  background-color: #f7f7f7;
  color: #000;
  border: 1px solid #ccc;
}

body.light-mode button {
  background-color: #013d71;
  color: #fff;
}

#google_translate_element {
  font-size: 14px;
}

#theme-toggle {
  font-size: 16px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
}

body.light-mode #theme-toggle {
  color: #000;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px; /* Adjust based on header height */
}

