/* Activities Block - Base Styles */

/* Block Container */
.activities-block {
  margin: 4rem 0;
}

/* Carousel Wrapper */
.activities-carousel-wrapper {
  position: relative;
  margin-bottom: 4rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  background-color: var(--wp--preset--color--blue);
  z-index: 2;
}

@media (max-width: 1024px) {
  .activities-carousel-wrapper {
    margin-bottom: 2rem;
  }
}

.activities-carousel-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50vw;
  width: 50vw;
  height: 100%;
  background-color: var(--wp--preset--color--blue);
  z-index: 1;
}

.activities-carousel-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  right: -50vw;
  width: 50vw;
  height: 100%;
  background-color: var(--wp--preset--color--blue);
  z-index: 1;
}

/* Carousel Container - Horizontal Scroll */
.activities-carousel {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  margin: 0 auto;
  max-width: 75%;
  bottom: -1rem;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.activities-carousel::-webkit-scrollbar {
  display: none;
}
.activities-carousel {
  -ms-overflow-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  scrollbar-width: none;
}

.carousel-track {
  display: flex;
  width: 100%;
  gap: 2rem;
  /* justify-content: center; */
  /* padding: 0 2rem; */
}

/* Activity Icon Buttons - Responsive slide counts */
.activity-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  border: none;
  cursor: pointer;
  background-color: transparent;
  transition: all 0.3s ease;
  text-align: center;
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* Above 1280px: 5 slides */
@media (min-width: 1281px) {
  .activity-icon-btn {
    width: calc(20% - 1.5rem);
  }
}

/* Below 1280px: 4 slides */
@media (max-width: 1280px) {
  .activity-icon-btn {
    width: calc(25% - 1.5rem);
  }
}

/* At 1024px and below: 3 slides */
@media (max-width: 1024px) {
  .activity-icon-btn {
    width: calc(33.333% - 1rem);
  }
}

/* At 768px and below: 2 slides */
@media (max-width: 768px) {
  .activity-icon-btn {
    width: calc(50% - 1rem);
  }

  .carousel-nav {
    max-width: 32px;
  }

  .activities-carousel-wrapper {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }
}

/* At 420px and below: 1 slide */
/* @media (max-width: 420px) {
  .activity-icon-btn {
    min-width: calc(100% - 1rem);
    width: calc(100% - 1rem);
  }
} */

.activity-icon-btn:hover img {
  background: var(--wp--preset--color--yellow);
}

.activity-icon-btn.active img {
  background: var(--wp--preset--color--yellow);
  fill: white;
  color: white;
}

/* Icon Images - Responsive sizes */
.activity-icon-btn img {
  border-radius: 20px;
  aspect-ratio: 1/1;
  margin-bottom: 1em;
  background: var(--wp--preset--color--white);
}

/* Above 1280px: Large icons */
@media (min-width: 1281px) {
  .activity-icon-btn img {
    width: 110px !important;
    height: 110px !important;
    padding: 1.6rem;
  }
}

/* Below 1280px: Medium-large icons */
@media (max-width: 1280px) {
  .activity-icon-btn img {
    width: 100px !important;
    height: 100px !important;
    padding: 1.4rem;
  }
}

/* At 1024px and below: Medium icons */
@media (max-width: 1024px) {
  .activity-icon-btn img {
    width: 90px !important;
    height: 90px !important;
    padding: 1.2rem;
  }
}

/* At 768px and below: Small-medium icons */
@media (max-width: 420px) {
  .activity-icon-btn img {
    width: 80px !important;
    height: 80px !important;
    padding: 1.1rem;
  }
}

/* Icon Placeholder - Responsive sizes */
.activity-icon-placeholder {
  background: var(--wp--preset--color--yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  color: white;
  font-weight: bold;
}

/* Above 1280px: Large placeholders */
@media (min-width: 1281px) {
  .activity-icon-placeholder {
    width: 110px !important;
    height: 110px !important;
  }
}

/* Below 1280px: Medium-large placeholders */
@media (max-width: 1280px) {
  .activity-icon-placeholder {
    width: 100px !important;
    height: 100px !important;
  }
}

/* At 1024px and below: Medium placeholders */
@media (max-width: 1024px) {
  .activity-icon-placeholder {
    width: 90px !important;
    height: 90px !important;
  }
}

/* At 768px and below: Small-medium placeholders */
@media (max-width: 768px) {
  .activity-icon-placeholder {
    width: 80px !important;
    height: 80px !important;
  }
}

/* At 420px and below: Small placeholders */
@media (max-width: 420px) {
  .activity-icon-placeholder {
    width: 70px !important;
    height: 70px !important;
  }
}

/* Icon Titles - Responsive sizing */
.activity-icon-title {
  font-weight: 100;
  color: var(--wp--preset--color--white);
  line-height: 1.2;
  letter-spacing: 1.1px;
  font-family: var(--wp--preset--font-family--heading);
  text-align: center;
}

/* Above 1280px: Large titles */
@media (min-width: 1281px) {
  .activity-icon-title {
    font-size: 1.35rem;
  }
}

/* Below 1280px: Medium-large titles */
@media (max-width: 1280px) {
  .activity-icon-title {
    font-size: 1.2rem;
  }
}

/* At 1024px and below: Medium titles */
@media (max-width: 1024px) {
  .activity-icon-title {
    font-size: 1.1rem;
  }
}

/* At 768px and below: Small-medium titles */
@media (max-width: 768px) {
  .activity-icon-title {
    font-size: 1rem;
  }
}

/* At 420px and below: Small titles */
@media (max-width: 420px) {
  .activity-icon-title {
    font-size: 0.9rem;
  }
}

/* Carousel Navigation */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 10;
  opacity: 1;
  color: white;
}

.carousel-nav:hover:not(:disabled) {
  opacity: 0.7;
}

.carousel-nav:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

@media (max-width: 640px) {
  .carousel-prev {
    left: 5px;
  }

  .carousel-next {
    right: 5px;
  }

  .carousel-nav {
    font-size: 1.25rem;
  }
}

/* Activity Content Sections */
.activity-content-heading {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 3rem;
  margin-bottom: 4rem;
  width: 100%;
  padding-bottom: 2rem;
  border-bottom: 5px solid #009464;
}

.activity-title {
  font-size: 4rem !important;
  line-height: 1;
  margin-bottom: 0 !important;
  font-weight: 300;
}

@media (max-width: 1024px) {
  .activity-content-heading {
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
  }
}

@media (max-width: 640px) {
  .activity-content-heading {
    gap: 2rem;
  }
  .activity-title {
    font-size: 3rem !important;
  }

  .activities-block .activity-content-heading img {
    width: 70px !important;
    height: 70px !important;
    padding: 0.75rem;
  }
}

.activity-content-heading img {
  width: 90px !important;
  height: 90px !important;
  border-radius: 20px;
  aspect-ratio: 1/1;
  padding: 1rem;
  background: var(--wp--preset--color--yellow);
}

/* Content Display */
.activities-content {
  position: relative;
  margin-bottom: 1rem;
}

.activity-content-panel {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.activity-content-panel.active {
  display: block;
  opacity: 1;
}

.activity-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.activity-description {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.activity-description p:last-child {
  margin-bottom: 0;
}

/* Information List */
.activity-information {
  margin-bottom: 1.5rem;
  display: flex;
  gap: 2rem;
}

.info-illustration {
  height: fit-content;
  width: 25%;
  align-self: end;
}

.information-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 75%;
}

@media (max-width: 1024px) {
  .info-illustration {
    display: none;
  }

  .information-list {
    width: 100%;
  }
}

.activity-books {
  padding-top: 1rem;
}

/* Books Header - Desktop and Mobile */
.books-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 5px solid #009464;
}

.books-title {
  font-size: 2rem;
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 300;
  letter-spacing: 1.1px;
  margin-bottom: 0;
  color: #29296b;
  flex: 1;
}

/* Books Toggle Button - Hidden by default */
.books-toggle {
  display: none;
  background: none;
  border: solid #29296b 2px;
  font-size: 0.9rem;
  color: #29296b;
  cursor: pointer;
  padding: 0.25rem;
  margin-left: 1rem;
  width: 69px;
  text-align: center;
  margin-top: 4px;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border-radius: 8px;
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700;
  transition: opacity 0.2s ease;
}

.books-toggle:hover {
  opacity: 0.7;
}

.toggle-icon {
  transition: transform 0.3s ease;
}

.books-toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

.books-toggle[aria-expanded="true"] .toggle-text::after {
  content: "Hide";
}

/* / */

.books-toggle[aria-expanded="false"] .toggle-text::after {
  content: "Show";
}

.toggle-text {
  position: relative;
}

.toggle-text::after {
  content: "Show";
}

.books-list {
  column-count: 3;
  column-gap: 2rem;
}

@media (max-width: 1024px) {
  .books-list {
    column-count: 2;
  }
}

/* Mobile dropdown styles at 768px and below */
@media (max-width: 768px) {
  .books-toggle {
    display: flex;
  }

  .books-list {
    display: none;
    animation: slideDown 0.3s ease;
  }

  .books-list.show {
    display: block;
  }

  .books-header {
    margin-bottom: 1rem;
  }

  .activity-books.expanded .books-header {
    margin-bottom: 2.5rem;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 1000px;
  }
}

@media (max-width: 640px) {
  .books-list {
    column-count: 1;
  }

  .book-item-container {
    max-width: 100% !important;
    width: 100%;
  }
}

.book-item {
  padding-bottom: 2rem;
  display: inline-block;
  width: 100%;
}

.book-item-container {
  max-width: 300px;
}

.book-link {
  display: block;
  color: var(--wp--preset--color--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: underline;
}

.book-link:hover {
  text-decoration: none;
  color: var(--wp--preset--color--purple) !important;
}

.book-accreditation {
  font-size: 1.125rem;
  color: black;
  line-height: 1.4;
}

/* Preview and Empty States */
.activities-preview,
.activities-empty {
  text-align: center;
  padding: 2rem;
  background: #f5f5f5;
  border: 2px dashed #ddd;
}

/* Status Note */
.activities-note {
  text-align: center;
  margin-top: 1rem;
  opacity: 0.7;
  font-size: 0.875rem;
}
