/* ============================================================
   SERVICIOS PROFESIONALES — page-specific styles
   Requiere: css/styles.css (base)
   ============================================================ */

/* ── PAGE HERO ──────────────────────────────────────────────── */
.sp-hero {
  position: relative;
  background: linear-gradient(108deg, #0e0d30 0%, #141143 45%, #2F2D52 100%);
  overflow: hidden;
  padding: clamp(1.8rem, 3.6vw, 2.7rem) clamp(1.5rem, 4.5vw, 4rem);
  border-bottom: 3px solid #8d141e;
}

.sp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 36px 36px;
  pointer-events: none;
}

.sp-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sp-hero__content {
  padding-right: 0;
}

.sp-hero__title {
  font-size: clamp(2rem, 4vw, 4.25rem);
  font-weight: 800;
  line-height: 1.0;
  color: white;
  padding-left: 0;
  white-space: nowrap;
}

.sp-hero__divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(141, 20, 30, 0.55) 30%, rgba(141, 20, 30, 0.55) 70%, transparent);
  flex-shrink: 0;
}

.sp-hero__nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0;
  padding-left: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(41, 38, 102, 0.92) rgba(255, 255, 255, 0.1);
  -webkit-overflow-scrolling: touch;
}

.sp-hero__nav::-webkit-scrollbar {
  height: 0.5rem;
}

.sp-hero__nav::-webkit-scrollbar-track {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.11) 10%, rgba(255, 255, 255, 0.11) 90%, transparent);
  border-radius: 999px;
}

.sp-hero__nav::-webkit-scrollbar-thumb {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.18)),
    var(--nav-bg);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(41, 38, 102, 0.28), 0 4px 12px rgba(0, 0, 0, 0.18);
}

.sp-hero__nav-item {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.625rem;
  padding: 0.625rem 1.5rem;
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.22s;
  cursor: pointer;
}

.sp-hero__nav-item:first-child {
  padding-left: 0;
}

.sp-hero__nav-item:last-child {
  border-right: none;
}

.sp-hero__nav-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  flex: 1;
  white-space: nowrap;
  transition: color 0.22s;
}

.sp-hero__nav-arrow {
  color: rgba(255, 255, 255, 0.15);
  transition: color 0.22s, transform 0.22s;
  flex-shrink: 0;
}

.sp-hero__nav-item:hover .sp-hero__nav-text {
  color: rgba(255, 255, 255, 0.9);
}

.sp-hero__nav-item:hover .sp-hero__nav-arrow {
  color: #8d141e;
  transform: translateX(4px);
}

/* ── INTRO BLOCK ──────────────────────────────────────────────── */
.sp-intro {
  background: #ffffff;
  padding: clamp(2rem, 4vw, 3rem) max(2rem, 6vw);
  border-bottom: 1px solid rgba(20,17,67,0.07);
  position: relative;
}

.sp-intro__inner {
  max-width: 900px;
  margin: 0 auto;
}

.sp-intro__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #8d141e;
  margin-bottom: 2rem;
}

.sp-intro__eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 2px;
  background: #8d141e;
  border-radius: 999px;
  opacity: 0.7;
}

/* ── REUSABLE EYEBROW ────────────────────────────────────────── */
.pso-eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #8d141e;
  margin-bottom: 1.25rem;
  margin-top: 0;
}

.pso-eyebrow::before {
  display: none;
}

