/* Top Navigation Bar - FIXED */
.top-nav {
  background-color: #000;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 60px;
  font-size: 13px;
  position: fixed; /* Changed from sticky to fixed */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1001;
  height: 37px; /* Set explicit height */
}

.top-left,
.top-right {
  display: flex;
  gap: 30px;
}

.top-nav a {
  color: #fff;
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: all 0.3s ease;
}

.top-nav a:hover {
  color: #ec2b38;
}

.top-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #ec2b38;
}

/* Main Header - FIXED */
.header {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: fixed; /* Changed from sticky to fixed */
  top: 37px; /* Position below top nav */
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  padding-top: 20px;
  transition: all 0.3s ease;
}

.nav-container {
  margin: 0 auto;
  padding: 0 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: 1800px;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 35px;
}

/* Logo Styles */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navlogo img {
  height: 40px;
  width: auto;
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 35px;
  margin: 0;
}

.nav-item {
  position: relative;
  cursor: pointer;
}

.nav-link {
  text-decoration: none;
  color: #000000;
  font-size: 14px;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 25px 10px;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: #e53e3e;
}

/* Dropdown Arrow */
.dropdown-arrow .fa-angle-down {
  font-size: 10px;
  color: inherit;
  transition: transform 0.3s ease;
  margin-left: 6px;
}

.nav-item:hover .dropdown-arrow .fa-angle-down {
  transform: rotate(180deg);
}

/* Full Width Dropdown Menu */
.dropdown-menu {
  position: fixed;
  left: 0;
  right: 0;
  width: 100vw;
  background: white;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  pointer-events: none;
  border-top: 3px solid #ffffff;
  margin-top: 0;
  top: 117px; /* Position below both fixed headers */
}

/* Hover behavior */
.nav-item:hover .nav-link {
  color: #ec0000;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.nav-item.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Keep dropdown open when hovering over it */
.dropdown-menu:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dropdown-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 60px;
  display: flex;
  flex-wrap: nowrap;
  gap: 50px;
  align-items: flex-start;
  justify-content: flex-start;
}

/* Special styling for Why Emtel Business dropdown - closer sections */
.nav-item:first-child .dropdown-inner {
  gap: 100px;
}

.dropdown-content {
  display: contents;
  text-align: left;
}

.dropdown-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 120px;
}

/* Special styling for Why Emtel Business dropdown section */
.nav-item:first-child .dropdown-section {
  min-width: 180px;
  flex: 0 0 auto;
}

h4 {
  font-size: 14px;
  color: #000000;
  letter-spacing: 1px;
  margin-bottom: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 6px;
}

.dropdown-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.dropdown-section a {
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 6px;
  display: block;
  cursor: pointer;
  position: relative;
}

.dropdown-section a:hover {
  color: #ff0011;
  background-color: rgba(236, 162, 167, 0.05);
  transform: translateX(3px);
  letter-spacing: 0.5px;
}

/* Optional: Add a subtle underline effect */
.dropdown-section a::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 12px;
  width: 0;
  height: 2px;
  background-color: #f51827;
  transition: width 0.3s ease;
}

.dropdown-section a:hover::after {
  width: calc(100% - 24px);
}

.insight-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  min-width: 260px;
  flex-shrink: 0;
}

/* Special styling for Why Emtel Business insight section */
.nav-item:first-child .insight-section {
  min-width: 400px;
  flex: 0 0 auto;
}

