/* CSS Variables & Design System */
:root {
  --color-primary: #0056b3;
  /* Deep Blue */
  --color-primary-dark: #004494;
  --color-accent: #ff9800;
  /* Vibrant Orange */
  --color-accent-hover: #f57c00;
  --color-text-main: #1a1a1a;
  --color-text-muted: #666666;
  --color-bg-light: #f8f9fa;
  --color-white: #ffffff;
  --color-border: #e0e0e0;

  /* Header Placeholder needs to be sticky */
  --header-height: 70px;
  /* Estimate if needed, but not using this variable yet */


  --font-family: 'Inter', system-ui, -apple-system, sans-serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;

  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius-md: 8px;
  --radius-full: 9999px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--color-text-main);
  line-height: 1.5;
  background-color: var(--color-bg-light);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  /* Slightly rounded as per design */
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
}

.btn-outline {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-outline-white {
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn-outline-white:hover {
  background-color: var(--color-white);
  color: var(--color-primary);
}

/* Header */
#header-placeholder {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header {
  background: var(--color-white);
  padding: var(--spacing-xs) 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  /* sticky moved to placeholder */
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

.logo span {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
}

.nav-links a {
  color: var(--color-text-muted);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.auth-buttons {
  display: flex;
  gap: var(--spacing-sm);
  height: 40px;
  align-items: center;
  /* Ensure vertical alignment */
}

/* Search Bar Styles */
.search-container {
  /* display: none; Removed for animation */
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 1s ease;

  /* Flex item properties when hidden */
  flex: 0 0 0;

  max-width: 0;
  margin: 0;
  /* Remove margin when hidden to avoid spacing issues */
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 0.5rem 1rem;
  padding-right: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 1rem;
  white-space: nowrap;
  /* Prevent placeholder wrap during anim */
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.search-close {
  position: absolute;
  right: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--color-text-muted);
}

.search-close:hover {
  color: var(--color-primary);
}

/* Search Trigger Button - Square Box */
/* Reuse btn-outline styles basically but force square */
.search-trigger {
  width: 42px;
  /* Match height of Join Now roughly */
  height: 42px;
  border: 2px solid var(--color-primary);
  /* Same as outline btn */
  border-radius: 4px;
  /* Same border radius */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: transparent;
  transition: all 0.2s;
  padding: 0;
  /* Override default padding */
}

.search-trigger:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* Nav Animation */
nav {
  transition: all 1s ease;
  overflow: hidden;
  /* default to hidden for animation */
  max-width: 1000px;
  opacity: 1;
}

nav.nav-visible {
  overflow: visible;
  /* allow dropdowns to show when static */
}

.nav-links {
  min-width: max-content;
  /* Ensure content doesn't break during squish */
}


/* Active Search State */
.header.search-active nav {
  /* Hide nav */
  max-width: 0;
  opacity: 0;
  margin: 0;
}

.header.search-active .search-container {
  /* Show search */
  width: auto;
  /* Allow growth */
  flex: 1;
  /* Take available space */
  max-width: 600px;
  opacity: 1;
  margin: 0 var(--spacing-md);
}

.header.search-active .search-trigger {
  /* Hide trigger smoothly or just display none since it's removed from flow */
  display: none;
}

/* Hero Section */
.hero {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-lg) 0;
  text-align: center;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: var(--spacing-sm);
  font-size: 3rem;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: var(--spacing-md);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
}

/* Features Section */
.features {
  padding: var(--spacing-lg) 0;
}

.features-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.feature-card {
  background: var(--color-white);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card h3 {
  color: var(--color-text-main);
  margin-bottom: var(--spacing-sm);
}

.feature-card p {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
}

.link-arrow {
  color: var(--color-accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.link-arrow:hover {
  gap: 8px;
  /* subtle animation */
}

/* Footer */
/* Footer */
.footer {
  background: var(--color-white);
  padding: var(--spacing-lg) 0 var(--spacing-md);
  color: var(--color-text-main);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-text-main);
  display: inline-block;
  margin-bottom: var(--spacing-xs);
}

.footer-logo span {
  color: var(--color-text-muted);
  /* or Accent if prefered */
}

.tagline {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-md);
}

.footer-col h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-main);
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--color-primary);
}

/* Subscribe Form */
.subscribe-area {
  margin-top: var(--spacing-md);
}

.subscribe-form {
  display: flex;
  gap: var(--spacing-xs);
  max-width: 400px;
}

.subscribe-form input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  /* match btn radius */
  font-family: inherit;
}

.subscribe-form input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Footer Bottom */
.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid #f0f0f0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  font-size: 1.25rem;
}

.social-links a {
  color: var(--color-text-muted);
}

.social-links a:hover {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* simple mobile hide for now, typically hamburger needed */
  }

  .hero h1 {
    font-size: 2rem;
  }
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-white);
  min-width: 200px;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-xs) 0;
  z-index: 200;
  flex-direction: column;
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  display: block;
  padding: 0.8rem var(--spacing-sm);
  color: var(--color-text-main);
  font-size: 0.95rem;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
}

.dropdown:hover .dropdown-menu {
  display: flex;
}

/* Nested Dropdown (Submenu) */
.dropdown-menu .dropdown-submenu {
  position: relative;
  width: max-content;
}

.submenu {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  margin-top: -5px;
  background-color: var(--color-white);
  min-width: 200px;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-xs) 0;
  z-index: 200;
  flex-direction: column;
}

.submenu li {
  width: 100%;
}

.submenu a {
  display: block;
  padding: 0.8rem var(--spacing-sm);
  color: var(--color-text-main);
  font-size: 0.95rem;
  white-space: nowrap;
}

.submenu a:hover {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
}

.dropdown-submenu:hover .submenu {
  display: flex;
}