html {
  scroll-padding-top: 5rem;
}

#heroSlider {
  height: 56svh;
  min-height: 360px;
  max-height: 520px;
}

@media (min-width: 640px) {
  #heroSlider {
    height: clamp(400px, 62vh, 620px);
    min-height: 0;
    max-height: 620px;
  }
}

#heroSlider > .absolute.inset-0.flex {
  display: none;
}

.hero-slide {
  transition: opacity 1s ease-in-out;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-slide img {
  display: block;
  height: 98%;
  width: 100%;
  object-fit: contain;
  object-position: center;
  transition: filter 0.8s ease, opacity 0.8s ease, transform 0.8s ease;
}

.hero-slide-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-slide.is-readable img {
  filter: brightness(0.72) blur(2px) saturate(0.85);
  opacity: 0.55;
  transform: scale(1.03);
}

.hero-intro-visual {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3vmin;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(220, 42, 31, 0.12), rgba(15, 15, 15, 0.75) 42%, rgba(15, 15, 15, 1) 100%);
}

.hero-slide.is-readable .hero-intro-visual {
  filter: brightness(0.72) blur(2px) saturate(0.85);
  opacity: 1;
  transform: scale(1.03);
}

.hero-intro-glow {
  position: absolute;
  width: 70vmin;
  height: 70vmin;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 42, 31, 0.54), transparent 65%);
  opacity: 0;
  filter: blur(12px);
  animation: heroIntroGlow 16s ease-in-out infinite;
}

.hero-intro-ecg {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 22vmin;
  transform: translateY(-50%);
  overflow: visible;
}

.hero-intro-ecg path {
  fill: none;
  stroke: #dc2a1f;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  filter: drop-shadow(0 0 8px rgba(220, 42, 31, 0.7));
  animation: heroIntroTrace 16s ease-in-out infinite;
}

.hero-intro-logo {
  position: relative;
  width: min(44vmin, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.36) rotate(-90deg);
  animation: heroIntroLogo 16s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.hero-intro-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hero-intro-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-align: center;
  color: #fff;
}

.hero-intro-title {
  opacity: 0;
  transform: translateY(18px);
  animation: heroIntroTitle 16s ease-out infinite;
  font-size: clamp(0.72rem, 2.6vmin, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
  max-width: min(78vw, 980px);
}

.hero-intro-since {
  opacity: 0;
  transform: translateY(18px);
  animation: heroIntroSince 16s ease-out infinite;
  font-size: clamp(0.65rem, 1.8vmin, 1.2rem);
  letter-spacing: 0.5em;
  color: #dc2a1f;
  font-weight: 700;
}

.hero-intro-tag {
  opacity: 0;
  transform: translateY(18px);
  animation: heroIntroTag 16s ease-out infinite;
  font-size: clamp(0.7rem, 1.9vmin, 1.3rem);
  font-style: italic;
}

@keyframes heroIntroGlow {
  0%, 14%, 84%, 100% {
    opacity: 0;
    transform: scale(0.5);
  }

  24%, 74% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heroIntroTrace {
  0%, 100% {
    stroke-dashoffset: 2400;
    opacity: 0;
  }

  3% {
    opacity: 1;
  }

  14%, 74% {
    stroke-dashoffset: 0;
    opacity: 1;
  }

  84% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes heroIntroLogo {
  0%, 14%, 84%, 100% {
    opacity: 0;
    transform: scale(0.36) rotate(-90deg);
  }

  26%, 74% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes heroIntroTitle {
  0%, 32%, 84%, 100% {
    opacity: 0;
    transform: translateY(18px);
  }

  40%, 74% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroIntroSince {
  0%, 43%, 84%, 100% {
    opacity: 0;
    transform: translateY(18px);
  }

  50%, 74% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroIntroTag {
  0%, 53%, 84%, 100% {
    opacity: 0;
    transform: translateY(18px);
  }

  61%, 74% {
    opacity: 1;
    transform: translateY(0);
  }
}
#heroSlider .bg-gradient-to-r,
#heroSlider .bg-gradient-to-b {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.8s ease;
}

#heroSlider .bg-gradient-to-b {
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent, rgba(255, 255, 255, 0.55));
}

#heroSlider:has(.hero-slide.is-readable) .bg-gradient-to-r,
#heroSlider:has(.hero-slide.is-readable) .bg-gradient-to-b {
  opacity: 1;
}

#heroSlider:has(.hero-slide.is-readable .hero-intro-visual) .bg-gradient-to-r,
#heroSlider:has(.hero-slide.is-readable .hero-intro-visual) .bg-gradient-to-b {
  display: none;
}

.hero-caption-title,
.hero-caption-text {
  color: #1b2a4e !important;
}

@keyframes captionIn {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.caption-animate {
  animation: captionIn 0.7s ease-out forwards;
}

.hero-caption-tag.caption-animate {
  animation-delay: 0.15s;
}

.hero-caption-title.caption-animate {
  animation-delay: 0.35s;
}

.hero-caption-text.caption-animate {
  animation-delay: 0.6s;
}

.hero-caption-btns.caption-animate {
  animation-delay: 0.85s;
}

.latest-events-panel {
  display: flex;
  height: 390px;
  margin: 16px 12px 0;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(200, 30, 40, 0.08), transparent 42%),
    #f2f1ef;
  padding: 22px 24px 16px;
}

.latest-event-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(88%, 440px);
  height: clamp(270px, 44vh, 380px);
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -46%) scale(0.76);
  transition:
    transform 650ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 500ms ease,
    box-shadow 500ms ease;
  will-change: transform, opacity;
}

