
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: var(--transition, all 0.3s ease);
}

.header-container {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  position: relative;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  height: 60px;
  width: auto;
}

.tagline {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgb(244, 122, 42); 
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none; 
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--dark-color, #333);
  position: relative;
  z-index: 10000;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}


   /*2. MOBILE VIEW ONLY & ALIGNMENT FIX */

@media (max-width: 1150px) {
  nav {
    display: none !important;
  }

  .header-actions .btn {
    display: none !important;
  }

  /* I-override ang Tailwind compression para manatiling pantay sa gitna */
  .header-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;     /* Sentro sa vertical alignment string */
    justify-content: space-between !important;
    height: 70px !important;            /* Fixed grid structure para pantay sa lahat ng pages */
    padding: 0 1.25rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .logo-container {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .header-actions {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* BURGER BUTTON ALIGNMENT RESET: Nilagyan ng flex para dead-center ang ☰ icon */
  .mobile-menu-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    width: 40px !important;
    margin: 0 !important;
    padding: 0 !important;             /* Alisin ang default button native padding */
    line-height: 1 !important;
    font-size: 1.75rem !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
}

@media (max-width: 767px) {
  .tagline {
    display: none;
  }

  .logo {
    height: 50px !important;            /* Bahagyang adjustment para swabe sa mobile header layout */
  }
}

/* Maayos at Stable na Mobile Dropdown Container Structure */
.mobile-nav-menu .mobile-dropdown-menu {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
  margin-top: 0;
  background-color: #f9fafb;
  position: static !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  box-shadow: none !important;
  width: 100%;

  /* Accordion Animation Fix */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Trigger kapag pinindot ang toggle link */
.mobile-nav-menu .mobile-dropdown-menu.active {
  max-height: 500px;
}

/* Dropdown Links */
.mobile-nav-menu .mobile-dropdown-menu .mobile-nav-link {
  display: block;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #eee;
  font-weight: 400;
  color: var(--dark-color, #333);
}

.mobile-nav-menu .mobile-dropdown-menu li:last-child .mobile-nav-link {
  border-bottom: none;
}

/* ==========================================================================
   3. DESKTOP VIEW ONLY (Screens 1151px pataas)
   ========================================================================== */
@media (min-width: 1151px) {
  .nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
  }

  .nav-link {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0.75rem; 
    font-size: 0.9rem; 
    transition: var(--transition, all 0.3s ease);
  }

  .nav-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(45deg, var(--primary-color, #2563eb), var(--primary-light, #60a5fa));
    z-index: -1;
    opacity: 0;
    transition: var(--transition, all 0.3s ease);
  }

  .nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color, #2563eb);
    transition: var(--transition, all 0.3s ease);
  }

  .nav-link:hover {
    color: var(--white, #fff);
    transform: translateY(-2px);
  }

  .nav-link:hover::before {
    opacity: 1;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
  }

  .nav-link:hover::after {
    width: 100%;
  }

  .nav-link.active {
    color: var(--white, #fff);
  }

  .nav-link.active::before {
    opacity: 1;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
  }

  /* Desktop Hover Dropdown Animation Mechanics */
  .dropdown-menu-item {
    position: relative;
  }

  nav .dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    list-style: none;
    background-color: var(--white, #fff);
    box-shadow: var(--shadow, 0 4px 6px rgba(0,0,0,0.1));
    border-radius: var(--border-radius, 8px);
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  }

  .dropdown-menu-item:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  nav .dropdown-menu li .nav-link {
    display: block;
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
    color: var(--dark-color, #333);
    font-weight: 400;
    transform: none;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  nav .dropdown-menu li .nav-link::before,
  nav .dropdown-menu li .nav-link::after {
    content: none !important;
  }

  nav .dropdown-menu li .nav-link:hover {
    background-color: var(--light-bg, #f3f4f6);
    color: var(--primary-color, #2563eb);
  }

  /* Desktop Submenu (Hover sa gilid) */
  .dropdown-submenu {
    position: relative;
  }

  .sub-dropdown {
    position: absolute;
    top: -8px;
    left: calc(100% - 5px);
    min-width: 220px;
    margin: 0;
    padding: 0.5rem 0;
    list-style: none;
    background-color: var(--white, #fff);
    border-radius: var(--border-radius, 8px);
    box-shadow: var(--shadow, 0 4px 6px rgba(0,0,0,0.1));
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .dropdown-submenu:hover > .sub-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .sub-dropdown li .nav-link {
    display: block;
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
    color: var(--dark-color, #333);
    font-weight: 400;
  }

  .mobile-menu-container,
  .mobile-menu-overlay {
    display: none !important;
  }
}

/* ==========================================================================
   4. GLOBAL MOBILE MENU DRAWER (Ang Slide-out Panel sa Mobile)
   ========================================================================== */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-container {
  position: fixed;
  top: 0;
  right: 0;            
  width: 80%;
  max-width: 350px;
  height: 100%;
  background-color: var(--white, #fff);
  z-index: 2000;
  padding: 2rem;
  overflow-y: auto;
  transition: transform 0.3s ease;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1); 
  transform: translateX(100%);
}

.mobile-menu-container.active {
  transform: translateX(0); 
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
  color: var(--dark-color, #333);
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark-color, #333);
}

.mobile-nav-menu {
  list-style: none;
  text-align: left;
  padding-left: 0;
  margin-left: 0;
  display: block;
}

.mobile-nav-menu li {
  padding: 0;
  margin: 0;
  position: relative;
  border-bottom: 1px solid #f0f0f0;
  overflow: visible;
}

.mobile-nav-menu li:last-child {
  border-bottom: none;
}

.mobile-nav-menu .mobile-nav-link {
  display: block;
  padding: 1rem 0.5rem;
  font-weight: 500;
  transition: var(--transition, all 0.3s ease);
  color: var(--primary-color, #2563eb);
}

.mobile-nav-link:hover {
  color: var(--primary-dark, #1d4ed8);
}

.mobile-nav-link.active {
  color: var(--primary-color, #2563eb);
  font-weight: 600;
}

.mobile-nav-menu li.dropdown-menu-item {
  border-bottom: none;
}

.dropdown-toggle {
  position: relative;
  padding-right: 0.5rem !important;
  cursor: pointer;
}

.dropdown-toggle::after {
  content: none; 
}

.mobile-nav-menu li.dropdown-menu-item:not(.active) {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-menu .dropdown-toggle {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-size: inherit;
}