/* ============================================================
   NBIS Welcome Page — Emerald & Teal Theme
   National Biomedical Imaging System
   ============================================================ */

:root {
  --bg-dark: #050d0a;
  --bg-card: rgba(8, 26, 18, 0.50);
  --border-color: rgba(0, 210, 140, 0.14);
  --primary: #00d28c;
  --secondary: #0097a7;
  --accent: #64ffda;
  --warning: #ff6b35;
  --text-muted: #8fb3a0;
  --text-light: #f0faf5;
}

html {
  overflow-x: hidden;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  overflow-x: hidden;
  position: relative;
  max-width: 100vw;
  padding-top: 75px;
}

/* Abstract background glows — contained to prevent mobile overflow */
body::before {
  content: "";
  position: fixed;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(0, 151, 167, 0.12) 0%, transparent 70%);
  top: 10%;
  left: -120px;
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 210, 140, 0.08) 0%, transparent 70%);
  top: 50%;
  right: -150px;
  pointer-events: none;
  z-index: -1;
}

/* ── Navigation ── */
.glass-nav {
  background: rgba(5, 13, 10, 0.90);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1030;
  transition: all 0.3s ease;
}

.navbar-brand img {
  filter: drop-shadow(0 0 8px rgba(0, 210, 140, 0.3));
}

/* ── Hero Section ── */
.hero-section {
  position: relative;
  padding: 100px 0 80px;
  min-height: calc(100vh - 86px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 210, 140, 0.08);
  border: 1px solid rgba(0, 210, 140, 0.3);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
  box-shadow: 0 0 15px rgba(0, 210, 140, 0.05);
}

.tech-badge i {
  animation: pulse 1.5s infinite;
}

.gradient-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, #a7f3d0 70%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
}

/* ── Buttons ── */
.btn-glow-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #000;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 8px;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 210, 140, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-glow-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.btn-glow-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 210, 140, 0.6);
}

.btn-glow-primary:hover::before {
  opacity: 1;
}

.btn-glow-outline {
  background: transparent;
  color: var(--text-light);
  font-weight: 500;
  padding: 13px 32px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.btn-glow-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 210, 140, 0.2);
  transform: translateY(-2px);
}

/* ── Console Mockup ── */
.console-mockup {
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 210, 140, 0.05);
  backdrop-filter: blur(12px);
  max-width: 100%;
  overflow: hidden;
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.console-dots {
  display: flex;
  gap: 6px;
}

.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.console-dot.red   { background: #ff5f56; }
.console-dot.yellow{ background: #ffbd2e; }
.console-dot.green { background: #27c93f; }

.console-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ── Chest Scanner Simulator ── */
.scanner-widget {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: #000;
  margin-bottom: 16px;
  max-height: 250px;
}

.scanner-image {
  width: 100%;
  height: auto;
  opacity: 0.65;
  display: block;
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--primary), transparent);
  box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
  animation: scan 4s linear infinite;
}

.ai-target-box {
  position: absolute;
  border: 2px dashed var(--warning);
  border-radius: 4px;
  animation: pulse-glow 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.4);
}

.ai-target-box.box-1 {
  top: 25%; left: 20%; width: 25%; height: 35%;
}

.ai-target-box.box-2 {
  top: 45%; left: 60%; width: 20%; height: 25%;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(100, 255, 218, 0.4);
}

.ai-label {
  position: absolute;
  top: -18px;
  left: 0;
  background: var(--warning);
  color: #fff;
  font-size: 0.55rem;
  padding: 1px 6px;
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.ai-target-box.box-2 .ai-label {
  background: var(--accent);
  color: #000;
}

/* ── Live ECG Canvas ── */
.ecg-container {
  background: rgba(5, 9, 21, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  position: relative;
}

.ecg-title {
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.ecg-canvas {
  width: 100%;
  height: 80px;
  background: #040710;
  border-radius: 4px;
  display: block;
}

/* ── Console Stats ── */
.console-stats {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 15px;
  overflow: hidden;
}

.console-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  min-width: 0;
}

.console-stat-row span {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.console-stat-row span:first-child {
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}

.console-stat-row span:last-child {
  text-align: right;
  flex-shrink: 0;
}

.console-stat-row:last-child {
  border-bottom: none;
}

/* ── Stats Ribbon ── */
.stats-ribbon {
  background: rgba(8, 26, 18, 0.6);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 35px 0;
  backdrop-filter: blur(10px);
}

.stat-box {
  text-align: center;
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 5px;
  text-shadow: 0 0 15px rgba(0, 210, 140, 0.2);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Service Cards ── */
.card-modern {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-card);
  overflow: hidden;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
}

.card-modern::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 210, 140, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card-modern:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 210, 140, 0.4);
  box-shadow: 0 15px 30px rgba(0, 210, 140, 0.08);
}

.card-modern:hover::before {
  opacity: 1;
}

.service-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.service-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  filter: brightness(0.8) contrast(1.1);
}

