/* === Fonts === */
@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
}

/* === Reset & Base Styles === */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "DM Sans", system-ui, sans-serif;
  background-color: #fff;
  color: #222;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* === Wrapper / Content === */
#wrapper {
  width: 100%;
  min-height: 100%;
  overflow: visible;
}

#content {
  width: 100%;
  position: relative;
}

/* === General Header === */
.sticky-header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 1000;

  width: 100%;
  /* let it span across the page */
  padding: 10px 0;
  margin: 0;
  /* remove margins here */
  display: flex;
  justify-content: center;
  /* centers the inner container */
}

.header-container {
  width: 100%;
  max-width: 1200px;
  /* same as panels */
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-text {
  font-size: 1.4rem;
  color: #000;
  margin-right: 8px;
}

.logo-img {
  height: 50px;
}

/* === Desktop Nav === */
.nav-links {
  display: flex;
  gap: 15px;
}

.nav-links a {
  text-decoration: none;
  font-weight: bold;
  color: #333;
  padding: 8px 16px;
  border-radius: 20px;
  /* round bubbles */
  background: #f5f5f5;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  background: #460606;
  color: #fff;
}

/* === Mobile Hamburger === */
.hamburger {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

/* === Mobile Menu === */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0;
  background: white;
  align-items: center;
  /* center bubbles */
}

.mobile-menu a {
  font-weight: bold;
  text-decoration: none;
  color: #333;
  padding: 8px 16px;
  border-radius: 20px;
  background: #f5f5f5;
  transition: all 0.3s ease;
  width: auto;
  /* only as wide as content */
  text-align: center;
}

.mobile-menu a:hover {
  background: #460606;
  color: white;
}

.mobile-menu.active {
  display: flex;
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* hide desktop nav */
  }

  .hamburger {
    display: block;
    /* show hamburger */
  }
}

/* === Video Panel === */
.video-panel {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 12px;
  background: none;
  aspect-ratio: 16 / 9;
  min-height: 300px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.video-panel video.background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5) blur(10px);
  z-index: 1;
}

/* Header text overlay */
.header-text-wrapper {
  width: 90%;
  max-width: 1100px;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
  padding: clamp(1rem, 3vw, 2rem);
  box-sizing: border-box;
  max-height: 80%;
  overflow: visible;
}

.header-text {
  font-size: clamp(2.2rem, 7vh, 3.1rem);
  font-weight: 900;
  color: white;
  line-height: 1.2;
  word-break: break-word;
  max-width: 100%;
  margin-bottom: 2px;
  z-index: 3;
}

.header-text h1 {
  margin: 0;
  /* remove all default top/bottom margin */
}

.header-link {
  font-size: clamp(1rem, 2vw, 2rem);
  color: white;
  text-decoration: none;
  margin-top: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.header-link .arrow {
  display: inline-block;
  will-change: transform;
  margin-right: 10px;
}


/* Optional media queries to further control font sizes on tablets */
@media (max-width: 1024px) {
  .video-panel {
    aspect-ratio: 16 / 9;

    /* responsive height */
  }

  .header-text {
    font-size: clamp(1.8rem, 4vw, 3rem);
    /* bigger than previous min */
  }

  .header-link {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
  }
}



/* Mobile */
@media (max-width: 768px) {
  .header-text-wrapper {
    width: 90%;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding-left: 0;
    padding-top: 6vh
  }

  .header-text h1 {
    font-size: clamp(1.5rem, 6vw, 3rem);
    margin-left: 0;
  }

  .header-link {
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    margin-top: 4px;
  }
}


@media (max-width: 576px) {
  .video-panel {
    aspect-ratio: 16 / 9;
    width: 95%;
  }

  .header-text-wrapper {
    width: 95%;
    align-items: center;
    /* center horizontally */
    text-align: left;
  }

  .header-text h1 {
    font-size: clamp(1.1rem, 8vw, 1.8rem);
  }

  .header-link {
    font-size: clamp(0.7rem, 2vw, 1rem);
    margin-top: 2px;
  }
}


/* === Sections & Content === */
.section-box {
  width: 90%;
  max-width: 1200px;
  margin: 3vh auto;
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  --color1: #27303b;
  --color2: #3a2327;
  background: linear-gradient(135deg, var(--color1), var(--color2));
  color: white;
}

/* === Tablets === */
@media (max-width: 1024px) {
  .section-box {
    width: 95%;
    /* more space for smaller screens */
    padding: 35px 25px;
  }
}

/* === Large Phones === */
@media (max-width: 768px) {
  .section-box {
    width: 95%;
    padding: 30px 20px;
  }
}

/* === Small Phones === */
@media (max-width: 480px) {
  .section-box {
    width: 95%;
    /* auto left/right to center */
    padding: 20px 15px;
  }
}

.section-box:first-of-type {
  margin-top: 10px;
}


body.solutions .section-box:first-of-type {
  margin-top: 80px;
}


.content-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

p {
  font-size: 1.4rem;
  line-height: 1.8;
  margin-bottom: 35px;
}



/* === Contact Section === */
#contact {
  width: 100%;
  background-color: #fff;
  margin: 8rem auto;
  /* vertical spacing */
  padding: 4rem 1.5rem;
}

