/* ══════════════════════════════════════
   home.css
   Home Page – Clínica Peruano Suiza
   ══════════════════════════════════════ */

/* =========================
   HERO CAROUSEL
========================= */
.hero {
  position: relative;
  width: 100%;
  height: 82vh;
  min-height: 540px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.7s cubic-bezier(.4, 0, .2, 1), opacity 0.5s ease;
}

.hero-bg img.out-left {
  transform: translateX(-110%);
  opacity: 0;
}

.hero-bg img.out-right {
  transform: translateX(110%);
  opacity: 0;
}

.hero-bg img.in-right {
  transform: translateX(110%);
  opacity: 0;
  transition: none;
}

.hero-bg img.in-left {
  transform: translateX(-110%);
  opacity: 0;
  transition: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity .6s ease;
  opacity: 1;
}

/* ── Temas de overlay (degradado horizontal: intenso → transparente) ── */
.hero-overlay--azul {
  background: linear-gradient(
    90deg,
    rgba(0,132,194,.98) 0%,
    rgba(0,164,223,.90) 27%,
    rgba(0,174,230,.55) 43%,
    rgba(0,174,230,.15) 56%,
    rgba(0,174,230,0) 68%
  );
}

.hero-overlay--rosa {
  background: linear-gradient(
    90deg,
    rgba(191,26,94,.98) 0%,
    rgba(210,50,120,.88) 27%,
    rgba(220,80,145,.50) 43%,
    rgba(220,80,145,.12) 56%,
    rgba(220,80,145,0) 68%
  );
}

.hero-overlay--celeste {
  background: linear-gradient(
    90deg,
    rgba(11,143,199,.98) 0%,
    rgba(20,165,215,.88) 27%,
    rgba(40,180,225,.50) 43%,
    rgba(40,180,225,.12) 56%,
    rgba(40,180,225,0) 68%
  );
}

.hero-overlay--verde {
  background: linear-gradient(
    90deg,
    rgba(26,122,74,.98) 0%,
    rgba(40,150,95,.88) 27%,
    rgba(60,170,110,.50) 43%,
    rgba(60,170,110,.12) 56%,
    rgba(60,170,110,0) 68%
  );
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0 7%;
}

.text-track-wrap {
  width: min(44%, 620px);
  overflow: hidden;
}

.text-track {
  display: flex;
  transition: transform .65s cubic-bezier(.4, 0, .2, 1);
}

.text-slide {
  flex: 0 0 100%;
  width: 100%;
}

.text-slide .sub {
  display: block;
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 700;
  color: rgba(255, 255, 255, .88);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.text-slide h1 {
  color: #fff;
  font-size: clamp(28px, 3.4vw, 56px);
  font-weight: 900;
  line-height: 1.03;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 18px;
}

.text-slide h1 span {
  display: block;
  font-style: italic;
  font-weight: 600;
}

.hero-btn {
  display: inline-block;
  background: #e91c1c;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 11px 20px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, transform .15s ease;
}

.hero-btn:hover {
  background: #c41515;
  transform: translateY(-1px);
}

.hero-dots {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  gap: 8px;
  z-index: 12;
}

.hero-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .84);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.hero-dots .dot.active {
  background: #fff;
  transform: scale(1.2);
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .88);
  color: #0a3a74;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  transition: background .2s ease, transform .2s ease;
  line-height: 1;
}

.arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
}

.arrow-left {
  left: 18px;
}

.arrow-right {
  right: 18px;
}

/* =========================
   ESPECIALIDADES
========================= */
.especialidades-section {
  position: relative;
  overflow: hidden;
  padding: 72px 0 80px;
  background: linear-gradient(90deg, #0b3f78 0%, #0b6fb3 45%, #0aa2df 100%);
  border-bottom-left-radius: 120px;
}

.especialidades-section .container {
  position: relative;
  z-index: 1;
}

.esp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.esp-title-block h2 {
  color: #fff;
  font-size: clamp(28px, 4.5vw, 64px);
  font-weight: 600;
  line-height: 1.05;
}

.esp-title-block h2 strong {
  font-weight: 900;
}

.esp-title-block p {
  color: rgba(255, 255, 255, .92);
  font-size: clamp(13px, 2vw, 18px);
  margin-top: 10px;
}

.btn-ver-todas {
  background: #fff;
  color: #0a3a74;
  border-radius: 999px;
  padding: 12px 22px 12px 14px;
  font-size: clamp(12px, 1.5vw, 16px);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.play-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #2789b0 0%, #0b6fb3 100%);
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}

.esp-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0;
}

