/* ============================================================
   WINOME COMPONENTS
   ============================================================ */

/* ─── Navigation & Mega-menu ────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(6, 13, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: var(--transition-base);
}
.site-nav.scrolled {
  background: rgba(6, 13, 26, 0.95);
  box-shadow: var(--shadow-sm);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.brand {
  font-size: var(--font-size-2xl);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.brand img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}
.brand span { color: var(--action-blue); }

.nav-links {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}
.nav-link {
  color: var(--slate-300);
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: var(--transition-fast);
  padding: var(--space-2) 0;
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--white);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--action-blue);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
  transform-origin: left;
}
.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
}

/* Mega Menu */
.has-mega-menu { position: static; }
.mega-menu {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--navy-850);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  z-index: 999;
}
.has-mega-menu:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.mega-col h4 {
  color: var(--white);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mega-link {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  color: var(--slate-300);
}
.mega-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--white);
}
.mega-icon {
  color: var(--action-blue);
  font-size: 1.25rem;
  margin-top: 2px;
}
.mega-text h5 {
  font-size: var(--font-size-sm);
  margin-bottom: 2px;
}
.mega-text p {
  font-size: var(--font-size-xs);
  color: var(--slate-500);
  margin: 0;
  line-height: 1.4;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  height: 48px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: all var(--transition-base);
  text-align: center;
  white-space: nowrap;
}
.btn-primary {
  background: var(--action-blue);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.25);
}
.btn-primary:hover {
  background: var(--action-blue-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}
.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}
.btn-red {
  background: var(--brand-red);
  color: var(--white);
  box-shadow: 0 4px 14px var(--brand-red-glow);
}
.btn-red:hover {
  background: var(--brand-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(227, 28, 35, 0.4);
}
.btn-outline {
  background: transparent;
  color: var(--action-blue);
  border: 1px solid var(--action-blue);
}
.btn-outline:hover {
  background: rgba(14, 165, 233, 0.1);
}
.btn-sm { height: 40px; padding: 0 var(--space-3); font-size: var(--font-size-xs); }
.btn-lg { height: 56px; padding: 0 var(--space-6); font-size: var(--font-size-base); }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--navy-850);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.05);
  padding: var(--space-6);
  transition: var(--transition-base);
  height: 100%;
}
.card:hover {
  border-color: rgba(14,165,233,0.3);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: rgba(14, 165, 233, 0.1);
  color: var(--action-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}
.card-title {
  font-size: var(--font-size-xl);
  color: var(--white);
  margin-bottom: var(--space-2);
}
.card-text {
  color: var(--slate-400);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
}
.card-link {
  color: var(--action-blue);
  font-weight: 600;
  font-size: var(--font-size-sm);
  display: inline-flex; align-items: center; gap: var(--space-1);
}
.card-link:hover { color: var(--action-blue-light); gap: var(--space-2); }

/* ─── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-4); }
.form-label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--slate-300);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-control {
  width: 100%;
  height: 48px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 0 var(--space-3);
  color: var(--white);
  font-size: var(--font-size-sm);
  transition: var(--transition-fast);
}
.form-control:focus {
  outline: none;
  border-color: var(--action-blue);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.2);
}
textarea.form-control { height: auto; padding: var(--space-3); resize: vertical; }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: #040914;
  padding: var(--space-16) 0 var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-6); margin-bottom: var(--space-8); }
.footer-col h4 {
  color: var(--white); font-size: var(--font-size-base);
  margin-bottom: var(--space-4); font-weight: 600;
}
.footer-link {
  display: block; color: var(--slate-400); font-size: var(--font-size-sm);
  margin-bottom: var(--space-2); transition: var(--transition-fast);
}
.footer-link:hover { color: var(--action-blue); }
.footer-bottom {
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex; justify-content: space-between; align-items: center;
  color: var(--slate-500); font-size: var(--font-size-xs);
}

/* ─── Top Bar ────────────────────────────────────────────── */
.site-top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 40px;
  background: #040914;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1001;
  display: flex;
  align-items: center;
  font-size: var(--font-size-xs);
  color: var(--slate-300);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.site-top-bar.scrolled {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.top-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.top-bar-item a {
  color: var(--slate-300);
  transition: var(--transition-fast);
}

.top-bar-item a:hover {
  color: var(--white);
}

.top-bar-socials {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.top-bar-social-link {
  color: var(--slate-400);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
}

.top-bar-social-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

/* Adjust navigation bar placement when top bar is present */
.has-top-bar .site-nav {
  top: 40px;
  transition: top var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}

.has-top-bar .site-nav.scrolled {
  top: 0;
}

/* Adjust page padding for service hero when top bar is present */
@media (min-width: 769px) {
  .has-top-bar .service-hero {
    padding-top: 200px; /* 160px base padding + 40px top bar push */
  }
}

@media (max-width: 768px) {
  .site-top-bar {
    display: none; /* Hide top bar on mobile */
  }
  .has-top-bar .site-nav {
    top: 0; /* Keep nav at 0 on mobile */
  }
}

/* ─── Mobile Hamburger Toggle ────────────────────────────── */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition-fast);
}
.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--action-blue-light);
  border-color: rgba(50, 75, 179, 0.3);
}

