/* ==========================================================================
   1. CORE & SHARED STYLES (Variables, Reset, Layout)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;900&family=Inter:wght@300;400;500&family=Playfair+Display:ital,wght@1,400&family=Questrial&display=swap');

:root {
  /* Core Colors */
  --color-bg-primary: #000000;
  --color-bg-secondary: #212121;
  --color-text-main: #FFFFFF;
  --color-text-body: #AFAFAF;
  --color-accent-magenta: #EA2BA1;
  --color-accent-blue: #1863DC;
  --color-border-subtle: rgba(255, 255, 255, 0.15);

  /* Gradients */
  --grad-vivid-cyan-purple: linear-gradient(135deg, rgb(6, 147, 227) 0%, rgb(155, 81, 224) 100%);
  --grad-midnight: linear-gradient(135deg, rgb(2, 3, 129) 0%, rgb(40, 116, 252) 100%);
  --grad-premium: linear-gradient(135deg, #EA2BA1 0%, #1863DC 100%);

  /* Typography */
  --font-main: 'Barlow Condensed', sans-serif;
  --font-sec: 'Questrial', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --font-header: 'Barlow Condensed', sans-serif;

  /* Spacing */
  --section-padding: 3.5rem;
  /* Ajustado para mayor proximidad entre secciones */
  --header-height: clamp(80px, 10vh, 100px);

  /* Font Sizes */
  --h1-size: clamp(2.5rem, 8vw, 5rem);
  --h2-size: clamp(2.5rem, 6vw, 4.5rem);
  --h3-size: clamp(1.8rem, 4vw, 3rem);
}

.grad-text-premium {
  background: var(--grad-premium);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-body);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--header-height);
}

h1,
h2,
h3,
.nav-link {
  color: var(--color-text-main);
  text-transform: uppercase;
}

h1 {
  font-size: var(--h1-size);
}

h2 {
  font-size: var(--h2-size);
}

h3 {
  font-size: var(--h3-size);
}

h1,
h3 {
  font-family: var(--font-main);
  font-weight: 700;
}

h2 {
  font-family: var(--font-sec);
  font-weight: 700;
  letter-spacing: 1px;
}

p {
  margin-bottom: 1.5rem;
}

.section-padding {
  padding: 0;
  /* Eliminado para continuidad total */
}

.container {
  max-width: min(100%, 1400px);
  /* Ensanchado para aprovechar el espacio lateral */
  margin: 0 auto;
  padding: 0 40px;
}

/* Decoraci�n Estilo Gema para Im�genes */
.img-gema-deco {
  border-radius: 30px;
  filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.45)) drop-shadow(0 0 40px rgba(0, 255, 255, 0.15));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.img-gema-deco:hover {
  filter: drop-shadow(0 0 35px rgba(0, 255, 255, 0.7)) drop-shadow(0 0 50px rgba(0, 255, 255, 0.25));
  transform: scale(1.02);
}

/* Header & Navigation */
.header-fijo {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
  z-index: 10000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: all 0.3s ease;
}

.header-fijo .container {
  max-width: 100% !important;
  padding: 0 40px;
  width: 100%;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo img {
  height: clamp(60px, 8vh, 90px);
  width: auto;
  display: block;
  filter: brightness(1.2) contrast(1.1);
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: clamp(15px, 2.5vw, 40px);
  list-style: none;
}

.nav-link {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(1.2rem, 1.5vw, 24px);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-accent-magenta);
}

/* CSS for Dropdown Menu */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  min-width: 340px;
  padding: 15px 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 15px rgba(24, 99, 220, 0.1);
  list-style: none;
  z-index: 1000;
  margin-top: 10px;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 12px 30px;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.dropdown-menu li a:hover {
  background: linear-gradient(90deg, rgba(234, 43, 161, 0.15) 0%, transparent 100%);
  color: var(--color-accent-magenta);
  padding-left: clamp(17px, 4vw, 35px);
  border-left-color: var(--color-accent-magenta);
}

/* Indicador de Dropdown */
.dropdown-toggle::after {
  content: '\25BE';
  margin-left: 8px;
  font-size: 14px;
  vertical-align: middle;
  transition: transform 0.3s ease;
  display: inline-block;
  opacity: 0.7;
}

