/* ============================================================
   OPBIOS — servicios.css v2
   Dark mode: hereda variables de style.css principal
   No redefinir --bg, --text, --purple, etc. ya vienen de style.css
   ============================================================ */

/* ── BREADCRUMBS ── */
.breadcrumbs {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
  font-size: 0.8125rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: '›';
  margin-left: 0.5rem;
  color: var(--text-3);
}

.breadcrumbs a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--yellow);
}

.breadcrumbs li[aria-current="page"] {
  color: var(--yellow);
  font-weight: 600;
}

/* ── HERO DE SERVICIO ── */
.service-hero {
  position: relative;
  padding: 5rem 0 4rem;
  background: var(--bg);
  overflow: hidden;
}

.service-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(162,69,173,0.15), transparent 70%);
  pointer-events: none;
}

.service-hero::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: -100px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255,204,35,0.06), transparent 70%);
  pointer-events: none;
}

.service-hero .container {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.service-hero .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--yellow);
  background: rgba(255, 204, 35, 0.1);
  border: 1px solid rgba(255, 204, 35, 0.25);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.service-hero h1 {
  font-family: var(--font-main);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 1.5rem;
}

.service-hero .lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ── LAYOUT PRINCIPAL ── */
.service-main {
  background: var(--bg);
  padding: 4rem 0 6rem;
}

.service-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 968px) {
  .service-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ── CONTENIDO PRINCIPAL ── */
.service-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-2);
}

.service-content section {
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}

.service-content section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.service-content h2 {
  font-family: var(--font-main);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 1.5rem;
  position: relative;
  padding-left: 1.25rem;
}

.service-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 3px;
  background: linear-gradient(to bottom, var(--purple), var(--orange));
  border-radius: 2px;
}

.service-content h3 {
  font-family: var(--font-main);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.625rem;
}

.service-content p {
  margin: 0 0 1.25rem;
  color: var(--text-2);
}

.service-content strong {
  color: var(--purple-l);
  font-weight: 600;
}

/* ── LISTA CON CHECK ── */
.check-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.check-list li {
  padding: 1.125rem 0 1.125rem 2.75rem;
  position: relative;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}

.check-list li:last-child {
  border-bottom: none;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 1.125rem;
  width: 1.625rem;
  height: 1.625rem;
  background: rgba(255, 204, 35, 0.12);
  border: 1px solid rgba(255, 204, 35, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1.625rem;
  text-align: center;
}

/* ── GRID DE TECNOLOGÍAS ── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.tech-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.tech-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-h);
  box-shadow: var(--shadow-glow);
}

.tech-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--yellow);
  font-family: var(--font-mono);
}

.tech-card p {
  font-size: 0.9rem;
  color: var(--text-2);
  margin: 0;
  line-height: 1.6;
}

/* ── FASES ── */
.phase-list {
  list-style: none;
  counter-reset: phase;
  padding: 0;
  margin: 1.5rem 0;
}

.phase-list li {
  counter-increment: phase;
  padding: 1.5rem 1.5rem 1.5rem 5rem;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}

.phase-list li:hover {
  border-color: var(--border-h);
}

.phase-list li::before {
  content: counter(phase, decimal-leading-zero);
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: -0.05em;
  line-height: 1;
}

.phase-list li strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.375rem;
  font-size: 1rem;
}

.phase-list li p {
  margin: 0;
  font-size: 0.9375rem;
}

