/* ============================================================
   SERVICIOS.CSS — Service tabs, cards, allies carousel
   ============================================================ */

/* ===== SERVICES SECTION ===== */
.services {
  padding: 100px 0;
  background: var(--cream);
}

.services-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  margin-bottom: 40px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 61, 125, 0.07);
}

.category-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 12px;
  border-radius: 0;
  background: transparent;
  border: none;
  border-right: 1px solid var(--gray-200);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  transition: background 0.25s ease, color 0.25s ease;
  cursor: pointer;
  position: relative;
}

.category-tab:last-child {
  border-right: none;
}

.category-tab:hover {
  background: var(--blue-lighter);
  color: var(--blue);
}

.category-tab.active {
  background: var(--blue);
  color: var(--white);
}

.category-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--green);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border: 1px solid var(--gray-200);
  box-shadow: 0 4px 24px rgba(0, 61, 125, 0.07);
}

.service-card:hover {
  border-color: rgba(0, 61, 125, 0.14);
  box-shadow: 0 12px 36px rgba(0, 61, 125, 0.12);
  transform: translateY(-4px);
}

.service-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.service-icon {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.95rem;
  flex-shrink: 0;
  background: var(--blue-lighter);
  border-radius: 12px;
}

.service-icon:has(img) {
  background: transparent;
  padding: 0;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.service-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.3;
  margin: 0;
}

.service-card-purpose {
  font-size: 0.84rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin: 0 0 18px;
}

.service-card-divider {
  height: 1px;
  background: var(--gray-200);
  margin-bottom: 16px;
}

.service-card-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 20px;
  flex: 1;
}

.service-card-highlight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--gray-700);
  line-height: 1.45;
}

.service-card-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid var(--green);
  position: relative;
}

.service-card-check::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 5px;
  width: 4px;
  height: 7px;
  border-right: 1.5px solid var(--green);
  border-bottom: 1.5px solid var(--green);
  transform: rotate(45deg);
}

.service-card-more {
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green);
  transition: gap 0.3s ease, color 0.3s ease;
}

.service-card:hover .service-card-more {
  color: var(--green-dark);
}

/* ===== ALLIES / ASEGURADORAS ===== */
.allies {
  padding: 40px 0 80px;
  background: var(--white);
}

.allies-track {
  overflow: hidden;
  margin-top: 48px;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.allies-slide {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: allies-scroll 46.875s linear infinite;
}

.allies-slide:hover {
  animation-play-state: paused;
}

.ally-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 58px;
  min-width: 352px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.ally-card img {
  max-height: 128px;
  max-width: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.ally-card--text {
  font-weight: 600;
  font-size: 1.84rem;
  color: var(--blue);
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}

.ally-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
}

/* ===== RESPONSIVE SERVICES ===== */
@media (max-width: 1024px) {
  .category-tab {
    font-size: 0.7rem;
    padding: 14px 8px;
    text-align: center;
    line-height: 1.25;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: auto;
    padding: 22px 20px;
  }

  .services-categories {
    grid-template-columns: 1fr 1fr;
  }

  .services-categories .category-tab {
    padding: 14px 10px;
    font-size: 0.68rem;
    border-right: 1px solid var(--gray-200);
  }

  .services-categories .category-tab:nth-child(2n) {
    border-right: none;
  }

  .services-categories .category-tab:nth-child(-n+2) {
    border-bottom: 1px solid var(--gray-200);
  }

  .allies-slide {
    animation-duration: 31.25s;
    gap: 24px;
  }

  .ally-card {
    min-width: 250px;
    height: 125px;
    padding: 16px 24px;
  }

  .ally-card img {
    max-height: 90px;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .allies-slide {
    gap: 16px;
  }

  .ally-card {
    min-width: 210px;
    height: 110px;
    padding: 12px 18px;
  }

  .ally-card img {
    max-height: 78px;
    max-width: 170px;
  }
}

/* ===== STANDALONE SERVICES PAGE STYLES ===== */
.servicios-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding: 80px 0;
}

.servicios-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 30px);
  height: fit-content;
}

.servicios-nav {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 61, 125, 0.07);
}

.servicios-nav .category-tab {
  border-right: none;
  border-bottom: 1px solid var(--gray-200);
  text-decoration: none;
}

.servicios-nav .category-tab:last-child {
  border-bottom: none;
}

.servicios-category-section {
  margin-bottom: 80px;
  scroll-margin-top: calc(var(--header-height) + 40px);
}

.servicios-category-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-200);
}

.servicios-category-subtitle {
  font-size: 0.95rem;
  color: var(--gray-500);
  margin-top: -16px;
  margin-bottom: 28px;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .servicios-container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 0;
  }

  .servicios-sidebar {
    position: sticky;
    top: var(--header-height);
    background: var(--white);
    z-index: 100;
    margin: 0 -20px 20px;
    padding: 12px 20px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .servicios-sidebar::-webkit-scrollbar {
    display: none;
  }

  .servicios-nav {
    flex-direction: row;
  }

  .servicios-nav .category-tab {
    border-bottom: none;
    border-right: 1px solid var(--gray-200);
    white-space: nowrap;
  }

  .servicios-nav .category-tab:last-child {
    border-right: none;
  }
}