.nav-item:hover .dropdown-toggle::after {
  transform: rotate(180deg);
  color: var(--color-accent-magenta);
  opacity: 1;
}

.hamburger {
  display: none;
}

/* Footer */
footer {
  background-color: #000;
  padding: 60px 0 40px;
  border-top: 1px solid #111;
  text-align: center;
}

footer p {
  font-family: var(--font-body);
  font-size: 14px;
  color: #444;
  letter-spacing: 0.5px;
  line-height: 1.6;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   2. SHARED COMPONENTS (Buttons, Grids, Common Section Title)
   ========================================================================== */

section {
  padding: var(--section-padding) 0;
}

.section-title {
  font-family: var(--font-main);
  font-size: clamp(3rem, 6vw, 75px);
  font-weight: 700;
  margin-bottom: clamp(2rem, 5vw, 70px);
  text-align: center;
  text-transform: uppercase;
  background: linear-gradient(90deg, #00FFFF 0%, #0099FF 40%, #A020F0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fff;
  filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.3));
  line-height: 1.1;
}

/* Fix para centrar ttulos con gradientes que cambian a inline-block */
h1.centered,
h2.centered,
h3.centered,
.section-title.centered {
  display: block !important;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}


.btn-premium {
  display: inline-block;
  background-color: transparent;
  color: #FFFFFF;
  font-family: var(--font-main);
  font-size: clamp(1rem, 1.5vw, 20px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: clamp(12px, 2vh, 18px) clamp(24px, 3vw, 40px);
  border: 2.5px solid #FFFFFF;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
}

.btn-premium:hover {
  background-color: #FFFFFF;
  color: #000000;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.btn-accent {
  border-color: var(--color-accent-magenta);
  color: var(--color-text-main);
}

.btn-accent:hover {
  background-color: var(--color-accent-magenta);
  border-color: var(--color-accent-magenta);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
  gap: clamp(20px, 4vw, 32px);
}


/* ==========================================================================
   4. PORTAL PAGE STYLES (index.html)
   ========================================================================== */

.portal-page {
  background-color: var(--color-bg-primary);
}

/* Split Hero Section */
.portal-hero {
  position: relative;
  height: calc(100vh - var(--header-height));
  min-height: 650px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  /* Anular padding de section global */
  z-index: 100;
  /* Asegurar que esté por encima de las secciones siguientes */
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.9), 0 10px 30px rgba(24, 99, 220, 0.1);
}

@media (min-width: 1024px) {
  .portal-hero {
    flex-direction: row;
  }
}

.portal-panel {
  position: relative;
  flex: 1;
  overflow: hidden;
  transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 40px);
  text-decoration: none;
  cursor: pointer;
}

.portal-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 1.5s ease, filter 0.5s ease;
  z-index: 1;
  filter: brightness(0.4) grayscale(0.2);
}

.portal-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
  z-index: 2;
}

/* Panel Izquierdo: Profesionales */
.panel-pro::before {
  background-image: url('../images/Area_Clinica.webp');
}

/* Panel Derecho: Pacientes */
.panel-patients::before {
  background-image: url('../images/Area_Pacientes.webp');
}

@media (min-width: 1024px) {
  .portal-panel:hover {
    flex: 1.15;
  }

  .portal-panel:hover::before {
    transform: scale(1.05);
    filter: brightness(0.7) grayscale(0);
  }

  .panel-pro {
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
    z-index: 10;
    margin-right: -10vw;
  }

  .panel-patients {
    z-index: 5;
    padding-left: 10vw;
  }
}

.portal-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 550px;
  transition: transform 0.5s ease;
}

.portal-panel:hover .portal-content {
  transform: translateY(-10px);
}

.portal-tag {
  display: block;
  font-family: var(--font-sec);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: clamp(10px, 2vw, 20px);
  color: var(--color-accent-blue);
  text-shadow: 0 0 10px rgba(24, 99, 220, 0.5);
}

.panel-patients .portal-tag {
  color: var(--color-accent-magenta);
  text-shadow: 0 0 10px rgba(234, 43, 161, 0.5);
}

.portal-title {
  font-family: var(--font-main);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 600;
  color: #fff;
  line-height: 1;
  margin-bottom: clamp(12px, 3vw, 25px);
  text-transform: uppercase;
  letter-spacing: -1px;
}

