/* Reset and Base Styles */
:root {
  --primary: #2a5298;
  --secondary: #f0f6ff;
  --accent: #ffa500;
  --text: #333333;
  --text-light: #666666;
  --background: #ffffff;
  --card-bg: #f8fafc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.my-4 {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.mt-8 {
  margin-top: 4rem;
}

.mb-8 {
  margin-bottom: 4rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(42, 82, 152, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 82, 152, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

/* Header Styles */
header {
  padding: 1.5rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 1rem 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--primary);
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  padding: 10rem 0 5rem;
  background: linear-gradient(135deg, var(--secondary) 0%, #ffffff 100%);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,82,152,0.1) 0%, rgba(42,82,152,0) 70%);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -5%;
  left: -5%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,165,0,0.1) 0%, rgba(255,165,0,0) 70%);
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.hero-text {
  flex: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-image img {
  width: 90%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transform: perspective(1000px) rotateY(-5deg);
  transition: all 0.5s ease;
}

.hero-image img:hover {
  transform: perspective(1000px) rotateY(0);
}

/* Resource Finder Dropdown - Clean implementation */
.resource-finder {
  max-width: 500px;
  margin: 0 auto 3rem;
  position: relative;
  z-index: 100;
}

.dropdown-container {
  position: relative;
}

.resource-finder label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 2px solid var(--secondary);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  color: var(--text);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.resource-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--secondary);
  border-radius: 8px;
  margin-top: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none; /* Hidden by default */
}

.resource-item {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.resource-item:hover {
  background-color: var(--secondary);
  color: var(--primary);
}

/* Animation for highlighting selected card */
.feature-card.highlight {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(42, 82, 152, 0.15);
  border: 2px solid var(--primary);
  transition: all 0.3s ease;
}

/* Features Section */
.features {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  justify-items: center; /* Center cards in their grid area */
}

.feature-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;        /* Take full width of grid area */
  max-width: 400px;   /* Set maximum width */
  height: fit-content; /* Adjust height based on content */
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-description {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.feature-link {
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  margin-top: auto;
}

.feature-link::after {
  content: '→';
  margin-left: 0.5rem;
  transition: all 0.3s ease;
}

.feature-link:hover::after {
  transform: translateX(5px);
}

/* Resources Section */
.resources {
  padding: 5rem 0;
  background: var(--secondary);
}

/* CTA Section */
.cta {
  padding: 5rem 0;
  text-align: center;
}

.cta-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.cta-subtitle {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Footer Section */
footer {
  background: var(--primary);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-column h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: white;
  transform: translateX(5px);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: white;
  color: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-link {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.footer-bottom-link:hover {
  color: white;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .hero-title {
      font-size: 2.8rem;
  }

  .hero-content {
      flex-direction: column;
  }

  .hero-image {
      order: -1;
  }

  .resources-image {
      order: -1;
  }
}

@media (max-width: 768px) {
  .hero-title {
      font-size: 2.5rem;
  }

  .nav-menu {
      position: fixed;
      left: -100%;
      top: 5rem;
      flex-direction: column;
      background: white;
      width: 100%;
      text-align: center;
      transition: 0.3s;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
      padding: 2rem 0;
      gap: 1.5rem;
  }

  .nav-menu.active {
      left: 0;
  }

  .email-form {
      flex-direction: column;
  }
}

@media (max-width: 576px) {
  .hero-title {
      font-size: 2rem;
  }

  .section-title {
      font-size: 1.8rem;
  }

  .hero-actions {
      flex-direction: column;
  }

  .hero {
      padding: 8rem 0 3rem;
  }
}