/* ===========================
   RESEARCH – Hero snap + free scroll below
=========================== */

/* Smoothness + no browser bounce */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
  overscroll-behavior-y: none;
}

/* Body doesn't scroll on this page (container will) */
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body.research {
  overflow: hidden;            /* single scroll root = .snap-container */
  overscroll-behavior-y: none;
}

/* SCROLL SNAP CONTAINER (mandatory; JS gate will toggle to none deeper in content) */
body.research .snap-container {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory; /* hero <-> content boundary is crisp */
  overscroll-behavior-y: none;
}

/* ===========================
   HERO - WITH SNAP
=========================== */
.research-hero {
  position: relative;
  height: 100vh;

  background-image: url("assets/humanoid.jpg");
  background-position: center 120px;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll !important;
  background-color: #f9f9f9;

  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 180px;
  text-align: center;

  /* snap target (hard stop) */
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* subtle overlay */
.research-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}
.research-hero > * { position: relative; z-index: 1; }

/* hero logo */
.research-logo {
  position: absolute;
  bottom: 12%;
  left: 10%;
  max-width: 380px;
  width: 22vw;
  height: auto;
  pointer-events: none;
}

/* ===========================
   CONTENT + FOOTER as ONE snap target
=========================== */
.content-wrap {
  min-height: 100vh;
  /* one snap target at the top (hard stop with hero) */
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Inside the wrapper: NO snap targets */
.research-main {
  background: #fff;
  color: #222;
  padding: 0 0 5rem;
  min-height: 100vh;

  scroll-snap-align: none;
  scroll-snap-stop: normal;
}

.footer {
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
}

/* ===========================
   TABS BAR
=========================== */
.research-tabs {
  position: sticky;
  top: 0;
  z-index: 10;

  display: flex;
  justify-content: space-around;
  align-items: center;

  width: 100%;
  padding: 0.9rem 0;

  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

/* Tabs */
.research-tabs .tab {
  appearance: none;
  border: none;
  background: transparent;
  font: 600 17px/1 Arial, sans-serif;
  color: #333;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
  
  flex: 1; /* Each tab takes equal space */
  text-align: center; /* Center the text within each tab */
}
.research-tabs .tab:hover { transform: translateY(-1px); }
.research-tabs .tab.is-active { color: #000; }
.research-tabs .tab.is-active::after {
  content: "";
  position: absolute;
  bottom: 0; 
  left: 50%; /* Start from center */
  transform: translateX(-50%); /* Center it */
  width: 80px; /* Fixed width - adjust as needed */
  height: 3px; 
  border-radius: 3px;
  background: rgba(11,219,230,0.7);
  box-shadow: 0 0 10px rgba(11,219,230,0.45);
}

/* ===========================
   PANELS
=========================== */
.panel {
  display: none;
  max-width: 950px;
  margin: 0 auto;
  padding: 3rem 2rem;
  animation: fadeIn .35s ease;
  scroll-margin-top: 80px; /* spacing from sticky tabs */
}
.panel.is-visible { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel h2 {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  text-align: center;
  color: #000;
}
.panel p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 720px) {
  .research-tabs { padding: 0.7rem 0; }
  .research-tabs .tab { padding: 0.7rem 1rem; font-size: 16px; }
  .panel { padding: 2rem 1.25rem; }
  .panel h2 { font-size: 1.6rem; }
}
