/* ==========================================================================
   Elysian Estates — Component Styles
   Property cards, features strip, intro, testimonial, CTA strip, gallery,
   redirect notice
   ========================================================================== */

/* --------------------------------------------------------------------------
   Property Cards
   -------------------------------------------------------------------------- */
.property-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
}
.property-card__image {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--ee-transition-slow);
}
.property-card:hover .property-card__image { transform: scale(1.05); }

.property-card__image--placeholder {
  background-color: var(--ee-border);
}

.property-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
  transition: background var(--ee-transition-base);
}
.property-card:hover .property-card__overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
}

.property-card__content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: var(--ee-space-lg);
  color: #ffffff;
}
.property-card__location {
  font-family: var(--ee-font-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.8;
  margin-bottom: var(--ee-space-xs);
}
.property-card__title { font-size: 1.5rem; color: #ffffff; margin-bottom: var(--ee-space-xs); }
.property-card__details { display: flex; gap: var(--ee-space-sm); font-family: var(--ee-font-secondary); font-size: 0.875rem; opacity: 0.9; }
.property-card__detail { display: flex; align-items: center; gap: 0.25rem; }
.property-card__link   { position: absolute; inset: 0; z-index: 1; }

/* Featured (wide) variant */
.property-card--featured { grid-column: span 2; aspect-ratio: 21/9; }
.property-card--featured .property-card__title { font-size: 2rem; }

/* Property grid (home page / related cards) */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: var(--ee-space-md);
}

/* Property list (archive — image left, details right) */
.ee-property-grid {
  display: flex;
  flex-direction: column;
  gap: var(--ee-space-lg);
}

.property-row {
  display: grid;
  grid-template-columns: 44% 1fr;
  min-height: 360px;
  background: var(--ee-surface);
  border: 1px solid var(--ee-border);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow var(--ee-transition-base), transform var(--ee-transition-base);
}
.property-row:hover {
  box-shadow: var(--ee-shadow-lg);
  transform: translateY(-3px);
}

.property-row__image-wrap {
  display: block;
  overflow: hidden;
}
.property-row__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ee-transition-slow);
}
.property-row__image--placeholder {
  width: 100%;
  height: 100%;
  background: var(--ee-border);
}
.property-row:hover .property-row__image {
  transform: scale(1.04);
}

.property-row__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--ee-space-xl);
}

.property-row__location {
  font-family: var(--ee-font-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ee-primary);
  margin-bottom: var(--ee-space-xs);
}

.property-row__title {
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  margin-bottom: var(--ee-space-md);
}
.property-row__title a { color: var(--ee-text); }
.property-row__title a:hover { color: var(--ee-primary); }

.property-row__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ee-space-xs) var(--ee-space-lg);
  margin-bottom: var(--ee-space-md);
  padding-bottom: var(--ee-space-md);
  border-bottom: 1px solid var(--ee-border-light);
}
.property-row__stat {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--ee-font-secondary);
  font-size: 0.875rem;
  color: var(--ee-text-light);
}
.property-row__stat svg { color: var(--ee-primary); flex-shrink: 0; }

.property-row__desc {
  font-size: 0.9375rem;
  color: var(--ee-text-light);
  line-height: 1.75;
  margin-bottom: var(--ee-space-md);
}

.property-row__highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--ee-space-xs) var(--ee-space-md);
  margin-bottom: var(--ee-space-lg);
}
.property-row__highlight {
  font-family: var(--ee-font-secondary);
  font-size: 0.8125rem;
  color: var(--ee-text-light);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}
.property-row__highlight::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--ee-primary);
}

.property-row__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--ee-font-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ee-primary);
  align-self: flex-start;
  transition: gap var(--ee-transition-fast), color var(--ee-transition-fast);
}
.property-row__cta:hover {
  color: var(--ee-primary-dark);
  gap: 0.625rem;
}

/* --------------------------------------------------------------------------
   Features Strip
   -------------------------------------------------------------------------- */
.features-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ee-space-lg);
  padding: var(--ee-space-xl) 0;
  border-top: 1px solid var(--ee-border-light);
  border-bottom: 1px solid var(--ee-border-light);
}
.feature-item { text-align: center; }
.feature-item__icon { width: 48px; height: 48px; margin: 0 auto var(--ee-space-sm); color: var(--ee-primary); }
.feature-item__title {
  font-family: var(--ee-font-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--ee-space-xs);
}
.feature-item__text { font-size: 0.875rem; color: var(--ee-text-light); }