.portal-desc {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.4vw, 18px);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: clamp(20px, 4vw, 40px);
  line-height: 1.6;
  font-weight: 300;
}

/* Intro Section index */
.home-intro {
  padding: 80px 0 150px;
  background: linear-gradient(rgba(0, 0, 0, 0.33), rgba(0, 0, 0, 0.33)), url('../fondos/Fondo_Scroll_9.webp') center/cover no-repeat fixed;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.intro-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.intro-text {
  max-width: min(100%, 1100px);
  width: 100%;
}

.intro-logo-metal {
  width: clamp(250px, 45vw, 600px);
  height: auto;
  margin: 0 auto 50px;
  display: block;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.25));
}

.presentation-card {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  padding: clamp(20px, 3vw, 40px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  text-align: left;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}

.presentation-greeting {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: #fff;
  margin-bottom: clamp(10px, 2vw, 20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  display: inline-block;
}

.presentation-body {
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 15px;
  font-weight: 300;
}

.presentation-body strong {
  color: #fff;
  font-weight: 700;
}

/* New Solutions Grid */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: clamp(15px, 3vw, 30px);
  margin-top: clamp(25px, 5vw, 50px);
}

.solution-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: clamp(15px, 3vw, 30px);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.solution-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.solution-card-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
  margin-bottom: clamp(10px, 2vw, 20px);
}

.solution-title-tag {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  display: block;
  margin-bottom: 5px;
}

.solution-title {
  font-family: var(--font-main);
  font-size: 1.8rem;
  color: #fff;
  line-height: 1.1;
  text-transform: uppercase;
}

.solution-card.accent-blue .solution-title {
  color: var(--color-accent-blue);
}

.solution-card.accent-magenta .solution-title {
  color: var(--color-accent-magenta);
}

.solution-features {
  list-style: none;
}

.solution-features li {
  margin-bottom: 15px;
  font-size: 1rem;
  color: #ccc;
  line-height: 1.5;
  padding-left: 15px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.solution-features li strong {
  color: #fff;
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-sec);
}

.solution-card.accent-blue .solution-features li {
  border-left-color: rgba(24, 99, 220, 0.5);
}

.solution-card.accent-magenta .solution-features li {
  border-left-color: rgba(234, 43, 161, 0.5);
}

/* Home Products Grid */
.home-products {
  background-color: #050505;
  padding-bottom: clamp(75px, 15vw, 150px);
}

.home-products .container {
  max-width: min(100%, 1400px);
}

.product-card-home {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
}

.product-card-home:hover {
  border-color: rgba(0, 255, 255, 0.2);
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.04);
}

.product-img-wrapper {
  height: 350px;
  overflow: hidden;
  position: relative;
  padding: clamp(15px, 3vw, 30px);
  /* Añadir espacio para que la imagen no toque los bordes */
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-wrapper img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.6s ease;
}

.product-card-home:hover .product-img-wrapper img {
  transform: scale(1.1);
  /* Efecto de zoom controlado dentro del padding */
}

.product-info-home {
  padding: clamp(20px, 4vw, 40px);
}

.product-tags-home {
  display: flex;
  gap: 10px;
  margin-bottom: clamp(10px, 2vw, 20px);
  flex-wrap: wrap;
}

.tag-mini {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(24, 99, 220, 0.1);
  color: var(--color-accent-blue);
  border: 1px solid rgba(24, 99, 220, 0.2);
}

.product-title-home {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #fff;
}

.product-desc-home {
  color: #888;
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  margin-bottom: clamp(15px, 3vw, 30px);
}

.text-center {
  text-align: center;
}

/* Technical Specs Design (Image Fidelity) */
.product-tech-specs {
  margin: 1.5rem 0;
}

.tech-specs-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
  width: 100%;
  margin: 10px 0;
}

.tech-specs-content {
  color: #fff;
  font-family: var(--font-sec);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-align: center;
  margin: 0;
}

.tech-specs-content strong {
  font-weight: 800;
}

@media (max-width: 768px) {
  .intro-layout {
    flex-direction: column;
    text-align: center;
  }

  .portal-hero {
    height: auto;
  }

  .portal-panel {
    height: 50vh;
    min-height: 400px;
  }
}

