/* Header and footer only */
:root {
  --hf-primary: #18b26f;
  --hf-primary-dark: #12965d;
  --hf-text: #1f2937;
  --hf-muted: #6b7280;
  --hf-border: #e5e7eb;
  --hf-surface: #ffffff;
  --hf-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --hf-footer-bg: #0f172a;
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--hf-text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.marquee {
  background: var(--hf-primary);
  color: #fff;
  overflow: hidden;
}

.marquee-content {
  display: flex;
  gap: 48px;
  align-items: center;
  min-height: 40px;
  white-space: nowrap;
  padding: 0 16px;
  animation: hf-marquee 24s linear infinite;
}

.marquee-item {
  font-size: 14px;
  font-weight: 600;
}

@keyframes hf-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 46px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav > a,
.nav-dropdown > a {
  color: var(--hf-text);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
}

.nav > a:hover,
.nav-dropdown > a:hover,
.header-right a:hover {
  color: var(--hf-primary);
}

.nav-dropdown {
  position: relative;
  padding-bottom: 18px;
}

.nav-dropdown::after {
  content: '';
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 18px;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 200px;
  padding: 10px;
  border: 1px solid var(--hf-border);
  border-radius: 16px;
  background: var(--hf-surface);
  box-shadow: var(--hf-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 9999;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown.no-children .dropdown-menu {
  display: none;
}

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--hf-text);
}

.dropdown-menu a:hover {
  background: rgba(24, 178, 111, 0.08);
  color: var(--hf-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 8px;
}

.header-right > a:first-child {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hf-border);
  border-radius: 999px;
  color: var(--hf-text);
  background: #fff;
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-dark:hover {
  background: #000;
  color: #fff;
}

.mobile-menu {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hf-border);
  border-radius: 12px;
  color: var(--hf-text);
}

footer {
  margin-top: 60px;
  padding: 64px 0 24px;
  background: var(--hf-footer-bg);
  color: rgba(255, 255, 255, 0.82);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-col h3 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 18px;
}

.footer-col p {
  margin: 14px 0 0;
  line-height: 1.8;
}

.footer-logo {
  width: 170px;
  height: auto;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li + li {
  margin-top: 10px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.76);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 14px;
}

.fixed-contact {
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 1200;
  display: grid;
  gap: 10px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--hf-text);
  box-shadow: var(--hf-shadow);
  border: 1px solid var(--hf-border);
  font-weight: 600;
}

.contact-btn:hover {
  color: var(--hf-primary);
}

.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--hf-primary);
  color: #fff;
  box-shadow: var(--hf-shadow);
  z-index: 1200;
}

.scroll-top:hover {
  background: var(--hf-primary-dark);
  color: #fff;
}

@media (max-width: 992px) {
  .nav,
  .header-right {
    display: none;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 20px, 1200px);
  }

  .header-inner {
    min-height: 72px;
  }

  .logo img {
    height: 40px;
  }

  .marquee-content {
    gap: 28px;
    min-height: 36px;
  }

  .marquee-item {
    font-size: 13px;
  }

  footer {
    padding-top: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .fixed-contact {
    right: 14px;
    bottom: 82px;
  }

  .scroll-top {
    right: 14px;
    bottom: 14px;
  }
}