/* --------------------------------------------------------------------------
   Intro / Two-column section
   -------------------------------------------------------------------------- */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ee-space-2xl);
  align-items: center;
}
.intro__content { padding-right: var(--ee-space-xl); }
.intro__tagline {
  font-family: var(--ee-font-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ee-primary);
  margin-bottom: var(--ee-space-sm);
}
.intro__title  { margin-bottom: var(--ee-space-md); }
.intro__text   { color: var(--ee-text-light); margin-bottom: var(--ee-space-lg); }
.intro__image  { position: relative; }
.intro__image img { border-radius: 4px; }
.intro__image::after {
  content: '';
  position: absolute;
  top: var(--ee-space-md);
  left: var(--ee-space-md);
  right: calc(var(--ee-space-md) * -1);
  bottom: calc(var(--ee-space-md) * -1);
  border: 1px solid var(--ee-primary);
  border-radius: 4px;
  z-index: -1;
  opacity: 0.3;
}

/* --------------------------------------------------------------------------
   Testimonial
   -------------------------------------------------------------------------- */
.testimonial {
  background-color: var(--ee-primary);
  color: #ffffff;
  text-align: center;
  padding: var(--ee-space-2xl);
}
.testimonial__quote {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-style: italic;
  max-width: 800px;
  margin: 0 auto var(--ee-space-lg);
  line-height: 1.6;
}
.testimonial__author {
  font-family: var(--ee-font-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   CTA Strip
   -------------------------------------------------------------------------- */
.cta-strip {
  position: relative;
  min-height: 400px;
  padding: var(--ee-space-2xl) 0;
  background-size: cover;
  background-position: center;
}
.cta-strip__overlay { position: absolute; inset: 0; background: var(--ee-overlay); }
.cta-strip__content { position: relative; z-index: 1; text-align: center; color: #ffffff; }
.cta-strip__title   { color: #ffffff; margin-bottom: var(--ee-space-sm); }
.cta-strip__text    { opacity: 0.9; margin-bottom: var(--ee-space-lg); max-width: 500px; margin-left: auto; margin-right: auto; }

/* Buttons on dark overlay background */
.cta-strip .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background-color: #ffffff;
  color: var(--ee-primary);
}
.cta-strip .is-style-outline .wp-block-button__link,
.hero .is-style-outline .wp-block-button__link {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
   Gallery Grid
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ee-space-sm);
}
.gallery-grid__item {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}
.gallery-grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--ee-transition-base); }
.gallery-grid__item:hover img { transform: scale(1.05); }
.gallery-grid__item--large { grid-column: span 2; grid-row: span 2; }

/* Gallery lightbox overlay */
.ee-gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ee-gallery-lightbox__img   { max-width: 90vw; max-height: 90vh; object-fit: contain; }
.ee-gallery-lightbox__close { position: absolute; top: 1.5rem; right: 1.5rem; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; }
.ee-gallery-lightbox__prev,
.ee-gallery-lightbox__next  { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); border: none; color: #fff; font-size: 1.5rem; padding: 1rem 1.25rem; cursor: pointer; border-radius: 2px; }
.ee-gallery-lightbox__prev  { left: 1.5rem; }
.ee-gallery-lightbox__next  { right: 1.5rem; }

/* Prevent body scroll while lightbox is open (toggled by gallery.js) */
body.ee-lightbox-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   Filter Bar
   -------------------------------------------------------------------------- */
.ee-archive-layout { display: block; }

.ee-filter-bar {
  background: var(--ee-surface);
  border-bottom: 1px solid var(--ee-border-light);
  padding: var(--ee-space-md) 0;
  position: sticky;
  top: var(--ee-header-height);
  z-index: 100;
}
.ee-filter-bar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ee-space-sm);
  align-items: flex-end;
}
.ee-filter-group { display: flex; flex-wrap: wrap; gap: var(--ee-space-xs); align-items: center; }
.ee-filter-group--sort { margin-left: auto; }
.ee-reset-filters {
  font-size: 0.8rem;
  color: var(--ee-text-muted);
  background: none;
  border: 1px solid var(--ee-border);
  border-radius: 4px;
  padding: 0.35em 0.75em;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.ee-reset-filters:hover { color: var(--ee-primary); border-color: var(--ee-primary); }

.ee-filter__label {
  font-family: var(--ee-font-secondary);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ee-text-muted);
  display: block;
  margin-bottom: 2px;
}
.ee-filter__select,
.ee-filter__input {
  font-family: var(--ee-font-secondary);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--ee-border);
  border-radius: 3px;
  background: var(--ee-surface);
  color: var(--ee-text);
  cursor: pointer;
}
.ee-filter__select:focus,
.ee-filter__input:focus {
  outline: 2px solid var(--ee-primary);
  outline-offset: 2px;
}