.card-modern:hover .service-img {
  transform: scale(1.08) rotate(1deg);
  filter: brightness(0.95) contrast(1.15);
}

.service-icon-floating {
  position: absolute;
  bottom: -20px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #000;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 8px 20px rgba(0, 210, 140, 0.3);
  z-index: 2;
}

.card-modern-body {
  padding: 30px 24px 24px;
}

.card-modern-body h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.35rem;
  margin-bottom: 12px;
}

/* ── Workflow Steps ── */
.flow-step-card {
  background: rgba(8, 26, 18, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 32px 24px;
  border-radius: 16px;
  position: relative;
  height: 100%;
  transition: all 0.3s ease;
}

.flow-step-card:hover {
  background: rgba(8, 26, 18, 0.55);
  border-color: rgba(0, 210, 140, 0.2);
}

.flow-step-number {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: rgba(0, 210, 140, 0.12);
  position: absolute;
  top: 15px;
  right: 20px;
  line-height: 1;
}

.flow-step-card:hover .flow-step-number {
  color: rgba(0, 210, 140, 0.25);
}

.flow-icon {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 20px;
  text-shadow: 0 0 15px rgba(0, 210, 140, 0.3);
}

/* ── PACS / DICOM Highlight Section ── */
.highlight-section {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #061410 50%, var(--bg-dark) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding: 100px 0;
}

.tech-feature-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
}

.tech-feature-pill:hover {
  background: rgba(0, 210, 140, 0.04);
  border-color: rgba(0, 210, 140, 0.15);
  transform: translateX(5px);
}

.tech-feature-pill i {
  color: var(--primary);
  font-size: 1.25rem;
}

/* ── Why Choose NBIS Section ── */
.why-section {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #061812 50%, var(--bg-dark) 100%);
  padding: 100px 0;
  position: relative;
}

.why-card {
  background: rgba(8, 26, 18, 0.5);
  border: 1px solid rgba(0, 210, 140, 0.08);
  border-radius: 16px;
  padding: 32px 24px;
  height: 100%;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
}

.why-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 210, 140, 0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.why-card:hover {
  border-color: rgba(0, 210, 140, 0.35);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 210, 140, 0.07);
}

.why-card:hover::before {
  opacity: 1;
}

.why-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 210, 140, 0.12), rgba(0, 151, 167, 0.12));
  border: 1px solid rgba(0, 210, 140, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 20px;
  transition: all 0.3s ease;
  text-shadow: 0 0 12px rgba(0, 210, 140, 0.4);
}

.why-card:hover .why-icon {
  background: linear-gradient(135deg, rgba(0, 210, 140, 0.2), rgba(0, 151, 167, 0.2));
  box-shadow: 0 0 20px rgba(0, 210, 140, 0.2);
}

.why-card h5 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--text-light);
}

.why-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.why-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(100, 255, 218, 0.08);
  border: 1px solid rgba(100, 255, 218, 0.25);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}

/* ── Footer ── */
.footer {
  background: #030a06;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 80px 0 30px;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.footer h5 {
  color: var(--text-light);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--primary);
}

.footer p,
.footer span,
.footer li {
  color: #94a3b8 !important;
}

.hover-primary:hover {
  color: var(--primary) !important;
  transition: color 0.3s ease;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 50px;
  padding-top: 30px;
}

/* ── Keyframe Animations ── */
@keyframes scan {
  0%   { top: 0%; }
  50%  { top: 100%; }
  100% { top: 0%; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.4;
    border-style: dashed;
  }
  50% {
    opacity: 1;
    border-style: solid;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.8);
  }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Large tablets (≤ 991px) */