.contact-header {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.contact-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 1rem;
}

.contact-header p {
  font-size: 1.125rem;
  color: #4b5563;
}

.contact-form {
  max-width: 800px;
  margin: 0 auto;
  background-color: #fff;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .contact-form {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  box-shadow: 0 0 0 2px #6366f1;
  border-color: #6366f1;
}

.form-submit {
  grid-column: 1 / -1;
  text-align: right;
}

.form-submit button {
  background-color: #4f46e5;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-submit button:hover {
  background-color: #4338ca;
}

/* === Footer === */
#footer {
  background-color: #1a1a1a;
  color: #fff;
  padding: 40px 20px;
  font-family: sans-serif;
}

.footer-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
  gap: 40px;
}

.footer-wrapper h4 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #fff;
}

.footer-wrapper p,
.footer-wrapper li {
  margin: 5px 0;
  color: #fff;
}

.footer-wrapper a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-wrapper a:hover {
  color: #1da1f2;
}

.footer-sections ul,
.footer-social ul {
  list-style: none;
  padding: 0;
}

.footer-sections li,
.footer-social li {
  margin-bottom: 8px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background-color: transparent;
  padding: 0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #1da1f2;
}

.footer-icon {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer-legal a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: #1da1f2;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9rem;
  opacity: 0.7;
  color: #fff;
}



/* === Section === */

.section {
  width: 95%;
  max-width: 1200px;
  margin: 150px auto; /* increased top/bottom spacing for desktop */
  padding: 1rem;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  background: linear-gradient(135deg, #1f2a38, #3b1a1f);
  color: white;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .section {
    margin: 30px auto; /* smaller spacing for mobile */
  }
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 10px;
  text-align: left;
}

.section-grid {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  margin-top: 0.5rem;
  width: 100%;
  border-radius: 12px;
}

.section-panel {
  position: relative;
  display: flex;
  cursor: pointer;
  overflow: hidden;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  padding: 1rem;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.3s ease;
  background-color: rgba(255, 255, 255, 0.1);

}

.section-panel img {
  width: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.5s ease;
}

@media (max-width: 1024px) {
  .section-grid {
    flex-direction: column;
  }
}


/* === Intro Section === */
.intro-section {
  background: transparent;
  box-shadow: none;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 2vh 5vw;
  /* responsive horizontal padding */
}

.intro-wrapper {
  width: clamp(90%, 800px, 100%);
  text-align: center;
}

/* Base text styling */
.intro-text {
  font-size: clamp(1rem, 4vw, 2.5rem);
  /* scales fluidly across devices */
  font-weight: 300;
  line-height: 1.2;
  color: #351813ff;
  margin: 0 auto;
}

/* === Benefits Section === */

.section-panel.benefits-panel img {
  height: 300px;
  object-fit: cover;
  border-radius: inherit;
}

#benefits .section-panel:hover img {
  filter: brightness(0.9);
}

.benefit-panel-content {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  color: white;
  padding: 2rem;
}

.benefit-panel-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.benefit-panel-text {
  font-size: 0.875rem;
  opacity: 0.5;
  max-height: 0;
  overflow: hidden;
  padding-right: 4px;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}




/* === About Section === */

.section-panel.about-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* keep image at top */
  align-items: center;
  /* center everything horizontally */
  text-align: center;

}

#about .about-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#about .about-intro {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertical centering */
}

#about .section-title,
#about .section-subtitle {
  display: block;
  text-align: left;
  margin-left: 10px; /* optional: same left margin for both */
}

#about .section-subtitle {
  font-size: 1rem;
  margin-top: 0.5rem;
  line-height: 1.5;
  color: #ddd;
}

/* On larger screens: title+text left, panels right */
@media (min-width: 992px) {
  #about .about-layout {
    flex-direction: row;
    align-items: stretch; /* make both columns the same height */
  }

  #about .about-intro {
    flex: 1;
    max-width: 35%;
  }

  #about .section-grid {
    flex: 2;
    display: flex;
    gap: 2rem;
  }
}


.about-image {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  /* makes image take remaining space */
  width: 80%;
  max-height: 500px;
  max-width: 300px;
  object-fit: cover;
}

.about-info {
  display: flex;
  flex-direction: column;
  /* keep name above position */
  justify-content: center;
  /* vertical centering (if needed) */
  align-items: center;
  /* horizontal centering */
  padding: 15px;
  text-align: center;
}

.about-info h3 {
  margin: 10px 0 5px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
}

.about-info p {
  margin: 0;
  font-size: 0.95rem;
  color: #bbbbbb;
}




/* === Service Section === */

#services .section-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 992px) {
  #services .section-grid {
    grid-template-columns: 1fr;
  }
}

.services-panel {
  display: flex;
  flex-direction: column;
  background-color: rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  border-radius: 12px;
  padding: 1rem;
  align-items: flex-start;
}

.services-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.services-panel img {
  width: 100%;
  aspect-ratio: 5 / 3;
  /* less tall than square, flexible */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.services-panel h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: #ffffff;
  margin: 0.5rem 0 1rem;
  text-align: left;
}

