/* Top Header Bar styling */
.top-header-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.8rem;
  padding: 0.5rem 0;
  font-family: var(--font-heading);
}

.top-header-link {
  color: var(--text-muted) !important;
  transition: var(--transition-smooth);
}

.hover-link-blue:hover {
  color: var(--secondary) !important;
}

#header-page {
  display: contents;
}

/* Header & Main Navbar - Clean light theme (Fixed White) */
.navbar-collapse.collapse {
  visibility: visible !important;
}

.navbar-custom {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color) !important;
  transition: var(--transition-smooth);
  z-index: 1030;
  padding: 0.6rem 2rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02) !important;
}

.navbar-custom.scrolled {
  padding: 0.45rem 2rem;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.02) !important;
  border-bottom-color: rgba(15, 23, 42, 0.05) !important;
}

/* Custom Hamburger Styles */
.hamburger-menu {
  width: 22px;
  height: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1060;
}

.hamburger-line {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--primary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: left center;
}

/* Toggler States (Bootstrap triggers aria-expanded) */
.navbar-toggler[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(2px, -1px);
  background-color: var(--primary);
}

.navbar-toggler[aria-expanded="true"] .hamburger-line:nth-child(2) {
  width: 0%;
  opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(2px, 1px);
  background-color: var(--primary);
}

.navbar-brand {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
}

.navbar-brand:hover {
  transform: scale(1.02);
}

.navbar-logo-img {
  height: 52px; /* Revert to standard size */
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.06));
  transition: var(--transition-smooth);
}

.navbar-logo-img:hover {
  transform: scale(1.02);
}

.nav-link-custom {
  color: var(--text-muted) !important; /* Revert link text to dark grey */
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem; /* Slightly compressed font size */
  padding: 0.5rem 0.6rem !important; /* Compressed horizontal padding */
  white-space: nowrap; /* Forces links to stay in a single line */
  transition: var(--transition-smooth);
  position: relative;
}

.nav-link-custom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary)) !important;
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.nav-link-custom:hover::after,
.nav-link-custom.active::after,
.custom-dropdown:hover > .nav-link-custom::after,
.custom-dropdown.show > .nav-link-custom::after {
  width: 80%;
}

.nav-link-custom:hover,
.nav-link-custom.active,
.custom-dropdown:hover > .nav-link-custom,
.custom-dropdown.show > .nav-link-custom {
  color: var(--primary) !important; /* Highlight links in Saffron Gold */
}

.btn-header-join {
  font-size: 0.9rem;
  padding: 0.6rem 1.4rem;
}

/* Dropdown Menu 3D unfolding flip animation */
.custom-dropdown .dropdown-menu {
  display: block !important;
  opacity: 0;
  visibility: hidden;
  background: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
  transform: perspective(600px) rotateX(-90deg);
  transform-origin: top;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
}

.custom-dropdown:hover .dropdown-menu,
.custom-dropdown.show .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: perspective(600px) rotateX(0deg);
}

.custom-dropdown .dropdown-item {
  color: var(--text-muted) !important;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.custom-dropdown .dropdown-item:hover {
  background: var(--secondary-glow) !important;
  color: var(--primary) !important;
  padding-left: 1.25rem;
}

/* 3D Flipping Event Showcase - Clean white theme card */
.partner-3d-showcase {
  width: 145px;
  height: 52px;
  perspective: 800px;
  cursor: pointer;
}

.partner-3d-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.partner-3d-card.flipped {
  transform: rotateX(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  background: #ffffff;
}

.face-front {
  z-index: 2;
  transform: rotateX(0deg);
  border-left: 3px solid var(--primary);
}

.face-back {
  transform: rotateX(180deg);
  border-left: 3px solid var(--secondary);
}

.badge-tag {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
}

.partner-name {
  font-size: 0.8rem;
  font-weight: 700;
  margin: 1px 0;
  color: var(--text-main);
}

.partner-link {
  font-size: 0.6rem;
  color: var(--accent-blue);
  text-decoration: underline;
}

/* Header Responsive - Compressed spacings and clean mobile fold-outs */
@media (max-width: 1199px) {
  .navbar-custom {
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }
  
  /* Make the navbar collapser behave as a slide-in drawer */
  .navbar-collapse.collapsing {
    height: 100vh !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    transform: translateX(100%);
  }
  
  .navbar-collapse.collapse:not(.show) {
    display: flex !important;
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.98);
  }

  .navbar-collapse.collapse.show {
    display: flex !important;
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 40px rgba(15, 23, 42, 0.08);
    flex-direction: column;
    padding: 90px 1.75rem 2rem 1.75rem !important;
    z-index: 1050;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    overflow-y: auto;
  }
  
  .navbar-nav {
    margin: 0;
    padding: 0;
    gap: 0.5rem !important;
    width: 100%;
  }
  
  .nav-link-custom {
    padding: 0.6rem 0.75rem !important;
    font-size: 1rem;
    font-weight: 600;
    display: block;
    width: 100%;
    border-radius: 8px;
    color: var(--text-body) !important;
  }

  .nav-link-custom:hover,
  .nav-link-custom.active {
    background: var(--primary-glow);
    color: var(--primary) !important;
    padding-left: 1rem !important;
  }
  
  .nav-link-custom::after {
    display: none; /* Hide hover underline bars on mobile */
  }
  
  /* Reset absolute positioning of dropdowns for standard vertical mobile expand behavior */
  .custom-dropdown .dropdown-menu {
    position: static !important;
    float: none;
    box-shadow: none !important;
    border: none !important;
    padding: 0.25rem 0 0.5rem 1.25rem !important; /* Indent submenus */
    margin: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: none !important;
    background: transparent !important;
  }
  
  .custom-dropdown.show .dropdown-menu,
  .custom-dropdown .dropdown-menu.show {
    display: block !important;
    animation: slideFadeIn 0.3s ease-out;
  }
  
  .custom-dropdown .dropdown-item {
    padding: 0.45rem 0.75rem !important;
    font-size: 0.9rem;
    color: var(--text-muted) !important;
    background: transparent !important;
    border-radius: 6px;
  }
  
  .custom-dropdown .dropdown-item:hover {
    background: var(--secondary-glow) !important;
    color: var(--primary) !important;
    padding-left: 1rem !important;
  }
  
  .partner-3d-showcase {
    margin: 0.75rem 0.5rem;
  }

  .btn-header-join {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem !important;
    font-size: 0.95rem;
    border-radius: 8px !important;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 104, 55, 0.15);
  }
}

