/* ==========================================================================
   DataIQ Hub - Global Header & Footer Stylesheet
   Centralized styling for Header, Navigation, Mobile Drawer, and Footer.
   Linked across all pages: index, about, services, solutions, industries, resources, contact.
   ========================================================================== */

/* -------------------------------------------------------------
   CSS VARIABLES FALLBACK (Ensures standalone styling reliability)
   ------------------------------------------------------------- */
:root {
  --navy-dark: #071228;
  --navy-main: #0b1e36;
  --blue-primary: #1d70b8;
  --blue-hover: #155894;
  --blue-light: #e8f3fc;
  --blue-glow: rgba(29, 112, 184, 0.35);
  --green-primary: #00b050;
  --green-hover: #008f41;
  --green-light: #e6f7ed;
  --green-glow: rgba(0, 176, 80, 0.35);
  --cyan-accent: #00d2ff;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-white: #ffffff;
  --bg-light: #f8fafc;
  --border-light: #e2e8f0;
  --font-display: 'Crimson Pro', Georgia, serif;
  --font-serif: 'Crimson Pro', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  --font-sans: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-pill: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --hero-globe-size: clamp(360px, 36.5vw, 600px);
  --hero-globe-min-height: clamp(360px, 36.5vw, 600px);
  --hero-globe-offset-x: clamp(-15px, -1vw, 0px);
}

/* -------------------------------------------------------------
   GLOBAL TYPOGRAPHY BASE
   ------------------------------------------------------------- */
body,
p,
input,
button,
select,
textarea,
label,
.font-sans {
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
.heading-serif,
.font-serif {
  font-family: var(--font-display);
}

/* -------------------------------------------------------------
   HEADER & NAVIGATION BAR (DESKTOP)
   ------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header .container {
  max-width: 1920px;
  padding: 0 30px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 1025px) {
  .header .brand-logo {
    margin-left: 0;
  }
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img-svg {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 176, 80, 0.3));
  transition: transform var(--transition-fast);
}

.brand-logo:hover .logo-img-svg {
  transform: scale(1.05) rotate(5deg);
}

.logo-text-block {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--navy-dark);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-family: var(--font-sans);
}

.logo-title .logo-iq {
  color: var(--green-primary) !important;
  font-weight: 900;
}

.logo-subtitle {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  font-family: var(--font-sans);
}

/* Desktop Navigation Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  padding: 0.35rem 0.25rem;
  position: relative;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--blue-primary);
  border-radius: var(--radius-pill);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-icon {
  font-size: 0.7rem;
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}

.dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
  color: var(--blue-primary);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 220px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.6rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: 1100;
  list-style: none;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}

.dropdown-item:hover {
  background: var(--blue-light);
  color: var(--blue-primary);
}

.dropdown-item i {
  font-size: 0.9rem;
  color: var(--blue-primary);
  width: 18px;
}

/* Right Nav CTA Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex-shrink: 0;
}

.btn-nav-demo {
  background: rgba(29, 112, 184, 0.08);
  color: var(--blue-primary);
  border: 1.5px solid var(--blue-primary);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}

.btn-nav-demo i {
  font-size: 0.72rem;
}

.btn-nav-demo:hover {
  background: var(--green-primary);
  color: #ffffff;
  border-color: var(--green-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--green-primary);
}

.btn-nav-touch {
  background-color: var(--blue-primary);
  color: var(--text-white);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(6, 26, 58, 0.2);
  transition: all var(--transition-normal);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.25;
  border: 1.5px solid var(--blue-primary);
  text-decoration: none;
  cursor: pointer;
}

.btn-nav-touch i {
  font-size: 0.72rem;
}

.btn-nav-touch:hover {
  background-color: var(--green-primary);
  border-color: var(--green-primary);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px var(--green-hover);
}

/* -------------------------------------------------------------
   MOBILE NAVIGATION TOGGLE & DRAWER
   ------------------------------------------------------------- */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--navy-dark);
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-drawer {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  padding: 1.25rem 1.5rem 1.75rem;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 999;
  box-sizing: border-box;
}

.mobile-drawer.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav-item {
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--navy-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--blue-primary);
}

