/***** BASIC *****/
:root {
  --theme-blue: 200, 80%, 38%;
  --theme-red: 350, 63%, 52%;
  --theme-pink: 350, 100%, 69%;
  --theme-black: 0, 7%, 9%;
  --theme-white: 0, 0%, 100%;
  --theme-light: 0, 100%, 100%;
  --theme-dark: 0, 7%, 29%;
  color: hsl(var(--theme-dark));
  background: hsl(var(--theme-light));
}
*, *::after, *::before {
  box-sizing: border-box;
}
a {
  color: hsl(var(--theme-blue));
  transition: color 150ms, text-decoration-color 150ms;
}
a:active, a:visited {
  color: hsl(var(--theme-blue));
}
a:hover {
  color: hsl(var(--theme-red));
}
a:focus, a:hover {
  text-decoration-color: transparent;
}
a:focus, [tabindex='-1']:focus {
  outline: 0.125rem solid hsl(var(--theme-pink));
}
a:focus:not(:focus-visible), [tabindex='-1']:focus:not(:focus-visible) {
  outline: none;
}

/* --- UPDATED Carousel Container ---
     The Carousel is now a static box whose width is fixed (1100px on desktop)
     and centered on the page. It will only shrink on smaller screens. */
.Carousel {
  border-radius: 1rem;
  width: 1100px;           /* fixed width for desktop */
  max-width: 100%;        /* allow shrinking on smaller screens */
  margin: 0 auto;         /* center the carousel */
  overflow: hidden;       /* hide any overflow (no partial cards) */
  position: relative;
  height: auto;           /* height is determined by the card’s aspect ratio */
}

/* Remove scrollbar styles no longer needed */
.Carousel::-webkit-scrollbar {
  display: none;
}

/* --- UPDATED Carousel Card ---
     Each card now simply fills 100% of the Carousel container.
     The aspect ratio is maintained via --card-ratio. */
.Carousel .Card {
  aspect-ratio: var(--card-ratio);
  width: 100%;
  position: relative;
  margin-right: 10px;
}

/* For single-card mode, remain full width */
.Carousel--single .Card {
  --card-ratio: auto;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .Carousel {
    /* No scroll behavior since the container is static */
    scroll-behavior: auto;
  }
}
@supports not (aspect-ratio: 1) {
  .Carousel .Card__media {
    padding-block-end: 0 !important;
  }
  .Carousel .Card__image {
    position: relative !important;
  }
}

.Dots {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.Dot {
  border-radius: 100%;
  display: block;
  height: 1.5rem;
  width: 1rem;
  position: relative;
}
.Dot::after {
  background: currentColor;
  border-radius: 100%;
  content: '';
  display: block;
  height: 0.375rem;
  width: 0.375rem;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
}
.Dot--active {
  color: lightgrey !important;
}
.Pagination {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 1rem -0.5rem;
}
.Pagination .Arrow {
  flex: 0 0 auto;
}
.Pagination .Arrow:first-of-type {
  margin-inline-end: auto;
  order: -1;
}
.Pagination .Arrow:last-of-type {
  margin-inline-start: auto;
  order: 1;
}
.Arrow {
  align-items: center;
  appearance: none;
  background: transparent;
  border: none;
  border-radius: 0.125rem;
  cursor: pointer;
  color: hsl(var(--theme-blue));
  display: flex;
  height: 3rem;
  justify-content: center;
  opacity: 1;
  padding: 0.5rem;
  transition: opacity 150ms, color 150ms;
  width: 3rem;
}
.Arrow:hover {
  color: hsl(var(--theme-red));
}
.Arrow:focus {
  color: hsl(var(--theme-pink));
  outline: none;
}
.Arrow:focus svg {
  box-shadow: 0 0 0 0.125rem hsla(var(--theme-white)), 0 0 0 0.25rem currentColor;
}
.Arrow:focus:not(:focus-visible) {
  color: hsl(var(--theme-red));
}
.Arrow:focus:not(:focus-visible) svg {
  box-shadow: none;
}
.Arrow[disabled] {
  color: hsl(var(--theme-dark));
  opacity: 0.4;
  pointer-events: none;
}
.Arrow svg {
  border-radius: 100%;
  fill: currentColor;
  height: 100%;
  width: 100%;
  transition: box-shadow 150ms;
}
[dir='rtl'] .Arrow svg {
  transform: scaleX(-1);
}
.Hidden {
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
  white-space: nowrap !important;
}
:root {
  --card-link-color: var(--theme-blue);
  --card-hover-color: var(--theme-red);
  --card-focus-color: var(--theme-pink);
  --card-inner-focus-color: var(--theme-white);
  --card-shadow-color: var(--theme-black);
  --card-foreground-color: var(--theme-dark);
  --card-background-color: var(--theme-dark);
}
.Card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: [media-start] auto media-end main-start auto [main-end];
  position: relative;
  border-radius: 1rem;
  min-height: 10px;
  max-height: 350px;
  width: 100%;
}
.Card__media {
  background: hsla(var(--card-background-color));
  border-radius: 1rem;
  grid-column: 1 / -1;
  grid-row: media-start / media-end;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  z-index: -1;
}
.Card__media > * {
  border-radius: inherit;
  height: 100%;
  object-fit: cover;
  position: absolute;
  width: 100%;
}
/* Card__image now fills its container */
.Card__image {
  border-radius: 1rem;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
    max-height: 350px; /*  big images are breaking not really sure why? this works for now */
}
.Card__main {
  align-self: end;
  color: hsl(var(--card-foreground-color));
  grid-column: 1 / -1;
  grid-row: main-start / main-end;
  padding: 1.25rem;
}
.Card__main [href]:not(.Card__link) {
  position: relative;
  z-index: 2;
}
.Card__main > * {
  margin: 0;
}
.Card__link {
  color: hsl(var(--card-link-color));
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-color: hsla(var(--card-link-color));
  text-decoration-thickness: 0.125rem;
  text-decoration-skip: ink;
  text-decoration-skip-ink: all;
  text-decoration-offset: 100%;
}
.Card__link::after {
  border: 0.125rem solid hsl(var(--card-focus-color));
  box-shadow: inset 0 0 0 0.125rem hsla(var(--card-inner-focus-color));
  border-radius: 1rem;
  bottom: 0;
  content: '';
  display: block;
  grid-column: 1 / -1;
  grid-row: media-start / media-end;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}
