* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  line-height: 1.6;
  background: linear-gradient(to right, #003fff, #020f4d);
  padding-top: 5em; /* space for the fixed header; small enough for desktop, adjustable */
}

header {
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #f8f9fa;
  padding: 1em 0;
  text-align: center;
  border-bottom: 1px solid #1a1f49;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.1);
  padding-left: 0.1em;
  padding-right: 0.1em;
  width: 100%;
  backdrop-filter: blur(10px);
}

header h1 {
  margin: 0;
  color: #f5f4f4;
  font-size: 2.5em;
  font-weight: bold;
  cursor: pointer;
}

header nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2em;
  margin: 0;
  padding: 0;
}

header nav ul li {
  margin: 0;
  transition: transform 0.3s;
}

header nav ul li:hover {
  transform: translateY(-5px);
}

header nav ul li:hover a {
  color: aqua;
}

#title a {
  text-decoration: none;
  color: black;
}

header nav ul li a {
  text-decoration: none;
  color: black;
  font-weight: bold;
  transition: color 0.3s;
}

#bt {
  background-color: #ff00d4;
  padding: 0.5em 1em;
  border-radius: 2em;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 2em;
  min-height: 80vh;
}

main #one {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 80%;
  gap: 2em;
  flex-wrap: wrap;
}

main #one div h2 {
  font-size: 2.5em;
  margin-bottom: 0.5em;
  line-height: 1.2;
  font-weight: bold;
}

main #one div p {
  font-size: 1.2em;
  margin-bottom: 1em;
}

main #one div img {
  max-width: 100%;
  height: auto;
  border-radius: 1em;
  transition: transform 0.3s;
}

main #one div img:hover {
  transform: scale(1.05);
}

button {
  background-color: #ff00d4;
  padding: 0.5em 1em;
  border-radius: 2em;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
  font-size: 2em;
  transition: background-color 0.5s, transform 0.5s;
}

button:hover {
  background-color: #e600c2;
  transform: translateY(-5px);
  color: black;
}

button:active {
  transform: translateY(0);
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 0, 212, 0.5);
}

#two {
  padding: 2em;
  display: flex;
  flex-wrap: wrap; /* allow items to wrap to new lines on small screens */
  justify-content: center;
  align-items: flex-start;
  font-size: 0.9em;
  width: 100%;
  gap: 1em;
  color: white;
}

#two div {
  padding: 0.6em; /* small inner padding so content doesn't touch edges */
  flex: 0 1 12.5%; /* try to show ~8 items per row on very wide screens if space allows */
  min-width: 120px; /* prevent items from becoming too narrow */
  box-sizing: border-box;
  transition: transform 0.3s;
}

#two div:hover {
  transform: scale(1.08);
}

#two div h1 {
  font-size: 1.5em;
  margin-bottom: 0.5em;
  font-weight: bold;
}

#two div p {
  display: flex;
  align-items: end;
  padding-bottom: 0;
}

#three {
  margin-top: 3em;
  border-bottom: 1px solid #1a1f49;
  border-top: 1px solid #1a1f49;
  background-color: #ffffff;
  width: 100%;
  height: 30em;
  padding: 2em;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 2em;
  text-align: center;
  color: #020f4d;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  height: auto;
}

#three h1 {
  font-size: 2.5em;
  margin-bottom: 0.5em;
  font-weight: bold;
}

#three h3 {
  font-size: 1.5em;
  margin-bottom: 0.5em;
  font-weight: bold;
}

#three p {
  font-size: 1em;
  margin-bottom: 1em;
  max-width: 1000px;
}

#four {
  background-color: #ffffffee;
  color: #020f4d;
  padding: 2em;
  text-align: center;
  /* margin-bottom: 2em; */
}

#cards {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2em;
  flex-wrap: wrap;
  margin-top: 2em;
  margin-bottom: 3em;
}

.card {
  background-color: #ffffffee;
  border: 1px solid #ddd;
  border-radius: 0.5em;
  padding: 1em;
  /* margin: 1em; */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  transition: transform 0.3s, box-shadow 0.3s;
  width: 30%;
  display: flex;
  text-align: center;
  justify-content: center;
  flex-direction: column;
  vertical-align: top;
  align-items: center;
  gap: 1em;
  min-width: 250px;
  max-width: 300px;
  height: auto;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card h1 {
  color: aqua;
  font-size: 4em;
  margin-bottom: 0.5em;
  font-weight: bold;
}

.card p {
  font-size: 1em;
  line-height: 1.4;
  max-width: 100%;
}

#five {
  padding: 2em;
  text-align: center;
}

#five h1 {
  color: white;
  text-align: center;
  padding: 2em;
}