/* ==========================================================================
   5. PROFESSIONAL PAGE EXCLUSIVE STYLES (index.html)
   ========================================================================== */

.card {
  background-color: var(--color-bg-secondary);
  padding: clamp(25px, 6vw, 45px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--color-accent-magenta);
}

.card h3 {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  margin-bottom: clamp(10px, 2vw, 20px);
}

.card ul {
  list-style: none;
}

.card li {
  margin-bottom: 12px;
  padding-left: clamp(12px, 2vw, 24px);
  position: relative;
}

.card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-accent-magenta);
}

/* Technical Tables */
.tech-table-container {
  overflow-x: auto;
  margin: 40px auto;
  max-width: min(100%, 1000px);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 15px;
  padding: clamp(10px, 2vw, 20px);
  border: 1px solid rgba(160, 32, 240, 0.2);
  backdrop-filter: blur(10px);
}

table {
  width: 100%;
  border-collapse: collapse;
  color: #ddd;
}

th,
td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
  font-family: var(--font-main);
  font-weight: 800;
  color: #fff;
  border-bottom: 2px solid rgba(160, 32, 240, 0.5);
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.03);
  color: #fff;
}

td strong {
  color: #00ffff;
  font-weight: 700;
}

/* Contact Form */
.contact-section {
  background-color: #050505;
}

.form-container {
  max-width: min(100%, 600px);
  margin: clamp(30px, 8vw, 60px) auto 0;
  padding: clamp(20px, 8vw, 60px);
  border-radius: 20px;
  border: 1px solid rgba(160, 32, 240, 0.2);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.input-group {
  margin-bottom: clamp(17px, 4vw, 35px);
  text-align: left;
}

.input-group label {
  display: block;
  font-family: var(--font-sec);
  font-size: 14px;
  color: #888;
  margin-bottom: 12px;
  font-weight: 600;
}

.input-group input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid #333;
  padding: 15px 0;
  font-size: 18px;
  color: #fff;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-bottom-color: #00ffff;
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */

.site-footer {
  padding: clamp(60px, 10vw, 100px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background-color: #000;
  text-align: center;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(10px, 3vw, 25px);
  flex-wrap: wrap;
  font-family: var(--font-main);
  color: rgba(255, 255, 255, 0.4);
  font-size: clamp(10px, 1.5vw, 13px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-content span {
  display: flex;
  align-items: center;
}

.footer-content span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: var(--color-accent-blue);
  border-radius: 50%;
  margin-left: clamp(10px, 3vw, 25px);
  opacity: 0.5;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 12px;
  }

  .footer-content span:not(:last-child)::after {
    display: none;
  }
}


/* ==========================================================================
   5. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1150px) {
  /* Al activar el menú hamburguesa antes, evitamos la colisión de los enlaces de navegación */

  .hamburger {
    display: block;
    cursor: pointer;
    z-index: 10001;
  }

  .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: 0.3s;
    background-color: var(--color-text-main);
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.95);
    transition: 0.3s;
    justify-content: center;
    text-align: center;
    gap: clamp(15px, 3vw, 30px);
  }

  .nav-links.active {
    left: 0;
  }

  .nav-item {
    flex-direction: column;
    justify-content: center;
    width: 100%;
  }

  .nav-item>a {
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    min-width: 100%;
    box-shadow: none;
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 15px;
    display: none;
    opacity: 1;
    visibility: visible;
  }

  .nav-item:hover .dropdown-menu,
  .nav-item:active .dropdown-menu,
  .nav-item:focus-within .dropdown-menu {
    display: block;
    transform: none;
  }

  .dropdown-menu li a {
    font-size: 1.1rem;
    padding: 10px 0;
    text-align: center;
    border-left: none;
  }

  .dropdown-menu li a:hover {
    padding-left: 0;
    background: transparent;
    color: var(--color-accent-magenta);
  }

}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  /* El padding se ajusta vía variable reactiva en :root o vía clamp directamente */

  .safety-container {
    flex-direction: column;
    text-align: center;
    gap: clamp(20px, 4vw, 40px);
  }

  .safety-content {
    text-align: center;
  }

  .safety-item {

    flex-direction: column;

    align-items: center;

    gap: 15px;

  }

}

