.at-showcase {
  --at-bg: #ffffff;
  --at-soft-bg: #eef8f7;
  --at-text: #222735;
  --at-muted: #4f5866;
  --at-accent: #166680;
  --at-accent-2: #2f7d8a;
  --at-border: rgba(22, 102, 128, 0.16);
  --at-shadow: 0 12px 30px rgba(20, 30, 40, 0.10);
  --at-shadow-hover: 0 18px 42px rgba(20, 30, 40, 0.15);
  --at-radius: 14px;

  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  color: var(--at-text);
}

.at-showcase *,
.at-showcase *::before,
.at-showcase *::after {
  box-sizing: border-box;
}

.at-showcase__header {
  margin: 0 0 34px;
  text-align: center;
}

.at-showcase__title {
  margin: 0;
  color: var(--at-text);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  font-weight: 700;
}

.at-showcase__divider {
  display: block;
  width: 90px;
  height: 4px;
  margin: 22px auto 0;
  background: var(--at-accent);
  border-radius: 999px;
}

.at-showcase__description {
  max-width: 760px;
  margin: 18px auto 0;
  color: var(--at-muted);
  font-size: 16px;
  line-height: 1.55;
}

.at-grid {
  --at-columns: 5;
  display: grid;
  grid-template-columns: repeat(var(--at-columns), minmax(0, 1fr));
  gap: 22px;
  width: 100%;
}

.at-grid__item {
  min-width: 0;
  display: flex;
}

.at-tile {
  position: relative;
  width: 100%;
  min-height: 285px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 30px 22px 26px;
  overflow: visible;
  background:
    radial-gradient(circle at 50% -10%, rgba(22, 102, 128, 0.08), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94));
  border: 1px solid var(--at-border);
  border-radius: var(--at-radius);
  box-shadow: var(--at-shadow);
  color: var(--at-text);
  text-align: center;
  text-decoration: none !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.at-tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(22, 102, 128, 0.95), transparent);
  opacity: 0;
  transition: opacity 180ms ease;
}

.at-tile--link {
  cursor: pointer;
}

.at-tile--link:hover,
.at-tile--link:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(22, 102, 128, 0.36);
  box-shadow: var(--at-shadow-hover);
}

.at-tile--link:hover::before,
.at-tile--link:focus-visible::before {
  opacity: 1;
}

.at-tile--link:focus-visible {
  outline: 4px solid rgba(22, 102, 128, 0.42);
  outline-offset: 4px;
}

.at-tile__icon-wrap {
  width: 112px;
  height: 112px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0 0 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), transparent 42%),
    rgba(22, 102, 128, 0.10);
  box-shadow: inset 0 0 0 1px rgba(22, 102, 128, 0.06);
}

