/* ==========================================================================
   HEALTHY WORKUP - NUESTROS SERVICIOS (Cards interactivas)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Contenedor y fondos
   -------------------------------------------------------------------------- */
.hw-services-section {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f4fbfd 50%, #ffffff 100%);
  padding: 85px 0 90px 0;
  overflow: hidden;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.hw-services-ambient {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 95vw;
  max-width: 1300px;
  height: 650px;
  background: radial-gradient(ellipse at center, rgba(81, 190, 213, 0.12) 0%, rgba(1, 30, 65, 0.02) 65%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

.hw-services-container {
  position: relative;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   Header & tipografia
   -------------------------------------------------------------------------- */
.hw-services-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 50px auto;
}

.hw-services-header .hw-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(81, 190, 213, 0.12);
  border: 1px solid rgba(81, 190, 213, 0.35);
  color: #0b7c93;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hw-services-header .hw-badge-tag i {
  color: #51bed5;
  font-size: 1rem;
}

.hw-services-header h2 {
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 800;
  color: #011E41;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.hw-services-header .hw-title-accent {
  color: #51bed5;
  position: relative;
  display: inline-block;
}

.hw-services-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.hw-services-divider .line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #51bed5);
}

.hw-services-divider .line.right {
  background: linear-gradient(90deg, #51bed5, transparent);
}

.hw-services-divider i {
  color: #51bed5;
  font-size: 1.15rem;
  animation: hwHeartPulse 2s ease-in-out infinite;
}

@keyframes hwHeartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.hw-services-header .hw-services-subtitle {
  color: #4a5568;
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Grid Layout
   -------------------------------------------------------------------------- */
.hw-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 0s;
  }
}

/* --------------------------------------------------------------------------
   Service Card - Default State
   -------------------------------------------------------------------------- */
.hw-service-card {
  contain: layout;
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(81, 190, 213, 0.22);
  box-shadow: 0 10px 30px rgba(1, 30, 65, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s ease,
              scale 0.2s ease;
}

.hw-service-card:not(.featured):hover {
  transform: translateY(-6px);
  scale: 1.02;
  border-color: #51bed5;
  box-shadow: 0 18px 40px rgba(81, 190, 213, 0.2);
}

/* Top Media Preview in Normal Card */
.hw-card-media {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #011E41;
}

.hw-card-media img.hw-card-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hw-service-card:hover .hw-card-media img.hw-card-main-img {
  transform: scale(1.06);
}

.hw-card-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(1, 30, 65, 0.15) 0%, rgba(1, 30, 65, 0.6) 100%);
}

.hw-card-num-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(1, 30, 65, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(81, 190, 213, 0.4);
  color: #51bed5;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
}

/* Floating Interactive Logo Icon */
.hw-card-icon-pill {
  position: absolute;
  bottom: 12px;
  right: 14px;
  width: 70px;
  height: 70px;
  background: #ffffff;
  border: 2px solid #51bed5;
  border-radius: 50%;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(1, 30, 65, 0.2);
  transition: transform 0.3s ease;
}

.hw-service-card:hover .hw-card-icon-pill {
  transform: scale(1.1) rotate(6deg);
}

.hw-card-icon-pill img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Card Body Content */
.hw-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.hw-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #011E41;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.3;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.hw-service-card:hover .hw-card-title {
  color: #0b7c93;
}

.hw-card-text {
  color: #556270;
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 18px;
  flex-grow: 1;
}

.hw-card-text ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hw-card-text li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.hw-card-text li:last-child {
  margin-bottom: 0;
}

.hw-card-text li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: #51bed5;
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1;
}

