/* IlajIndia — Premium dark Hospitals + Stories
   MOBILE-FIRST: exactly 4 compact cards visible at 360–430px. */

.hp-hospitals,
.hp-stories {
  --hs-navy: #050a18;
  --hs-navy-mid: #071a33;
  --hs-panel: #0a1629;
  --hs-card: #0c1f3a;
  --hs-accent: #1e88ff;
  --hs-accent-soft: #33b5ff;
  --hs-muted: #94a3b8;
  --hs-purple: #8b7cf6;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  scroll-margin-top: calc(var(--hp-header-h, 64px) + 8px);
}

.hp-hospitals *,
.hp-hospitals *::before,
.hp-hospitals *::after,
.hp-stories *,
.hp-stories *::before,
.hp-stories *::after {
  box-sizing: border-box;
  min-width: 0;
}

.hp-hospitals {
  padding: 14px 0 8px;
  background:
    radial-gradient(ellipse 80% 40% at 0% 0%, rgba(30, 136, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(30, 136, 255, 0.08), transparent 45%),
    linear-gradient(180deg, #071a33 0%, #050a18 100%);
}

.hp-stories {
  padding: 6px 0 72px;
  background:
    radial-gradient(ellipse 70% 35% at 100% 0%, rgba(139, 124, 246, 0.1), transparent 50%),
    linear-gradient(180deg, #050a18 0%, #040816 100%);
}

.hp-hs {
  width: 100%;
  max-width: 100%;
  padding-inline: 10px;
  margin-inline: auto;
}

.hp-hs__panel {
  width: 100%;
  max-width: 100%;
  padding: 12px 8px 10px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(12, 31, 58, 0.95) 0%, rgba(7, 22, 41, 0.98) 100%);
  border: 1px solid rgba(51, 181, 255, 0.28);
  box-shadow:
    0 0 0 1px rgba(30, 136, 255, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.hp-hs__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-inline: 4px;
}

.hp-hs__titles {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.hp-hs__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--hs-accent-soft);
}

.hp-hs__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.hp-hs__title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hp-hs__sub {
  margin: 0;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--hs-muted);
  line-height: 1.3;
  max-width: 28ch;
}

.hp-hs__view {
  flex: 0 0 auto;
  color: var(--hs-accent-soft);
  font-weight: 700;
  text-decoration: none;
  font-size: 11px;
  white-space: nowrap;
  padding-top: 3px;
}

.hp-hs__carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.hp-hospitals__swiper,
.hp-stories__swiper {
  width: 100%;
  max-width: 100%;
  padding: 2px 0 22px;
  overflow: hidden;
}

/* —— Mobile nav: floating over edges —— */
.hp-hs__nav {
  position: absolute;
  top: calc(50% - 18px);
  z-index: 5;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(51, 181, 255, 0.45);
  background: rgba(7, 22, 41, 0.92);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hp-hs__nav--prev { left: -2px; }
.hp-hs__nav--next { right: -2px; }

.hp-hs__nav svg {
  width: 12px;
  height: 12px;
  display: block;
}

.hp-hs__nav:hover,
.hp-hs__nav:focus-visible {
  border-color: var(--hs-accent-soft);
  outline: none;
}

.hp-hs__nav.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* —— Hospital cards (mobile compact 4-up) —— */
.hp-hospital-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 132px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(180deg, #0e2748 0%, #0a1c36 100%);
  border: 1px solid rgba(51, 181, 255, 0.3);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.hp-hospital-card:hover,
.hp-hospital-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(51, 181, 255, 0.55);
  outline: none;
}

.hp-hospital-card__photo {
  position: relative;
  height: 62px;
  flex-shrink: 0;
  overflow: hidden;
  background: #061628;
}

.hp-hospital-card__photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.hp-hospital-card__rating {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(7, 26, 51, 0.9);
  border: 1px solid rgba(51, 181, 255, 0.35);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.hp-hospital-card__rating svg {
  width: 8px;
  height: 8px;
  display: block;
}

.hp-hospital-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 5px 7px;
  flex: 1;
}

.hp-hospital-card__name {
  margin: 0;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.hp-hospital-card__type {
  font-size: 8px;
  font-weight: 500;
  color: #7eb6e8;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* —— Story cards (mobile vertical compact 4-up) —— */
.hp-story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  min-height: 168px;
  padding: 8px 5px 8px;
  background: linear-gradient(180deg, #0e2748 0%, #0a1c36 100%);
  border: 1px solid rgba(51, 181, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.hp-story-card:hover {
  transform: translateY(-2px);
  border-color: rgba(51, 181, 255, 0.5);
}

.hp-story-card__qmark {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 16px;
  line-height: 1;
  color: var(--hs-purple);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.hp-story-card__avatar {
  position: relative;
  width: 36px;
  height: 36px;
  margin: 4px 0 4px;
  flex-shrink: 0;
}

.hp-story-card__avatar > img:first-child {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: 1.5px solid rgba(51, 181, 255, 0.5);
}

.hp-story-card__play {
  position: absolute;
  right: -2px;
  bottom: -1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--hs-accent);
  color: #fff;
  font-size: 6px;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.hp-story-card__flag {
  position: absolute;
  left: -2px;
  bottom: -1px;
  width: 12px;
  height: 8px;
  border-radius: 1px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hp-demo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(139, 124, 246, 0.2);
  border: 1px solid rgba(139, 124, 246, 0.45);
  color: #c4b5fd;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.hp-demo-chip--spacer {
  visibility: hidden;
  border-color: transparent;
  background: transparent;
}

.hp-story-card__text {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  font-size: 8.5px;
  font-weight: 500;
  font-style: normal;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  flex: 1;
  width: 100%;
}

.hp-story-card__foot {
  width: 100%;
  padding-top: 6px;
  border-top: 1px solid rgba(51, 181, 255, 0.15);
  display: grid;
  gap: 1px;
}

.hp-story-card__foot strong {
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-story-card__foot span {
  font-size: 7.5px;
  font-weight: 500;
  color: var(--hs-muted);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* —— Pagination —— */
.hp-hospitals__dots,
.hp-stories__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  z-index: 2;
}

.hp-hospitals__dots .swiper-pagination-bullet,
.hp-stories__dots .swiper-pagination-bullet {
  width: 5px;
  height: 5px;
  margin: 0 2px !important;
  background: rgba(148, 163, 184, 0.4);
  opacity: 1;
}

.hp-hospitals__dots .swiper-pagination-bullet-active {
  background: var(--hs-accent-soft);
  width: 12px;
  border-radius: 999px;
}

.hp-stories__dots .swiper-pagination-bullet-active {
  background: var(--hs-purple);
  width: 12px;
  border-radius: 999px;
}

/* —— Slightly wider phones —— */
@media (min-width: 390px) {
  .hp-hs__title {
    font-size: 15px;
  }

  .hp-hs__sub {
    font-size: 10px;
  }

  .hp-hospital-card {
    min-height: 140px;
  }

  .hp-hospital-card__photo {
    height: 68px;
  }

  .hp-hospital-card__name {
    font-size: 10px;
  }

  .hp-story-card {
    min-height: 176px;
  }

  .hp-story-card__avatar,
  .hp-story-card__avatar > img:first-child {
    width: 40px;
    height: 40px;
  }

  .hp-story-card__text {
    font-size: 9px;
  }
}

@media (min-width: 430px) {
  .hp-hs {
    padding-inline: 12px;
  }

  .hp-hs__panel {
    padding: 14px 10px 12px;
    border-radius: 20px;
  }

  .hp-hospital-card__photo {
    height: 72px;
  }
}

/* —— Tablet —— */
@media (min-width: 768px) {
  .hp-hospitals {
    padding: 28px 0 12px;
  }

  .hp-stories {
    padding: 8px 0 40px;
  }

  .hp-hs {
    width: min(100% - 32px, 1120px);
    padding-inline: 0;
  }

  .hp-hs__panel {
    padding: 20px 18px 16px;
    border-radius: 22px;
  }

  .hp-hs__head {
    margin-bottom: 16px;
  }

  .hp-hs__icon {
    width: 32px;
    height: 32px;
  }

  .hp-hs__icon svg {
    width: 28px;
    height: 28px;
  }

  .hp-hs__title {
    font-size: 1.35rem;
  }

  .hp-hs__sub {
    font-size: 0.85rem;
    max-width: 42ch;
  }

  .hp-hs__view {
    font-size: 0.85rem;
  }

  .hp-hs__carousel {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 8px;
  }

  .hp-hs__nav {
    position: static;
    width: 40px;
    height: 40px;
  }

  .hp-hs__nav svg {
    width: 16px;
    height: 16px;
  }

  .hp-hospitals__swiper,
  .hp-stories__swiper {
    padding-bottom: 28px;
  }

  .hp-hospital-card {
    min-height: 210px;
    border-radius: 16px;
  }

  .hp-hospital-card__photo {
    height: 110px;
  }

  .hp-hospital-card__rating {
    font-size: 11px;
    padding: 3px 7px;
  }

  .hp-hospital-card__rating svg {
    width: 10px;
    height: 10px;
  }

  .hp-hospital-card__body {
    padding: 10px 10px 12px;
    gap: 4px;
  }

  .hp-hospital-card__name {
    font-size: 0.88rem;
  }

  .hp-hospital-card__type {
    font-size: 0.72rem;
  }

  .hp-story-card {
    min-height: 220px;
    padding: 14px 10px 12px;
    border-radius: 16px;
  }

  .hp-story-card__qmark {
    font-size: 22px;
    top: 8px;
    left: 10px;
  }

  .hp-story-card__avatar,
  .hp-story-card__avatar > img:first-child {
    width: 56px;
    height: 56px;
  }

  .hp-story-card__play {
    width: 18px;
    height: 18px;
    font-size: 8px;
  }

  .hp-demo-chip {
    font-size: 9px;
    padding: 2px 8px;
  }

  .hp-story-card__text {
    font-size: 0.78rem;
  }

  .hp-story-card__foot strong {
    font-size: 0.82rem;
  }

  .hp-story-card__foot span {
    font-size: 0.7rem;
  }
}

/* —— Desktop —— */
@media (min-width: 1024px) {
  .hp-hospitals {
    padding: 40px 0 16px;
  }

  .hp-stories {
    padding: 12px 0 48px;
  }

  .hp-hs {
    width: min(100% - 40px, 1180px);
  }

  .hp-hs__panel {
    padding: 28px 24px 20px;
    border-radius: 24px;
  }

  .hp-hs__title {
    font-size: 1.55rem;
  }

  .hp-hs__carousel {
    gap: 12px;
    grid-template-columns: 48px 1fr 48px;
  }

  .hp-hs__nav {
    width: 48px;
    height: 48px;
  }

  .hp-hospital-card {
    min-height: 240px;
    border-radius: 20px;
  }

  .hp-hospital-card__photo {
    height: 128px;
  }

  .hp-hospital-card__name {
    font-size: 0.95rem;
  }

  .hp-story-card {
    min-height: 240px;
    border-radius: 20px;
    padding: 16px 14px 14px;
  }

  .hp-story-card__avatar,
  .hp-story-card__avatar > img:first-child {
    width: 64px;
    height: 64px;
  }

  .hp-story-card__text {
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-hospital-card,
  .hp-story-card,
  .hp-hs__nav {
    transition: none;
  }

  .hp-hospital-card:hover,
  .hp-story-card:hover {
    transform: none;
  }
}

[dir="rtl"] .hp-hs__nav--prev svg,
[dir="rtl"] .hp-hs__nav--next svg {
  transform: scaleX(-1);
}

[dir="rtl"] .hp-story-card__qmark {
  left: auto;
  right: 6px;
}

[dir="rtl"] .hp-hospital-card__rating {
  right: auto;
  left: 4px;
}
