:root {
  --primary: #1769aa;
  --primary-dark: #0d3b66;
  --accent: #25c7a2;
  --soft: #eef8fb;
  --text: #14213d;
  --muted: #6c757d;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

.navbar {
  padding: 0.9rem 0;
}

.navbar-brand {
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.navbar-brand span {
  color: var(--primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.nav-link {
  font-weight: 500;
  color: var(--text);
}

.nav-link:hover,
.nav-link:focus {
  color: var(--primary);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--primary);
  border-color: var(--primary);
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
  background:
    radial-gradient(circle at top right, rgba(37, 199, 162, 0.18), transparent 35%),
    linear-gradient(180deg, #f7fcff 0%, #ffffff 100%);
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-section h1,
.section-title h2,
section h2 {
  color: var(--primary-dark);
  letter-spacing: -0.04em;
}

.hero-stats strong {
  display: block;
  color: var(--primary);
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1;
}

.hero-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-image-card {
  position: relative;
  padding: 2rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 24px 70px rgba(13, 59, 102, 0.12);
}

.floating-card {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 260px;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--white);
}

.floating-card i {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  background: var(--accent);
  font-size: 1.3rem;
}

.floating-card small {
  display: block;
  color: var(--muted);
}

.section-padding {
  padding: 6rem 0;
}

.section-title {
  max-width: 720px;
}

.section-title p {
  color: var(--muted);
  margin-top: 1rem;
}

.bg-soft {
  background: var(--soft);
}

.service-card {
  padding: 2rem;
  border: 1px solid rgba(23, 105, 170, 0.08);
  border-radius: 1.5rem;
  background: var(--white);
  box-shadow: 0 16px 50px rgba(13, 59, 102, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(13, 59, 102, 0.12);
}

.service-card i {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: var(--primary);
  background: var(--soft);
  font-size: 1.7rem;
  margin-bottom: 1.4rem;
}

.service-card h3 {
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.service-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.check-item,
.technology-list div {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(13, 59, 102, 0.06);
}

.check-item i,
.technology-list i {
  color: var(--accent);
}

.technology-list {
  display: grid;
  gap: 1rem;
}

.cta-section {
  padding: 5rem 0;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(13, 59, 102, 0.98), rgba(23, 105, 170, 0.94)),
    url('../img/pattern.svg');
  background-size: cover;
}

.cta-section h2 {
  color: var(--white);
}

.appointment-form {
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.appointment-form .form-label {
  color: var(--white);
  font-weight: 600;
}

.footer-section {
  padding: 4rem 0 2rem;
  color: rgba(255,255,255,0.78);
  background: #081f36;
}

.footer-section h3,
.footer-section h4 {
  color: var(--white);
}

.footer-section p {
  margin-bottom: 0.6rem;
}

.footer-section hr {
  border-color: rgba(255,255,255,0.18);
  margin: 2rem 0;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255,255,255,0.12);
  text-decoration: none;
}

.social-links a:hover {
  background: var(--primary);
}

@media (max-width: 991.98px) {
  .hero-section {
    min-height: auto;
    padding-top: 7rem;
  }

  .navbar-collapse {
    padding: 1rem 0;
  }
}

@media (max-width: 575.98px) {
  .section-padding {
    padding: 4rem 0;
  }

  .hero-image-card {
    padding: 1rem;
    border-radius: 1.4rem;
  }

  .floating-card {
    position: static;
    margin-top: 1rem;
    max-width: none;
  }

  .service-card {
    padding: 1.5rem;
  }
}


/* =========================================================
   Background dinámico tipo tech/radiología
   Inspirado en fondos oscuros con brillos, profundidad y motion.
   ========================================================= */
.glass-nav {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(23, 105, 170, 0.08);
}

.dynamic-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 16% 18%, rgba(37, 199, 162, 0.24), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(64, 143, 255, 0.22), transparent 34%),
    linear-gradient(145deg, #061729 0%, #0d2742 48%, #081f36 100%);
}

.dynamic-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,0.9), transparent 72%);
  animation: gridDrift 18s linear infinite;
}

.dynamic-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -28% -10%;
  height: 45%;
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(37, 199, 162, 0.28), transparent 70%);
  filter: blur(22px);
}

.hero-content {
  position: relative;
  z-index: 5;
}

.radiology-canvas,
.hero-grid,
.hero-orb {
  position: absolute;
  pointer-events: none;
}

.radiology-canvas {
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

.hero-grid {
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 18%, rgba(255,255,255,0.04) 19%, transparent 20%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.035) 0 1px, transparent 1px 46px);
  transform: perspective(900px) rotateX(62deg) translateY(16%);
  transform-origin: center bottom;
  opacity: 0.45;
}