.latest-event-card[data-position="current"] {
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.latest-event-card[data-position="previous"] {
  z-index: 2;
  opacity: 0.58;
  transform: translate(-83%, -46%) scale(0.82);
}

.latest-event-card[data-position="next"] {
  z-index: 2;
  opacity: 0.58;
  transform: translate(-17%, -46%) scale(0.82);
}

.latest-event-card img {
  width: 100%;
  height: 100%;
  background: #fff;
  object-fit: contain;
  object-position: center;
  transition: transform 700ms ease;
}

.latest-event-image-link {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
}

.latest-event-card[data-position="current"]:hover img {
  transform: scale(1.04);
}

.latest-event-card::after {
  position: absolute;
  z-index: 1;
  inset: 30% 0 0;
  background: linear-gradient(180deg, transparent, rgba(10, 25, 55, 0.92));
  content: "";
}

.latest-event-card-copy {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 20px;
  left: 20px;
  color: #fff;
  pointer-events: none;
}

.latest-event-card-copy h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.latest-events-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.latest-events-controls {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.latest-events-arrow {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(27, 42, 78, 0.16);
  border-radius: 9999px;
  color: #1b2a4e;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.latest-events-arrow:hover {
  border-color: #c81e28;
  background: #c81e28;
  color: #fff;
}

.latest-events-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.latest-events-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: rgba(27, 42, 78, 0.28);
  transition: width 250ms ease, background-color 250ms ease;
}

.latest-events-dot[aria-current="true"] {
  width: 22px;
  background: #1b2a4e;
}

.latest-events-arrow:focus-visible,
.latest-events-dot:focus-visible,
.latest-event-image-link:focus-visible,
.latest-event-card-copy a:focus-visible {
  outline: 3px solid #c81e28;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .latest-event-card,
  .latest-event-card img,
  .latest-events-arrow,
  .latest-events-dot {
    transition-duration: 0.01ms;
  }
}

@media (max-width: 639px) {
  .latest-event-card[data-position="current"]:hover img {
    transform: none;
  }
}

@media (min-width: 1280px) {
    #home {
        display: grid;
        width: min(calc(100% - 64px), 1680px);
        height: clamp(520px, 64vh, 633px);
        grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
        gap: 18px;
        margin: 14px auto 0;
    }

  #heroSlider {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    border-radius: 24px;
    background: #f3f5f8;
    box-shadow: 0 20px 55px rgba(27, 42, 78, 0.14);
  }

  #heroSlider .hero-slide {
    background: linear-gradient(145deg, #eef2f7, #fff);
  }

  #heroSlider .hero-slide img {
    padding: clamp(14px, 1.8vw, 28px);
    object-fit: contain;
  }

  #heroSlider .hero-slide.is-readable img {
    filter: none;
    opacity: 1;
    transform: none;
  }

  #heroSlider .bg-gradient-to-r,
  #heroSlider .bg-gradient-to-b,
  #heroSlider .absolute.inset-0.flex {
    display: none;
  }

  #heroSlider #heroDots {
    z-index: 30;
  }

  .latest-events-panel {
    height: auto;
    margin: 0;
  }

  .latest-event-card {
    width: min(88%, 420px);
    height: auto;
    aspect-ratio: 12 / 11;
  }

  .latest-event-card img {
    object-fit: contain;
  }
}

.home-main {
  padding: 2px 0 0;
}

.home-about-section {
  padding-top: 31px;
}

.home-copy {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.emphasis-red {
  color: #dc2626;
  font-weight: bold;
}

.home-activities-inner {
  padding-top: 45px;
  padding-bottom: 29px;
}

.activity-card-first {
  padding-top: 9px;
}

.activity-card-second {
  padding-top: 6px;
}

.activity-card-third {
  padding-top: 5px;
}

.home-multimedia {
  padding-top: 13px;
}