.esp-tab {
  border: 0;
  background: #fff;
  color: #0a3a74;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: clamp(11px, 1.2vw, 15px);
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: background .2s ease, transform .15s ease;
}

.esp-tab.active {
  background: linear-gradient(90deg, #0a3a74 0%, #1093eb 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 50, 120, .3);
}

.esp-tab:hover:not(.active) {
  background: #e8f4fd;
}

.esp-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px;
}

.esp-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .2s, box-shadow .2s, opacity .25s ease;
}

.esp-card[style*="display: none"] {
  opacity: 0;
}

.esp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}

.esp-card-img {
  width: 100%;
  height: 320px;
  overflow: hidden;
}

.esp-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.esp-card-specialty {
  margin: 14px 16px 0;
  background: linear-gradient(90deg, #0a3a74 0%, #1093eb 100%);
  color: #fff;
  font-size: clamp(13px, 1.5vw, 22px);
  font-weight: 900;
  text-align: center;
  padding: 10px 12px;
  border-radius: 999px;
}

.esp-card-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 12px 16px;
  color: #4d4d4d;
  font-size: 14px;
  font-weight: 600;
}

.plus-circle {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, .55);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}

/* ── Card "Ver todas" — glassmorphism ── */
.esp-card-ver-todas {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  min-height: 420px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 1px 0 0 rgba(255, 255, 255, 0.08),
    inset -1px 0 0 rgba(255, 255, 255, 0.04),
    0 8px 40px rgba(0, 60, 140, 0.10);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1),
              background .35s ease,
              border-color .35s ease,
              box-shadow .35s ease;
}

/* Reflejo de luz superior — simula vidrio curvado */
.esp-card-ver-todas::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 100%
  );
  border-radius: 14px 14px 0 0;
  pointer-events: none;
}

.esp-card-ver-todas:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.30);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 1px 0 0 rgba(255, 255, 255, 0.10),
    inset -1px 0 0 rgba(255, 255, 255, 0.06),
    0 14px 44px rgba(0, 60, 140, 0.16);
}

.esp-card-ver-todas-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 32px 24px;
  text-align: center;
}

.esp-card-ver-todas-text {
  font-size: clamp(15px, 1.8vw, 22px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 8px rgba(0, 30, 80, 0.30);
}

.esp-card-ver-todas-arrow {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 2px 10px rgba(0, 30, 80, 0.10);
  font-size: 20px;
  transition: transform .35s cubic-bezier(.4, 0, .2, 1),
              background .35s ease,
              border-color .35s ease,
              box-shadow .35s ease;
}

.esp-card-ver-todas:hover .esp-card-ver-todas-arrow {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow: 0 4px 16px rgba(0, 30, 80, 0.14);
}

/* =========================
   CONÓCENOS (tabs)
========================= */
.conocenos-section {
  padding: 60px 0 40px;
  background: #fff;
}

.conocenos-title {
  text-align: center;
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 900;
  color: #0a3a74;
  margin-bottom: 10px;
}

/* ── Tabs bar ── */
.conocenos-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: -1px;
  position: relative;
  z-index: 3;
  flex-wrap: wrap;
}

.conocenos-tab {
  border: 0;
  background: #e8e8e8;
  color: #555;
  font-weight: 700;
  font-size: clamp(11px, 1.1vw, 14px);
  padding: 11px 20px;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}

.conocenos-tab.active {
  background: #f0f0f0;
  color: #0a3a74;
  font-weight: 800;
}

.conocenos-tab:hover:not(.active) {
  background: #e0e0e0;
  color: #333;
}

/* ── Card container ── */
.conocenos-card {
  max-width: 1180px;
  margin: 0 auto;
  background: #f0f0f0;
  border-radius: 26px 80px 26px 26px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  min-height: 360px;
}

/* ── Panels (fade transition) ── */
.conocenos-panel {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.conocenos-panel.active {
  display: block;
  animation: panel-fade-in .35s ease forwards;
}

@keyframes panel-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Panel grid (2 col) ── */
.conocenos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.conocenos-imgwrap {
  border-radius: 18px;
  overflow: hidden;
}

.conocenos-imgwrap img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.conocenos-text {
  padding: 4px 0 4px 8px;
}

.conocenos-text h3 {
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 900;
  line-height: 1.05;
  color: #1a1a2e;
  margin-bottom: 10px;
}

.conocenos-text h3 span {
  display: block;
  font-weight: 700;
  color: #6b6f76;
}

.conocenos-text p {
  color: #5f6670;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 16px;
}

/* ── Sedes accordion ── */
.conocenos-sedes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.conocenos-sede-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .2s ease;
}

