#carousel-tenants .wrapper {
  display: flex;
  flex-direction: row;
  gap: 24px;
}

#carousel-tenants .control-wrapper {
  width: calc(25% - 12px); /* 3/12 of the width, adjusting for gap */
}

#carousel-tenants .carousels {
  width: calc(75% - 12px); /* 9/12 of the width, adjusting for gap */
}

.tenant-carousel .slick-slide {
  padding: 0 12px; /* Half of desired gap (24px) on each side */
  left: 0 !important; /* Force left alignment */
}

.tenant-carousel {
  margin: 0 -12px; /* Compensate for the padding of slides */
}

/* Make sure the carousel container has proper overflow handling */
.carousels {
  overflow: hidden;
  padding: 1px; /* Prevent margin collapse */
  border-radius: 24px;
}

/* Ensure full height for carousel items */
.tenant-carousel,
.tenant-carousel .slick-list,
.tenant-carousel .slick-track {
  height: 100%;
}

.tenant-carousel .slick-track {
  position: relative;
  left: 0;
  margin-left: 0;
}

.tenant-carousel .slick-slide {
  height: auto;
}

.tenant-carousel .slick-slide > div {
  height: 100%;
}

.tenant-carousel .carousel-item {
  height: 100%;
  float: left;
  clear: none;
  position: relative;
}

/* Maintain existing padding for gaps */
.tenant-carousel .slick-slide {
  padding: 0 12px; /* Half of desired gap (24px) on each side */
}

.tenant-carousel {
  margin: 0 -12px; /* Compensate for the padding of slides */
}

#carousel-tenants .control-wrapper {
  display: flex;
  flex-direction: column;
  height: 400px;
  justify-content: space-between;
  padding: 40px;
  border-radius: 24px;
  background-color: var(--color-green-dark);
  color: var(--color-green-light);
}

#carousel-tenants .control-wrapper .information-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#carousel-tenants .information-wrapper h3 {
  font-weight: 500;
}

#carousel-tenants .control-indicators {
  position: relative;
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: space-between;
}

#carousel-tenants .control-indicators .slick-controls {
  display: flex;
  flex-direction: row;
  gap: 4px;
}

#carousel-tenants .control-indicators .slick-prev:before,
#carousel-tenants .control-indicators .slick-next:before {
  display: none;
}

#carousel-tenants .control-indicators .slick-prev,
#carousel-tenants .control-indicators .slick-next {
  position: relative;
  top: unset;
  transform: unset;
  width: 40px;
  height: 40px;
  border-radius: unset;
  display: flex;
  justify-content: center;
  align-items: center;
  left: unset;
  right: unset;
}

#carousel-tenants .control-indicators .slick-dots-container {
  display: flex;
  flex-direction: row;
  align-items: end;
}

#carousel-tenants .control-indicators .slick-dots {
  position: relative;
  bottom: unset;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
  text-align: left;
}

#carousel-tenants .control-indicators .slick-dots li {
  margin: 0 2px;
}

#carousel-tenants .control-indicators .slick-dots li button:before {
  font-size: 16px;
  color: var(--color-green-light);
  opacity: 1;
  transition: all 0.1s ease-in-out;
}

#carousel-tenants .control-indicators .slick-dots li button:hover:before {
  color: var(--color-green-medium);
}

#carousel-tenants .control-indicators .slick-dots li.slick-active button:before {
  color: var(--color-green-medium);
}

/* Tenant Card Item */
.tenant-carousel .carousel-item {
  height: 100% !important;
  flex: 1; /* Take up all available space */
  display: flex; /* Add flex to ensure child elements can also fill height */
  flex-direction: column; /* Stack children vertically */
}

/* Ensure tenant card fills entire carousel item */
.tenant-card-home {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 24px;
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.tenant-card-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.tenant-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4a3b2d;
  opacity: 0.5;
  z-index: 2;
}

/* Update these sections of your carousel animation CSS */

/* Base carousel item styles with improved transitions */
.carousel-item {
  width: 380px;
  transform-origin: left center; /* Anchor from left side */
  transition:
    width 1s cubic-bezier(0.25, 1, 0.5, 1),
    /* Smooth 1s duration for width change */ transform 0.5s ease-out; /* Smoother transform */
  overflow: hidden;
  position: relative;
  left: 0; /* Ensure left edge alignment */
  margin-left: 0; /* Remove any margin that might be causing offset */
}

/* Hidden elements for non-active slides - slower fade out */
.carousel-item .tenant-card-home .tenant-term,
.carousel-item .tenant-card-home .tenant-bot-row p {
  opacity: 0;
  max-height: 0;
  transform: translateY(10px);
  transition:
    opacity 1.2s ease,
    /* Slower fade out */ max-height 1.2s ease,
    transform 1.2s ease,
    margin 1.2s ease;
  visibility: hidden;
  margin: 0;
  pointer-events: none;
}

/* Active slide styling - coordinated with slick movement */
.carousel-item.active {
  width: 540px;
  z-index: 10;
}

/* Animation for content appearance - slower fade in with gentle timing */
.carousel-item.active.expanded .tenant-card-home .tenant-term,
.carousel-item.active.expanded .tenant-card-home .tenant-bot-row p {
  opacity: 1;
  max-height: 200px;
  transform: translateY(0);
  visibility: visible;
  transition:
    opacity 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.3s,
    /* Slower, nicer easing with delay */ max-height 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.3s,
    transform 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.3s,
    margin 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.3s;
  pointer-events: auto;
}

