* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

/* ✅ Single source of truth for header height */
:root {
  --header-height: 100px;
}
@media (max-width: 1024px) {
  :root { --header-height: 80px; }
}
@media (max-width: 768px) {
  :root { --header-height: 70px; }
}
@media (max-width: 480px) {
  :root { --header-height: 60px; }
}

html {
  scroll-padding-top: calc(var(--header-height) + 10px);
  /* scroll-behavior: smooth; ← removed (causes sluggish scroll on Android) */
  animation: transitionIn 0.9s;
  overflow-x: clip;
}

body {
  margin: 0;
  padding-top: var(--header-height); /* ✅ auto adjusts with header */
  overflow-x: clip;
  overflow-y: auto;
  /* overscroll-behavior-y: none; ← removed (was causing hard scroll on Android) */
  -webkit-overflow-scrolling: touch;
}

.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.rest_head {
  text-align: center;
  color: #183B4E;
  font-size: 2.8rem;
  margin: 10px;
  font-family: "Montserrat", sans-serif;
  margin-bottom: 0.5rem;
}

.logo img {
  max-height: 100px;
  max-width: 250px;
  object-fit: contain;
  background-color: transparent;
  display: block;
  height: auto;
  width: auto;
}

header {
  top: calc(-1 * var(--header-height)); /* ✅ slideDown starts from correct position */
  width: 100%;
  height: var(--header-height); /* ✅ uses variable */
  min-height: unset; /* ✅ removed conflicting min-height */
  max-height: unset; /* ✅ removed conflicting max-height */
  background-color: #183B4E;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 999;
  animation: slideDown 0.7s ease-out forwards;
  position: fixed;
}

/* ✅ Strip always sticks right below header */
.color-strip {
  display: flex;
  height: 5px;
  width: 100%;
  position: fixed;
  top: var(--header-height); /* ✅ uses variable */
  z-index: 800;
  background: linear-gradient(to right, #E52020, #FBA518, #7E1891, #A6F1E0);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar a,
.dropbtn {
  color: #adb5bd;
  text-decoration: none;
  font-size: 1rem;
  background: none;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  transition: 0.3s;
  border-radius: 4px;
}

.navbar a:hover,
.dropbtn:hover {
  color: white;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.dropdown-label:hover {
  color: white;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.dropdown {
  display: inline-block;
  color: #adb5bd;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  color: #adb5bd;
  min-width: 180px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  z-index: 1;
  border-radius: 6px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  transform: translateX(0px);
}

.dropdown-content a:hover {
  transform: translateX(10px);
  transition: transform 0.3s ease-in-out;
  color: #183B4E;
}

.dropdown.open .dropdown-content {
  max-height: 500px;
  opacity: 1;
}

.dropdown-content.show {
  max-height: 500px;
  opacity: 1;
}

.dropdown-content a {
  color: grey;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.arrow {
  display: inline-block;
  margin-left: 5px;
  transition: transform 0.3s ease;
  font-size: 20px;
}

.dropdown:hover .arrow {
  transform: rotate(180deg);
}

a.active,
.dropdown-label.active {
  text-decoration: underline;
  color: white;
  text-underline-offset: 5px;
}

.hamburger {
  display: none;
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #adb5bd;
  margin-left: auto;
  margin-top: 5px;
}

/* Tablets */
@media (max-width: 1024px) {
  header {
    padding: 0 20px;
  }
  .logo img {
    max-height: 60px;
    max-width: 160px;
  }
  .hamburger {
    font-size: 1rem;
  }
}

/* Phones */
@media (max-width: 768px) {
  header {
    padding: 0 15px;
  }
  .logo img {
    max-height: 50px;
    max-width: 140px;
  }
  .hamburger {
    font-size: 0.5rem;
  }
}

/* Very small phones */
@media (max-width: 480px) {
  header {
    padding: 0 10px;
  }
  .logo img {
    max-height: 40px;
    max-width: 120px;
  }
  .hamburger {
    font-size: 0.2rem;
  }
}

/* Mobile navbar */
@media (max-width: 1229px) {
  .hamburger {
    display: block;
    position: fixed;
    top: 0.7rem;
    right: 1rem;
    z-index: 1001;
    font-size: 1rem;
    background: none;
    border: none;
    color: #adb5bd;
    padding: 0.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
  }

  .hamburger:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
  }

  .navbar {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(100%);
    opacity: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding-top: 4rem; /* ✅ pushes links below hamburger icon */
    background-color: #183B4E;
    transition: transform 0.4s ease-in-out, opacity 0.3s ease-in-out;
    z-index: 1000;
    pointer-events: none;
    overflow-y: auto; /* ✅ scrollable if many links */
  }

  .navbar.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .navbar a,
  .dropdown-label {
    display: block;
    padding: 0.6rem 0;
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: #adb5bd;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: background 0.4s ease, color 0.4s ease;
  }

  .navbar a:hover,
  .dropdown-label:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }

  .dropdown {
    width: 100%;
    color: #adb5bd;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .dropdown-label {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
  }

  .dropdown-label:hover,
  .dropdown-label:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }

  .dropdown-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: #f6f8fa;
    border-top: 1px solid #ccc;
    padding: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-in-out, padding 0.4s ease-in-out;
    z-index: 1002;
    position: relative;
  }

  .dropdown.open .dropdown-content {
    max-height: 500px;
    padding: 1rem 0;
  }

  .dropdown-content a {
    padding: 0.75rem 0;
    font-size: 1rem;
    color: grey;
    background-color: transparent;
    text-align: center;
    width: 100%;
    transition: background 0.3s ease;
  }

  .dropdown-content a:hover {
    background-color: #e0e0e0;
    color: #183b4e;
  }
}

/* Footer strip */
.color-strip_footer {
  display: flex;
  height: 10px;
  width: 100%;
  background: linear-gradient(to right, #E52020, #FBA518, #7E1891, #A6F1E0);
  margin-top: 20px;
}

/* Strip below every heading */
.color-strip1 {
  display: flex;
  height: 3px;
  width: 180px;
  margin: 0 auto;
  margin-top: 15px;
  position: relative;
  background: linear-gradient(to right, #E52020, #FBA518, #7E1891, #A6F1E0);
  border-radius: 10px;
}

.footer-container {
  line-height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  height: auto;
}

.footer-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0.8;
  margin: 0;
  padding: 0;
  margin-bottom: 0;
}

.footer-cr {
  text-align: center;
  background-color: #183b4e;
  color: #adb5bd;
  padding: 0;
  margin: 0;
  height: 15px;
  font-size: 10px;
}

@media (max-width: 768px) {
  .footer-cr {
    font-size: 0.55rem;
  }
}

/* All Animations */
@keyframes transitionIn {
  from {
    opacity: 0;
    transform: rotateX(-10deg);
  }
  to {
    opacity: 1;
    transform: rotateX(0);
  }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes appear {
  from {
    opacity: 0;
    scale: 1;
  }
}

.founder-card {
  animation: appear linear;
  animation-timeline: view();
}

/* On scroll animation */
.hidden {
  opacity: 0;
  transition: 2s;
}

.show {
  opacity: 1;
}

@media (max-width: 768px) {
  .hidden {
    opacity: 1;
  }
}

/* Slide down animation for navbar */
@keyframes slideDown {
  from { opacity: 0; }
  to {
    opacity: 1;
    top: 0;
  }
}

/* Strip animation */
@keyframes scroll-watcher {
  to { scale: 1 1; }
}

/* All image animation */
@keyframes fade-in {
  from { scale: .8; opacity: 0; }
  to { scale: 1; opacity: 1; }
}
