/* Casal dei Fichi – unified apartment cards + homepage carousel */
.apartment-book-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(1.4rem,2.4vw,2rem);
  align-items:stretch;
}

.apartment-premium-card{
  display:block;
  min-width:0;
  height:100%;
  color:#20382d;
  border-radius:28px;
  transition:transform .26s ease,filter .26s ease;
}
.apartment-premium-card:hover,
.apartment-premium-card:focus-within{
  transform:translateY(-6px);
}
.apartment-premium-card__inner{
  height:100%;
  overflow:hidden;
  border:1px solid rgba(45,66,54,.13);
  border-radius:28px;
  background:#fff;
  box-shadow:0 18px 48px rgba(34,56,45,.10);
  transition:box-shadow .26s ease,border-color .26s ease;
}
.apartment-premium-card:hover .apartment-premium-card__inner,
.apartment-premium-card:focus-within .apartment-premium-card__inner{
  border-color:rgba(89,118,36,.26);
  box-shadow:0 28px 64px rgba(34,56,45,.16);
}

.apartment-premium-card__media{
  position:relative;
  min-height:390px;
  overflow:hidden;
  background:#dfe7df;
}
.apartment-premium-card__media-link{
  position:absolute;
  inset:0;
  z-index:2;
}
.apartment-premium-card__slides{
  position:absolute;
  inset:0;
}
.apartment-premium-card__slide{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transform:scale(1.015);
  transition:opacity .42s ease,transform .65s cubic-bezier(.2,.65,.2,1);
}
.apartment-premium-card__slide.is-active{
  opacity:1;
}
.apartment-premium-card:hover .apartment-premium-card__slide.is-active,
.apartment-premium-card:focus-within .apartment-premium-card__slide.is-active{
  transform:scale(1.055);
}
.apartment-premium-card__shade{
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:
    linear-gradient(180deg,rgba(13,27,20,.30) 0%,rgba(13,27,20,.02) 43%,rgba(13,27,20,.52) 100%),
    linear-gradient(90deg,rgba(13,27,20,.14),transparent 35%);
}

.apartment-premium-card__topline{
  position:absolute;
  z-index:5;
  top:18px;
  right:18px;
  left:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  pointer-events:none;
}
.apartment-premium-card__brand,
.apartment-premium-card__explore,
.apartment-premium-card__pill{
  display:inline-flex;
  align-items:center;
  border:1px solid rgba(255,255,255,.30);
  color:#fff;
  background:rgba(18,33,25,.38);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.apartment-premium-card__brand{
  padding:8px 11px;
  border-radius:999px;
  font-size:.68rem;
  font-weight:850;
  letter-spacing:.10em;
  text-transform:uppercase;
}
.apartment-premium-card__explore{
  pointer-events:auto;
  gap:7px;
  padding:8px 12px;
  border-radius:999px;
  font-size:.72rem;
  font-weight:800;
  text-decoration:none;
  transition:background .2s ease,transform .2s ease;
}
.apartment-premium-card:hover .apartment-premium-card__explore,
.apartment-premium-card:focus-within .apartment-premium-card__explore{
  color:#fff;
  background:rgba(87,116,37,.90);
  transform:translateX(2px);
}

.apartment-premium-card__gallery-nav{
  position:absolute;
  z-index:6;
  top:50%;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.46);
  border-radius:50%;
  color:#fff;
  background:rgba(18,33,25,.48);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  font:700 1.65rem/1 Georgia,serif;
  cursor:pointer;
  transform:translateY(-50%);
  opacity:.86;
  transition:background .18s ease,opacity .18s ease,transform .18s ease;
}
.apartment-premium-card__gallery-nav:hover,
.apartment-premium-card__gallery-nav:focus-visible{
  opacity:1;
  background:rgba(73,101,26,.88);
}
.apartment-premium-card__gallery-nav--prev{left:16px}
.apartment-premium-card__gallery-nav--next{right:16px}

.apartment-premium-card__gallery-dots{
  position:absolute;
  z-index:6;
  right:18px;
  bottom:54px;
  left:18px;
  display:flex;
  justify-content:center;
  gap:7px;
  pointer-events:none;
}
.apartment-premium-card__gallery-dots button{
  width:7px;
  height:7px;
  padding:0;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.48);
  box-shadow:0 0 0 1px rgba(23,40,31,.08);
  pointer-events:auto;
  cursor:pointer;
  transition:width .18s ease,background .18s ease,border-radius .18s ease;
}
.apartment-premium-card__gallery-dots button.is-active{
  width:22px;
  border-radius:999px;
  background:#fff;
}

.apartment-premium-card__media-meta{
  position:absolute;
  z-index:5;
  right:18px;
  bottom:18px;
  left:18px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  pointer-events:none;
}
.apartment-premium-card__pill{
  padding:7px 10px;
  border-radius:999px;
  font-size:.68rem;
  font-weight:750;
}

