:root {
  --light-blue: #c4e5fa; /* Darker light blue */
  --white: #ffffff;
  --orange: #ffa962;
  --text-color: #1a1a1a;
  --border-style: 2px solid var(--orange);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

body {
  background-color: var(--light-blue);
  color: var(--text-color);
  padding: 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Image container */
.top-image {
  text-align: center;
  margin: 2rem 0;
  border: var(--border-style);
  border-radius: 15px;
}

.top-image img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  display: block;
}

/* Hero Section */
.hero {
  background-color: var(--white);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  margin-bottom: 2rem;
  height: 30vh;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center horizontally */
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border: var(--border-style);
}

.hero h1 {
  font-size: 2.5rem; /* 1.75x bigger */
  margin-bottom: 1rem;
}

/* Four Info Boxes */
.four-boxes {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.info-box {
  background-color: var(--white);
  border-radius: 20px;
  padding: 2rem;
  flex: 1;
  text-align: center;
  height: 30vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border: var(--border-style);
}

.info-box h2 {
  margin-bottom: 1rem;
  line-height: 1.3;
}

/* Referral Box */
.referral-box {
  background-color: var(--white);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  height: 30vh;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center horizontally */
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border: var(--border-style);
}

.referral-box h1 {
  font-size: 2.5rem; /* 1.75x bigger */
  margin-bottom: 1rem;
}

.referral-subtitle {
  font-size: 1.75rem; /* slightly smaller than h1 */
  text-align: center;
  white-space: nowrap; /* prevents wrapping */
  margin-bottom: 1.5rem;
}

.button {
  margin-top: auto;
  background-color: var(--orange);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
  width: fit-content;
  min-width: 120px;
}

.button:hover {
  background-color: #e0761e;
}

@media screen and (max-width: 1024px) {
  .hero,
  .referral-box {
    height: auto;
    padding: 2rem 1rem;
  }

  .four-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .info-box {
    flex: 0 1 48%;
    height: auto;
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .button {
    width: 100%;
    max-width: 250px;
    font-size: 1rem;
  }

  .top-image {
    margin: 1.5rem 0;
  }

  body {
    padding: 1rem;
  }
}

@media screen and (max-width: 600px) {
  .four-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the boxes horizontally */
    gap: 1rem; /* Maintain consistent spacing */
  }

  .info-box {
    flex: 0 1 calc(50% - 0.5rem); /* Two boxes per row, accounting for gap */
    padding: 1rem;
    height: auto; /* Allow height to adjust to content */
    min-width: 0; /* Prevent overflow on very small screens */
    box-sizing: border-box; /* Ensure padding is included in width */
  }

  .hero h1 {
    font-size: 1.8rem; /* Adjusted middle ground */
    text-align: center;
    white-space: normal; /* Allow wrapping */
    max-width: 550px; /* Constrain width to encourage wrapping */
    line-height: 1.4; /* Adjust line spacing for readability */
  }

  .hero h1 span::after {
    content: "\A"; /* Insert line break after "Access Your" */
    white-space: pre;
  }

  .button {
    width: 100%;
    max-width: 200px;
    font-size: 0.9rem;
  }

  h2 {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.25rem;
  }
}

@media screen and (max-width: 320px) {
  .four-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the boxes horizontally */
    gap: 0.6rem; /* Slightly smaller gap for tiny screens */
  }

  .info-box {
    flex: 0 1 calc(50% - 0.3rem); /* Two boxes per row, smaller gap */
    padding: 0.8rem;
    height: auto;
    min-width: 0;
    box-sizing: border-box;
  }

  .hero h1 {
    font-size: 1.5rem; /* Adjusted middle ground */
    text-align: center;
    white-space: normal;
    max-width: 300px; /* Tighter width for smaller screens */
    line-height: 1.4;
  }

  .hero h1 span::after {
    content: "\A"; /* Insert line break after "Access Your" */
    white-space: pre;
  }

  .button {
    width: 100%;
    max-width: 180px;
    font-size: 0.8rem;
  }

  h2 {
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.1rem;
  }
}