.at-tile__icon {
  display: block;
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.at-tile__placeholder {
  color: var(--at-accent);
  font-size: 38px;
  line-height: 1;
  font-weight: 700;
}

.at-tile__title {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--at-text);
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.32;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.at-tile__line {
  width: 44px;
  height: 3px;
  flex: 0 0 auto;
  margin: 18px auto 18px;
  background: var(--at-accent);
  border-radius: 999px;
}

.at-tile__text {
  margin: 0;
  color: var(--at-text);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

/* Text display setting */
.at-showcase--text-full .at-tile__text {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

.at-showcase--text-partial .at-tile__text {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Better proportions when fewer columns are used */
.at-grid--cols-1 .at-tile {
  min-height: 190px;
  padding: 30px 34px;
}

.at-grid--cols-2 .at-tile,
.at-grid--cols-3 .at-tile {
  min-height: 255px;
}

.at-grid--cols-2 .at-tile__text,
.at-grid--cols-3 .at-tile__text {
  max-width: 480px;
}

/* Compact mode for many columns */
.at-grid--cols-6 .at-tile,
.at-grid--cols-7 .at-tile,
.at-grid--cols-8 .at-tile,
.at-grid--cols-9 .at-tile,
.at-grid--cols-10 .at-tile,
.at-grid--cols-11 .at-tile,
.at-grid--cols-12 .at-tile {
  min-height: 245px;
  padding: 24px 16px 22px;
}

.at-grid--cols-6 .at-tile__icon-wrap,
.at-grid--cols-7 .at-tile__icon-wrap,
.at-grid--cols-8 .at-tile__icon-wrap,
.at-grid--cols-9 .at-tile__icon-wrap,
.at-grid--cols-10 .at-tile__icon-wrap,
.at-grid--cols-11 .at-tile__icon-wrap,
.at-grid--cols-12 .at-tile__icon-wrap {
  width: 86px;
  height: 86px;
  margin-bottom: 16px;
}

.at-grid--cols-6 .at-tile__icon,
.at-grid--cols-7 .at-tile__icon,
.at-grid--cols-8 .at-tile__icon,
.at-grid--cols-9 .at-tile__icon,
.at-grid--cols-10 .at-tile__icon,
.at-grid--cols-11 .at-tile__icon,
.at-grid--cols-12 .at-tile__icon {
  width: 54px;
  height: 54px;
}

.at-showcase--text-partial .at-grid--cols-6 .at-tile__text,
.at-showcase--text-partial .at-grid--cols-7 .at-tile__text,
.at-showcase--text-partial .at-grid--cols-8 .at-tile__text,
.at-showcase--text-partial .at-grid--cols-9 .at-tile__text,
.at-showcase--text-partial .at-grid--cols-10 .at-tile__text,
.at-showcase--text-partial .at-grid--cols-11 .at-tile__text,
.at-showcase--text-partial .at-grid--cols-12 .at-tile__text {
  -webkit-line-clamp: 4;
}

.at-grid--cols-6 .at-tile__text,
.at-grid--cols-7 .at-tile__text,
.at-grid--cols-8 .at-tile__text,
.at-grid--cols-9 .at-tile__text,
.at-grid--cols-10 .at-tile__text,
.at-grid--cols-11 .at-tile__text,
.at-grid--cols-12 .at-tile__text {
  font-size: 13px;
}

/* List layout setting */
.at-grid--layout-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.at-grid--layout-list .at-grid__item {
  display: block;
  width: 100%;
}

.at-grid--layout-list .at-tile {
  min-height: auto;
  height: auto;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon line"
    "icon text";
  column-gap: 26px;
  align-items: start;
  justify-items: start;
  padding: 26px 30px;
  text-align: left;
}

.at-grid--layout-list .at-tile__icon-wrap {
  grid-area: icon;
  width: 86px;
  height: 86px;
  margin: 0;
}

.at-grid--layout-list .at-tile__icon {
  width: 54px;
  height: 54px;
}

.at-grid--layout-list .at-tile__title {
  grid-area: title;
  min-height: 0;
  justify-content: flex-start;
  text-align: left;
  font-size: 20px;
  line-height: 1.28;
}

.at-grid--layout-list .at-tile__line {
  grid-area: line;
  margin: 14px 0 16px;
}

.at-grid--layout-list .at-tile__text {
  grid-area: text;
  max-width: 840px;
  text-align: left;
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 1300px) {
  .at-grid:not(.at-grid--layout-list) {
    grid-template-columns: repeat(min(var(--at-columns), 3), minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .at-grid:not(.at-grid--layout-list) {
    grid-template-columns: repeat(min(var(--at-columns), 2), minmax(0, 1fr));
  }

  .at-tile {
    min-height: 250px;
  }
}

@media (max-width: 767px) {
  .at-showcase__header {
    text-align: left;
  }

  .at-showcase__divider {
    margin-left: 0;
    margin-right: 0;
  }

  .at-grid:not(.at-grid--layout-list) {
    grid-template-columns: 1fr;
  }

  .at-tile {
    min-height: auto;
    padding: 26px 22px;
  }

  .at-tile__icon-wrap {
    width: 100px;
    height: 100px;
    margin-bottom: 18px;
  }

  .at-tile__icon {
    width: 64px;
    height: 64px;
  }

  .at-tile__title {
    min-height: 0;
  }

  .at-grid--layout-list .at-tile {
    grid-template-columns: 1fr;
    grid-template-areas:
      "icon"
      "title"
      "line"
      "text";
    justify-items: center;
    text-align: center;
  }

  .at-grid--layout-list .at-tile__icon-wrap {
    margin-bottom: 18px;
  }

  .at-grid--layout-list .at-tile__title,
  .at-grid--layout-list .at-tile__text {
    text-align: center;
  }

  .at-grid--layout-list .at-tile__title {
    justify-content: center;
  }

  .at-grid--layout-list .at-tile__line {
    margin-left: auto;
    margin-right: auto;
  }

  .at-showcase--text-partial .at-tile__text {
    -webkit-line-clamp: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .at-tile,
  .at-tile::before {
    transition: none;
  }

  .at-tile--link:hover,
  .at-tile--link:focus-visible {
    transform: none;
  }
}