.ee-filter-range { display: flex; align-items: center; gap: 0.25rem; }

.ee-property-grid-wrap { padding-top: var(--ee-space-xl); padding-bottom: var(--ee-space-xl); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .property-grid { grid-template-columns: repeat(2, 1fr); }
  .property-card--featured { grid-column: span 2; }
}

@media (max-width: 992px) {
  .footer__main    { grid-template-columns: 1fr 1fr; gap: var(--ee-space-lg); }
  .footer__brand   { grid-column: span 2; padding-right: 0; }
  .intro           { grid-template-columns: 1fr; gap: var(--ee-space-xl); }
  .intro__content  { padding-right: 0; }
  .features-strip  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
  .property-row {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .property-row__image-wrap {
    aspect-ratio: 16/9;
    height: auto;
  }
}

@media (max-width: 768px) {
  .property-grid { grid-template-columns: 1fr; }
  .property-card--featured { grid-column: span 1; aspect-ratio: 4/3; }
  .gallery-grid    { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid__item--large { grid-column: span 2; grid-row: span 1; }
  .footer__main    { grid-template-columns: 1fr; }
  .footer__brand   { grid-column: span 1; }
  .footer__bottom  { flex-direction: column; gap: var(--ee-space-sm); text-align: center; }
  .ee-filter-bar   { position: static; }
}

@media (max-width: 576px) {
  .features-strip { grid-template-columns: 1fr; }
  .hero__actions  { flex-direction: column; width: 100%; }
}

/* --------------------------------------------------------------------------
   Image Hover Cards
   Three-column Cover blocks where inner text fades in on hover.
   Add a background image to each card via the Cover block toolbar in Gutenberg.
   -------------------------------------------------------------------------- */
.image-hover-cards { padding: var(--ee-space-xl) 0; }
.image-hover-cards__grid { gap: var(--ee-space-sm) !important; }

.image-hover-card { border-radius: 4px; overflow: hidden; cursor: default; }

/* Text hidden by default, revealed on hover / keyboard focus */
.image-hover-card .image-hover-card__inner {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.image-hover-card:hover .image-hover-card__inner,
.image-hover-card:focus-within .image-hover-card__inner {
  opacity: 1;
  transform: translateY(0);
}

/* Darken overlay a little more on hover for better text contrast */
.image-hover-card:hover .wp-block-cover__background {
  opacity: 0.75 !important;
}

.image-hover-card__title {
  color: #ffffff;
  margin-bottom: var(--ee-space-sm) !important;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem) !important;
}
.image-hover-card__text {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  margin: 0 !important;
}

/* Solid-colour fallback when no background image is set (editor placeholder) */
.image-hover-card:not([style*="background-image"]) { background-color: var(--ee-surface); }

@media (max-width: 768px) {
  .image-hover-cards__grid { flex-direction: column !important; }
  /* Always show text on touch devices (no reliable hover) */
  .image-hover-card .image-hover-card__inner {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Stats Strip
   Four headline statistics on a light background band.
   -------------------------------------------------------------------------- */
.stats-strip {
  padding: var(--ee-space-2xl) 0;
  border-top: 1px solid var(--ee-border-light);
  border-bottom: 1px solid var(--ee-border-light);
  background: var(--ee-surface);
}
.stats-strip__grid { align-items: center; }

.stat-item { text-align: center; padding: var(--ee-space-md) var(--ee-space-sm); }

.stat-item__number {
  font-size: clamp(2.5rem, 5vw, 3.75rem) !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: var(--ee-primary) !important;
  margin-bottom: var(--ee-space-xs) !important;
}
.stat-item__label {
  font-family: var(--ee-font-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ee-text-muted);
  margin: 0 !important;
}

@media (max-width: 768px) {
  .stats-strip__grid { flex-wrap: wrap !important; }
  .stats-strip__grid .wp-block-column { flex-basis: 50% !important; min-width: 50% !important; }
}

/* ==========================================================================
   Redirect notice — shown after redirecting from a non-corporate property
   ========================================================================== */

.ee-redirect-notice {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ee-space-md);
  padding: var(--ee-space-sm) var(--ee-space-lg);
  background: var(--ee-color-corporate, #1a2e4a);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.ee-redirect-notice__message {
  margin: 0;
  flex: 1;
}

.ee-redirect-notice__close {
  flex-shrink: 0;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: inherit;
  border-radius: 50%;
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ee-redirect-notice__close:hover {
  background: rgba(255,255,255,0.15);
}