.Card__link:hover, .Card__link:focus {
  text-decoration-color: hsla(var(--card-hover-color));
}
.Card__link:hover::after, .Card__link:focus::after {
  opacity: 1;
}
.Card__link:focus {
  outline: none;
  text-decoration-color: currentColor;
}
.Card__heading {
  line-height: 1.25;
  margin-block-end: 0.5rem;
}
.Card--border .Card__link::after {
  opacity: 1;
}
.Card--border .Card__link:not(:focus):not(:hover)::after {
  border-color: hsla(var(--card-foreground-color));
}
.Card--overlay {
  --card-shadow-color: var(--theme-white);
  --card-foreground-color: var(--theme-white);
  --card-background-color: var(--theme-white);
  --card-link-color: var(--theme-white);
  --card-hover-color: var(--theme-white);
  grid-template-rows: [media-start] 1fr [overlay-start] 1rem [main-start] auto main-end overlay-end media-end;
}
.Card--overlay::before {
  background: linear-gradient(to top, hsla(var(--card-shadow-color)) 20%, hsla(var(--card-shadow-color)) 60%, transparent);
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
  content: '';
  display: block;
  grid-column: 1 / -1;
  grid-row: overlay-start / overlay-end;
  overflow: hidden;
}
.Card--overlay .Card__main p {
  text-shadow: 0 0.0625rem 0.0625rem hsl(var(--card-shadow-color));
}
.Card--overlay .Card__main a {
  color: hsl(var(--card-link-color));
}
.Card--overlay .Card__main a:active, .Card--overlay .Card__main a:visited {
  color: hsl(var(--card-link-color));
}
.Card--overlay .Card__main a:hover, .Card--overlay .Card__main a:focus {
  color: hsl(var(--card-hover-color));
}
.Card--overlay .Card__link {
  /* additional overlay rules can go here */
}
.Card--overlay .Card__link:focus {
  outline: none;
  text-decoration-color: currentColor;
}
/* Card modifiers for aspect ratio */
.Card--square {
  --card-ratio: auto 1;
}
.Card--photo {
  --card-ratio: auto 1.3333333333;
}
.Card--portrait {
  --card-ratio: auto 0.75;
}
.Card--wide {
  --card-ratio: auto 1.7777777778;
}

/***** TABLET *****/
@media only screen and (max-width: 991px) {
  .Carousel {
    width: 90%;  /* shrink carousel container on tablet */
    padding: 0 0.5rem;
  }
  .Card {
    max-height: 350px;
    width: 100%;
  }
  .Card__image {
    max-height: 350px;
    height: 100%;
  }
  .Dots {
    margin: 1rem 0;
  }
  .Arrow {
    height: 2.5rem;
    width: 2.5rem;
  }
}

/***** TABLET 2 *****/
@media only screen and (max-width: 767px) {
  .Carousel {
    width: 90%;
    padding: 0 0.25rem;
  }
  .Card {
    max-height: 300px;
    width: 100%;
  }
  .Card__image {
       max-height: 300px;
    height: 100%;
  }
  .Dots {
    flex-wrap: nowrap;
    margin: 0.5rem 0;
  }
  .Card__main {
    padding: 0.75rem;
  }
}

/***** MOBILE *****/
@media only screen and (max-width: 576px) {
  .Carousel {
    width: 100%;  /* full width on mobile */
    padding: 0;
  }
  .Card {
    max-height: 250px;
    width: 100%;
  }
  .Card__image {
      max-height: 250px;
    height: 100%;
  }
  .Card__main {
    padding: 0.5rem;
  }
}

/***** MOBILE 2 *****/
@media only screen and (max-width: 397px) {
  .Card {
    max-height: 200px;
  }
  .Card__image {
       max-height: 200px;
    height: 100%;
  }
}
