:root {
  --primary-green: #10B981;
  --primary-blue: #3B82F6;
  --success-green: #22C55E;
  --text-black: #1F2937;
  --white: #FFFFFF;
  --radius-md: 18px;
}

.inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  transition: box-shadow 0.3s ease;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.site-header.nav-open {
  box-shadow: 0 20px 40px -35px rgba(14, 22, 40, 0.3);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
  color: var(--white);
  border-radius: 0.9rem;
  font-weight: 600;
  transition: transform 0.3s ease;
}

.logo-icon:hover,
.logo-icon:focus-visible {
  transform: scale(1.1);
}

.logo-text {
  font-size: 1.1rem;
  color: var(--text-black);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
  transition: color 0.3s ease, background-color 0.3s ease, transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary-blue);
  transform: translateY(-1px);
}

.nav-cta {
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  background: var(--primary-green);
  color: var(--white);
  box-shadow: 0 12px 30px -18px var(--primary-green);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--success-green);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px -20px rgba(16, 185, 129, 0.6);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-black);
  margin-bottom: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle span:last-child {
  margin-bottom: 0;
}

/* ============================================
   RESPONSIVE DESIGN - HEADER
   ============================================ */

/* Tablet & Mobile */
@media (max-width: 820px) {
  .site-header .inner {
    position: relative;
    padding: 0.875rem 1.25rem;
  }

  .site-nav {
    position: absolute;
    top: 70px;
    right: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.8rem;
    background: rgba(247, 249, 252, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(106, 156, 253, 0.25);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px -30px rgba(14, 22, 40, 0.35);
    transform: scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 999;
  }

  .site-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }

  .site-nav a {
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 1rem;
  }

  .nav-cta {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
    padding: 0.75rem 1.2rem;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
  }

  .logo-icon {
    width: 2.4rem;
    height: 2.4rem;
  }

  .logo-text {
    font-size: 1.05rem;
  }
}

/* Small Mobile */
@media (max-width: 540px) {
  .site-header .inner {
    padding: 0.75rem 1rem;
  }

  .site-nav {
    right: 16px;
    left: 16px;
    width: calc(100% - 32px);
    padding: 1.5rem;
    top: 65px;
  }

  .site-nav a {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }

  .logo-icon {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
  }

  .logo-text {
    font-size: 1rem;
  }

  .menu-toggle {
    padding: 0.4rem;
  }

  .menu-toggle span {
    width: 22px;
  }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
  .site-header .inner {
    padding: 0.625rem 0.875rem;
  }

  .logo-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
  }

  .logo-text {
    font-size: 0.95rem;
  }

  .site-nav {
    padding: 1.25rem;
    right: 12px;
    left: 12px;
    width: calc(100% - 24px);
  }

  .site-nav a {
    padding: 0.75rem 0.875rem;
    font-size: 0.9rem;
  }

  .nav-cta {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .menu-toggle span {
    width: 20px;
    height: 2px;
  }
}

/* Landscape Mode (Mobile) */
@media (max-width: 820px) and (orientation: landscape) {
  .site-nav {
    max-height: calc(100vh - 70px);
    top: 60px;
  }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
  .site-nav a,
  .nav-cta {
    min-height: 44px;
  }

  .menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  /* Remove hover effects on touch */
  .site-nav a:hover {
    background-color: transparent;
    transform: none;
  }

  .site-nav a:active {
    background-color: rgba(59, 130, 246, 0.15);
  }
}

/* Sticky Header Scroll Animation */
@media (max-width: 820px) {
  .site-header {
    transition: all 0.3s ease;
  }

  .site-header.scrolled {
    box-shadow: 0 4px 20px rgba(14, 22, 40, 0.1);
  }
}