.insight-image {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.insight-content {
  flex: 1;
  max-width: 300px;
}

.insight-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.insight-content h5 {
  font-size: 14px;
  color: #000000;
  letter-spacing: 1px;
  margin-bottom: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 6px;
}

.insight-section h4 {
  font-size: 14px;
  color: #000000;
  letter-spacing: 1px;
  margin-bottom: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 6px;
}

.insight-content p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.insight-link {
  color: #ec2b38;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.insight-link:hover {
  transform: translateX(5px);
}

.insight-link::after {
  content: "→";
  font-size: 14px;
  transition: transform 0.3s ease;
}

.insight-link:hover::after {
  transform: translateX(3px);
}

/* CTA Button */
.cta-button-nav {
  background: #e53e3e;
  color: white;
  padding: 7px 24px;
  border-radius: 35px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid #ec2b38;
  white-space: nowrap;
}

.cta-button-nav:hover {
  background: #ec2b38;
  border-color: #c53030;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(229, 62, 62, 0.3);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  z-index: 1002;
}

.mobile-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.mobile-toggle span {
  width: 25px;
  height: 3px;
  background: #333;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  body {
    padding-top: 103px; /* Adjust for mobile header height */
  }

  .nav-item:first-child .insight-section {
    min-width: 300px;
    flex: 0 0 auto;
  }

  .top-nav {
    padding: 10px 20px;
    font-size: 12px;
    height: 33px;
  }

  .top-left,
  .top-right {
    gap: 15px;
  }

  .header {
    top: 33px; /* Position below mobile top nav */
  }

  .nav-container {
    padding: 0 20px;
    height: 70px;
  }

  .navlogo img {
    height: 35px;
  }

  .nav-menu {
    position: fixed;
    top: 120px; /* Position below both fixed headers on mobile */
    left: -100%;
    width: 100%;
    height: calc(100vh - 103px);
    background: white;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0;
    gap: 0;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 999;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-link {
    width: 100%;
    padding: 20px;
    font-size: 16px;
    justify-content: space-between;
  }

  /* Mobile Dropdown Behavior - Stack content vertically */
  .dropdown-menu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: #f8f9fa !important;
    border: none !important;
    margin: 0 !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    top: auto !important;
  }

  .nav-item.mobile-open .dropdown-menu {
    max-height: 2000px;
    padding: 20px 0;
  }

  /* Mobile dropdown inner - stack vertically */
  .dropdown-inner {
    flex-direction: column !important;
    gap: 25px !important;
    padding: 0 20px !important;
  }

  /* Mobile dropdown content - remove display: contents */
  .dropdown-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 25px !important;
    width: 100% !important;
  }

  .dropdown-section {
    margin-bottom: 0;
    min-width: auto;
    width: 100%;
    flex: none !important;
  }

  .dropdown-section ul {
    gap: 8px;
  }

  .dropdown-section a {
    padding: 12px 16px;
    font-size: 15px;
  }

  /* Mobile insight section - stack image and content vertically */
  .insight-section {
    min-width: auto;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    width: 100%;
  }

  .insight-image {
    width: 100%;
    height: 200px;
    order: 2;
    /* padding: 10px; */
  }

  .insight-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px !important;
  }

  .insight-content {
    max-width: none;
    width: 100%;
    order: 1;
  }

  .insight-content a {
    text-decoration: none;
  }

  .insight-content h5 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .insight-content p {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 18px;
    text-decoration: none;
  }

  .insight-link {
    font-size: 15px;
    padding: 8px 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-right {
    gap: 15px;
  }

  .cta-button-nav {
    padding: 10px 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .top-nav {
    padding: 8px 15px;
    font-size: 11px;
  }

  .top-left,
  .top-right {
    gap: 10px;
  }

  .nav-container {
    padding: 0 15px;
  }

  .nav-right {
    gap: 10px;
  }

  .cta-button-nav {
    padding: 8px 16px;
    font-size: 12px;
  }

  .navlogo img {
    height: 30px;
  }

  .dropdown-inner {
    padding: 0 15px !important;
    gap: 25px !important;
  }

  .nav-link {
    padding: 18px 15px;
    font-size: 15px;
  }

  .dropdown-section a {
    padding: 10px 12px;
    font-size: 14px;
  }

  .insight-content h5 {
    font-size: 16px;
  }

  .insight-content p {
    font-size: 13px;
  }
}

/* Focus states for accessibility */
.nav-link:focus,
.cta-button-nav:focus,
.top-nav a:focus {
  outline: 2px solid #e53e3e;
  outline-offset: 2px;
}

/* Demo content to show scrolling effect */
.demo-content {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.demo-section {
  background: #f8f9fa;
  margin: 20px 0;
  padding: 60px 40px;
  border-radius: 8px;
  border-left: 4px solid #ec2b38;
}

.demo-section h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 24px;
}

.demo-section p {
  color: #666;
  line-height: 1.6;
  font-size: 16px;
}