.sp-intro__body {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.sp-intro__body p {
  font-size: clamp(0.9375rem, 1.3vw, 1.125rem);
  font-weight: 400;
  color: #5c5b7f;
  line-height: 1.78;
}

.sp-intro__body strong {
  font-weight: 700;
  color: #141143;
}

.sp-intro__highlight {
  margin-top: 0.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(20,17,67,0.03);
  border-radius: 0 0.5rem 0.5rem 0;
}

.sp-intro__highlight p {
  font-size: clamp(0.9375rem, 1.3vw, 1.0625rem) !important;
  font-style: italic;
  color: #141143 !important;
  font-weight: 500 !important;
}

/* ── PROGRAM SECTIONS ─────────────────────────────────────────── */
.sp-section {
  padding: clamp(2rem, 4vw, 3rem) max(2rem, 6vw);
  scroll-margin-top: 5rem;
}

.sp-section--a { background: #f4f2ff; }
.sp-section--b { background: #ffffff; }
.sp-section--c { background: #faf8f3; }

.sp-section__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: clamp(2.5rem, 5vw, 5.5rem);
  align-items: start;
}

.sp-section__inner--rev {
  grid-template-columns: 1.35fr 1fr;
}

.sp-section__inner--rev .sp-section__meta {
  order: 2;
}

.sp-section__inner--rev .sp-section__content {
  order: 1;
}

.sp-section__meta {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.sp-section__num {
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.88;
  color: rgba(20,17,67,0.06);
  user-select: none;
  margin-bottom: -0.25rem;
}

.sp-section__badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #8d141e;
  background: rgba(141,20,30,0.08);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}

.sp-section__title {
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.22;
  color: #141143;
}

.sp-section__note {
  font-size: 0.875rem;
  font-weight: 400;
  color: #5c5b7f;
  line-height: 1.65;
  max-width: 340px;
}

.sp-section__content {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* Program item card */
.sp-item {
  display: flex;
  align-items: flex-start;
  gap: 1.125rem;
  padding: 1.125rem 1.375rem;
  background: white;
  border-radius: 0.75rem;
  border-left: 3px solid #8d141e;
  box-shadow: 0 1px 8px rgba(20,17,67,0.05), 0 4px 16px rgba(20,17,67,0.04);
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
}

.sp-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 20px rgba(20,17,67,0.10);
}

.sp-section--a .sp-item { background: rgba(255,255,255,0.80); }
.sp-section--c .sp-item { background: white; }

/* Program item card */
.sp-item-right {
  display: flex;
  align-items: flex-start;
  gap: 1.125rem;
  padding: 1.125rem 1.375rem;
  background: white;
  border-radius: 0.75rem;
  border-right: 3px solid #8d141e;
  box-shadow: 0 1px 8px rgba(20,17,67,0.05), 0 4px 16px rgba(20,17,67,0.04);
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
}

.sp-item-right:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 20px rgba(20,17,67,0.10);
}

.sp-section--a .sp-item-right { background: rgba(255,255,255,0.80); }
.sp-section--c .sp-item-right { background: white; }

.sp-item__dot {
  flex-shrink: 0;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: rgba(141,20,30,0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.075rem;
}

.sp-item__dot svg {
  color: #8d141e;
}

.sp-item__text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #141143;
  line-height: 1.45;
}

/* ── INVESTIGACIONES ──────────────────────────────────────────── */
.sp-invest {
  background: linear-gradient(150deg, #18165a 0%, #252378 55%, #2a2880 100%);
  padding: clamp(2rem, 4vw, 3rem) max(2rem, 6vw);
  position: relative;
  overflow: hidden;
  scroll-margin-top: 5rem;
}

.sp-invest::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.035) 1px, transparent 0);
  background-size: 36px 36px;
  pointer-events: none;
}

.sp-invest__inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}

.sp-invest__meta {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  top: 5.5rem;
}

.sp-invest__num {
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.88;
  color: rgba(255,255,255,0.04);
  user-select: none;
  margin-bottom: -0.25rem;
}

.sp-invest__badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: white;
  background: #8d141e;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}

.sp-invest__title {
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.22;
  color: white;
}

.sp-invest__desc {
  font-size: 0.9375rem;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
}