.hero-orb {
  z-index: 0;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  filter: blur(46px);
  opacity: 0.78;
  mix-blend-mode: screen;
  animation: orbFloat 12s ease-in-out infinite alternate;
}

.hero-orb-one {
  top: 14%;
  left: -8%;
  background: rgba(37, 199, 162, 0.34);
}

.hero-orb-two {
  right: -10%;
  top: 9%;
  background: rgba(56, 132, 255, 0.34);
  animation-delay: -4s;
}

.hero-orb-three {
  width: 16rem;
  height: 16rem;
  right: 22%;
  bottom: 8%;
  background: rgba(138, 208, 255, 0.24);
  animation-delay: -8s;
}

.text-white-75 {
  color: rgba(255, 255, 255, 0.75) !important;
}

.dynamic-hero .eyebrow {
  color: #7ff6d9;
}

.dynamic-hero .hero-stats {
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1.5rem;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dynamic-hero .hero-stats strong {
  color: #7ff6d9;
}

.dynamic-hero .hero-stats span {
  color: rgba(255,255,255,0.66);
}

.hero-glass-card {
  border: 1px solid rgba(255,255,255,0.16);
  background: linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.07));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-glass-card::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(127, 246, 217, 0.18);
  box-shadow: inset 0 0 60px rgba(37, 199, 162, 0.08);
  pointer-events: none;
}

.hero-glass-card img {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 22px 34px rgba(0,0,0,0.25));
}

.dynamic-hero .floating-card {
  z-index: 2;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}


.dynamic-hero .scan-sweep {
  position: absolute;
  inset: -20% auto -20% -35%;
  width: 38%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(127, 246, 217, 0.18), rgba(255,255,255,0.18), transparent);
  filter: blur(14px);
  transform: skewX(-16deg);
  animation: scanSweep 7s ease-in-out infinite;
}

.dynamic-hero .pulse-ring {
  position: absolute;
  right: 10%;
  top: 20%;
  width: 20rem;
  height: 20rem;
  z-index: 1;
  pointer-events: none;
  border: 1px solid rgba(127, 246, 217, 0.22);
  border-radius: 999px;
  box-shadow: 0 0 60px rgba(127, 246, 217, 0.08), inset 0 0 60px rgba(127, 246, 217, 0.06);
  animation: ringPulse 5s ease-in-out infinite;
}

@keyframes scanSweep {
  0%, 12% { transform: translateX(0) skewX(-16deg); opacity: 0; }
  25% { opacity: 0.95; }
  72% { opacity: 0.55; }
  100% { transform: translateX(430%) skewX(-16deg); opacity: 0; }
}

@keyframes ringPulse {
  0%, 100% { transform: scale(0.88); opacity: 0.15; }
  50% { transform: scale(1.08); opacity: 0.58; }
}

@keyframes orbFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(7%, -6%, 0) scale(1.12); }
}

@keyframes gridDrift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 72px 72px, 72px 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .dynamic-hero::before,
  .hero-orb {
    animation: none;
  }

  .radiology-canvas {
    opacity: 0.35;
  }

  .dynamic-hero .scan-sweep,
  .dynamic-hero .pulse-ring {
    animation: none;
  }
}

@media (max-width: 575.98px) {
  .dynamic-hero::before {
    background-size: 48px 48px;
  }

  .hero-orb {
    width: 16rem;
    height: 16rem;
  }

  .dynamic-hero .hero-stats {
    text-align: center;
  }
}

/* =========================================================
   v3 - Background dinámico global para TODO el sitio
   ========================================================= */
body {
  color: rgba(255, 255, 255, 0.88);
  background: #061729;
  overflow-x: hidden;
}

.site-dynamic-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 18%, rgba(37, 199, 162, 0.24), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(64, 143, 255, 0.22), transparent 34%),
    radial-gradient(circle at 42% 82%, rgba(41, 171, 226, 0.14), transparent 38%),
    linear-gradient(145deg, #061729 0%, #0d2742 48%, #081f36 100%);
}

.site-dynamic-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,0.9), transparent 74%);
  animation: gridDrift 18s linear infinite;
}

.site-dynamic-bg::after {
  content: "";
  position: absolute;
  inset: auto -10% -22% -10%;
  height: 38%;
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(37, 199, 162, 0.24), transparent 70%);
  filter: blur(22px);
}

.site-dynamic-bg .radiology-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0.78;
}

.global-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 18%, rgba(255,255,255,0.04) 19%, transparent 20%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.035) 0 1px, transparent 1px 46px);
  transform: perspective(900px) rotateX(62deg) translateY(18%);
  transform-origin: center bottom;
  opacity: 0.42;
}

