:root {
  --green: rgb(79 166 49);
  --bg-light: #f9f9f9;
  --bg-dark: #202124;
  --text-light: #222;
  --text-dark: #e8e8e8;
  --card-light: #fff;
  --card-dark: #282b2e;
  --border-light: #ddd;
  --border-dark: #4d4d4d;
  --dur: 0.35s;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  transition: background-color var(--dur) ease, color var(--dur) ease,
    border-color var(--dur) ease;
}
html {
  scroll-behavior: smooth;
  scrollbar-color: var(--green) var(--bg-light);
  scrollbar-width: thin;
}
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: inherit;
}
::-webkit-scrollbar-thumb {
  background: var(--green);
  border-radius: 5px;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-light);
  color: var(--text-light);
}
body.dark-mode {
  background: var(--bg-dark);
  color: var(--text-dark);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Top Banner */
.top-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  gap: 2.5rem;
  align-items: center;
  justify-content: flex-end;
  padding: 0.6rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
}
body.dark-mode .top-banner {
  background: var(--bg-dark);
  border-color: var(--border-dark);
}

/* Dark/Light Toggle */
.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
}
.theme-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.toggle-track {
  position: absolute;
  inset: 0;
  background: #c6c6c6;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  font-size: 14px;
  color: #fff;
  transition: background-color var(--dur) ease;
}
.toggle-track .sun {
  opacity: 1;
}
.toggle-track .moon {
  opacity: 0.4;
}
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}
.theme-toggle input:checked + .toggle-track {
  background-color: var(--green);
}
.theme-toggle input:checked + .toggle-track .sun {
  opacity: 0.4;
}
.theme-toggle input:checked + .toggle-track .moon {
  opacity: 1;
}
.theme-toggle input:checked ~ .toggle-thumb {
  transform: translateX(30px);
}

/* Language Selector */
.lang-select {
  position: relative;
}
.lang-trigger {
  --flag: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem;
  font: inherit;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--card-light);
  color: inherit;
  cursor: pointer;
  min-width: 150px;
  transition: box-shadow var(--dur) ease;
}
.lang-trigger::before {
  content: "";
  width: 20px;
  height: 20px;
  background: var(--flag) no-repeat center/cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.lang-trigger .lang-chevron {
  margin-left: auto;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}
.lang-select.open .lang-trigger .lang-chevron {
  transform: rotate(180deg);
}
.lang-trigger:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.lang-select.open .lang-trigger {
  box-shadow: 0 0 0 2px rgba(79, 166, 49, 0.25);
}
body.dark-mode .lang-trigger {
  background: var(--card-dark);
  border-color: var(--border-dark);
  color: var(--text-dark);
}
.lang-options {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.3rem 0;
  min-width: 170px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1200;
}
body.dark-mode .lang-options {
  background: var(--card-dark);
  border-color: var(--border-dark);
}
.lang-select.open .lang-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.lang-option::before {
  content: "";
  width: 20px;
  height: 20px;
  background: var(--flag) no-repeat center/cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.lang-option:hover {
  background: rgba(79, 166, 49, 0.12);
}
.lang-option[aria-selected="true"] {
  background: rgba(79, 166, 49, 0.18);
  color: var(--green);
}
body.dark-mode .lang-option:hover {
  background: rgba(79, 166, 49, 0.25);
}

/* Header */
.header-wrapper {
  background: #e0e0e0;
}
header {
  background: #fff;
  text-align: center;
  padding: 2rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}
body.dark-mode .header-wrapper {
  background: var(--bg-dark);
}
body.dark-mode header {
  background: var(--card-dark);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
.slogan {
  margin-top: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #666;
}
body.dark-mode .slogan {
  color: #aaa;
}
.divider {
  width: 60px;
  height: 4px;
  background: var(--green);
  border: none;
  margin: 2rem auto 1rem;
}

/* Hero Banner */
.hero-banner {
  width: 100%;
  background: var(--card-light);
}
body.dark-mode .hero-banner {
  background: var(--card-dark);
}
.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--card-light);
}
body.dark-mode main {
  background: var(--card-dark);
}

main h1 {
  font-size: clamp(2.4rem, 4vw + 1.2rem, 3.2rem);
  margin-bottom: 1.2rem;
  max-width: min(55ch, 90%);
  font-weight: 600;
  color: var(--green);
  hyphens: auto;
  text-wrap: balance;
}
main h1#heroTitle {
  font-family: "Impact", sans-serif;
  letter-spacing: 0.02em;
}
main h1 br {
  display: block;
  margin-bottom: 0.2rem;
}
main p {
  max-width: 640px;
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}
.highlight {
  color: var(--green);
  font-weight: 600;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  font-size: 1rem;
  color: #fff;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 999px;
  text-decoration: none;
  transition: background-color var(--dur) ease, color var(--dur) ease;
}
.cta-button:hover {
  background-color: rgb(65 145 40);
}
.cta-button.small {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
}
.cta-button.secondary {
  background: transparent;
  color: var(--green);
}
.cta-button.secondary:hover {
  color: #fff;
  background: var(--green);
}
body.dark-mode .cta-button.secondary {
  color: var(--green);
}
.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}