#five .card {
  height: 20em;
  background-color: white;
}

#five .card h3 {
  color: aqua;
}

#five .card h2,
#five .card p {
  color: #020f4d;
}

.dotted-line {
  border: none;
  border-top: 2px dotted #bbb;
  margin: 2em 0;
  width: 100%;
  margin-right: auto;
}

#siex {
  background-color: white;
  color: #020f4d;
  padding: 2em 10em;
}

#siex h1 {
  font-size: 2.5em;
  margin-bottom: 0.5em;
  font-weight: bold;
  margin-bottom: 2em;
  text-align: center;
}

#siex p {
  font-size: 1em;
  margin-bottom: 1em;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

#sevin {
  color: white;
  padding: 2em 10em;
  text-align: center;
  margin-bottom: 2em;
}

#sevin h1 {
  font-size: 2.5em;
  margin-bottom: 0.5em;
  font-weight: bold;
}

#sevin h3 {
  font-size: 1.5em;
  margin-bottom: 0.5em;
  font-weight: bold;
  margin-bottom: 2em;
}

#sevin button {
  font-size: 1.5em;
  padding: 0.5em 2em;
}

#foot {
  background-color: white;
  color: #020f4d;
  text-align: center;
  padding: 2em 10em;
  margin-top: 2em;
}

#foot #foot1 {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  margin-bottom: 5em;
  flex-wrap: wrap;
}

#foot #foot2 {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 4em;
  font-size: 0.8em;
  flex-wrap: wrap;
  margin-bottom: 1em;
  text-align: center;
  padding: 0 1em;
}

#foot #foot2 .a {
  text-align: left;
}

.a h2 {
  margin-bottom: 0.5em;
  font-weight: bold;
}

.a h3 {
  margin-bottom: 0.5em;
  font-weight: bold;
  color: #003fff;
}

#foot1 h1 {
  font-size: 3em;
  /* color: #003fff; */
  font-weight: bold;
}

#icon {
  display: flex;
  gap: 1em;
  color: #003fff;
}

#foot p {
  font-size: 1em;
  margin-bottom: 0.5em;
  color: #555;
  text-align: center;
  padding: 0 1em;
  line-height: 1.4;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Ensure content doesn't get hidden behind the fixed header */
body {
  padding-top: 5em; /* space for the fixed header; small enough for desktop, adjustable */
}

@media (max-width: 768px) {
  /* header adjustments */
  header {
    padding: 0.6em 0.6em;
  }
  header h1 {
    font-size: 1.6em;
  }
  header nav ul {
    flex-direction: row; /* keep links in a single row but allow wrap */
    gap: 0.6em;
    font-size: 0.95em;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
  #bt {
    padding: 0.4em 0.8em;
    font-size: 0.9em;
  }

  /* main layout: stack hero content */
  main {
    padding: 1.5em;
  }
  main #one {
    flex-direction: column;
    width: 95%;
    gap: 1em;
    align-items: center;
  }
  main #one div h2 {
    font-size: 1.6em;
    text-align: center;
  }

  main #one div img {
    max-width: 90%;
    margin: 0 auto;
  }

  /* smaller buttons on phones */
  button {
    font-size: 1em;
    padding: 0.6em 1em;
  }

  /* make the small stat blocks readable */
  #two {
    padding: 1em;
    font-size: 0.9em;
    gap: 0.8em;
  }
  #two div {
    width: 48%;
  }

  /* cards should be full-width on small screens */
  .card {
    width: 100%;
    max-width: 700px;
    min-width: auto;
  }

  #cards {
    flex-direction: column;
    gap: 1em;
  }

  /* reduce large horizontal paddings used on wide screens */
  #siex,
  #sevin,
  #foot {
    padding: 2em 1.5em;
  }

  /* center long paragraphs and avoid fixed heights */
  #three {
    padding: 1.5em;
    height: auto;
  }

  img {
    max-width: 100%;
    height: auto;
  }
}

/* Very small phones: further reduce text and spacing */
@media (max-width: 420px) {
  header h1 {
    font-size: 1.2em;
  }
  header nav ul {
    gap: 0.4em;
    font-size: 0.85em;
  }
  #two div {
    width: 100%;
  }
  main #one div h2 {
    font-size: 1.3em;
  }
  body {
    padding-top: 4.5em;
  }
}

/* Floating back-to-top button */
#backToTop {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 2000;
}
#backToTop.visible {
  opacity: 1;
  transform: translateY(0);
}
#backToTop:focus {
  outline: 2px solid #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

@media (max-width: 420px) {
  #backToTop {
    right: 0.6rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
}