.global-orb {
  position: absolute;
  z-index: 1;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  filter: blur(46px);
  opacity: 0.72;
  mix-blend-mode: screen;
  animation: orbFloat 12s ease-in-out infinite alternate;
}

.global-orb-one {
  top: 12%;
  left: -8%;
  background: rgba(37, 199, 162, 0.34);
}

.global-orb-two {
  right: -10%;
  top: 8%;
  background: rgba(56, 132, 255, 0.34);
  animation-delay: -4s;
}

.global-orb-three {
  width: 18rem;
  height: 18rem;
  right: 18%;
  bottom: 10%;
  background: rgba(138, 208, 255, 0.24);
  animation-delay: -8s;
}

.global-scan-sweep {
  position: absolute;
  inset: -20% auto -20% -35%;
  width: 38%;
  z-index: 3;
  background: linear-gradient(90deg, transparent, rgba(127, 246, 217, 0.14), rgba(255,255,255,0.16), transparent);
  filter: blur(14px);
  transform: skewX(-16deg);
  animation: scanSweep 8s ease-in-out infinite;
}

.global-pulse-ring {
  position: absolute;
  right: 10%;
  top: 20%;
  width: 22rem;
  height: 22rem;
  z-index: 2;
  border: 1px solid rgba(127, 246, 217, 0.2);
  border-radius: 999px;
  box-shadow: 0 0 60px rgba(127, 246, 217, 0.08), inset 0 0 60px rgba(127, 246, 217, 0.06);
  animation: ringPulse 5s ease-in-out infinite;
}

nav,
header,
main,
footer {
  position: relative;
  z-index: 1;
}

.glass-nav {
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18) !important;
}

.hero-section,
.dynamic-hero,
.bg-soft,
.cta-section,
.footer-section {
  background: transparent !important;
}

.hero-section {
  min-height: 100vh;
  padding-bottom: 6rem;
}

.section-padding {
  position: relative;
  isolation: isolate;
}

.section-padding::before,
.cta-section::before,
.footer-section::before {
  content: "";
  position: absolute;
  inset: 1.2rem;
  z-index: -1;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2rem;
  background: linear-gradient(145deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.16);
}

.hero-section h1,
.section-title h2,
section h2 {
  color: #ffffff;
}

.section-title p,
.service-card p,
.hero-stats span,
.floating-card small,
.text-secondary,
.footer-section {
  color: rgba(255,255,255,0.68) !important;
}

.eyebrow,
.dynamic-hero .eyebrow {
  color: #7ff6d9;
}

.service-card,
.check-item,
.technology-list div,
.hero-image-card,
.appointment-form,
.floating-card {
  border: 1px solid rgba(255,255,255,0.13);
  background: linear-gradient(145deg, rgba(255,255,255,0.14), rgba(255,255,255,0.065));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.service-card:hover {
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.service-card h3,
.hero-stats strong,
.footer-section h3,
.footer-section h4 {
  color: #ffffff;
}

.service-card i,
.check-item i,
.technology-list i,
.hero-stats strong {
  color: #7ff6d9;
}

.service-card i {
  background: rgba(127, 246, 217, 0.12);
}

.check-item,
.technology-list div {
  color: rgba(255,255,255,0.82);
}

.hero-glass-card,
.dynamic-hero .hero-stats {
  background: linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06));
}

.dynamic-hero .floating-card,
.floating-card {
  color: #ffffff;
  background: linear-gradient(145deg, rgba(12, 36, 61, 0.88), rgba(12, 36, 61, 0.56));
}

.glass-media {
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.13);
  background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.055));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.form-control,
.form-select {
  color: #ffffff;
  border-color: rgba(255,255,255,0.16);
  background-color: rgba(255,255,255,0.08);
}

.form-control::placeholder {
  color: rgba(255,255,255,0.45);
}

.form-control:focus,
.form-select:focus {
  color: #ffffff;
  border-color: rgba(127, 246, 217, 0.65);
  background-color: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 0.25rem rgba(37,199,162,0.16);
}

.form-select option {
  color: #14213d;
}

.footer-section {
  padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  .site-dynamic-bg::before,
  .global-orb,
  .global-scan-sweep,
  .global-pulse-ring {
    animation: none;
  }
}

@media (max-width: 575.98px) {
  .section-padding::before,
  .cta-section::before,
  .footer-section::before {
    inset: 0.7rem;
    border-radius: 1.35rem;
  }

  .global-orb {
    width: 16rem;
    height: 16rem;
  }
}
