/* ==========================================================================
   HOME PAGE
   Casale Isidoro
   ========================================================================== */

/* --------------------------------------------------------------------------
   Intro Section (Text + Image Side by Side)
   -------------------------------------------------------------------------- */

.home-intro {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.home-intro__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.home-intro__content {
  order: 2;
}

.home-intro__image {
  order: 1;
  position: relative;
}

/* Section labels use shared .section__label from main.css */

.home-intro__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.home-intro__text {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: var(--fw-regular);
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: var(--space-lg);
}

.home-intro__cta {
  margin-top: var(--space-sm);
}

/* Image with decorative accent */
.home-intro__img-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.home-intro__img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* Decorative border accent */
.home-intro__img-wrapper::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 60%;
  height: 60%;
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  z-index: -1;
  opacity: 0.3;
}

@media (min-width: 768px) {
  .home-intro__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .home-intro__content {
    order: 1;
  }

  .home-intro__image {
    order: 2;
  }
}

/* Reversed variant */
.home-intro--reversed .home-intro__content {
  order: 2;
}

.home-intro--reversed .home-intro__image {
  order: 1;
}

@media (min-width: 768px) {
  .home-intro--reversed .home-intro__content {
    order: 2;
  }

  .home-intro--reversed .home-intro__image {
    order: 1;
  }
}

/* --------------------------------------------------------------------------
   Rooms Preview Section
   -------------------------------------------------------------------------- */

.home-rooms {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  background-color: var(--bg-secondary);
}

.home-rooms__header {
  text-align: center;
  margin-bottom: var(--space-xl);
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.home-rooms__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.home-rooms__subtitle {
  font-size: 1rem;
  font-weight: var(--fw-light);
  color: var(--text-secondary);
  line-height: 1.7;
}

.home-rooms__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: var(--space-xl);
}

.home-rooms__grid > .room-card--overlay {
  border-radius: 0;
  border-bottom: 3px solid var(--bg-secondary);
}

.home-rooms__grid > .room-card--overlay:last-child {
  border-bottom: none;
}

.home-rooms__cta {
  text-align: center;
  margin-top: var(--space-xl);
}

@media (min-width: 768px) {
  .home-rooms__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-rooms__grid > .room-card--overlay {
    border-bottom: none;
    border-right: 3px solid var(--bg-secondary);
    aspect-ratio: 3 / 4;
  }

  .home-rooms__grid > .room-card--overlay:last-child {
    border-right: none;
  }
}

/* --------------------------------------------------------------------------
   Experiences Preview Section
   -------------------------------------------------------------------------- */

.home-experiences {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.home-experiences__header {
  text-align: center;
  margin-bottom: var(--space-xl);
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.home-experiences__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.home-experiences__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.home-experiences__cta {
  text-align: center;
  margin-top: var(--space-xl);
}

@media (min-width: 768px) {
  .home-experiences__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .home-experiences__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Pool / Feature Section (Image + Text)
   -------------------------------------------------------------------------- */

.home-pool {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  overflow: hidden;
}

.home-pool__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.home-pool__image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.home-pool__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.home-pool__content {
  /* text content */
}

.home-pool__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.home-pool__text {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: var(--fw-light);
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: var(--space-md);
}

/* Pool feature list */
.home-pool__features {
  list-style: none;
  margin-bottom: var(--space-lg);
}

.home-pool__feature {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5em 0;
  font-size: var(--fs-small);
  font-weight: var(--fw-light);
  color: var(--text-secondary);
}

.home-pool__features--lg .home-pool__feature {
  font-size: 18px;
  font-weight: var(--fw-regular);
}

.section--bg-accent .home-pool__feature {
  color: rgba(255, 255, 255, 0.9);
}

.section--bg-accent .home-pool__feature-icon {
  color: #FFFFFF;
}

.home-pool__feature-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .home-pool__grid {
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-2xl);
  }
}

/* --------------------------------------------------------------------------
   Living Gallery (Homepage)
   -------------------------------------------------------------------------- */

.home-living__gallery {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--space-xs);
  /* Mobile: subtle right-edge fade to hint at scrollable content */
  mask-image: linear-gradient(to right, black calc(100% - 32px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 32px), transparent 100%);
}

.home-living__gallery::-webkit-scrollbar {
  display: none;
}

.home-living__gallery-item {
  flex: 0 0 75%;
  max-width: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  /* Tablet/Desktop: grid, all items visible, no scroll */
  .home-living__gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    overflow: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .home-living__gallery-item {
    flex: initial;
    max-width: none;
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .home-living__gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

.home-living__gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.home-living__gallery-item:hover img {
  transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   Map Preview Section
   -------------------------------------------------------------------------- */

.home-map {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  background-color: var(--bg-secondary);
}

.home-map__header {
  text-align: center;
  margin-bottom: var(--space-xl);
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.home-map__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.home-map__subtitle {
  font-size: 1rem;
  font-weight: var(--fw-light);
  color: var(--text-secondary);
}

.home-map__embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.home-map__embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Map overlay for dark theme */
[data-theme="dark"] .home-map__embed::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Nearby places list */
.home-map__places {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.home-map__place {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: var(--space-md);
  background-color: var(--bg-card, #FFFFFF);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.home-map__place:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

[data-theme="dark"] .home-map__place {
  background-color: var(--bg-card);
}

.home-map__place-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
  margin-bottom: 0.15rem;
}

.home-map__place > span:first-of-type {
  font-family: var(--font-heading);
  font-weight: var(--fw-regular);
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.home-map__place-distance {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: var(--fw-light);
  margin-left: 0;
  letter-spacing: 0.01em;
}

@media (min-width: 768px) {
  .home-map__places {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
}

@media (min-width: 1024px) {
  .home-map__places {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Reviews Preview (Home)
   -------------------------------------------------------------------------- */

.home-reviews {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.home-reviews__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.home-reviews__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Exclusive Claim (Home — Rooms section)
   -------------------------------------------------------------------------- */

.home-exclusive {
  margin-top: var(--space-xl);
}

.home-exclusive__claim {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: var(--fw-regular);
  line-height: 1.25;
  color: var(--accent);
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}