.apartment-premium-card__body{
  display:flex;
  min-height:245px;
  flex-direction:column;
  padding:24px 24px 22px;
}
.apartment-premium-card__heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.apartment-premium-card__title-wrap{min-width:0}
.apartment-premium-card__eyebrow{
  display:block;
  margin-bottom:7px;
  color:#6c7c72;
  font-size:.69rem;
  font-weight:850;
  letter-spacing:.13em;
  text-transform:uppercase;
}
.apartment-premium-card__heading h3{
  margin:0;
  color:#22382d;
  font-size:clamp(1.75rem,2.4vw,2.25rem);
  line-height:1.04;
}
.apartment-premium-card__heading h3 a{
  color:inherit;
  text-decoration:none;
}
.apartment-premium-card__heading h3 a:hover{color:#506d20}
.apartment-premium-card__price{
  flex:0 0 auto;
  min-width:88px;
  padding:10px 12px;
  border:1px solid #dce6dc;
  border-radius:16px;
  background:#f7faf6;
  text-align:right;
}
.apartment-premium-card__price span,
.apartment-premium-card__price small{
  display:block;
  color:#6d7e74;
  font-size:.66rem;
  line-height:1.15;
}
.apartment-premium-card__price strong{
  display:block;
  margin:2px 0;
  color:#4f6e20;
  font-size:1.45rem;
  line-height:1;
}
.apartment-premium-card__description{
  margin:18px 0 22px;
  color:#63746a;
  font-size:.94rem;
  line-height:1.68;
}
.apartment-premium-card__footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:16px;
  margin-top:auto;
  border-top:1px solid #e7ece8;
  color:#355028;
  font-size:.78rem;
  font-weight:850;
  letter-spacing:.05em;
  text-transform:uppercase;
  text-decoration:none;
}
.apartment-premium-card__footer:hover{color:#355028}
.apartment-premium-card__arrow{
  display:grid;
  width:38px;
  height:38px;
  place-items:center;
  border-radius:50%;
  color:#fff;
  background:#5e7d22;
  font-size:1.05rem;
  transition:transform .2s ease,background .2s ease;
}
.apartment-premium-card__footer:hover .apartment-premium-card__arrow{
  background:#49651a;
  transform:translateX(3px);
}

/* Homepage carousel uses the exact same cards, just slightly denser. */
.home-apartment-showcase{
  overflow:hidden;
}
.home-apartment-showcase__head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:24px;
  align-items:end;
}
.home-apartment-showcase__head .section-header{
  margin-bottom:0;
}
.home-apartment-showcase__actions{
  display:flex;
  align-items:center;
  gap:18px;
  padding-bottom:10px;
}
.home-apartment-showcase__all{
  display:inline-flex;
  align-items:center;
  gap:9px;
  color:#425b20;
  font-size:.86rem;
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
}
.home-apartment-showcase__all:hover{color:#2f4316}
.home-apartment-reviews-carousel{
  --width:clamp(320px,27vw,395px);
  --height:575px;
  position:relative;
  width:100%;
  height:var(--height);
  margin-top:30px;
  overflow:hidden;
  -webkit-mask-image:linear-gradient(to right,transparent,#000 4% 96%,transparent);
  mask-image:linear-gradient(to right,transparent,#000 4% 96%,transparent);
}
.home-apartment-reviews-carousel:focus-visible{
  outline:3px solid rgba(43,46,36,.15);
  outline-offset:6px;
}
.home-apartment-reviews-carousel__track{
  position:relative;
  width:100%;
  height:100%;
  min-width:calc(var(--width) * var(--quantity));
}
.home-apartment-reviews-carousel__item{
  position:absolute;
  top:0;
  left:100%;
  width:var(--width);
  height:var(--height);
  animation:homeApartmentsAutoRun var(--duration) linear infinite;
  animation-delay:calc((var(--duration) / var(--quantity)) * (var(--position) - 1) - var(--duration)) !important;
  transition:filter .25s ease;
}
.home-apartment-reviews-carousel__item > .apartment-premium-card{
  height:100%;
}
.home-apartment-reviews-carousel:hover .home-apartment-reviews-carousel__item{
  animation-play-state:paused !important;
  filter:saturate(.92);
}
.home-apartment-reviews-carousel .home-apartment-reviews-carousel__item:hover{
  filter:none;
}
@keyframes homeApartmentsAutoRun{
  from{left:100%}
  to{left:calc(var(--width) * -1)}
}
.apartment-premium-card--compact .apartment-premium-card__media{
  min-height:305px;
}
.apartment-premium-card--compact .apartment-premium-card__body{
  min-height:255px;
  padding:21px 21px 20px;
}
.apartment-premium-card--compact .apartment-premium-card__heading h3{
  font-size:clamp(1.6rem,2vw,2rem);
}
.apartment-premium-card--compact .apartment-premium-card__description{
  font-size:.9rem;
  line-height:1.58;
  margin:15px 0 18px;
}
.apartment-premium-card--compact .apartment-premium-card__gallery-nav{
  width:38px;
  height:38px;
}

@media(max-width:1050px){
  .apartment-book-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .home-apartment-showcase__head{grid-template-columns:1fr}
  .home-apartment-showcase__actions{justify-content:space-between;padding-bottom:0}
  .home-apartment-reviews-carousel{--width:clamp(310px,44vw,390px);--height:575px}
}
@media(max-width:720px){
  .apartment-book-grid{grid-template-columns:1fr;}
  .apartment-premium-card__media{min-height:330px;}
  .apartment-premium-card__body{min-height:0;}
  .home-apartment-showcase__actions{align-items:center}
  .home-apartment-reviews-carousel{--width:min(86vw,390px);--height:575px;-webkit-mask-image:linear-gradient(to right,transparent,#000 2% 98%,transparent);mask-image:linear-gradient(to right,transparent,#000 2% 98%,transparent)}
}
@media(max-width:480px){
  .apartment-premium-card__heading{display:block;}
  .apartment-premium-card__price{display:inline-block;margin-top:14px;text-align:left;}
  .apartment-premium-card__media,
  .apartment-premium-card--compact .apartment-premium-card__media{min-height:300px}
  .apartment-premium-card__gallery-nav{width:36px;height:36px}
  .home-apartment-showcase__all{font-size:.78rem}
}

@media(prefers-reduced-motion:reduce){
  .apartment-premium-card,
  .apartment-premium-card__slide,
  .home-apartment-reviews-carousel__item{animation:none;left:auto;position:relative;display:inline-block;margin-right:16px}
  .home-apartment-reviews-carousel__track{display:flex;overflow-x:auto;gap:16px;min-width:0}
}
