/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Typography */
body {
  font-family: "Open Sans", sans-serif;
  color: #333;
  line-height: 1.6;
}

h1,
h2,
h3,
h4 {
  font-family: "Montserrat", sans-serif;
  color: #003087;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: linear-gradient(to right, #003087, #005566);
  color: white;
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: "Lora", serif;
  font-weight: 500;
  font-size: 1.2rem;
  color: white;
  letter-spacing: 0.5px;
  text-transform: none;
  line-height: 1.2;
}

.logo span {
  display: block; /* Stack lines */
}

@media (max-width: 768px) {
  .logo {
    font-size: 1.2rem; /* Smaller on mobile */
  }
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

nav a:hover {
  color: #00c4b4;
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: url("./img/hero-2.jpg") center/cover no-repeat;
  position: relative;
  color: white;
  text-align: center;
  padding: 150px 20px;
  top: 77px; /* Align flush with header */
  margin-bottom: 3rem;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Overlay for contrast */
  z-index: 1;
}

.hero h1,
.hero p,
.hero .btn {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Sections */
section {
  padding: 50px 20px;
  text-align: center;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

section p,
section ul,
section ol {
  max-width: 800px;
  margin: 0 auto;
}

/* Custom Lists */
section ul,
section ol {
  text-align: left;
  margin: 20px auto;
  list-style: none;
}

section ul li {
  position: relative;
  padding-left: 30px;
  margin: 15px 0;
  border-left: 3px solid #00c4b4;
  transition: transform 0.3s;
}

section ul li:hover {
  transform: translateX(5px);
}

section ol li {
  position: relative;
  padding-left: 40px;
  margin: 15px 0;
  border-left: 3px solid #00c4b4;
  transition: transform 0.3s;
}

section ol li::before {
  content: counter(list-counter);
  position: absolute;
  left: 0;
  width: 24px;
  height: 24px;
  background: #003087;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-weight: bold;
}

section ol li:hover {
  transform: translateX(5px);
}

section ol {
  counter-reset: list-counter;
}

section ol li {
  counter-increment: list-counter;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
  justify-items: center; /* Center single cards in row */
}

.card {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  max-width: 300px; /* Ensure consistent card width */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: #00c4b4;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn:hover {
  background: #009688;
}

/* Footer */
footer {
  background: #003087;
  color: white;
  padding: 40px 20px;
  text-align: center;
}

footer a {
  color: #00c4b4;
  text-decoration: none;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    background: #003087;
    position: absolute;
    top: 77px;
    left: 0;
    width: 100%;
    padding: 0;
  }

  nav ul.active {
    display: flex;
  }

  nav ul li {
    padding: 10px 20px;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    top: 60px; /* Consistent with desktop */
  }

  .hero h1 {
    font-size: 2rem;
  }

  .card-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
  }

  .card {
    max-width: 100%;
  }
}
