/* ==========================================================================
   Header & Footer Styles - Modular Component Stylesheet
   Can be included across any page of the ESCR-Asia website.
   ========================================================================== */

/* --------------------------------------------------------------------------
   TOP BAR
   -------------------------------------------------------------------------- */
.site-topbar {
  background: var(--navy-950);
  color: var(--slate-300);
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1001;
}

.topbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--slate-300);
  transition: color var(--transition-fast);
}

.topbar-item:hover {
  color: var(--gold-400);
}

.topbar-item svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(197, 147, 58, 0.15);
  color: var(--gold-300);
  padding: 0.15rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(197, 147, 58, 0.3);
}

.topbar-socials {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--slate-300);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--gold-500);
  color: var(--navy-950);
  transform: translateY(-2px);
}

.social-link svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* --------------------------------------------------------------------------
   MAIN HEADER / NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px -2px rgba(10, 25, 47, 0.07);
  z-index: 1000;
  transition: all var(--transition-smooth);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px -4px rgba(10, 25, 47, 0.12);
  padding: 0.2rem 0;
}

.header-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1.5rem;
}

/* Brand / Logo Area */
.brand-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 2px 6px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.brand-link:hover .brand-logo-container {
  transform: scale(1.02);
}

.brand-logo {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--navy-900);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-title span {
  color: var(--gold-500);
}

.brand-subtext {
  font-size: 0.72rem;
  color: var(--slate-500);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Nav Links */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--slate-700);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--navy-900);
  background-color: var(--slate-100);
}

.nav-link.active {
  color: var(--navy-900);
  background-color: rgba(197, 147, 58, 0.12);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--gold-500);
  border-radius: 2px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-nav-cta {
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
  color: var(--white);
  padding: 0.65rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(197, 147, 58, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.btn-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(197, 147, 58, 0.45);
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
  color: var(--white);
}

.btn-nav-cta svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
}

.mobile-toggle span {
  display: block;
  height: 2.5px;
  width: 100%;
  background-color: var(--navy-900);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-950);
  color: var(--slate-300);
  border-top: 3px solid var(--gold-500);
  position: relative;
  overflow: hidden;
}

.footer-top {
  padding: 4.5rem 0 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.1fr 1.2fr 1.5fr;
  gap: 3rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

/* Footer Brand */
.footer-logo-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  align-self: flex-start;
}

.footer-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.footer-desc {
  font-size: 0.925rem;
  line-height: 1.7;
  color: var(--slate-400);
  margin-bottom: 1.5rem;
}

.footer-secretariat {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.825rem;
  color: var(--slate-300);
}

.footer-secretariat svg {
  width: 18px;
  height: 18px;
  fill: var(--gold-400);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Footer Headings */
.footer-heading {
  font-family: var(--font-heading);
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.35rem;
  position: relative;
  padding-bottom: 0.6rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2.5px;
  background: var(--gold-500);
  border-radius: 2px;
}

/* Footer List Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links li a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.925rem;
  color: var(--slate-400);
  transition: all var(--transition-fast);
}

.footer-links li a:hover {
  color: var(--gold-300);
  transform: translateX(4px);
}

.footer-links li a svg {
  width: 12px;
  height: 12px;
  fill: var(--gold-500);
  opacity: 0.7;
}

/* Footer Contact Details */
.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--slate-300);
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  fill: var(--gold-400);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.07);
  color: var(--slate-200);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-fast);
}

.footer-social-btn:hover {
  background: var(--gold-500);
  color: var(--navy-950);
  border-color: var(--gold-500);
  transform: translateY(-3px);
}

.footer-social-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Footer Bottom Bar */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: var(--slate-500);
}

.footer-bottom-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: var(--slate-400);
}

.footer-bottom-links a:hover {
  color: var(--gold-400);
}

.btn-scroll-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-300);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-scroll-top:hover {
  background: var(--gold-500);
  color: var(--navy-950);
  transform: translateY(-3px);
}

.btn-scroll-top svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN (Header & Footer)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 900px) {
  .topbar-left {
    display: none;
  }
  .topbar-container {
    justify-content: center;
  }
  .mobile-toggle {
    display: flex;
  }
  .header-actions .btn-nav-cta {
    display: none;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 6rem 2rem 2rem 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    transition: right var(--transition-smooth);
    z-index: 1001;
    gap: 0.5rem;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
  }

  .nav-mobile-cta {
    display: block !important;
    width: 100%;
    margin-top: 1.5rem;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
  .brand-subtext {
    display: none;
  }
}
