/* ===== NEXUS 360 — Shared styles for new pages ===== */
/* Used by index.html (new), service pages, product pages */

:root {
  --nexus-blue: #0c4a6e;
  --nexus-light-blue: #0ea5e9;
  --nexus-dark: #0f172a;
  --nexus-gray: #475569;
  --nexus-light-gray: #f8fafc;
}

/* ===== HERO AREA (Split Video) ===== */
.video-hero {
  position: relative;
  height: 85vh;
  width: 100%;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-hero .video-left, .video-hero .video-right {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
}
.video-hero video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.6;
}
.video-hero .video-left { z-index: 1; }
.video-hero .video-right {
  z-index: 2;
  clip-path: polygon(100% 0, 100% 100%, 0% 100%);
  transition: clip-path 0.5s ease-in-out;
}
.video-hero:hover .video-right {
  clip-path: polygon(100% 0, 100% 100%, 20% 100%);
}
.diagonal-line {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to top left, transparent 49.8%, var(--nexus-light-blue) 49.9%, var(--nexus-light-blue) 50.1%, transparent 50.2%);
  opacity: 0.8;
}
/* Invisible wider hitbox strip over the diagonal for dragging */
.diagonal-line-hitbox {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 4;
  cursor: ns-resize;
  background: linear-gradient(to top left, transparent 48%, transparent 48%, transparent 52%, transparent 52%);
}
.motto-container {
  position: relative;
  z-index: 10;
  text-align: center;
  color: #fff;
  max-width: 900px;
  padding: 0 20px;
}
.motto {
  font-family: 'Libre Baskerville', serif;
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.submotto {
  font-size: 1.2rem;
  margin-bottom: 35px;
  opacity: 0.9;
  font-weight: 400;
}
.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* ===== SERVICE CARDS — UNIVERSAL ===== */
.service-card {
  background: #ffffff;
  color: var(--nexus-gray);
  border-radius: 12px;
  padding: 35px 28px;
  text-align: left;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(135deg, var(--nexus-blue) 0%, var(--nexus-light-blue) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(12,74,110,0.12);
  border-color: var(--nexus-light-blue);
}

/* DARK THEME FOR PRODUCTS — disabled: now uses white cards like services */

/* Status Badges — inline pill next to icon */
.badge-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
  line-height: 16px;
}
.sc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.service-card .sc-icon {
  width: 56px; height: 56px; line-height: 56px;
  border-radius: 12px; font-size: 24px;
  margin-bottom: 20px;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  background: linear-gradient(135deg, #0c4a6e, #0ea5e9);
  flex-shrink: 0;
}
.sc-header .sc-icon {
  margin-bottom: 0;
}
.sc-tech { background: linear-gradient(135deg, #0c4a6e, #0ea5e9) !important; }
.sc-data { background: linear-gradient(135deg, #7c3aed, #a78bfa) !important; }
.sc-strat { background: linear-gradient(135deg, #047857, #10b981) !important; }
.sc-fin  { background: linear-gradient(135deg, #b45309, #f59e0b) !important; }
.sc-mkt  { background: linear-gradient(135deg, #dc2626, #f87171) !important; }
.sc-pharma { background: linear-gradient(135deg, #0d9488, #14b8a6) !important; }
.service-card h4 { 
  font-size: 18px; 
  margin-bottom: 15px; 
  font-family: 'Libre Baskerville', serif; 
  color: var(--nexus-dark);
}
.service-card p { 
  font-size: 14px; 
  line-height: 23px; 
  margin-bottom: 20px;
}
.service-card .sc-link {
  margin-top: auto;
  display: inline-block;
  color: var(--nexus-blue);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s;
}
.service-card .sc-link:hover { color: var(--nexus-light-blue); }

/* Section Polish */
.nx-section { padding: 80px 5%; }
.nx-section-gray { background: #f8fafc; }
.section-label {
  color: var(--nexus-light-blue);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 11px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.section-heading {
  font-size: 2.5rem;
  margin-bottom: 16px;
  font-family: 'Libre Baskerville', serif;
  color: var(--nexus-dark);
}

/* ===== COOKIE CONSENT ===== */
.cookie-consent {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--nexus-dark);
  color: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  z-index: 99999;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
@media (min-width: 768px) {
  .cookie-consent {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20px 50px;
  }
}
.cookie-btns { display: flex; gap: 12px; margin-top: 15px; }
@media (min-width: 768px) { .cookie-btns { margin-top: 0; } }

.btn-accept { background: var(--nexus-light-blue); color: #fff; border: none; padding: 10px 25px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.btn-deny { background: rgba(255,255,255,0.1); color: #fff; border: none; padding: 10px 25px; border-radius: 6px; cursor: pointer; }
/* ===== MEGA MENU & DROPDOWNS ===== */
.nav-menu li.dropdown {
  position: static; /* Required for full-width mega menu or large width */
}

/* Base Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: 12px;
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

/* Mega Menu Version */
.mega-menu {
  width: 900px;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
}

.nav-menu li.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Mega Columns */
.mega-col {
  padding: 0 10px;
}
.mega-col h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--nexus-blue);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--nexus-light-blue);
  display: inline-block;
  padding-bottom: 4px;
}

.mega-link {
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: var(--nexus-gray) !important;
  text-decoration: none !important;
  font-size: 0.9rem !important;
  padding: 8px 0 !important;
  font-weight: 400 !important;
  transition: all 0.2s ease !important;
}

.mega-link::after { display: none !important; } /* Remove underline effect for mega links */

.mega-link i {
  font-size: 0.75rem;
  color: var(--nexus-light-blue);
  transition: transform 0.2s ease;
}

.mega-link:hover {
  color: var(--nexus-blue) !important;
  transform: translateX(4px);
}
.mega-link:hover i {
  transform: translateX(2px);
}

/* Header & Navigation Fixes */
.nav-arrow {
  font-size: 0.75rem;
  margin-left: 6px;
  opacity: 0.7;
}

@media (max-width: 991px) {
  .mega-menu {
    width: 95vw;
    grid-template-columns: 1fr !important;
    padding: 20px;
  }
}

/* ===== HERO BUTTONS (CTA Aligned) ===== */
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}
.hero-btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #0ea5e9 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}
.hero-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
  color: #fff;
}
.hero-btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}
.hero-btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  transform: translateY(-3px);
  color: #fff;
}

/* ===== FOOTER ===== */
.nx-footer {
  background: var(--nexus-dark);
  color: #94a3b8;
}
.footer-link {
  display: flex;
  align-items: center;
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  padding: 5px 0;
  transition: all 0.2s ease;
  gap: 10px;
}
.footer-link i {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.footer-link:hover {
  color: #0ea5e9;
  transform: translateX(3px);
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: var(--nexus-dark);
  color: #fff;
  padding: 80px 5%;
  text-align: center;
}
.cta-section h2 {
  color: #fff;
  font-family: 'Libre Baskerville', serif;
  font-size: 2.2rem;
  margin-bottom: 16px;
}
.cta-section p {
  color: #94a3b8;
  font-size: 1.1rem;
}

/* ===== CONTACT CARDS ===== */
.contact-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}
.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}
.contact-card i {
  font-size: 2rem;
  color: var(--nexus-light-blue);
  margin-bottom: 16px;
}
.contact-card h3 {
  font-family: 'Libre Baskerville', serif;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

/* ===== SERVICE PAGE HERO ===== */
.svc-hero {
  background: linear-gradient(135deg, #0f172a 0%, #0c4a6e 100%);
  color: #fff;
  padding: 140px 5% 80px;
  text-align: left;
  max-width: 100%;
}
.svc-hero h1 {
  color: #fff;
  font-size: 3rem;
  font-family: 'Libre Baskerville', serif;
  margin-bottom: 20px;
}
.svc-hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  max-width: 700px;
}

/* ===== SERVICE FEATURES ===== */
.svc-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.svc-feature {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 30px;
  transition: all 0.3s ease;
}
.svc-feature:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  border-color: var(--nexus-light-blue);
}
.sf-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--nexus-blue), var(--nexus-light-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.sf-icon i { color: #fff; font-size: 20px; }
.svc-feature h4 {
  font-family: 'Libre Baskerville', serif;
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--nexus-dark);
}
.svc-feature p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--nexus-gray);
}

/* ===== USE CASE TABLE ===== */
.use-case-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.use-case-table th {
  background: var(--nexus-dark);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}
.use-case-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.use-case-table tr:hover td {
  background: #f1f5f9;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {

  /* --- GLOBAL OVERFLOW FIX --- */
  html, body { overflow-x: hidden; }

  /* --- HERO --- */
  .video-hero { height: 60vh; }
  .motto { font-size: 1.8rem; }
  .submotto { font-size: 1rem; }
  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  .hero-btn {
    height: 44px;
    padding: 0 24px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    max-width: 260px;
  }
  /* Short labels on mobile */
  .hero-btn .btn-label-long { display: none; }
  .hero-btn .btn-label-short { display: inline; }

  /* --- SERVICE PAGE HERO --- */
  .svc-hero {
    padding: 100px 5% 50px;
  }
  .svc-hero h1 { font-size: 1.8rem; }
  .svc-hero p { font-size: 0.95rem; }

  /* --- SECTION HEADINGS --- */
  .section-heading { font-size: 1.6rem; }
  .nx-section { padding: 50px 5%; }

  /* --- GRIDS → 1 COLUMN --- */
  .svc-features {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* All inline grids to single column */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(auto-fit"],
  [style*="grid-template-columns:repeat(auto-fit"],
  [style*="grid-template-columns: 2fr 1fr 1fr 1fr 1fr"],
  [style*="grid-template-columns:2fr 1fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* --- PRODUCT HERO (nexusmedical etc) --- */
  [style*="grid-template-columns: 1fr 1fr"][style*="gap:60px"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Product hero titles */
  [style*="font-size:3rem"] { font-size: 2rem !important; }
  [style*="font-size: 3rem"] { font-size: 2rem !important; }
  [style*="font-size:3.5rem"] { font-size: 2rem !important; }
  [style*="font-size: 3.5rem"] { font-size: 2rem !important; }

  /* --- STATS CARDS (52K+, 4, 512, etc.) --- */
  [style*="font-size:2.5rem"] { font-size: 1.8rem !important; }
  [style*="font-size: 2.5rem"] { font-size: 1.8rem !important; }

  /* --- TABLES --- */
  .use-case-table {
    font-size: 12px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .use-case-table th,
  .use-case-table td {
    padding: 8px 10px;
    white-space: nowrap;
  }

  /* --- CTA SECTION --- */
  .cta-section {
    padding: 50px 5%;
  }
  .cta-section h2 {
    font-size: 1.5rem;
  }
  .cta-section p {
    font-size: 0.95rem;
  }
  .cta-section [style*="display:inline-flex"],
  .cta-section [style*="display: inline-flex"] {
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
  }
  .cta-section .hero-btn {
    width: 80%;
    max-width: 280px;
  }

  /* --- FOOTER --- */
  .nx-footer [style*="grid-template-columns"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
    padding: 40px 5% 30px !important;
  }

  /* --- COOKIE CONSENT --- */
  .cookie-consent {
    bottom: 10px;
    left: 10px;
    right: 10px;
    padding: 18px 20px;
    font-size: 13px;
  }
  .cookie-btns {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .cookie-btns button,
  .btn-accept, .btn-deny {
    width: 100%;
    padding: 10px;
    font-size: 13px;
  }

  /* --- MEGA MENU MOBILE --- */
  .mega-menu {
    width: 95vw !important;
    grid-template-columns: 1fr !important;
    padding: 16px !important;
  }

  /* --- CONTACT CARDS --- */
  .contact-card {
    padding: 24px 20px;
  }
  .contact-card h3 {
    font-size: 1rem;
  }

  /* --- COMPLIANCE BADGES (pharma hero) --- */
  [style*="display:flex"][style*="gap:12px"][style*="flex-wrap:wrap"] span {
    font-size: 11px !important;
    padding: 6px 12px !important;
  }

  /* --- SUBSECTOR CARDS (salud.html flex rows) --- */
  [style*="display:flex"][style*="gap:40px"][style*="align-items:center"] {
    flex-direction: column !important;
    gap: 16px !important;
    padding: 24px !important;
  }

  /* --- LIVE DEMO BANNER --- */
  [style*="background:linear-gradient(90deg,#0d9488,#0ea5e9)"] {
    padding: 12px 5% !important;
  }
  [style*="background:linear-gradient(90deg,#0d9488,#0ea5e9)"] a {
    font-size: 13px !important;
  }

  /* --- SERVICE/PRODUCT PAGE INLINE BUTTONS --- */
  [style*="display:flex"][style*="gap:16px"][style*="margin-top:30px"] {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }
}

/* Extra small phones */
@media (max-width: 380px) {
  .motto { font-size: 1.5rem; }
  .section-heading { font-size: 1.3rem; }
  .svc-hero h1 { font-size: 1.5rem; }
  .hero-btn { font-size: 12px; height: 40px; padding: 0 18px; }
}