.services-header {
  display: flex;
  justify-content: space-between; /* pushes h3 left, button right */
  align-items: center;
  width: 100%;
  margin: 0.5rem 0 1rem; /* same spacing as your h3 had */
}

.services-header h3 {
  margin: 0; /* remove extra spacing */
}

.learn-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.learn-more:hover {
  background-color: rgba(255, 255, 255, 0.3);
}


/* === Global Reset / Touch Highlights === */
* {
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0) !important;
  -webkit-focus-ring-color: rgba(255, 255, 255, 0) !important;
  outline: none !important;
}

/* === Global reset for tap & focus === */
* {
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0) !important;
  -webkit-focus-ring-color: rgba(255, 255, 255, 0) !important;
  outline: none !important;
}

/* === Body wrapper === */
body.globe-body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: transparent;
  padding: 1rem;
  box-sizing: border-box;
  height: auto;
}

/* === Globe section wrapper === */
.globe-section {
  width: 95%;
  max-width: 1200px;
  margin: 80px auto 0;
  margin-bottom: 4rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.globe-section h2 {
  margin-bottom: 0.5rem;
}

.globe-intro {
  font-size: 1rem;
  margin: 0 0 1rem 0;
  text-align: justify;
  line-height: 1.6;
  max-width: 800px;
}

/* === Main container: globe + panel === */
.globe-container {
  display: flex;
  gap: 2rem;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* === Globe side === */
#globeContainer,
.globe-wrapper {
  flex: 1 1 60%;
  min-width: 300px;
  max-height: 700px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
}

#globeViz,
.globe-wrapper iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

#globeViz {
    position: relative;
    z-index: 1; /* below the label */
}

.globe-container {
    position: relative; /* make this the reference for absolute positioning */
}

.globe-label {
    position: absolute;
    top: 50%;               /* vertical center */
    left: 50%;              /* horizontal center */
    transform: translate(-50%, -50%); /* center the label exactly */
    background-color: rgba(255, 255, 255, 0.85);
    color: #000;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    pointer-events: none;
    z-index: 9999;          /* ensure it’s on top of the globe */
    text-align: center;
    white-space: nowrap;    /* keep label on one line */
}

/* === Reference panel === */
#refList {
  flex: 0 0 300px;
  max-width: 35%;
  max-height: 700px;
  overflow-y: auto;
  background: linear-gradient(135deg, #1f2a38, #3b1a1f); /* panel gradient */
  color: white;
  border-radius: 12px;
  padding: 1rem;
  box-sizing: border-box;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  line-height: 1.4;
}

/* Transparent background for text */
#refList .text-bg {
  background-color: rgba(255, 255, 255, 0.2); /* semi-transparent white */
  border-radius: 8px;
  padding: 0.75rem;
}

#refList h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

#refList .ref-entry {
  background-color: rgba(255, 255, 255, 0.2); /* semi-transparent white */
  border-radius: 8px;                           /* rounded corners */
  padding: 0.75rem;                             /* inner spacing */
  margin-bottom: 0.75rem;                       /* space between entries */
}

.ref-entry a {
  color: #7ecbff;
  text-decoration: underline;
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.ref-entry .authors {
  font-size: 0.875rem;
  color: #dcdcdc;
  margin-bottom: 0.125rem;
}

.ref-entry .journal {
  font-size: 0.875rem;
  color: #aab3bc;
}

#refList a:hover {
  color: #a6ddff;
}

/* Scrollbar styling */
#refList::-webkit-scrollbar {
  width: 3px;
}

#refList::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

#refList::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

/* === Responsive === */
@media (max-width: 900px) {
  .globe-container {
    flex-direction: column-reverse;
  }

  #globeContainer,
  #refList,
  #leftPanel {
    flex: 1 1 100%;
    max-width: 100%;
  }

  #refList {
    max-height: 400px;
    margin-top: 1rem;
  }
}

@media (max-width: 768px) {
  .globe-intro {
    text-align: center;
    margin: 0 auto 1rem auto;
    max-width: 90%;
  }

  .globe-container {
    width: 100%;
    /* full width */
    margin: 40px auto;
    /* valid value */
    flex-direction: column-reverse;
    gap: 1rem;
    min-height: 100px;
  }

  #globeContainer {
    order: 0;
    width: 100%;
    height: auto;
    min-height: 250px;
  }

  #leftPanel {
    order: 1;
    width: 100%;
    max-height: none;
    overflow: visible;
  }
}

/* Add this to your CSS file */

.globe-label {
  position: absolute;
  top: 55%;
  left: 60%;
  transform: translate(-50%, -50%);
  padding: 0.6rem 1rem;
  background: #f9f9f9;
  color: #635a5a;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  white-space: nowrap;
  pointer-events: none;

  /* Floating balloon animation */
  animation: floaty 4s ease-in-out infinite;
}

@keyframes floaty {
  0%   { transform: translate(-50%, -50%) translateY(0px); }
  50%  { transform: translate(-50%, -50%) translateY(-8px); }
  100% { transform: translate(-50%, -50%) translateY(0px); }
}