/* Override any conflicting styles with consistent slower transitions */
.carousel-item .tenant-card-home .tenant-term,
.carousel-item .tenant-card-home .tenant-bot-row p {
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  height: 0;
  transform: translateY(10px);
  overflow: hidden;
  margin: 0;
  transition:
    opacity 1.2s ease,
    visibility 1.2s ease,
    max-height 1.2s ease,
    height 1.2s ease,
    transform 1.2s ease,
    margin 1.2s ease;
}

/* Expanded state with slower, more elegant transitions */
.carousel-item.active.expanded .tenant-card-home .tenant-term,
.carousel-item.active.expanded .tenant-card-home .tenant-bot-row p {
  opacity: 1;
  visibility: visible;
  height: auto;
  max-height: 200px;
  transform: translateY(0);
  overflow: visible;
  display: block;
  transition:
    opacity 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.3s,
    visibility 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.3s,
    max-height 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.3s,
    height 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.3s,
    transform 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.3s,
    margin 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.3s;
}

/* Add a subtle staggered effect for the term and paragraph */
.carousel-item.active.expanded .tenant-card-home .tenant-term {
  transition-delay: 0.1s; /* Start first */
}

.carousel-item.active.expanded .tenant-card-home .tenant-bot-row p {
  transition-delay: 0.3s; /* Start slightly after the term */
}

/* Update the tenant-top-row styles to change based on active state */

/* Active state - row layout with space-between */
.carousel-item.active .tenant-card-home .tenant-top-row,
.carousel-item.slick-current .tenant-card-home .tenant-top-row {
  flex-direction: row; /* Row layout for active slides */
  justify-content: space-between;
  align-items: center;
}

/* Default state (non-active) - column layout */
.carousel-item .tenant-card-home .tenant-top-row {
  display: flex;
  flex-direction: column; /* Column layout for inactive slides */
  gap: 16px;
  justify-content: flex-start;
  align-items: flex-start;
  transition: all 1s cubic-bezier(0.25, 1, 0.5, 1); /* Match width transition timing */
}

/* Make sure tenant info has appropriate transitions */
.tenant-card-home .tenant-info {
  transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
  max-width: 100%; /* Allow full width in column layout */
}

/* In active state, limit info width to allow space for term */
.carousel-item.active .tenant-card-home .tenant-info,
.carousel-item.slick-current .tenant-card-home .tenant-info {
  max-width: calc(100% - 120px); /* Allow space for term tag */
}

/* Ensure tenant-term always appears next to tenant name in non-active state */
.carousel-item:not(.active):not(.slick-current) .tenant-card-home .tenant-top-row .tenant-term {
  order: 2; /* Place after tenant-info in non-active slides */
  margin-top: -10px; /* Adjust position relative to tenant info */
}

/* Override any conflicting styles */
.carousel-item .tenant-card-home .tenant-term {
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  height: 0;
  transform: translateY(10px);
  overflow: hidden;
  margin: 0;
  transition:
    opacity 1.2s ease,
    visibility 1.2s ease,
    max-height 1.2s ease,
    height 1.2s ease,
    transform 1.2s ease,
    margin 1.2s ease,
    flex-direction 1s cubic-bezier(0.25, 1, 0.5, 1); /* Add flex-direction to transitions */
}

.tenant-card-home .tenant-top-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.tenant-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tenant-card-home .tenant-info .tenant-name {
  font-weight: 600;
  text-transform: uppercase;
}

.tenant-card-home .tenant-info .operations-day-hours {
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 16px;
}

.tenant-card-home .tenant-term {
  width: fit-content;
}

.tenant-card-home .tenant-bot-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: flex-end;
}

/* XXL Screens (1800px and up) */
@media (min-width: 1800px) {
}

/* XL Screens (1600px-1799px) */
@media (min-width: 1600px) and (max-width: 1799px) {
}

/* Large Screens (1400px-1599px) */
@media (min-width: 1400px) and (max-width: 1599px) {
}

/* Medium-Large Screens (1200px-1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
}

/* Small-Medium Screens (max-width: 1199px) */
@media (max-width: 1199px) {
}

/* Small Screens (max-width: 992px) */
@media (max-width: 992px) {
}

/* Mobile Screens (max-width: 768px) */
@media (max-width: 768px) {
  #carousel-tenants .control-wrapper {
    padding: 24px;
    height: fit-content;
    gap: 24px;
  }

  #carousel-tenants .control-wrapper .information-wrapper {
    gap: 8px;
  }

  #carousel-tenants .wrapper {
    flex-direction: column;
  }

  #carousel-tenants .control-wrapper,
  #carousel-tenants .carousels {
    width: 100%;
  }

  .tenant-carousel .carousel-item {
    height: 400px !important;
  }

  .tenant-card-home {
    padding: 32px 24px;
  }

  .carousel-item.active .tenant-card-home .tenant-top-row,
  .carousel-item.slick-current .tenant-card-home .tenant-top-row {
    align-items: flex-start;
  }

  .carousel-item.active .tenant-card-home .tenant-info,
  .carousel-item.slick-current .tenant-card-home .tenant-info {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .tenant-card-home .tenant-info .operations-day-hours {
    flex-direction: column;
    gap: 0px;
  }
}