.conocenos-sede-item.open {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.conocenos-sede-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  transition: background .2s ease;
}

.conocenos-sede-btn:hover {
  background: #e8f4fd;
}

.conocenos-sede-btn svg {
  color: #0b6fb3;
  flex-shrink: 0;
  transition: transform .3s ease;
}

.conocenos-sede-item.open .conocenos-sede-btn svg {
  transform: rotate(180deg);
}

.conocenos-sede-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
}

.conocenos-sede-item.open .conocenos-sede-detail {
  max-height: 200px;
}

.conocenos-sede-detail p {
  padding: 0 16px;
  font-size: 13px;
  color: #5f6670;
  line-height: 1.6;
  margin-bottom: 4px;
}

.conocenos-sede-detail p:first-child {
  padding-top: 0;
}

.conocenos-sede-detail p:last-child {
  padding-bottom: 14px;
}

/* ── Panel 3: Planes de Salud ── */
.planes-panel-layout {
  display: grid;
  grid-template-columns: 28% 72%;
  gap: 28px;
  align-items: start;
}

.planes-head {
  padding: 8px 0;
}

.planes-head h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 900;
  line-height: 1.05;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.planes-head h2 span {
  font-weight: 700;
  color: #6b6f76;
}

.planes-head p {
  color: #5f6670;
  font-size: 14px;
  line-height: 1.5;
}

.planes-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* ── Plan card (premium hover reveal) ── */
.planes-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  outline: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  transition:
    transform .35s cubic-bezier(.4, 0, .2, 1),
    box-shadow .35s cubic-bezier(.4, 0, .2, 1);
}

.planes-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(13, 45, 107, .14);
}

.planes-card:focus-visible {
  outline: 3px solid #0b6fb3;
  outline-offset: 4px;
}

.planes-card-img {
  width: 100%;
  aspect-ratio: 1.25 / 1;
  overflow: hidden;
  position: relative;
  background: #e8eef6;
}

.planes-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}

.planes-card:hover .planes-card-img img {
  transform: scale(1.04);
}

.planes-card-logo {
  position: absolute;
  bottom: 18px;
  left: 18px;
  max-width: 120px;
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .25));
  transition: transform .35s cubic-bezier(.4, 0, .2, 1),
              bottom .35s cubic-bezier(.4, 0, .2, 1);
}

.planes-card:hover .planes-card-logo {
  transform: scale(1.08) translateY(-4px);
  bottom: 22px;
}

/* ── White body: absolute overlay, hidden by default ── */
.planes-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 0 0 18px 18px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 22px;
  transform: translateY(100%);
  transition:
    max-height .4s cubic-bezier(.4, 0, .2, 1),
    opacity .35s cubic-bezier(.4, 0, .2, 1) .05s,
    padding .35s cubic-bezier(.4, 0, .2, 1),
    transform .4s cubic-bezier(.4, 0, .2, 1);
}

.planes-card:hover .planes-card-body {
  max-height: 180px;
  opacity: 1;
  padding: 18px 22px 22px;
  transform: translateY(0);
}

.planes-card-name {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 900;
  color: #0d2d6b;
  line-height: 1.15;
}

/* ── Hidden details (revealed on hover) ── */
.planes-card-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(8px);
  transition:
    max-height .4s cubic-bezier(.4, 0, .2, 1),
    opacity .35s cubic-bezier(.4, 0, .2, 1) .1s,
    transform .35s cubic-bezier(.4, 0, .2, 1) .1s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 0;
}

.planes-card:hover .planes-card-details {
  max-height: 120px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 10px;
}

.planes-card-desc {
  font-size: 13px;
  line-height: 1.55;
  color: #5a6272;
}

.planes-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #0d2d6b 0%, #1a56c4 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 10px;
  text-decoration: none;
  transition:
    background .2s,
    transform .2s,
    box-shadow .2s;
}

.planes-card-cta svg {
  width: 15px;
  height: 15px;
  transition: transform .2s;
}