@media (max-width: 480px) {
  .navbar-logo-img {
    height: 42px !important;
  }
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating Live News Box Screen Widget */
.floating-news-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(3, 6, 14, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(12, 18, 32, 0.12);
  z-index: 1040;
  overflow: hidden;
  font-family: var(--font-heading);
  animation: slideUpWidget 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpWidget {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floating-news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #003087; /* Corporate Blue */
  padding: 8px 16px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.live-pulse-badge {
  color: #ffffff;
  font-weight: 800;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  animation: live-pulse 1.5s infinite;
}

@keyframes live-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.floating-news-body {
  padding: 16px;
  background: rgba(255, 255, 255, 0.3);
}

.floating-news-footer {
  padding: 8px 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: flex-end;
}

/* Live News Modal Overrides */
.live-news-modal-content {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
}

.btn-close-custom {
  background-color: rgba(15, 23, 42, 0.05);
  border-radius: 50%;
  padding: 0.5rem;
  transition: all 0.2s ease;
  border: none;
  opacity: 0.7;
}

.btn-close-custom:hover {
  background-color: rgba(220, 38, 38, 0.1);
  color: #ef4444;
  transform: rotate(90deg);
  opacity: 1;
}

.live-news-list {
  display: flex;
  flex-direction: column;
}

.news-list-item {
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding: 1rem 0.5rem;
}

.news-list-item:last-child {
  border-bottom: none;
}

.news-list-item:hover {
  background: rgba(180, 83, 9, 0.03);
  transform: translateX(4px);
  border-radius: 12px;
}

.news-item-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(0, 48, 135, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.news-item-body {
  flex-grow: 1;
}

.news-item-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-trade {
  background: rgba(0, 70, 199, 0.08);
  color: #0046c7;
}

.badge-delegation {
  background: rgba(217, 119, 6, 0.08);
  color: #d97706;
}

.badge-energy {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
}

.badge-digital {
  background: rgba(139, 92, 246, 0.08);
  color: #8b5cf6;
}

.badge-startup {
  background: rgba(236, 72, 153, 0.08);
  color: #ec4899;
}

.news-item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.news-item-title {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-top: 4px;
  margin-bottom: 4px;
}

.news-item-desc {
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Responsiveness for Ticker Widget on Mobile */
@media (max-width: 576px) {
  .floating-news-box {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}


.live-ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #dc3545; /* Bootstrap danger */
  color: #fff;
  border-radius: 999px; /* Fully rounded pill */
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 0 12px rgba(220, 53, 69, 0.45);
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: livePulse 1.2s infinite;
}

@keyframes livePulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255,255,255,0.8);
    opacity: 1;
  }

  50% {
    transform: scale(1.25);
    box-shadow: 0 0 0 6px rgba(255,255,255,0);
    opacity: 0.8;
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255,255,255,0);
    opacity: 1;
  }
}

@keyframes liveNewsPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }

  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}


/** latest css for news badge */
/* Container: Fixed single row at the bottom of the screen */
.mini-news-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  height: 40px;
  background: rgba(15, 23, 42, 0.95); /* Dark background with subtle transparency */
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 0 10px 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* 1. Live Badge Styling */
.live-news-badge {
  display: inline-flex;
  align-items: center;
  background: #dc3545;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  margin-right: 15px;
}
.live-news-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  margin-right: 5px;
  animation: blink 1.2s infinite;
}

/* 2. Horizontal Scrolling Window */
.ticker-content-window-floating {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.ticker-track-floating {
  display: flex;
  white-space: nowrap;
  align-items: center;
  /* Adjust animation duration based on your preference */
  animation: ticker-slide 30s linear infinite; 
}
.ticker-track-floating:hover {
  animation-play-state: paused; /* Pauses when user hovers */
}
.ticker-item-floating {
  display: inline-flex;
  align-items: center;
  color: #e2e8f0;
  font-size: 13px;
  padding-right: 50px; /* Gap between news items */
}

/* 3. Action Buttons Layout */
.mini-news-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(15,23,42,0) 0%, rgba(15,23,42,1) 15%);
  padding-left: 20px;
  height: 100%;
}
.btn-ticker-view-all-floating {
  background: #0d6efd;
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-ticker-view-all-floating:hover {
  background: #0b5ed7;
}
.btn-close-ticker {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 5px;
  transition: color 0.2s;
}
.btn-close-ticker:hover {
  color: #f1f5f9;
}

/* Animations */
@keyframes blink {
  0% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 0.2; }
}

@keyframes ticker-slide {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); } 
  /* Note: For seamless infinite looping, you typically duplicate the items list inside the track. 
     If it jumps, change 100% to translate through your container length. */
}