/* Header - Base Styles */
.header {
  display: flex;
  height: 100px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header_left {
  flex: 1;
  background: #fff;
  display: flex;
  align-items: center;
  padding-left: 20px;
  position: relative;
  border: none;
  outline: none;
  box-shadow: none;
  overflow: visible; /* Changed from hidden to visible for 125% scaling */
  z-index: 20;
  min-width: 280px; /* Ensure minimum space for logo */
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  z-index: 25;
  position: relative;
  flex-shrink: 0; /* Prevent logo from shrinking */
}

.logo_img {
  height: 95px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.logo_text {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  letter-spacing: 1px;
  white-space: nowrap; /* Prevent text wrapping */
}
.header_right {
  flex: 2;
  background: #87cc46;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 100;
  clip-path: polygon(80px 0%, 100% 0%, 100% 100%, 0% 100%);
}

.navbar {
  width: 100%;
  height: 100%;
  position: relative;
}

.nav__list {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  padding: 0 80px 0 120px;
  gap: 3rem;
  list-style: none;
  margin: 0;
}

.nav__item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav__link {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  transition: opacity 0.3s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  padding: 10px 5px;
}

.nav__link:hover {
  opacity: 0.8;
}

.nav__link i {
  font-size: 10px;
  transition: transform 0.3s ease;
}

.nav__link.active i {
  transform: rotate(180deg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 15px;
  margin-right: 20px;
  position: absolute;
  right: 0;
  z-index: 105;
}

.mobile-menu-toggle span {
  width: 35px;
  height: 4px;
  background: #fff;
  margin: 4px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* DROPDOWN PORTAL */
#dropdown-portal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99999;
}

.dropdown-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.dropdown-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.dropdown-menu-portal {
  position: absolute;
  top: 150px;
  left: 70%;
  transform: translateX(-50%) translateY(-20px);
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  min-width: 675px;
  max-width: 95vw;
}

.dropdown-menu-portal.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

.dropdown-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 50px;
}

.dropdown-column {
  padding: 0 30px;
  border-right: 1px solid #e5e5e5;
}

.dropdown-column:last-child {
  border-right: none;
}

.dropdown-column h4 {
  color: #87cc46;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  margin-bottom: 25px;
  padding-bottom: 12px;
  border-bottom: 3px solid #87cc46;
}

.dropdown-column a {
  display: block;
  color: #333;
  text-decoration: none;
  padding: 12px 0;
  font-size: 14px;
  line-height: 1.4;
  transition: all 0.2s ease;
  border-radius: 4px;
  padding-left: 0;
}

.dropdown-column a:hover {
  color: #87cc46;
  padding-left: 12px;
  background: rgba(135, 204, 70, 0.05);
}

/* Tablet and Mobile Responsive */
@media (max-width: 1300px) {
  .nav__list {
    display: none;
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    background: #87cc46;
    flex-direction: column;
    padding: 20px;
    gap: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    height: auto;
  }

  .nav__list.active {
    display: flex;
  }

  .nav__item {
    width: 100%;
    height: auto;
  }

  .nav__link {
    width: 100%;
    padding: 15px 10px;
    justify-content: space-between;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .dropdown-menu-portal {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    min-width: 100%;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    max-height: 70vh;
    overflow-y: auto;
  }

  .dropdown-menu-portal.active {
    transform: translateY(0);
  }

  .dropdown-content {
    grid-template-columns: 1fr;
    padding: 30px;
    gap: 20px;
  }

  .dropdown-column {
    padding: 0;
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 20px;
  }

  .dropdown-column:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}

@media (max-width: 768px) {
  .header {
    height: 80px;
  }

  .header_left {
    padding-left: 15px;
    min-width: 200px;
  }

  .logo_img {
    height: 65px;
  }

  .logo_text {
    font-size: 18px;
  }

  .header_right {
    clip-path: polygon(60px 0%, 100% 0%, 100% 100%, 0% 100%);
  }

  .nav__list {
    top: 80px;
  }

  .dropdown-menu-portal {
    top: 90px;
  }

  .infobar {
    font-size: 11px;
  }

  .contact-info {
    gap: 10px;
  }

  .contact-item {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .logo_img {
    height: 55px;
  }

  .logo_text {
    font-size: 16px;
  }

  .infobar .container {
    flex-direction: column;
    text-align: center;
  }

  .dropdown-content {
    padding: 20px;
  }
}
@media (min-width: 1301px) {
  .header_left {
    padding-left: clamp(20px, 2vw, 40px);
    min-width: clamp(280px, 25vw, 400px);
  }

  .header_right {
    padding-left: clamp(120px, 15vw, 200px);
    padding-right: clamp(40px, 5vw, 80px);
    clip-path: polygon(clamp(80px, 8vw, 120px) 0%, 100% 0%, 100% 100%, 0% 100%);
  }

  .nav__list {
    gap: clamp(2rem, 3vw, 3rem);
    padding: 0 clamp(40px, 5vw, 80px);
  }

  .nav__link {
    font-size: clamp(13px, 1.2vw, 16px);
  }
}

/* Large Desktop (1536px and above) */
@media (min-width: 1536px) {
  .header_right {
    padding-left: clamp(200px, 20vw, 300px);
    padding-right: clamp(80px, 8vw, 120px);
  }
}

/* Tablet and smaller desktop breakpoint */
@media (max-width: 1300px) {
  .nav__list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #87cc46;
    flex-direction: column;
    padding: 20px;
    gap: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
  }

  .nav__list.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
    margin-right: 20px;
  }



  .dropdown-menu {
    width: 95vw;
  }

  .dropdown-content {
    grid-template-columns: 1fr;
  }
}

/* Tablet (769px to 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  .header_left {
    z-index: 25;
    min-width: 250px;
  }

  .logo_img {
    height: 80px;
  }

  .logo_text {
    font-size: 20px;
  }
}

/* Mobile and small tablet (up to 768px) */
@media (max-width: 768px) {
  .header {
    height: 80px;
  }

  .header_left {
    flex: 6;
    background: #fff;
    display: flex;
    align-items: center;
    padding-left: 15px;
    padding-right: 0;
    position: relative;
    border: none;
    outline: none;
    box-shadow: none;
    overflow: visible;
    z-index: 25;
    min-width: 200px;
  }

  .header_right {
    flex: 1;
    background: #87cc46;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    width: 100%;
    border: none;
    outline: none;
    box-shadow: none;
    z-index: 15;

  }

  .logo {
    gap: 8px;
  }

  .logo_img {
    height: 65px;
  }

  .logo_text {
    font-size: 16px;
    letter-spacing: 0px;
  }

  .mobile-menu-toggle {
    padding: 10px;
  }

  .mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    margin: 3px 0;
    border-radius: 1px;
  }
}

/* Small mobile (up to 480px) */
@media (max-width: 480px) {
  .header_left {
    flex: 7;
    padding-left: 10px;
    min-width: 180px;
  }

  .header_right {
    flex: 1;
    clip-path: polygon(70px 0%, 100% 0%, 100% 100%, 0% 100%);
  }

  .logo {
    gap: 6px;
  }

  .logo_img {
    height: 55px;
  }

  .logo_text {
    font-size: 14px;
  }
}

/* Extra small mobile (up to 360px) */
@media (max-width: 360px) {
  .header_left {
    flex: 8;
    padding-left: 8px;
    min-width: 160px;
  }

  .header_right {
    clip-path: polygon(60px 0%, 100% 0%, 100% 100%, 0% 100%);
  }

  .logo {
    gap: 4px;
  }

  .logo_img {
    height: 50px;
  }

  .logo_text {
    font-size: 13px;
  }
}

/* Ultra small screens (up to 344px) */
@media (max-width: 344px) {
  .header_left {
    flex: 10;
    padding-left: 5px;
    min-width: 150px;
  }

  .header_right {
    clip-path: polygon(50px 0%, 100% 0%, 100% 100%, 0% 100%);
  }

  .logo {
    gap: 2px;
  }

  .logo_img {
    height: 45px;
  }

  .logo_text {
    font-size: 12px;
    letter-spacing: -0.5px;
  }
}

/* Landscape orientation on small screens */
@media (max-width: 1024px) and (max-height: 600px) and (orientation: landscape) {
  .header {
    height: 70px;
  }

  .logo_img {
    height: 50px;
  }

  .logo_text {
    font-size: 16px;
  }
}

/* High DPI / Retina displays with scaling */
@media (-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi),
(min-resolution: 1.25dppx) {
  .header_left {
    overflow: visible !important;
  }

  .logo {
    flex-shrink: 0 !important;
  }

  .logo_text {
    white-space: nowrap !important;
  }
}

/* Force visibility for problematic scaling scenarios */
@media (min-width: 1301px) {
  .logo,
  .logo_img,
  .logo_text {
    visibility: visible !important;
    display: flex !important;
  }

  .logo_img {
    display: block !important;
  }
}
/* Make dropdown wider and not clipped */
.dropdown {
  position: static;
}

.dropdown-menu {
  position: fixed;
  top: 100px;
  right: 80px;
  left: auto;
}

/* Show dropdown when active */
.dropdown.active .dropdown-menu {
  display: block;
}

/* Ensure dropdown content is wide and flexible */
.dropdown-content {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.dropdown-column {
  min-width: 200px;
}

.dropdown-column h4 {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.dropdown-column a {
  display: block;
  margin-bottom: 0.4rem;
  color: #333;
  text-decoration: none;
}

.dropdown-column a:hover {
  text-decoration: underline;
}

/* Prevent nav bar clipping */
header, .header, .header_right, nav.navbar {
  overflow: visible !important;
  position: relative;
  z-index: 10;
}

/* Prevent parent container from clipping it */
.header {
  overflow: visible;
  position: relative;
}

/* For smaller screens */
@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    width: 100%;
    padding: 1rem 0;
    box-shadow: none;
  }

  .dropdown-content {
    flex-direction: column;
    gap: 1rem;
  }
}
/* Fix dropdown clipping */
.header,
.header_right,
.navbar,
.nav__list,
.nav__item {
  overflow: visible !important;
  position: relative;
  z-index: 10;
}
/* Make sure all parent containers allow overflow and stacking */
header,
.header,
.header_right,
.navbar,
.nav__list,
.nav__item,
.container {
  overflow: visible !important;
  position: relative !important;
  z-index: 1000; /* a high base so that dropdown can be above everything */
}

/* Dropdown menu should truly float above everything */
.dropdown-menu {
  position: absolute !important;
  top: calc(100% + 5px) !important; /* just under the nav item */
  left: 0 !important;
  width: max-content; /* or set a fixed width you want */
  min-width: 700px; /* you can adjust to your preference */
  background: white !important;
  padding: 1.5rem !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
  border-radius: 8px !important;
  visibility: hidden;
  opacity: 0;
  max-width: 100vw;
  z-index: 9999 !important; /* very high so it beats other content */
}

/* When active, show it */
.dropdown.active .dropdown-menu {
  visibility: visible;
  opacity: 1;
  /* optionally animate */
  transition: opacity 0.3s ease !important;
}

/* Rotate arrow when open for UX */
.dropdown.active .dropdown-toggle .fa-chevron-down {
  transform: rotate(180deg);
}

