/* ================= HEADER COMPONENT STYLES ================= */

:root {
  --header-bg: #ffffff;
  --header-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --header-height: 80px;
  --header-z-index: 1000;

  --primary-blue: #1e3a8a;
  --primary-dark-blue: #1e40af;
  --primary-light-blue: #3b82f6;
  --primary-color: var(--primary-blue);
  --primary-hover: var(--primary-dark-blue);
  --whatsapp-color: #25D366;
  --whatsapp-hover: #128C7E;

  --text-color: #1e293b;
  --text-light: #64748b;
  --border-color: #e2e8f0;

  --transition-speed: 0.3s;
  --border-radius: 8px;

  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 20px;
  --spacing-xl: 30px;

  /* Real mobile viewport unit (set by JS) */
  --vh: 1vh;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ================= HEADER BASE ================= */

.site-header {
  background: var(--header-bg);
  box-shadow: var(--header-shadow);
  position: relative;
  z-index: var(--header-z-index);
  transition: all var(--transition-speed) ease;
  width: 100%;
}

.site-header.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* ================= CONTAINER ================= */

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: 1200px;
  margin: auto;
  padding: 0 var(--spacing-lg);
}

/* ================= LOGO ================= */

.logo-img {
  margin-top: 10px;
  height: 60px;
  width: auto;
  transition: transform var(--transition-speed) ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

/* ================= NAVIGATION ================= */

.header-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  margin: 0 var(--spacing-sm);
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-color);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius);
  white-space: normal;
  word-break: break-word;
  transition: all var(--transition-speed);
}

.nav-menu li.active a {
  color: var(--primary-color);
  font-weight: 600;
}

/* ================= CTA BUTTONS ================= */

.header-cta {
  display: flex;
  gap: var(--spacing-sm);
}

.btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: 30px;
  color: white;
  font-weight: 600;
  text-decoration: none;
}

.btn-call { background: var(--primary-color); }
.btn-whatsapp { background: var(--whatsapp-color); }

/* ================= MOBILE TOGGLE ================= */

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: var(--text-color);
  margin: 4px 0;
  transition: all 0.3s ease;
  position: relative;
}

/* Hamburger to Cross Animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(45deg) translate(-10px, -10px);
}

/* ================= MOBILE STYLES ================= */

@media (max-width: 768px) {

  .header-container {
    height: 70px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* 🔥 FIXED MOBILE MENU SYSTEM */
  .header-nav {
    position: fixed;
    top: 70px;
    /* left: 0; */
    right: 0;
    background: var(--header-bg);
    transform: translateY(-130%);
    transition: transform 0.4s ease;
    /* height: calc(var(--vh) * 100 - 70px); */
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999;
            display: flex;
        flex-direction: column;
  }

  .header-nav.active {
    transform: translateY(0);
  }

  .nav-menu {
    flex-direction: column;
  }

  .nav-menu li {
    margin: 0;
    width: 100%;
  }

  .nav-menu a {
    padding: 15px var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
  }

  .header-cta {
    flex-direction: column;
    padding: var(--spacing-lg);
  }
}

/* ================= ACCESSIBILITY ================= */

*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