@media (max-width: 991.98px) {
  .hero-section {
    padding: 60px 0 50px;
    min-height: auto;
  }

  .hero-section .row {
    flex-direction: column-reverse;
  }

  .hero-section .col-lg-6:first-child {
    text-align: center;
  }

  .hero-section .tech-badge {
    display: inline-flex;
  }

  .hero-section h1.gradient-text {
    font-size: 2.2rem;
  }

  .hero-section .d-flex.gap-3 {
    justify-content: center;
  }

  .highlight-section {
    padding: 60px 0;
  }

  .highlight-section .col-lg-6:last-child {
    display: none;
  }

  .footer {
    padding: 60px 0 24px;
    text-align: center;
  }

  .footer .d-flex.justify-content-lg-start {
    justify-content: center !important;
  }
}

/* Tablets / large phones (≤ 767px) */
@media (max-width: 767.98px) {
  .hero-section {
    padding: 50px 0 40px;
  }

  .hero-section h1.gradient-text {
    font-size: 1.9rem;
    line-height: 1.25;
  }

  .hero-section p.lead {
    font-size: 1rem !important;
  }

  .console-mockup {
    padding: 16px;
    margin-top: 30px;
  }

  .console-title {
    font-size: 0.65rem;
  }

  .scanner-widget {
    max-height: 200px;
  }

  .ecg-canvas {
    height: 60px;
  }

  .stats-ribbon {
    padding: 28px 0;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.78rem;
    letter-spacing: 0.5px;
  }

  .service-img-wrapper {
    height: 180px;
  }

  .card-modern-body {
    padding: 24px 16px 16px;
  }

  .card-modern-body h3 {
    font-size: 1.15rem;
  }

  .flow-step-card {
    padding: 24px 20px;
  }

  .flow-step-number {
    font-size: 2.2rem;
  }

  .highlight-section {
    padding: 50px 0;
  }

  .tech-feature-pill {
    padding: 12px 14px;
  }

  .footer {
    padding: 50px 0 20px;
    text-align: center;
  }

  .footer .d-flex.gap-3 {
    justify-content: center !important;
  }

  .footer-bottom {
    margin-top: 30px;
    text-align: center;
  }

  .footer-bottom .col-md-6:last-child {
    margin-top: 8px;
  }

  .btn-glow-primary,
  .btn-glow-outline {
    padding: 11px 22px;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
    display: block;
  }

  .hero-section .d-flex.gap-3 {
    flex-direction: column;
    align-items: stretch;
  }

  .why-section { padding: 60px 0; }
  .why-card { padding: 24px 18px; }
  .why-icon { width: 48px; height: 48px; font-size: 1.2rem; }

  .navbar-collapse {
    background: #050d0a;
    padding: 15px;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
  }

  .navbar-nav .nav-link {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
  }
}

/* Small phones (≤ 575px) */
@media (max-width: 575.98px) {
  .hero-section {
    padding: 40px 0 30px;
  }

  .hero-section h1.gradient-text {
    font-size: 1.6rem;
  }

  .tech-badge {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .console-mockup {
    padding: 12px;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .console-stat-row {
    flex-direction: column;
    gap: 1px;
    padding: 5px 0;
  }

  .console-stat-row span:first-child {
    max-width: 100%;
    white-space: normal;
    font-size: 0.65rem;
    color: var(--text-muted);
  }

  .console-stat-row span:last-child {
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
  }

  .console-stats {
    font-size: 0.68rem;
  }

  .scanner-widget {
    max-height: 180px;
  }

  .ecg-canvas {
    height: 55px;
  }

  .ecg-title {
    font-size: 0.6rem;
  }

  .console-title {
    font-size: 0.58rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 60px);
  }

  .stats-ribbon .row > div {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 16px;
    margin-bottom: 4px;
  }

  .stats-ribbon .row > div:last-child {
    border-bottom: none;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .service-img-wrapper {
    height: 160px;
  }

  .display-5 {
    font-size: 1.7rem !important;
  }

  .highlight-section {
    padding: 40px 0;
  }

  .footer h5 {
    margin-top: 20px;
  }

  .footer {
    padding: 40px 0 20px;
  }

  .navbar-brand img {
    height: 36px !important;
  }

  .why-section { padding: 40px 0; }
}