/* ─── Mobile Slide-out Drawer ───────────────────────────── */
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: -100%; /* Hidden offscreen */
  width: 100%;
  max-width: 360px;
  height: 100vh;
  background: linear-gradient(145deg, rgba(10, 22, 40, 0.98) 0%, rgba(6, 13, 26, 0.99) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 1010;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu-drawer.active {
  right: 0;
}

.drawer-header {
  height: var(--nav-height);
  padding: 0 var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}
.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--slate-400);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition-fast);
}
.mobile-menu-close:hover {
  color: var(--white);
  background: rgba(227, 28, 35, 0.1);
  border-color: rgba(227, 28, 35, 0.2);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.drawer-link {
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
  height: 48px;
  color: var(--slate-300);
  font-weight: 600;
  font-size: var(--font-size-base);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.drawer-link:hover, .drawer-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  padding-left: var(--space-4);
}

/* Drawer Accordions */
.drawer-accordion {
  display: flex;
  flex-direction: column;
}
.drawer-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 var(--space-3);
  height: 48px;
  color: var(--slate-300);
  font-weight: 600;
  font-size: var(--font-size-base);
  border-radius: var(--radius-md);
  text-align: left;
  transition: all var(--transition-fast);
}
.drawer-accordion-btn:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}
.drawer-accordion.active .drawer-accordion-btn {
  color: var(--white);
  background: rgba(50, 75, 179, 0.1);
}
.accordion-icon {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-base);
}

.drawer-accordion-content {
  max-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: var(--space-4);
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer-sublink {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 44px;
  padding: 0 var(--space-3);
  color: var(--slate-400);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.drawer-sublink:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.03);
  padding-left: var(--space-4);
}
.sublink-icon {
  width: 14px;
  height: 14px;
  color: var(--action-blue-light);
}

.drawer-actions {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

/* ─── Drawer Overlay ────────────────────────────────────── */
.mobile-menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(4, 9, 20, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1009;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Smartwatch Block Overlay ──────────────────────────── */
.unsupported-size-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--navy-900);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.unsupported-content {
  text-align: center;
  max-width: 280px;
}
.unsupported-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  color: var(--brand-red);
  background: rgba(227, 28, 35, 0.1);
  border: 1px solid rgba(227, 28, 35, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(227, 28, 35, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(227, 28, 35, 0); }
}
.unsupported-content h3 {
  font-size: var(--font-size-xl);
  color: var(--white);
  margin-bottom: var(--space-2);
}
.unsupported-content p {
  font-size: var(--font-size-sm);
  color: var(--slate-400);
  line-height: 1.6;
}

/* ─── Media Query Overrides ─────────────────────────────── */
@media (max-width: 319px) {
  .unsupported-size-overlay {
    display: flex !important;
  }
  body {
    overflow: hidden !important;
  }
}

@media (max-width: 1024px) {
  .nav-links { display: none !important; }
  .nav-actions { display: none !important; }
  .mobile-menu-toggle { display: flex !important; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-4); text-align: center; }
}