/* ── TARJETAS DE CASOS ── */
.case-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.case-card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.case-card:hover {
  border-color: var(--border-h);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.case-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(162, 69, 173, 0.15);
  color: var(--purple-l);
  border: 1px solid rgba(162, 69, 173, 0.25);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.case-card h3 {
  font-size: 1.125rem;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.case-card p {
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
  color: var(--text-2);
}

.case-metrics {
  display: flex;
  gap: 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.case-metrics > div {
  display: flex;
  flex-direction: column;
}

.case-metrics strong {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  color: var(--yellow);
  margin-bottom: 0.25rem;
}

.case-metrics span {
  font-size: 0.6875rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.case-card a {
  color: var(--purple-l);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: color 0.2s;
}

.case-card a:hover {
  color: var(--yellow);
}

/* ── FAQ ── */
#faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.625rem;
  transition: border-color 0.2s;
}

#faq details[open] {
  border-color: var(--border-h);
}

#faq summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2rem;
  color: var(--text);
  font-size: 1rem;
}

#faq summary::-webkit-details-marker { display: none; }

#faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: -0.125rem;
  font-size: 1.5rem;
  color: var(--purple-l);
  font-weight: 300;
  line-height: 1;
  transition: transform 0.2s;
}

#faq details[open] summary::after {
  content: '−';
}

#faq details p {
  margin-top: 1rem;
  margin-bottom: 0;
  color: var(--text-2);
  font-size: 0.9375rem;
}

/* ── RECURSOS RELACIONADOS ── */
.related-resources {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  padding: 2rem;
  border-radius: var(--radius);
}

.related-resources h2 {
  padding-left: 0 !important;
}

.related-resources h2::before {
  display: none;
}

.resource-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.resource-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.resource-list li:last-child {
  border-bottom: none;
}

.resource-list a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  transition: color 0.2s;
}

.resource-list a::before {
  content: '→';
  color: var(--orange);
  font-weight: 700;
  flex-shrink: 0;
}

.resource-list a:hover {
  color: var(--yellow);
}

/* ── SIDEBAR ── */
.service-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 969px) {
  .service-sidebar {
    position: sticky;
    top: calc(var(--nav-h) + 1.5rem);
    align-self: start;
  }
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

/* Primera tarjeta: CTA principal con gradiente */
.sidebar-card:first-child {
  background: linear-gradient(135deg, var(--purple-d), #3a1a4a);
  border-color: var(--border-h);
  box-shadow: var(--shadow-glow);
}

.sidebar-card:first-child h3 {
  color: var(--yellow);
  font-size: 1.125rem;
  margin: 0 0 0.75rem;
}

.sidebar-card:first-child p {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: rgba(240, 240, 248, 0.85);
}

/* Segunda tarjeta: nav de servicios */
.sidebar-card:not(:first-child) h3 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 0.25rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  transition: all 0.2s;
}

.sidebar-nav a:hover {
  background: var(--surface-2);
  color: var(--yellow);
  padding-left: 1.125rem;
}

/* ── BOTONES (complementa los del style.css principal) ── */
.btn-block {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 0.75rem;
}

.btn-block:last-child {
  margin-bottom: 0;
}

/* Override dentro del sidebar oscuro */
.sidebar-card:first-child .btn {
  font-family: var(--font-main);
  font-weight: 700;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  transition: all 0.2s;
  text-align: center;
  display: block;
  width: 100%;
  margin-bottom: 0.75rem;
}

.sidebar-card:first-child .btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-d));
  color: white;
  border: none;
}

.sidebar-card:first-child .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(162,69,173,0.4);
}

.sidebar-card:first-child .btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text-2);
  border: 1px solid var(--border);
  margin-bottom: 0;
}

.sidebar-card:first-child .btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

/* ── CTA FINAL ── */
.cta-final {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-final::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(162,69,173,0.12), transparent 70%);
  pointer-events: none;
}

.cta-final h2 {
  font-family: var(--font-main);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  position: relative;
}

.cta-final h2 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--purple-l), var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-final p {
  font-size: 1.125rem;
  max-width: 580px;
  margin: 0 auto 2.5rem;
  color: var(--text-2);
  position: relative;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .service-hero {
    padding: 3rem 0 2.5rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }

  .case-metrics {
    gap: 1.5rem;
  }

  .phase-list li {
    padding-left: 4rem;
  }
}
