/**
 * OST Web&Support 3.0 - Header, Mega-Menu & Footer Styling
 */

/* ==========================================================================
   Header & Sticky Bar
   ========================================================================== */

.ost-site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--ost-header-height);
  background-color: rgba(10, 16, 32, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  transition: all var(--ost-transition-base);
}

.ost-site-header.ost-header-scrolled {
  background-color: rgba(10, 16, 32, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border-bottom-color: rgba(20, 215, 203, 0.2);
}

.ost-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Brand Logo */
.ost-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--ost-font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ost-white);
  text-decoration: none;
}

.ost-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--ost-primary-blue), var(--ost-cyber-cyan));
  border-radius: var(--ost-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ost-deep-navy);
  font-weight: 800;
  box-shadow: var(--ost-shadow-cyan-glow);
}

.ost-logo-text span {
  color: var(--ost-cyber-cyan);
}

/* Primary Desktop Navigation */
.ost-desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 100%;
}

.ost-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.5rem;
  height: 100%;
}

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

.ost-nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  font-family: var(--ost-font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ost-text-light);
  border-radius: var(--ost-radius-sm);
  transition: all var(--ost-transition-fast);
}

.ost-nav-link:hover,
.ost-nav-item:hover > .ost-nav-link {
  color: var(--ost-white);
  background-color: rgba(255, 255, 255, 0.05);
}

.ost-nav-item.active > .ost-nav-link {
  color: var(--ost-cyber-cyan);
}

/* Mega-Menu Container */
.ost-mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 900px;
  background: var(--ost-dark-surface);
  border: 1px solid var(--ost-border-dark);
  border-radius: var(--ost-radius-lg);
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--ost-transition-base);
  z-index: 1001;
}

.ost-nav-item:hover .ost-mega-menu,
.ost-nav-item:focus-within .ost-mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.ost-mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 240px;
  gap: 1.5rem;
}

.ost-mega-col-title {
  font-family: var(--ost-font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ost-cyber-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.ost-mega-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ost-mega-link {
  display: block;
  color: var(--ost-text-light);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--ost-transition-fast);
}

.ost-mega-link:hover {
  color: var(--ost-white);
  transform: translateX(4px);
}

.ost-mega-link small {
  display: block;
  color: var(--ost-text-muted);
  font-size: 0.775rem;
  margin-top: 2px;
}

.ost-mega-feature {
  background: rgba(21, 112, 239, 0.08);
  border: 1px solid rgba(21, 112, 239, 0.2);
  border-radius: var(--ost-radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ost-mega-feature h5 {
  color: var(--ost-white);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.ost-mega-feature p {
  font-size: 0.8rem;
  color: var(--ost-text-light);
  margin-bottom: 1rem;
}

/* Header CTAs */
.ost-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ost-hotline-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ost-text-light);
  padding: 0.5rem 0.75rem;
  border-radius: var(--ost-radius-sm);
  transition: color var(--ost-transition-fast);
}

.ost-hotline-btn:hover {
  color: var(--ost-cyber-cyan);
}

.ost-portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--ost-radius-md);
  color: var(--ost-white);
  background: rgba(255, 255, 255, 0.04);
}

.ost-portal-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ost-cyber-cyan);
  border-color: var(--ost-cyber-cyan);
}

/* Mobile Toggle */
.ost-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--ost-white);
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 1080px) {
  .ost-desktop-nav {
    display: none;
  }
  .ost-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

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

  .ost-logo {
    font-size: 1.15rem;
    gap: 0.5rem;
  }

  .ost-logo-icon {
    width: 32px;
    height: 32px;
  }

  .ost-header-actions {
    gap: 0.5rem;
  }

  /* Hide wide desktop buttons on mobile to prevent overflow */
  .ost-portal-btn,
  .ost-header-actions .ost-btn-primary {
    display: none !important;
  }

  /* Compact round quick-call button on mobile */
  .ost-hotline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: rgba(20, 215, 203, 0.12);
    border: 1px solid rgba(20, 215, 203, 0.35);
    color: var(--ost-cyber-cyan);
  }

  .ost-hotline-btn span {
    display: none;
  }

  .ost-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--ost-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
  }
}

/* ==========================================================================
   Mobile Drawer Navigation
   ========================================================================== */

.ost-mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: min(340px, 85vw);
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background-color: var(--ost-deep-navy);
  border-left: 1px solid var(--ost-border-dark);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1100;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
}

.ost-mobile-drawer.is-open {
  right: 0;
}

.ost-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ost-mobile-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.ost-mobile-close {
  background: transparent;
  border: none;
  color: var(--ost-white);
  font-size: 1.5rem;
  align-self: flex-end;
  cursor: pointer;
  padding: 0.5rem;
}

.ost-mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.ost-mobile-nav-link {
  font-family: var(--ost-font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ost-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ost-mobile-nav-link:hover {
  color: var(--ost-cyber-cyan);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.ost-site-footer {
  background-color: var(--ost-deep-navy);
  color: var(--ost-text-light);
  border-top: 1px solid var(--ost-border-dark);
  padding-top: var(--ost-space-3xl);
  padding-bottom: var(--ost-space-xl);
  margin-top: auto;
}

.ost-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr) 1.2fr;
  gap: 2.5rem;
  margin-bottom: var(--ost-space-3xl);
}

@media (max-width: 992px) {
  .ost-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .ost-footer-grid {
    grid-template-columns: 1fr;
  }
}

.ost-footer-col h4 {
  font-family: var(--ost-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ost-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.ost-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ost-footer-links a {
  color: var(--ost-text-light);
  font-size: 0.9rem;
  transition: color var(--ost-transition-fast);
}

.ost-footer-links a:hover {
  color: var(--ost-cyber-cyan);
}

.ost-footer-company p {
  font-size: 0.9rem;
  color: var(--ost-text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.ost-footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--ost-text-light);
}

.ost-footer-contact-item a {
  color: var(--ost-white);
}

.ost-footer-contact-item a:hover {
  color: var(--ost-cyber-cyan);
}

.ost-footer-bottom {
  border-top: 1px solid var(--ost-border-dark);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ost-text-muted);
}

.ost-footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.ost-footer-bottom-links a {
  color: var(--ost-text-muted);
}

.ost-footer-bottom-links a:hover {
  color: var(--ost-white);
}

@media (max-width: 768px) {
  .ost-footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