.hw-card-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(81, 190, 213, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hw-card-btn-cue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0b7c93;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.hw-service-card:hover .hw-card-btn-cue {
  gap: 10px;
  color: #51bed5;
}

.hw-card-btn-cue i {
  font-size: 1rem;
}

/* Close Button (Hidden in normal mode) */
.hw-service-card .card-close-btn {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(1, 30, 65, 0.08);
  color: #011E41;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 15;
  transition: all 0.25s ease;
  align-items: center;
  justify-content: center;
}

.hw-service-card .card-close-btn:hover,
.hw-service-card .card-close-btn:focus {
  background: #dc3545;
  color: #ffffff;
  transform: rotate(90deg);
}

/* Details container hidden in normal state */
.hw-featured-extra {
  display: none;
}

/* --------------------------------------------------------------------------
   Service Card - FEATURED State (Expanded Showcase Mode)
   -------------------------------------------------------------------------- */
.hw-service-card.featured {
  order: -1;
  grid-column: 1 / -1;
  background: #ffffff;
  border: 2px solid #51bed5;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(1, 30, 65, 0.14);
  cursor: default;
  padding: 0;
  animation: hwFeaturedFadeIn 0.35s ease;
}

@keyframes hwFeaturedFadeIn {
  from {
    opacity: 0.85;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hw-service-card.featured .card-close-btn {
  display: flex;
}

.hw-service-card.featured .hw-card-footer {
  display: none;
}

/* Featured Layout Grid */
.hw-service-card.featured .hw-card-inner-featured {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: center;
  padding: 36px 36px 36px 36px;
}

/* Featured Left Media */
.hw-service-card.featured .hw-card-media {
  height: 400px;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(1, 30, 65, 0.18);
}

.hw-service-card.featured .hw-card-media img.hw-card-main-img {
  height: 100%;
}

.hw-service-card.featured .hw-card-icon-pill {
  width: 85px;
  height: 85px;
  bottom: 20px;
  right: 20px;
  padding: 12px;
}

/* Featured Right Content */
.hw-service-card.featured .hw-card-body {
  padding: 0;
}

.hw-service-card.featured .hw-featured-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.hw-service-card.featured .hw-featured-badge {
  background: rgba(81, 190, 213, 0.16);
  border: 1px solid rgba(81, 190, 213, 0.4);
  color: #0b7c93;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 14px;
  border-radius: 20px;
}

.hw-service-card.featured .hw-title-svg-wrap {
  margin-bottom: 28px;
  max-width: 320px;
}

.hw-service-card.featured .hw-title-svg-wrap img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

.hw-service-card.featured .hw-card-title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  color: #011E41;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hw-service-card.featured .hw-card-text {
  font-size: 1rem;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 24px;
}

.hw-service-card.featured .hw-card-text li {
  padding-left: 28px;
  margin-bottom: 12px;
}

.hw-service-card.featured .hw-card-text li::before {
  content: "\F26E";
  font-family: "bootstrap-icons";
  font-size: 1.1rem;
  left: 0;
  top: 1px;
  color: #51bed5;
}

.hw-service-card.featured .hw-featured-extra {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(81, 190, 213, 0.2);
}

.hw-service-card.featured .hw-btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #011E41 0%, #0b7c93 100%);
  color: #ffffff;
  padding: 12px 26px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(1, 30, 65, 0.25);
  transition: all 0.25s ease;
}

.hw-service-card.featured .hw-btn-contact:hover {
  background: linear-gradient(135deg, #51bed5 0%, #0b7c93 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(81, 190, 213, 0.4);
  color: #ffffff;
}

.hw-service-card.featured .hw-btn-dismiss {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(1, 30, 65, 0.2);
  color: #011E41;
  padding: 11px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hw-service-card.featured .hw-btn-dismiss:hover {
  border-color: #51bed5;
  color: #0b7c93;
  background: rgba(81, 190, 213, 0.08);
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .hw-service-card.featured .hw-card-inner-featured {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding: 24px;
  }

  .hw-service-card.featured .hw-card-media {
    height: 260px;
  }
}

@media (max-width: 576px) {
  .hw-services-section {
    padding: 60px 0;
  }

  .hw-services-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .hw-card-media {
    height: 180px;
  }

  .hw-service-card.featured .hw-card-inner-featured {
    padding: 20px 16px;
  }

  .hw-service-card.featured .hw-card-media {
    height: 200px;
  }
}