/* SECCIÓN 6: SEGURIDAD (PRP) */

.prp-seguridad {
  background-color: #000;
  padding: clamp(80px, 12vw, 150px) 0;
  scroll-margin-top: clamp(50px, 10vw, 100px);
}



.prp-seguridad-container {
  padding: clamp(50px, 10vw, 100px) clamp(20px, 5vw, 60px);
  max-width: min(100%, 1300px);
  margin: 0 auto;
}

.prp-seguridad-header {

  text-align: center;

  margin-bottom: clamp(60px, 10vw, 100px);

}

.prp-seguridad-header .prp-section-title {

  margin-bottom: 15px;

  font-size: clamp(3rem, 8vw, 5.5rem);

  letter-spacing: 2px;

}

.prp-seguridad-header .prp-section-subtitle {

  font-size: clamp(1.4rem, 3.5vw, 2.4rem);

  color: #fff;

  opacity: 0.95;

  font-family: var(--font-secondary);

  text-align: center;

  max-width: none;

  margin: 0;

}

.prp-seguridad-main {

  position: relative;

  max-width: min(100%, 1100px);

  margin: 0 auto;

  display: flex;

  justify-content: center;

  align-items: center;

  min-height: 600px;

}

.prp-seguridad-visual {

  width: 100%;

  max-width: 550px;
  /* Reducido de 850px para igualar proporción de 5.jpg */

  position: relative;

  z-index: 2;

}

.prp-dispositivo-img {
  width: 100%;
  height: auto;
}

.prp-callout {

  position: absolute;

  width: clamp(220px, 20vw, 280px);
  /* Reducido ligeramente */

  z-index: 10;

  pointer-events: none;

}

.prp-callout p {

  font-family: var(--font-secondary);

  font-size: clamp(1rem, 1.8vw, 1.2rem);

  line-height: 1.6;

  color: rgba(255, 255, 255, 0.95);

  margin: 0;

}

.prp-callout strong {

  color: #fff;

  display: block;

  margin-bottom: 8px;

  font-family: var(--font-main);

  text-transform: uppercase;

  font-size: 1.2em;

  letter-spacing: 1px;

}

/* Positions Callouts */

.callout-left {

  left: -2%;

  top: 30%;
  /* Subido de 35% a 30% */

  transform: translateY(-50%);

  text-align: right;

  padding-right: clamp(12px, 3vw, 25px);

  border-right: 3px solid #00ffff;

}

.callout-right-top {

  right: -2%;

  top: 18%;

  text-align: left;

  padding-left: clamp(12px, 3vw, 25px);

  border-left: 3px solid #ea2ba1;

}

.callout-right-bottom {

  right: -2%;

  bottom: 12%;

  text-align: left;

  padding-left: clamp(12px, 3vw, 25px);

  border-left: 3px solid #1863dc;

}

@media (max-width: 1024px) {

  .prp-seguridad-container {

    padding: clamp(20px, 4vw, 40px) clamp(10px, 2vw, 20px);

  }

  .prp-seguridad-main {

    flex-direction: column;

    min-height: auto;

    gap: clamp(20px, 4vw, 40px);

  }

  .prp-callout {

    position: static;

    width: 100%;

    transform: none;

    text-align: left !important;

    padding: 20px !important;

    border-left: 3px solid var(--color-accent-blue) !important;

    border-right: none !important;

    background: rgba(255, 255, 255, 0.03);

    border-radius: 10px;

    pointer-events: all;

  }

  .prp-seguridad-visual {

    order: -1;

    max-width: 500px;

  }

}

/* SECCIÓN 7: PROCESO (PRP) */
.prp-proceso {
  background-color: #000;
  padding: clamp(80px, 12vw, 150px) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.prp-proceso-header {
  margin-bottom: clamp(60px, 10vw, 100px);
}

.prp-proceso-header .prp-section-title {
  background: linear-gradient(90deg, #00FFFF 0%, #0099FF 40%, #A020F0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.3));
}

.prp-proceso-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: #ccc;
  font-weight: 300;
  line-height: 1.4;
  margin-top: 10px;
}

.prp-proceso .prp-steps-container {
  position: relative;
  max-width: min(100%, 1200px);
  margin: 0 auto clamp(60px, 8vw, 100px);
  padding: 0 5%;
  display: block;
  /* Forzar bloque para anular posibles grids de otras secciones */
}

/* Horizontal Decorative Line */
.prp-steps-line {
  position: absolute;
  top: 110px;
  /* Center of the visual circles */
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #00ffff 50%, transparent 100%);
  box-shadow: 0 0 20px #00ffff;
  opacity: 0.6;
  z-index: 1;
}

.prp-steps-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(30px, 8vw, 100px);
  position: relative;
  z-index: 2;
}

