/* ============================================
   KYVERA DIGITAL — Casos de éxito (light)
   ============================================ */

:root {
  --border-subtle: #e2e8f0;
  --surface-raised: #ffffff;
}

.caso-page,
.svc-page.caso-page {
  overflow-x: clip;
}

.caso-page .container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 24px);
  box-sizing: border-box;
}

.caso-page .svc-page-hero-inner.container {
  max-width: 960px;
}

.caso-page h1,
.caso-page .svc-page-lead,
.caso-page .caso-block,
.caso-page .caso-devices {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.caso-page .svc-page-hero::before {
  background:
    radial-gradient(ellipse 55% 45% at 80% 10%, rgba(37, 99, 235, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 8% 90%, rgba(124, 58, 237, 0.08) 0%, transparent 55%);
}

.caso-page .section-tag {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7c3aed;
}

.caso-page .svc-page-actions .btn {
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.caso-page .btn-primary,
.caso-page .hero-btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 48%, #7c3aed 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}

.caso-page .btn-outline {
  background: #fff;
  color: #0f172a !important;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.caso-page .btn-outline:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: #2563eb !important;
}

/* Hero device duo: desktop metrics + mobile web */
.caso-devices {
  position: relative;
  display: grid;
  grid-template-columns: 1.55fr 0.7fr;
  gap: 1.25rem;
  align-items: end;
  margin-top: 2.25rem;
  max-width: 920px;
}

.caso-device-desktop {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.caso-device-chrome {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.caso-device-dots {
  display: inline-flex;
  gap: 0.28rem;
}

.caso-device-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  display: block;
}

.caso-device-dots i:nth-child(1) { background: #f87171; }
.caso-device-dots i:nth-child(2) { background: #fbbf24; }
.caso-device-dots i:nth-child(3) { background: #34d399; }

.caso-device-url {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.caso-device-desktop img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  background: #f1f5f9;
}

.caso-device-mobile {
  justify-self: center;
  width: min(100%, 180px);
  aspect-ratio: 9 / 19.5;
  border-radius: 28px;
  border: 3px solid #0f172a;
  background: #0f172a;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  position: relative;
}

.caso-device-mobile::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 8px;
  border-radius: 999px;
  background: #1e293b;
  z-index: 2;
}

.caso-device-mobile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.caso-grid {
  display: grid;
  gap: 1.25rem;
  max-width: 920px;
  width: 100%;
}

.caso-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.35rem 1.45rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.caso-block h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0 0 0.55rem;
}

.caso-block p {
  margin: 0;
  color: #475569;
  line-height: 1.65;
  font-size: 1rem;
}

.caso-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.caso-metric {
  padding: 1.15rem 1rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.caso-metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.1;
}

.caso-metric span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
}

.caso-tools {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.15rem 1.35rem;
}

.caso-tools h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #0f172a;
}

.caso-tools p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}

.caso-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.caso-shot {
  margin: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.caso-shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top left;
  display: block;
  background: #f1f5f9;
}

.caso-shot figcaption {
  padding: 0.7rem 0.85rem 0.85rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #64748b;
}

.caso-page .svc-internal-mesh {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  display: grid;
  gap: 1rem;
}

.caso-page .svc-internal-mesh-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.caso-page .svc-internal-mesh-group a {
  display: inline-flex;
  margin: 0 0.4rem 0.4rem 0;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: none;
}

.caso-page .svc-internal-mesh-group a:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: #2563eb;
}

.caso-page .footer {
  margin-top: 2rem;
  background: #0f172a;
  color: #94a3b8;
}

.caso-page .footer-bottom {
  padding: 1.25rem 24px;
}

.caso-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.caso-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.caso-card-media {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr;
  gap: 0.55rem;
  padding: 0.75rem;
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
  min-height: 150px;
}

.caso-card-desktop {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.caso-card-desktop img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
  object-position: top left;
  display: block;
}

.caso-card-mobile {
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #0f172a;
  background: #0f172a;
  max-width: 84px;
  justify-self: end;
  align-self: end;
  aspect-ratio: 9 / 16;
}

.caso-card-mobile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.caso-card-body {
  padding: 0 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.caso-card-sector {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7c3aed;
}

.caso-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.caso-card h2 a {
  color: #0f172a;
  text-decoration: none;
}

.caso-card h2 a:hover {
  color: #2563eb;
}

.caso-card p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.55;
}

.caso-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.15rem 0 0.35rem;
}

.caso-card-metrics span {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.72rem;
  color: #64748b;
}

.caso-card-metrics strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #0f172a;
}

.caso-card .service-link {
  margin-top: auto;
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 960px) {
  .caso-devices {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .caso-device-desktop {
    width: 100%;
  }

  .caso-device-mobile {
    width: min(42%, 150px);
    margin-top: -3rem;
    justify-self: end;
    margin-right: 0.75rem;
  }

  .caso-gallery,
  .caso-index-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .caso-page .svc-page-hero {
    padding-top: calc(var(--header-height, 80px) + 1.5rem);
    padding-bottom: 2rem;
  }

  .caso-page .svc-page-hero-inner,
  .caso-grid {
    max-width: 100%;
  }

  .caso-page .svc-page-hero h1 {
    font-size: clamp(1.55rem, 8vw, 2.1rem);
    word-break: break-word;
  }

  .caso-page .svc-page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .caso-page .svc-page-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .caso-metrics {
    grid-template-columns: 1fr;
  }

  .caso-devices {
    margin-top: 1.5rem;
  }

  .caso-device-url {
    font-size: 0.65rem;
  }
}
