/* ============================================
   FETALMED — Header CSS
   topbar + site header + mobile nav
   ============================================ */

/* === TOPBAR === */
.topbar {
  background: var(--color-bg);
  border-bottom: 0.5px solid var(--color-border);
  padding: 6px 24px;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.topbar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-light);
  font-weight: 500;
}
.topbar-item svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-social {
  display: flex;
  gap: 12px;
}
.topbar-social a {
  color: var(--color-text-light);
  transition: color .15s;
  display: flex;
}
.topbar-social a:hover { color: var(--color-primary); }
.topbar-social svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.topbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-navy);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s;
  font-family: var(--font-body);
  white-space: nowrap;
}
.topbar-btn:hover { background: var(--color-primary); }
.topbar-btn svg {
  width: 13px;
  height: 13px;
  stroke: var(--color-white);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* === SITE HEADER === */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: var(--space-lg);
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-mid);
  text-decoration: none;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  transition: all .15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link:hover { color: var(--color-primary); background: var(--teal-50); }
.nav-link.active { color: var(--color-primary); }
.nav-link svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.6;
}

.site-header-cta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.btn-agendar {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.btn-agendar:hover { background: var(--teal-600); }

.btn-curso {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-gestantes);
  background: var(--rosa-50);
  border: 1.5px solid var(--rosa-100);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
}
.btn-curso:hover { background: var(--color-gestantes); color: var(--color-white); }

.btn-menu-mobile {
  display: none;
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--color-navy);
}
.btn-menu-mobile svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* === MOBILE NAV === */
.mobile-nav {
  display: none;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) var(--space-lg);
  flex-direction: column;
  gap: 2px;
}

.mobile-nav.open { display: flex; }

.mobile-nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-mid);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: all .15s;
}

.mobile-nav-link:hover { color: var(--color-primary); background: var(--teal-50); }

.mobile-nav-cta {
  margin-top: var(--space-sm);
  padding: 12px;
  background: var(--rosa-50);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gestantes);
  text-decoration: none;
  text-align: center;
  border: 1px solid var(--rosa-100);
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .site-nav { display: none; }
  .btn-menu-mobile { display: block; }
  .btn-curso, .btn-agendar { display: none; }
  .topbar { display: none; }
}

/* === CONTRAST FIXES (WCAG AA) === */
/* topbar-item: text-mid sobre color-bg */
.topbar-item { color: var(--color-text-mid); }

/* === NAV DROPDOWN === */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}
.nav-dropdown-trigger svg {
  width: 11px; height: 11px;
  transition: transform .2s;
}
.nav-dropdown:hover .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 8px;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
/* Bridge to prevent gap hover loss */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-mid);
  text-decoration: none;
  border-radius: 8px;
  transition: all .15s;
  white-space: nowrap;
}
.nav-dropdown-item:hover {
  background: var(--teal-50);
  color: var(--color-primary);
}
.nav-dropdown-item svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
  opacity: .6;
}
.nav-dropdown-item:hover svg {
  opacity: 1;
}
