.wp-block-acf-taxonomy-list {
  margin-top: 2rem;
  padding: 0 1rem;
}
.wp-block-acf-taxonomy-list .acf-block-placeholder {
  padding: 2rem;
  background: #f1f1f1;
  border: 2px dashed #ccc;
  text-align: center;
  color: #666;
}
.wp-block-acf-taxonomy-list .taxonomy-list__container {
  display: flex;
  flex-direction: column;
  gap: 3rem; /* Tighter gap on mobile */
  margin: 0 auto;
  max-width: var(--wp--style--global--content-size, 1200px);
}
@media screen and (min-width: 768px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__container {
    gap: 4rem; /* Larger gap on desktop */
  }
}
.wp-block-acf-taxonomy-list .taxonomy-list__item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
@media screen and (min-width: 768px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__item {
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
  }
}
.wp-block-acf-taxonomy-list .taxonomy-list__item {
  /* --- ALTERNATING LAYOUT LOGIC --- */
}
.wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(odd) .taxonomy-list__image-wrapper img,
.wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(odd) .taxonomy-list__image-wrapper .taxonomy-list__image-placeholder {
  -webkit-mask-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTg4IiBoZWlnaHQ9IjU3NSIgdmlld0JveD0iMCAwIDk4OCA1NzUiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8zNDNfMTgzNSkiPgo8cGF0aCBkPSJNMCAwTDk4OCAzNC4yNzU3VjUxNS44NTFMNTkyLjExNCA1NzQuOTc2TDAgNTE1Ljg1MVYwWiIgZmlsbD0iI0Q5RDlEOSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzM0M18xODM1Ij4KPHJlY3Qgd2lkdGg9Ijk4OCIgaGVpZ2h0PSI1NzUiIGZpbGw9IndoaXRlIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgMSA5ODggMCkiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K);
  mask-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTg4IiBoZWlnaHQ9IjU3NSIgdmlld0JveD0iMCAwIDk4OCA1NzUiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8zNDNfMTgzNSkiPgo8cGF0aCBkPSJNMCAwTDk4OCAzNC4yNzU3VjUxNS44NTFMNTkyLjExNCA1NzQuOTc2TDAgNTE1Ljg1MVYwWiIgZmlsbD0iI0Q5RDlEOSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzM0M18xODM1Ij4KPHJlY3Qgd2lkdGg9Ijk4OCIgaGVpZ2h0PSI1NzUiIGZpbGw9IndoaXRlIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgMSA5ODggMCkiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K);
}
@media screen and (min-width: 768px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(odd) {
    flex-direction: row-reverse;
  }
  .wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(odd) .taxonomy-list__link {
    align-items: flex-start;
  }
  .wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(odd) .taxonomy-list__title {
    writing-mode: vertical-rl;
    transform: rotate(0deg);
  }
}
.wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(even) .taxonomy-list__image-wrapper img,
.wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(even) .taxonomy-list__image-wrapper .taxonomy-list__image-placeholder {
  -webkit-mask-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTg4IiBoZWlnaHQ9IjU3NSIgdmlld0JveD0iMCAwIDk4OCA1NzUiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik05ODggMEwwIDM0LjI3NTdWNTE1Ljg1MUwzOTUuODg2IDU3NC45NzZMOTg4IDUxNS44NTFWMFoiIGZpbGw9IiNEOUQ5RDkiLz4KPC9zdmc+Cg==);
  mask-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTg4IiBoZWlnaHQ9IjU3NSIgdmlld0JveD0iMCAwIDk4OCA1NzUiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik05ODggMEwwIDM0LjI3NTdWNTE1Ljg1MUwzOTUuODg2IDU3NC45NzZMOTg4IDUxNS44NTFWMFoiIGZpbGw9IiNEOUQ5RDkiLz4KPC9zdmc+Cg==);
}
@media screen and (min-width: 768px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(even) {
    flex-direction: row;
  }
  .wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(even) .taxonomy-list__link {
    align-items: flex-end;
  }
  .wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(even) .taxonomy-list__title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }
}
.wp-block-acf-taxonomy-list .taxonomy-list__item {
  /* --- REPEATING COLOR SEQUENCE LOGIC --- */
}
.wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(3n+1) .taxonomy-list__title {
  color: var(--wp--preset--color--wsmgreen, #008A7B);
}
.wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(3n+2) .taxonomy-list__title {
  color: var(--wp--preset--color--wsmblue, #00A7E1);
}
.wp-block-acf-taxonomy-list .taxonomy-list__item:nth-child(3n+3) .taxonomy-list__title {
  color: var(--wp--preset--color--wsmpurple, #8953A7);
}
.wp-block-acf-taxonomy-list .taxonomy-list__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column; /* Stack vertically on mobile */
  width: 100%;
}
@media screen and (min-width: 768px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__link {
    flex-direction: inherit;
    width: 100%;
  }
}
.wp-block-acf-taxonomy-list .taxonomy-list__link:hover .taxonomy-list__image-wrapper img {
  transform: scale(1.005);
}
.wp-block-acf-taxonomy-list .taxonomy-list__link:hover .taxonomy-list__title {
  color: var(--wp--preset--color--wsmpink, #e02b79) !important;
}
.wp-block-acf-taxonomy-list .taxonomy-list__link:hover .taxonomy-list__explore span {
  transform: translateX(15px);
}
@media screen and (max-width: 767px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__image-wrapper {
    /* Dissolves wrapper on mobile so we can reorder children freely */
    display: contents;
  }
}
@media screen and (min-width: 768px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__image-wrapper {
    position: relative;
    flex: 1;
  }
}
.wp-block-acf-taxonomy-list .taxonomy-list__image-wrapper img, .wp-block-acf-taxonomy-list .taxonomy-list__image-wrapper .taxonomy-list__image-placeholder {
  width: 100%;
  aspect-ratio: 1.72/1;
  max-height: 650px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  /* Shared Mask Settings */
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: cover;
  mask-size: cover;
  mask-position: center center;
}
@media screen and (max-width: 767px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__image-wrapper img, .wp-block-acf-taxonomy-list .taxonomy-list__image-wrapper .taxonomy-list__image-placeholder {
    order: 1; /* Forces Image to top on mobile */
  }
}
.wp-block-acf-taxonomy-list .taxonomy-list__image-wrapper .taxonomy-list__image-placeholder {
  background-color: #e5e5e5;
}
.wp-block-acf-taxonomy-list .taxonomy-list__title-overlay {
  position: relative;
  z-index: 2;
}
@media screen and (max-width: 767px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__title-overlay {
    order: 2; /* Forces Title below Image on mobile */
    padding: 1.5rem 0 0 0;
  }
}
@media screen and (min-width: 768px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__title-overlay {
    z-index: 1;
    padding: 0;
    flex-shrink: 0;
  }
}
.wp-block-acf-taxonomy-list .taxonomy-list__title {
  margin: 0;
  font-family: var(--wp--preset--font-family--roboto, "Roboto", sans-serif);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.1275rem;
  text-transform: uppercase;
  transition: color 0.3s ease;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
  white-space: normal;
  text-shadow: none;
  /* Mobile specific base styles (Horizontal, Stacked) */
  writing-mode: horizontal-tb;
  transform: none;
  text-align: left;
  max-height: none;
  padding-right: 0;
}
@media screen and (min-width: 768px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__title {
    max-height: 400px;
    padding-right: 1.5rem;
    /* writing-mode & transform are injected via the odd/even logic above */
  }
}
.wp-block-acf-taxonomy-list .taxonomy-list__explore {
  font-family: var(--wp--preset--font-family--roboto, "Roboto", sans-serif);
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  gap: 0.5rem;
  transition: color 0.3s ease;
}
.wp-block-acf-taxonomy-list .taxonomy-list__explore span {
  transition: transform 0.3s ease;
  display: inline-block;
}
@media screen and (max-width: 767px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__explore {
    order: 3; /* Forces Explore below Title on mobile */
    position: static;
    color: var(--wp--preset--color--wsmdarkblue, #0f172a);
    font-size: 1.125rem;
    justify-content: flex-start;
    padding: 1rem 0 0 0;
    text-shadow: none;
    border: none;
    width: 100%;
    text-align: left;
  }
}
@media screen and (min-width: 768px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__explore {
    position: absolute;
    bottom: 5.5rem;
    right: 0;
    z-index: 2;
    color: #ffffff;
    font-size: 2.875rem;
    line-height: normal;
    letter-spacing: -0.14375rem;
    justify-content: flex-end;
    width: 100%;
    text-align: right;
    padding: 1rem 1.5rem;
    border-top: 1px solid white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  }
}
.wp-block-acf-taxonomy-list .taxonomy-list__description {
  margin: 0;
  font-family: var(--wp--preset--font-family--roboto, "Roboto", sans-serif);
  font-size: 1.125rem;
  line-height: 1.6;
  color: #333;
}
@media screen and (min-width: 768px) {
  .wp-block-acf-taxonomy-list .taxonomy-list__description {
    margin-top: -1rem;
  }
}