.planes-card-cta:hover {
  background: linear-gradient(135deg, #0a2454 0%, #1548a8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26, 86, 196, .3);
}

.planes-card-cta:hover svg {
  transform: translateX(2px);
}

/* =========================
   SERVICIOS BANNER
========================= */
.servicios-banner {
  padding: 0 0 60px;
  background: #fff;
}

.srv-banner {
  max-width: 1180px;
  margin: 0 auto;
  border-radius: 34px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 52% 48%;
  background: linear-gradient(90deg, #072f5e 0%, #0b6fb3 50%, #0aa2df 100%);
  min-height: 210px;
}

/* ── Left: text + red strip ── */
.srv-banner-left {
  padding: 32px 28px 32px 36px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.srv-banner-left h2 {
  font-size: clamp(24px, 3.2vw, 44px);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 18px;
  color: #fff;
}

.srv-banner-left h2 span {
  font-weight: 700;
  font-style: italic;
  background: linear-gradient(90deg, #fff 0%, #9fd8f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.srv-red-strip {
  display: inline-flex;
  align-items: center;
  background: #d42b2b;
  border-radius: 8px;
  padding: 8px 20px;
  width: fit-content;
  max-width: 92%;
}

.srv-red-strip span {
  color: #fff;
  font-size: clamp(11px, 1.1vw, 13px);
  font-weight: 800;
  letter-spacing: .3px;
  white-space: nowrap;
}

/* ── Right: angled image collage ── */
.srv-banner-right {
  position: relative;
  height: 230px;
}

.srv-collage {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* ── Individual angled panels ── */
.srv-panel {
  position: absolute;
  top: -15px;
  bottom: -15px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .18);
}

.srv-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.srv-panel-1 {
  left: 10px;
  width: calc(33.3% - 7px);
  clip-path: polygon(0 0, 100% 9%, 100% 91%, 0 100%);
}

.srv-panel-2 {
  left: calc(33.3% + 3px);
  width: calc(33.4% - 6px);
  clip-path: polygon(0 9%, 100% 18%, 100% 100%, 0 91%);
}

.srv-panel-3 {
  left: calc(66.6% - 4px);
  width: calc(33.4% - 6px);
  clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%);
}

/* ── CONOCER button ── */
.srv-banner-btn {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  text-decoration: none;
  background: #fff;
  color: #0a3a74;
  font-weight: 900;
  font-size: 11px;
  padding: 9px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
  transition: transform .15s ease;
}

.srv-banner-btn:hover {
  transform: translateY(-2px);
}

.srv-banner-btn-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e91c1c;
  color: #fff;
  font-size: 10px;
}

/* =========================
   CONVENIOS
========================= */
.convenios-section {
  padding: 0 0 56px;
  background: #fff;
}

.convenios-wrap {
  background: #efefef;
  border-radius: 42px 0 42px 42px;
  padding: 32px 28px 36px;
  position: relative;
  overflow: hidden;
}

.convenios-wrap::before {
  content: "";
  position: absolute;
  left: -240px;
  top: -240px;
  width: 520px;
  height: 520px;
  background: #e7e7e7;
  border-radius: 50%;
  opacity: .9;
  pointer-events: none;
}

.convenios-title {
  text-align: center;
  font-size: clamp(22px, 3.5vw, 42px);
  color: #0a3a74;
  font-weight: 900;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.convenios-subtitle {
  text-align: center;
  color: #6b6b6b;
  font-size: 13px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.convenios-group {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

/* ── Bar headers ── */
.convenios-bar {
  width: min(900px, 92%);
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 10px 10px 0 0;
  text-align: center;
  color: #fff;
}

.convenios-bar span {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.convenios-bar strong {
  display: block;
  font-size: 17px;
  font-weight: 900;
  margin-top: 1px;
}

.convenios-bar--nacionales {
  background: linear-gradient(90deg, #0b2f68 0%, #0aa2df 100%);
}

.convenios-bar--internacionales {
  background: linear-gradient(90deg, #0aa2df 0%, #0b2f68 100%);
}

/* ── Marquee container ── */
.convenios-marquee {
  width: min(900px, 92%);
  margin: 0 auto;
  background: #fff;
  border-radius: 0 0 10px 10px;
  padding: 14px 0;
  overflow: hidden;
  position: relative;
}

/* ── Fade edges ── */
.convenios-marquee::before,
.convenios-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.convenios-marquee::before {
  left: 0;
  background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0) 100%);
}

.convenios-marquee::after {
  right: 0;
  background: linear-gradient(-90deg, #fff 0%, rgba(255,255,255,0) 100%);
}

/* ── Track ── */
.convenios-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: marquee-scroll 26s linear infinite;
}

.convenios-track--intl {
  animation-duration: 30s;
}

/* ── Logo slot (normalized container) ── */
.convenio-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 70px;
  flex-shrink: 0;
  text-decoration: none;
  overflow: hidden;
}

.convenio-logo img {
  max-width: 160px;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: grayscale(1) brightness(.55);
  opacity: .75;
  transition: filter .3s ease, opacity .3s ease, transform .3s ease;
}

.convenio-logo:hover img {
  filter: grayscale(0) brightness(1);
  opacity: 1;
  transform: scale(1.08);
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .convenios-track {
    animation: none;
  }
}

/* =========================
   HOME PAGE RESPONSIVE
========================= */
@media (max-width: 1024px) {
  .hero {
    height: 74vh;
    min-height: 500px;
  }

  .hero-bg img {
    object-position: 62% center;
  }

  .hero-content {
    align-items: flex-end;
    padding: 0 5% 34px;
  }

  .text-track-wrap {
    width: 100%;
    max-width: 440px;
  }

  .text-slide .sub {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .text-slide h1 {
    font-size: clamp(24px, 5vw, 38px);
    margin-bottom: 12px;
  }

  .hero-btn {
    font-size: 12px;
    padding: 10px 16px;
  }

  .arrow {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
}

@media (max-width: 980px) {
  .esp-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .esp-card-img {
    height: 200px;
  }

  .esp-card-ver-todas {
    min-height: 340px;
  }

  .esp-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .esp-tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .esp-tab {
    font-size: 13px;
  }

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

  .conocenos-imgwrap img {
    height: 240px;
  }

  .conocenos-text {
    padding: 4px 0 0;
  }

  .planes-panel-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .planes-head {
    text-align: center;
  }

  .planes-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Tablet: body always visible in normal flow */
  .planes-card-body {
    position: static;
    max-height: none;
    opacity: 1;
    padding: 16px 18px 18px;
    transform: none;
    border-radius: 0;
  }

  .planes-card:hover .planes-card-body {
    position: static;
    max-height: none;
    opacity: 1;
    padding: 16px 18px 18px;
    transform: none;
  }

  .planes-card-details {
    max-height: none;
    opacity: 1;
    transform: none;
    margin-top: 10px;
  }

  .planes-card:hover .planes-card-details {
    max-height: none;
    opacity: 1;
    transform: none;
    margin-top: 10px;
  }

  .planes-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13, 45, 107, .10);
  }

  .planes-card-logo {
    bottom: auto;
    top: 14px;
    left: 14px;
  }

  .planes-card:hover .planes-card-logo {
    bottom: auto;
    transform: none;
  }

  .conocenos-tab {
    font-size: 12px;
    padding: 10px 16px;
  }

  .srv-banner {
    grid-template-columns: 1fr;
    border-radius: 22px;
    min-height: auto;
  }

  .srv-banner-left {
    padding: 28px 24px;
  }

  .srv-banner-right {
    position: relative;
    height: 200px;
  }

  .convenios-wrap {
    padding: 24px 16px 28px;
    border-radius: 28px 0 28px 28px;
  }

  .convenios-bar {
    padding: 8px 12px;
  }

  .convenios-bar strong {
    font-size: 15px;
  }

  .convenios-marquee {
    padding: 12px 0;
  }

  .convenios-track {
    gap: 22px;
  }

  .convenio-logo {
    width: 170px;
    height: 62px;
  }

  .convenio-logo img {
    max-width: 140px;
    max-height: 38px;
  }
}

@media (max-width: 640px) {
  .hero {
    height: calc(100dvh - var(--header-h));
    min-height: 540px;
    max-height: none;
  }

  .hero-bg img {
    object-position: 62% top;
  }

  .hero-content {
    align-items: flex-end;
    padding: 0 16px 52px;
  }

  .text-track-wrap {
    width: 100%;
    max-width: 100%;
  }

  .text-slide .sub {
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
  }

  .text-slide h1 {
    font-size: clamp(22px, 8vw, 32px);
    margin-bottom: 12px;
    word-break: break-word;
  }

  .hero-btn {
    font-size: 12px;
    padding: 10px 14px;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
  }

  .arrow {
    display: none;
  }

  .hero-dots {
    display: flex;
  }

  .especialidades-section {
    padding: 44px 0 52px;
  }

  .esp-header {
    gap: 14px;
  }

  .esp-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .esp-card-img {
    height: 150px;
  }

  .esp-card-specialty {
    font-size: 11px;
    padding: 6px 10px;
  }

  .esp-card-more {
    font-size: 11px;
    padding: 8px 0 12px;
    gap: 6px;
  }

  .esp-tabs {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 16px 0;
  }

  .esp-tab {
    font-size: 10px;
    padding: 8px 10px;
  }

  .btn-ver-todas {
    font-size: 12px;
    padding: 9px 14px 9px 10px;
    gap: 10px;
  }

  .play-icon {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .conocenos-section {
    padding: 36px 0 20px;
  }

  .conocenos-title {
    font-size: 26px;
  }

  .conocenos-tabs {
    gap: 6px;
  }

  .conocenos-tab {
    font-size: 11px;
    padding: 9px 12px;
  }

  .conocenos-card {
    padding: 20px 16px;
    border-radius: 18px;
    min-height: auto;
  }

  .conocenos-imgwrap img {
    height: 200px;
  }

  .conocenos-text h3 {
    font-size: 20px;
  }

  .conocenos-text p {
    font-size: 12px;
  }

  .conocenos-sede-btn {
    padding: 12px 14px;
    font-size: 14px;
  }

  .conocenos-sede-detail p {
    font-size: 12px;
  }

  .planes-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .planes-card-logo {
    max-width: 70px;
    max-height: 44px;
    top: 10px;
    bottom: auto;
    left: 10px;
  }

  .planes-card:hover .planes-card-logo {
    bottom: auto;
    transform: none;
  }

  .planes-card-body {
    position: static;
    max-height: none;
    opacity: 1;
    padding: 14px 16px 16px;
    transform: none;
    border-radius: 0;
  }

  .planes-card:hover .planes-card-body {
    position: static;
    max-height: none;
    opacity: 1;
    padding: 14px 16px 16px;
    transform: none;
  }

  .planes-card-details {
    max-height: none;
    opacity: 1;
    transform: none;
    margin-top: 8px;
  }

  .planes-card:hover .planes-card-details {
    max-height: none;
    opacity: 1;
    transform: none;
    margin-top: 8px;
  }

  .planes-card-cta {
    font-size: 12px;
    padding: 9px 18px;
  }

  .srv-banner-left {
    padding: 22px 18px;
  }

  .srv-banner-left h2 {
    font-size: 22px;
  }

  .srv-red-strip {
    padding: 6px 14px;
  }

  .srv-red-strip span {
    font-size: 11px;
    white-space: normal;
  }

  .srv-banner-right {
    height: 170px;
  }

  .srv-panel {
    top: -10px;
    bottom: -10px;
  }

  .srv-banner-btn {
    right: 14px;
    bottom: 14px;
    font-size: 10px;
    padding: 7px 12px;
  }

  .convenios-section {
    padding: 0 0 40px;
  }

  .convenios-wrap {
    border-radius: 20px;
    padding: 22px 14px 26px;
  }

  .convenios-title {
    font-size: 22px;
  }

  .convenios-bar {
    padding: 8px 10px;
  }

  .convenios-bar span {
    font-size: 8px;
  }

  .convenios-bar strong {
    font-size: 14px;
  }

  .convenios-marquee {
    padding: 10px 0;
  }

  .convenios-track {
    gap: 20px;
    animation-duration: 22s;
  }

  .convenios-track--intl {
    animation-duration: 26s;
  }

  .convenio-logo {
    width: 150px;
    height: 56px;
  }

  .convenio-logo img {
    max-width: 120px;
    max-height: 32px;
  }

  .convenios-marquee::before,
  .convenios-marquee::after {
    width: 36px;
  }
}

@media (max-width: 420px) {
  .hero {
    min-height: 520px;
  }

  .hero-bg img {
    object-position: 64% top;
  }

  .hero-content {
    padding: 0 14px 48px;
  }

  .text-slide h1 {
    font-size: clamp(20px, 8.3vw, 29px);
  }

  .hero-btn {
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .esp-cards {
    grid-template-columns: 1fr;
  }

  .esp-card-img {
    height: 180px;
  }

  .conocenos-text h3 {
    font-size: 20px;
  }

  .conocenos-tab {
    font-size: 10px;
    padding: 8px 10px;
  }
}