.sp-invest__content {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.sp-invest-item {
  display: flex;
  align-items: flex-start;
  gap: 1.125rem;
  padding: 1.125rem 1.5rem;
  background: rgba(255,255,255,0.055);
  border-radius: 0.75rem;
  border-left: 3px solid #8d141e;
  transition: background 0.2s, transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

.sp-invest-item:hover {
  background: rgba(255,255,255,0.09);
  transform: translateX(5px);
}

.sp-invest-item-right {
  display: flex;
  align-items: flex-start;
  gap: 1.125rem;
  padding: 1.125rem 1.5rem;
  background: rgba(255,255,255,0.055);
  border-radius: 0.75rem;
  border-right: 3px solid #8d141e;
  transition: background 0.2s, transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

.sp-invest-item-right:hover {
  background: rgba(255,255,255,0.09);
  transform: translateX(5px);
}

.sp-invest-item__dot {
  flex-shrink: 0;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: rgba(141,20,30,0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.075rem;
}

.sp-invest-item__dot svg { color: white; }

.sp-invest-item__text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  line-height: 1.45;
}

/* ── CONTACTO ─────────────────────────────────────────────────── */
.sp-contact {
  background: #ffffff;
  padding: clamp(2rem, 4vw, 3rem) max(2rem, 6vw);
  border-top: 1px solid rgba(20,17,67,0.07);
  scroll-margin-top: 5rem;
}

.sp-contact__inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.5rem;
}

.sp-contact__label {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #8d141e;
}

.sp-contact__label::before,
.sp-contact__label::after {
  content: '';
  display: block;
  width: 2rem;
  height: 1.5px;
  background: #8d141e;
  border-radius: 999px;
  opacity: 0.6;
}

.sp-contact__actions {
  display: flex;
  gap: 0.95rem;
  flex-wrap: wrap;
  justify-content: center;
}

.sp-contact__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.12rem 2.15rem;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s, background 0.2s;
}

.sp-contact__btn:active {
  transform: scale(0.97) !important;
  box-shadow: none !important;
}

.sp-contact__btn--email {
  background: #141143;
  color: white;
}

.sp-contact__btn--email:hover {
  background: #0e0c2a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20,17,67,0.22);
}

.sp-contact__btn--wa {
  background: #25D366;
  color: white;
}

.sp-contact__btn--wa:hover {
  background: #1db954;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.35);
}

/* ── SECTION SEPARATOR LINE ──────────────────────────────────── */
.sp-rule {
  height: 1px;
  background: linear-gradient(to right, rgba(20,17,67,0.12) 0%, transparent 100%);
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .sp-hero__title { white-space: normal; }

  .sp-section__inner,
  .sp-section__inner--rev {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .sp-section__inner--rev .sp-section__meta { order: -1; }
  .sp-section__inner--rev .sp-section__content { order: 0; }
  .sp-section__meta { position: static; }

  .sp-invest__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .sp-invest__meta {
    position: static;
    order: -1;
  }
  .sp-invest__content { order: 0; }

  .sp-contact { padding: 2rem; }
}

@media (max-width: 640px) {
  .sp-hero   { padding: 1.5rem; }
  .sp-intro  { padding: 1.5rem; }
  .sp-section{ padding: 1.5rem; }
  .sp-invest { padding: 1.5rem; }
  .sp-contact { padding: 1.5rem; }
  .sp-contact__actions { flex-direction: column; align-items: stretch; }
  .sp-contact__btn { justify-content: center; }
  .sp-hero__divider {
    display: block;
    margin: -0.25rem 0 0;
  }

  .sp-hero__nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0;
    padding-left: 0;
    padding-bottom: 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .sp-hero__nav-item,
  .sp-hero__nav-item:first-child {
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
  }

  .sp-hero__nav-item:first-child {
    padding-left: 0;
  }

  .sp-hero__nav-item:last-child {
    border-right: none;
  }

  .sp-hero__nav-text {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.875rem;
    line-height: normal;
  }

  .sp-hero__nav-arrow {
    display: block;
    color: rgba(255, 255, 255, 0.15);
  }
}