.prp-step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.prp-step-visual {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(15px, 3vw, 30px);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 0 40px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.prp-step-item:hover .prp-step-visual {
  transform: scale(1.08) translateY(-10px);
  border-color: rgba(0, 255, 255, 0.6);
  box-shadow: 0 25px 60px rgba(0, 255, 255, 0.15);
}

.prp-step-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
}

.prp-step-text h3 {
  font-family: var(--font-main);
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  color: #fff;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.prp-step-text p {
  font-size: 1.1rem;
  color: #aaa;
  font-weight: 300;
}

.prp-neon-motto.italic {
  font-style: italic;
  color: #fff;
  text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
  font-size: clamp(1.2rem, 3vw, 2rem);
  margin-top: clamp(30px, 6vw, 60px);
  display: block;
  width: 100%;
  text-align: center;
}

@media (max-width: 1024px) {
  .prp-steps-line {
    display: none;
  }

  .prp-steps-grid {
    flex-direction: column;
    align-items: center;
    gap: clamp(30px, 6vw, 60px);
  }

  .prp-step-visual {
    width: 180px;
    height: 180px;
  }
}

/* SECCIÓN 8: CTA Final - Recupera tu Calidad de Vida */
.prp-page .prp-cta {
  position: relative;
  overflow: hidden;
  background-color: #000;
  padding: clamp(100px, 15vw, 180px) 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.prp-page .prp-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../fondos/bg-cta-final.webp') center center / 100% 100% no-repeat;
  opacity: 0.5;
  z-index: 1;
}

.prp-page .prp-cta .container {
  position: relative;
  z-index: 2;
}

.prp-page .prp-cta-content {
  max-width: min(100%, 900px);
  margin: 0 auto;
  padding: 0 20px;
}

.prp-page .prp-cta-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  margin-bottom: clamp(15px, 3vw, 30px);
  background: var(--grad-premium);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  font-family: var(--font-main);
  letter-spacing: -1px;
}

.prp-page .prp-cta-description {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: #ccc;
  line-height: 1.6;
  margin-bottom: clamp(15px, 3vw, 30px);
  font-weight: 300;
  font-family: var(--font-body);
}

.prp-page .prp-cta-actions {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2vw, 20px);
  flex-wrap: wrap;
}


/* ==========================================================================
   5. DYNAMIC PARALLAX SYSTEM
   ========================================================================== */

.parallax-section {
  position: relative;
  height: clamp(200px, 30vh, 300px);
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  margin: 0;
}

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 110vh;
  /* Un poco más del 100% para evitar bordes por redondeo */
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.parallax-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      #000000 0%,
      rgba(0, 0, 0, 0.2) 20%,
      rgba(0, 0, 0, 0.2) 80%,
      #000000 100%);
  z-index: 2;
  pointer-events: none;
}

.parallax-content {
  position: relative;
  z-index: 3;
  max-width: min(100%, 900px);
  padding: 0 2rem;
  text-align: center;
  color: #ffffff;
}

