/* css/header.css */

/* --- Top Bar --- */
.top-bar {
  background-color: var(--color-primary);
  color: var(--color-bg-white);
  font-size: 13px;
  font-weight: 400;
  display: flex;
  align-items: center;
  padding-top: 12px !important;
  padding-bottom: 0 !important;
  height: auto !important;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.top-bar .info-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  opacity: 0.9;
}

.top-bar .whatsapp-link a {
  color: var(--color-success);
  margin-left: 8px;
  font-size: 16px;
}

/* --- Main Header --- */
.main-header {
  background-color: var(--color-bg-white);
  height: auto;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: var(--z-index-sticky);
  transition: box-shadow 0.3s ease;
  width: 100%;
  padding: 0;
}

/* Sticky Class controlled by JS */
.header-wrapper {
  position: fixed !important; /* Override inline style="position:relative" on all pages */
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-index-sticky);
  transition: transform 0.35s ease;
}

/* Hide header when scrolling down */
.header-wrapper.header-hidden {
  transform: translateY(-100%);
}

.main-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Logo */
.logo {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-size: 24px;
  line-height: 1;
}

.logo-text .bold {
  font-weight: 800;
  color: var(--color-accent);
}

.logo-text .regular {
  font-weight: 400;
  color: var(--color-primary);
}

.logo-tagline {
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* Navigation */
.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 !important; /* Override inline padding:16px 0 */
  margin: 0 !important;
}

.main-nav > ul > li {
  position: relative;
}

.main-nav > ul > li > a {
  font-weight: 500;
  font-size: 15px;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.main-nav > ul > li > a:hover {
  color: var(--color-accent);
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--color-bg-white);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 16px 0;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.main-nav li.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--color-text-dark);
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s ease;
}

.dropdown-menu li a:hover {
  color: var(--color-accent);
  background-color: var(--color-bg-light);
}

.dropdown-menu li a i {
  color: var(--color-accent);
  font-size: 12px;
}

/* Header CTA */
.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Social icons in header — bigger size */
.social-links-top a {
  font-size: 22px !important;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}
.social-links-top a:hover {
  background: rgba(45, 125, 210, 0.1);
  transform: translateY(-2px);
}

/* Mobile Toggle */
.mobile-menu-toggle {
  display: none;
  font-size: 24px;
  color: var(--color-primary);
  border: none;
  background: transparent;
  cursor: pointer;
}

/* Mobile Sidebar Wrapper (hidden by default) */
.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 100vw);
  height: 100dvh; /* dynamic viewport height — avoids iOS address bar issue */
  height: 100vh; /* fallback */
  background-color: var(--color-bg-white);
  z-index: var(--z-index-sidebar);
  box-shadow: -5px 0 20px rgba(0,0,0,0.1);
  transition: right 0.4s ease;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Sidebar header area */
.mobile-sidebar-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* Sidebar social icons */
.mobile-sidebar-socials {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.mobile-sidebar-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
  text-decoration: none;
  color: white;
}

.mobile-sidebar-socials a:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

/* Nav area scrollable */
.mobile-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px;
  -webkit-overflow-scrolling: touch;
}

.mobile-sidebar.open {
  right: 0;
}

.mobile-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(26,43,74,0.6);
  z-index: var(--z-index-overlay);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.mobile-sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

.close-mobile-menu {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 24px;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-nav {
  margin-top: 0;
}

.mobile-nav ul {
  margin-bottom: 20px;
}

.mobile-nav ul li a {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-primary);
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav ul li:last-child a {
  border-bottom: none;
}

.mobile-nav ul li ul {
  padding-left: 20px;
  padding-top: 8px;
}

.mobile-nav ul li ul li a {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-gray);
  border-bottom: none;
  padding: 8px 0;
}

.mobile-sidebar-cta {
  display: flex;
  width: 100%;
  justify-content: center;
  margin: 20px 0 24px;
}

/* === NEO FIX: header logo layout === */
.logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.logo-tagline {
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.3;
}

/* === NEO FIX: header address hover === */
.header-address a:hover {
  text-decoration: underline;
}

/* === NEO FIX: phone nowrap === */
.whatsapp-link {
  white-space: nowrap;
  flex-shrink: 0;
}

/* === NEO FIX: social icons size === */
.social-links-top a {
  width: 44px;
  height: 44px;
  min-width: 44px;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* === NEO FIX: nav padding reduce === */
.main-nav > ul {
  gap: 8px;
}
.main-nav > ul > li > a {
  padding-left: 12px;
  padding-right: 12px;
  font-size: 14px;
}

/* === NEO FIX: header info icons size === */
.top-bar .info-item i,
.top-bar .whatsapp-link i {
  font-size: 20px;
}
