/* Import fonts */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap");

html {
  scroll-behavior: smooth;
} 

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

body {
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(to top left, #d3d3d3 2%, #314b12 95%);
}

/* Header and Navbar */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  background: rgba(49, 75, 18, 0.7);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px;
}

.navbar .logo a {
  font-size: 1.8rem;
  text-decoration: none;
  color: #fff;
}

.navbar .links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 35px;
}

.navbar .links a {
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  padding: 10px 0;
  transition: 0.2s ease;
}

.navbar .links a:hover {
  color: #47b2e4;
}

.navbar .buttons a {
  text-decoration: none;
  color: black;
  font-size: 1rem;
  padding: 15px 20px;
  transition: 0.2s ease;
}

.navbar .buttons a:not(:last-child) {
  margin-right: 20px;
}

.navbar .buttons .signin:hover {
  color: #47b2e4;
}

.navbar .buttons .signup {
  border: 1px solid #fff;
  border-radius: 0.375rem;
  text-align: center;
}

.navbar .buttons .signup:hover {
  background-color: #47b2e4;
  color: #fff;
}

/* Hero Section */
.hero-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 60vh;
  min-height: fit-content;
  padding: 120px 15px 0 100px;
  margin: 0 auto;
  width: 100%;
}

.mid-section {
  display: flex;
  flex-direction: row;
  justify-content: center; /* Centers the content horizontally */
  align-items: center; /* Centers the content vertically */
  height: 60vh;
  min-height: fit-content;
  width: 100%;
  text-align: center; /* Centers the text */
}

.right-section {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Aligns content to the right */
  align-items: flex-end; /* Centers the content vertically */
  height: 60vh;
  min-height: fit-content;
  width: 100%;
  padding: 120px 120px 0 15px;
  text-align: center;
}

.title {
font-size: 5rem;
padding-bottom: 20px;
}

.hero, .form, .info {
  width: 100%;
  color: black;
  max-width: 600px;
}

.hero, .form {
  text-align: justify;
}

.form {
  text-align-last: right;
}

.info {
  text-align:center;
}

.hero h2, .form h2, .info h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #c9c7c7;
}

.form p, .info p {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: black;
}

.hero a, .form a, .info a {
  font-size: 1.5rem;
  margin-bottom: 20px;
  display: inline-block;
  color: black;
  text-decoration: none;
  transition: 0.2s ease;
}

.hero a:hover, .form a:hover {
  color: #fff;
}

/* Hero Images */
.hero-section .img img {
  width: 517px;
}

/* Buttons inside Hero */
.buttons {
  margin-top: 40px;
  text-align: center;
}

.buttons a {
  text-decoration: none;
  color: black;
  padding: 12px 24px;
  border-radius: 0.375rem;
  font-weight: 600;
  transition: 0.2s ease;
  display: inline-block;
}

.hero .buttons a {
  color: #fff;
}

.buttons a:not(:last-child) {
  margin-right: 15px;
}

.buttons .join {
  background-color: #47b2e4;
}

.buttons .learn {
  border: 1px solid #fff;
}

.hero .buttons a:hover {
  color: black;
}

.form .buttons a:hover {
  background-color: #47b2e4;
}

/* Card Section which should fill the width of the page */
.card-container {
  display: flex;
  justify-content: space-between; /* Adjust spacing between cards */
  flex-wrap: wrap; /* Prevent stacking unless necessary (e.g., on smaller screens) */
  gap: 20px;
  margin-top: 40px; /* Space between hero and cards */
  margin-bottom: 40px; /* Space between cards and footer */
  width: 90%; /* Limit the container width */
  padding: 0 15px; /* Add padding for better spacing */
}

/* Ensure each card takes up one-third of the container */
.card {
  flex: 1 1 calc(33.33% - 20px); /* Responsive width with gap adjustment */
  max-width: 33.33%; /* Optional: Limit the maximum width */
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background: none;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

/* Image which should fill the top half of the card */
.card img {
  width: 95%;
  height: auto;
  object-fit: contain;
}

.card-text {
  padding: 0 20px 50px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card-text h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  color: #fff;
}

.card-text p {
  color: #c9c7c7;
  font-size: 1rem;
}

.email-logo svg {
  transition: stroke 0.3s ease;
}

.email-logo:hover svg {
  stroke: rgba(49, 75, 18, 1);
}

/* Hamburger menu styles for mobile */
#menu-toggle {
  display: none;
}

#hamburger-btn {
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
  display: none;
  order: 1;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  /* Navbar adjustments */
  .navbar .logo a {
    font-size: 1.5rem;
  }

  .links {
    position: fixed;
    left: -100%;
    top: 75px;
    width: 100%;
    height: 100vh;
    padding-top: 50px;
    background: #175d69;
    flex-direction: column;
    transition: 0.3s ease;
  }

  .navbar #menu-toggle:checked ~ .links {
    left: 0;
  }

  .navbar #hamburger-btn {
    display: block;
  }

  .header .buttons {
    display: none;
  }

  /* Hero Section adjustments */
  .hero-section {
    padding: 100px 20px 0 20px;
    align-items: center;
    text-align: center;
  }

  .title {
    font-size: 3rem;
  }

  .hero, .form, .info {
    max-width: 100%;
    text-align: center;
  }

  .hero p, .form p, .info p {
    font-size: 1rem;
  }

  .hero a, .form a, .info a {
    font-size: 1.2rem;
  }

  .hero-section .img {
    display: none; /* Hides large images that break layout */
  }

  .mid-section,
  .right-section {
    flex-direction: column;
    padding: 20px;
    align-items: center;
    text-align: center;
    height: auto;
  }

  /* Card layout for phones */
  .card-container {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 0 15px;
    width: 100%;
    margin-top: 60px;
    margin-bottom: 60px;
  }

  .card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .card img,
  .card svg {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
  }

  /* Buttons adjustments */
  .buttons {
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
  }

  .buttons a {
    margin: 10px 0;
    width: 80%;
    text-align: center;
  }

  /* SVG logo fix */
  .email-logo svg {
    width: 50px;
    height: auto;
  }
}