.mobile-drawer .btn-nav-demo,
.mobile-drawer .btn-nav-touch {
  padding: 9px 18px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

/* -------------------------------------------------------------
   FOOTER (DESKTOP)
   ------------------------------------------------------------- */
.footer {
  background: #d8e6fe;
  background: linear-gradient(0deg, rgba(209, 225, 255, 0.8), rgba(209, 225, 255, 0.8)), #f8fafc;
  color: var(--navy-dark);
  padding: 2.2rem 0 1rem;
  margin-top: auto;
  border-top: 1px solid rgba(27, 88, 148, 0.15);
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
}

.footer .container {
  max-width: 1920px;
  padding: 0 30px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.footer-col-about .logo-img-svg {
  width: 32px;
  height: 32px;
}

.footer-col-about .logo-title {
  color: var(--navy-dark);
  font-size: 1.15rem;
}

.footer-col-about .logo-subtitle {
  font-size: 0.55rem;
}

.footer-about-text {
  font-size: 0.8rem;
  line-height: 1.55;
  margin-top: 0.5rem;
  color: #475569;
  font-weight: 500;
}

.footer-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-link {
  font-size: 0.8rem;
  color: #475569;
  font-weight: 500;
  transition: color var(--transition-fast), transform var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.footer-link i {
  color: var(--blue-primary);
  font-size: 0.7rem;
}

.footer-link:hover {
  color: var(--green-primary);
  transform: translateX(4px);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #475569;
  font-weight: 500;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.footer-contact-item i {
  color: var(--blue-primary);
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.footer-contact-link {
  color: inherit;
  transition: color var(--transition-fast);
  text-decoration: none;
}

.footer-contact-link:hover {
  color: var(--green-primary);
}

.footer-col-actions {
  display: flex;
  flex-direction: column;
}

.footer-actions-text {
  font-size: 0.76rem;
  line-height: 1.4;
  color: #475569;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.footer-actions-group {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  align-items: flex-start;
}

.btn-footer-demo {
  background: rgba(29, 112, 184, 0.08);
  color: var(--blue-primary);
  border: 1.5px solid var(--blue-primary);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  line-height: 1.25;
  width: 100%;
  max-width: 155px;
  cursor: pointer;
  text-decoration: none;
}

.btn-footer-demo i {
  font-size: 0.72rem;
}

.btn-footer-demo:hover {
  background: var(--green-primary);
  color: #ffffff;
  border-color: var(--green-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--green-primary);
}

.btn-footer-touch {
  background-color: var(--blue-primary);
  color: var(--text-white);
  border: 1.5px solid var(--blue-primary);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(6, 26, 58, 0.2);
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  line-height: 1.25;
  width: 100%;
  max-width: 155px;
  cursor: pointer;
  text-decoration: none;
}

.btn-footer-touch i {
  font-size: 0.72rem;
}

.btn-footer-touch:hover {
  background-color: var(--green-primary);
  border-color: var(--green-primary);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px var(--green-hover);
}

.footer-bottom {
  padding-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box;
}

.footer-socials {
  display: flex;
  gap: 0.55rem;
}

.social-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(27, 88, 148, 0.18);
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.social-icon:hover {
  background: var(--blue-primary);
  color: #ffffff;
  border-color: var(--blue-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 112, 184, 0.3);
}

/* -------------------------------------------------------------
   RESPONSIVE MEDIA QUERIES (HEADER & FOOTER)
   ------------------------------------------------------------- */
/* Desktop Protection: Ensure mobile drawer never renders on desktop (>=1024px) */
@media (min-width: 1024px) {
  .mobile-drawer {
    display: none !important;
  }
}

/* Compact Desktop Tier (Accommodates Full Desktop Navbar from 1024px to 1279px) */
@media (max-width: 1279px) and (min-width: 1024px) {
  .header .container {
    padding: 0 20px;
  }

  .nav-container {
    height: 60px;
    gap: 0.75rem;
  }

  .brand-logo {
    gap: 0.45rem;
  }

  .logo-img-svg {
    width: 32px;
    height: 32px;
  }

  .logo-title {
    font-size: 1.12rem;
  }

  .logo-subtitle {
    font-size: 0.54rem;
  }

  .nav-menu {
    gap: 0.75rem;
  }

  .nav-link {
    font-size: 0.82rem;
    padding: 0.3rem 0.18rem;
  }

  .nav-actions {
    gap: 0.3rem;
  }

  .btn-nav-demo {
    padding: 7px 14px;
    font-size: 0.82rem;
  }

  .btn-nav-touch {
    padding: 7px 14px;
    font-size: 0.82rem;
  }

  .btn-footer-demo,
  .btn-footer-touch {
    padding: 7px 14px;
    font-size: 0.82rem;
    max-width: 145px;
  }

  .footer-grid {
    gap: 1.25rem;
  }
}

/* Tablet Portrait & Mobile Tier (Triggers below 1024px) */
@media (max-width: 1023px) {
  .nav-menu,
  .nav-actions {
    display: none !important;
  }

  .mobile-toggle {
    display: block !important;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    height: 58px;
  }

  .nav-menu,
  .nav-actions {
    display: none !important;
  }

  .mobile-toggle {
    display: block !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  /* 1. Full-Width Background Video is the ONLY one visible on mobile (<= 768px) */
  .hero-video-desktop {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
    pointer-events: none !important;
  }

  .hero-video-mobile {
    display: none !important;
  }

  /* 2. Globe disappears completely at <= 768px */
  .hero-visual,
  .globe-wrapper,
  #globeViz,
  .globe-nodes-container,
  .globe-node {
    display: none !important;
  }

  /* 3. Hero Section & Content Formatting */
  .hero-section {
    position: relative !important;
    overflow: hidden !important;
    padding: 3.5rem 0 3rem !important;
    min-height: auto !important;
  }

  .hero-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
    position: relative !important;
    z-index: 5 !important;
  }

  .hero-content {
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    z-index: 5 !important;
  }
}

/* ==========================================================================
   PERMANENT FAIL-SAFE HERO VIDEO BACKGROUND SYSTEM (UNIVERSAL)
   ========================================================================== */
.hero-video-container,
.hero-video-desktop {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  pointer-events: none !important;
  z-index: 0 !important;
  display: block !important;
}

.hero-video-element {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

.hero-video-overlay {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(135deg, rgba(14, 38, 77, 0.74) 0%, rgba(9, 28, 58, 0.62) 50%, rgba(4, 14, 32, 0.78) 100%) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* Permanent Guard: Defensively obliterate any legacy mobile duplicate */
.hero-video-mobile {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Base Desktop Orbiting Feature Nodes Container */
.globe-nodes-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.globe-nodes-container .globe-node {
  pointer-events: auto;
}

/* Hero Category Tag Badge (Consistent across pages) */
.hero-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #00e676;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  padding: 0.4rem 0.9rem;
  background: rgba(0, 176, 80, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.35);
  border-radius: 9999px;
  backdrop-filter: blur(8px);
}

/* Hero Section Paragraph & Subtitle (Pure White) */
.hero-subtitle,
.hero-desc,
.hero-section p {
  color: #ffffff;
}

/* ==========================================================================
   Tiered Button Design System (Plus Jakarta Sans)
   - Tier 1 (Nav/Footer): 8px 16px (~36px height)
   - Tier 2 (Standard UI): 10px 20px (~42px height)
   - Tier 3 (Hero/CTA): 14px 28px (~50px height)
   ========================================================================== */
button,
.btn,
a.btn,
button.btn,
[class*="btn-"],
[class*="-btn"] {
  font-family: var(--font-body), 'Plus Jakarta Sans', 'DM Sans', sans-serif !important;
  font-style: normal !important;
}

/* Tier 2: Standard UI Buttons */
.btn {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}

/* Tier 1: Compact Nav & Footer Actions */
.btn-nav-demo,
.btn-nav-touch,
.btn-footer-demo,
.btn-footer-touch {
  padding: 8px 16px !important;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
}

/* Tier 3: High-Impact Hero & Final CTA Actions */
.hero-actions .btn,
.btn-hero-cta,
.btn-large,
.btn-cta-main,
.btn-cta-sec,
.btn-cta-tert,
.btn-cta-green,
.btn-cta-ghost,
.btn-cta-explore,
.btn-cta-talk,
.btn-cta-services,
.btn-cta-solutions,
.btn-cta-contact {
  padding: 14px 28px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  line-height: 1.35;
}

@media (max-width: 768px) {
  .hero-actions .btn,
  .btn-hero-cta,
  .btn-large,
  .btn-cta-main,
  .btn-cta-sec,
  .btn-cta-tert,
  .btn-cta-green,
  .btn-cta-ghost,
  .btn-cta-explore,
  .btn-cta-talk,
  .btn-cta-services,
  .btn-cta-solutions,
  .btn-cta-contact {
    padding: 11px 22px !important;
    font-size: 0.92rem !important;
  }
}