/* Section Titles in Green */
section h2 {
  position: relative;
  margin-bottom: 0.5rem;
  color: var(--green);
  font-weight: 700;
}
section h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background: var(--green);
  margin: 0.5rem auto 1.5rem;
}

/* Impact font + larger size for consulting title */
h2.impact-title {
  font-family: "Impact", sans-serif;
  letter-spacing: 0.02em;
  font-size: 2.5rem; /* increased size */
}

/* Team member names in green */
.team-member h3 {
  color: var(--green);
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  line-height: 1.25;
}
.team-member h3 span {
  display: block;
}
.team-member h3 .last-name {
  font-weight: 700;
}

/* Sections */
section {
  padding: 3.5rem 1.5rem;
  background: var(--card-light);
  text-align: center;
}
body.dark-mode section {
  background: var(--card-dark);
}
section p {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

/* Consulting Section */
.consulting {
  background: #f5f5f5;
  border: 1px solid var(--border-light);
}
body.dark-mode .consulting {
  background: var(--card-dark);
  border-color: var(--border-dark);
}
.consulting ul,
.expertise-list,
.industry-benefits {
  list-style: none;
  max-width: 640px;
  margin: 1rem auto;
  padding: 0;
  text-align: left;
}
.consulting li,
.expertise-list li,
.industry-benefits li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.5rem;
}
.consulting li::before,
.expertise-list li::before,
.industry-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}
body.dark-mode .cta-button.secondary:hover {
  color: #fff;
}
.service-list strong {
  font-weight: 700;
}
.service-list span {
  font-weight: 400;
}
.consulting-note {
  max-width: 720px;
  margin: 1.5rem auto;
  font-size: 1.05rem;
}
.industry-benefits {
  margin-top: 1.5rem;
}
.contact-section {
  background: #eaf4e5;
  color: #11220d;
}
body.dark-mode .contact-section {
  background: var(--card-dark);
  color: inherit;
}
.contact-section a:not(.cta-button) {
  color: var(--green);
}
body.dark-mode .contact-section a:not(.cta-button) {
  color: var(--green);
}
.contact-section .cta-button {
  margin-top: 1rem;
  color: #fff;
}
.contact-section .cta-button:hover {
  color: #fff;
}

/* Team Grid */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}
.team-member {
  flex: 1;
  max-width: 260px;
  background: var(--card-light);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform var(--dur) ease, box-shadow var(--dur) ease;
}
body.dark-mode .team-member {
  background: var(--card-dark);
}
.team-member:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}
@media (hover: hover) {
  .team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  }
}
.team-member img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.team-member p {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1rem;
}
body.dark-mode .team-member p {
  color: #aaa;
}
.team-member .cta-button {
  margin-top: auto;
}
.team-scroll-btn {
  display: none;
}

/* Footer */
footer {
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  background: var(--card-light);
  color: #777;
  border-top: 1px solid#eee;
}
body.dark-mode footer {
  background: var(--card-dark);
  color: #999;
  border-color: var(--border-dark);
}
footer a {
  color: var(--green);
  text-decoration: none;
  margin: 0 0.5rem;
}
footer a:hover {
  text-decoration: underline;
}

/* Legal Modal */
#legalPopup {
  display: none;
  position: fixed;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  max-height: 85vh;
  overflow: auto;
  background: var(--card-light);
  color: inherit;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.5rem;
  z-index: 2000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
body.dark-mode #legalPopup {
  background: var(--card-dark);
  border-color: var(--border-dark);
}
#legalPopup .close-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
}

.header-wrapper img {
  width: min(80vw, 480px);
  height: auto;
}

@media (max-width: 768px) {
  .team-carousel {
    position: relative;
  }
  .team-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1.25rem;
    padding: 0 var(--carousel-pad, 0) 1rem;
    justify-content: flex-start;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: var(--carousel-pad, 0);
    scroll-padding-right: var(--carousel-pad, 0);
  }
  .team-member {
    width: clamp(240px, 70vw, 280px);
    flex: 0 0 auto;
    scroll-snap-align: center;
  }
  main h1 {
    font-size: 2.2rem;
  }
  section h2 {
    font-size: 1.6rem;
  }
  .top-banner {
    gap: 1.5rem;
  }
  .hero-banner img {
    max-width: 100%;
  }
  .header-wrapper img {
    width: min(70vw, 360px);
  }
  .team-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    cursor: pointer;
    transition: background 0.2s ease;
  }
  .team-scroll-btn:hover,
  .team-scroll-btn:focus {
    background: rgba(0, 0, 0, 0.6);
  }
  .team-scroll-btn[disabled] {
    opacity: 0.3;
    cursor: default;
  }
  .team-scroll-btn.prev {
    left: 0.25rem;
  }
  .team-scroll-btn.next {
    right: 0.25rem;
  }
}