@media (max-width: 768px) {
  .parallax-section {
    height: 200px;
  }

  .parallax-bg {
    height: 120%;
    top: -10%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .parallax-bg {
    transform: none !important;
  }
}

/* ==========================================================================
   GLOBAL UTILITIES: Back to Top Button
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #1863DC;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #fff;
  color: #1863DC;
  transform: translateY(-5px);
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
.site-footer {
  padding: 60px 0 40px;
  background-color: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  color: #555;
  font-size: 0.85rem;
  font-family: var(--font-main);
  list-style: none;
}

.footer-content span {
  display: inline-block;
  padding: 5px 0;
}

.footer-content span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: var(--color-accent-blue);
  border-radius: 50%;
  margin: 0 6px;
  vertical-align: middle;
  box-shadow: 0 0 6px var(--color-accent-blue);
}


/* ==========================================================================
   MOBILE REFINEMENTS & MISSING STYLES (FINAL POLISH 375px)
   ========================================================================== */

/* 1. Global Overflow Protection */
body {
  overflow-x: hidden;
}

/* 2. PRP Hero Content Wrapper (Replacement for inline style) */

/* ==========================================================================
   PARTNERS SECTION: Red de Clínicas Colaboradoras (Social Proof)
   ========================================================================== */

.partners-section {
  background-color: var(--color-bg-primary);
  padding: 6rem 0;
  position: relative;
  z-index: 10;
}

.partners-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-premium);
  opacity: 0.4;
}

.partners-section .section-title {
  margin-bottom: clamp(1rem, 2.5vw, 35px);
}

.partners-intro {
  text-align: center;
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--color-text-body);
  max-width: min(100%, 700px);
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  line-height: 1.6;
  font-weight: 300;
}

/* Grid Dinámico de Colaboradores */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(20px, 3vw, 40px);
}

/* Tarjeta Individual */
.partner-card {
  background-color: var(--color-bg-secondary);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  position: relative;
}

/* Borde Gradiente Neón en Hover (Efecto Premium Exogenetics) */
.partner-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, transparent 0%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.partner-card:hover {
  transform: translateY(-8px);
  border-color: rgba(24, 99, 220, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6),
              0 0 20px rgba(24, 99, 220, 0.15);
}

.partner-card:hover::after {
  opacity: 1;
  background: var(--grad-premium);
}

/* Contenedor del Logo - FONDO BLANCO OBLIGATORIO */
/* NOTA: Se usa #ffffff literal porque no existe variable --color-white en :root.
   Este blanco es funcional (no temático) para garantizar visibilidad de logos
   con texto oscuro o transparencias sobre fondo negro. */
.partner-logo-wrapper {
  background-color: #ffffff;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  border-bottom: 3px solid var(--color-accent-blue);
}

.partner-logo-wrapper a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.partner-logo-wrapper img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.partner-card:hover .partner-logo-wrapper img {
  transform: scale(1.05);
  filter: brightness(1.05);
}

/* Información del Colaborador */
.partner-info {
  padding: 30px 25px 0 25px;
  flex-grow: 1;
}

.partner-name {
  font-family: var(--font-main);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--color-text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin: 0 0 8px 0;
}

.partner-specialty {
  font-family: var(--font-sec);
  font-size: clamp(0.8rem, 1.4vw, 0.95rem);
  font-weight: 700;
  color: var(--color-accent-magenta);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 12px 0;
}

.partner-doctor {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: var(--color-text-main);
  font-weight: 600;
  margin: 0 0 25px 0;
}

/* Bloque de Detalles (Dirección, Teléfono, Email) */
.partner-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--color-text-body);
  font-size: clamp(0.85rem, 1.3vw, 0.95rem);
  line-height: 1.5;
}

.detail-icon {
  flex-shrink: 0;
  min-width: 20px;
  height: 20px;
  color: var(--color-accent-blue);
  margin-top: 2px;
}

.detail-item span {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Footer de la Tarjeta con Botón */
.partner-footer {
  padding: 0 25px 30px 25px;
  margin-top: auto;
}

.partner-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  font-size: clamp(0.85rem, 1.4vw, 0.95rem);
}

.external-icon {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.partner-btn:hover .external-icon {
  opacity: 1;
}

/* Responsive: Mobile Refinements */
@media (max-width: 768px) {
  .partners-grid {
    grid-template-columns: 1fr;
    gap: clamp(15px, 4vw, 25px);
  }

  .partner-logo-wrapper {
    height: 130px;
    padding: 20px;
  }

  .partner-info {
    padding: 25px 20px 0 20px;
  }

  .partner-footer {
    padding: 0 20px 25px 20px;
  }
}

@media (max-width: 480px) {
  .partners-intro {
    font-size: 0.95rem;
    padding: 0 1rem;
  }

  .partner-logo-wrapper {
    height: 110px;
    padding: 15px;
  }

  .detail-item {
    font-size: 0.85rem;
  }
}