:root {
  --hero-bg-color: #f8f9fa;
  --styling-bg-color: #f8f9fa;
  --vs-bg-color: #f8f9fa;
  --image-height: 450px;
  --image-width: 500px;
}

/*
* ============================================================================
* Landing Page Layout
* ============================================================================
*/

.landing-container {
  width: 100%;
}

/* Override main-content padding for edge-to-edge sections */
main:has(.landing-container) {
  max-width: none;
  padding: 0;
}

.page-section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: calc(var(--max-width-screen) * 0.85);
  margin: 0 auto var(--space-xl) auto;
  padding: 0 var(--space-lg);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 1.3rem;
  color: var(--color-text-secondary);
}

/*
* ============================================================================
* Hero Section
* ============================================================================
*/

.hero-section {
  display: flex;
  padding-top: var(--space-md);
  align-items: stretch;
  min-height: 65vh;
  position: relative;
  background-color: transparent;
  overflow: hidden;
}

.hero-background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  opacity: 0.3;
}

.hero-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-image:
    /* linear-gradient(to bottom, var(--styling-bg-color) 0%, transparent 50%), */
    /* linear-gradient(to top, var(--color-background) 0%, transparent 50%); */
    linear-gradient(to bottom, var(--color-background) 0%, transparent 50%),
    linear-gradient(to top, var(--styling-bg-color) 0%, transparent 50%);

  z-index: 1;
}

/* Left Column */
.hero-main-content {
  flex: 0 0 65%;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  padding-left: 15%;
  padding-right: 10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1.1;
  text-align: left;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  color: var(--color-text-secondary);
  text-align: left;
  margin: var(--space-md) 0 var(--space-xl) 0;
  max-width: 60ch;
}

.hero-cta {
  font-size: 1.1rem;
  padding: var(--space-md) var(--space-xxl);
}

/* Right Column */
.hero-features {
  flex: 0 0 30%;
  padding: var(--space-xxl) 5%;
  border-left: 3px solid var(--color-background-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

.hero-features-title {
  margin-top: 0;
  margin-bottom: var(--space-lg);
  font-size: 1.5rem;
}

.hero-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-serif-text);
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
  color: var(--color-text-secondary);
}

.hero-feature-item i {
  color: var(--color-text-secondary);
}

.free-credits-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-xl);

  /* Create a very light, on-brand background color */
  background-color: color-mix(in srgb, var(--color-accent) 15%, transparent);

  border-radius: var(--border-radius);

  /* Use a dark, readable version of your accent color for the text */
  color: var(--color-accent-hover);

  font-weight: 500;
  font-family: var(--font-sans); /* Use the UI font, not the display font */
  font-size: 0.95rem;
}

.free-credits-badge i {
  /* Make the icon match the main accent color */
  color: var(--color-accent);
}

/* --- Responsive Styles for Hero --- */
@media (max-width: 992px) {
  .hero-section {
    flex-direction: column; /* Stack columns on smaller screens */
    min-height: auto;
  }

  .hero-main-content {
    padding: var(--space-xl) var(--space-lg);
  }

  .hero-features {
    border-left: none; /* Remove vertical separator */
    border-top: 1px solid var(--color-border); /* Add horizontal separator */
    padding: var(--space-xl) var(--space-lg);
  }
}

/*
* ============================================================================
* Virtual staging Section
* ============================================================================
*/

.virtual-staging-section-bg {
  background-color: var(--vs-bg-color);
}

.virtual-staging-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-xxl); /* More space between each example */
  max-width: calc(var(--max-width-screen) * 0.85);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.virtual-staging-card {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

/* The image slider column */
.virtual-staging-image-side {
  flex: 0 0 60%;
  min-width: 0; /* Prevents flexbox overflow issues */
}

/* The prompt details column */
.virtual-staging-prompt-side {
  flex: 1;
}

/* Use this class when the TEXT is on the RIGHT side of the image */
.prompt-on-right {
  padding-left: var(--space-xl);
}

/* Use this class when the TEXT is on the LEFT side of the image */
.prompt-on-left {
  padding-right: var(--space-xl);
}

.prompt-details {
  font-family: var(--font-serif-text);
}

.prompt-title {
  font-family: var(--font-serif-display);
  margin-top: 0;
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.prompt-text {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  border-left: 3px solid var(--color-border);
  padding-left: var(--space-md);
  margin-top: 0;
}

/* --- STYLES FOR THE COMPARISON SLIDER ITSELF --- */
/* These styles are mostly from your original file but consolidated and cleaned up */
.comparison-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.1),
    0 5px 10px rgba(0, 0, 0, 0.05);
}

.comparison-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  user-select: none;
}

/* This is a new, crucial rule to make the responsive images work inside the slider */
.comparison-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.comparison-image img,
.comparison-image picture {
  border-radius: var(--border-radius);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comparison-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
  cursor: ew-resize;
  z-index: 10;
}

.comparison-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 4px;
  height: 100%;
  background-color: #fff;
  cursor: ew-resize;
}

.comparison-slider::-moz-range-thumb {
  width: 4px;
  height: 100%;
  background: #fff;
  border: 0;
  border-radius: 0;
  cursor: ew-resize;
}

.comparison-handle {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.handle-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background-color: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.handle-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: transparent;
  color: #fff;
  font-size: 1rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  gap: 2px;
  z-index: 1;
}

@media (max-width: 992px) {
  .virtual-staging-card {
    flex-direction: column !important; /* Use !important to override inline order */
  }

  .virtual-staging-prompt-side.prompt-on-right,
  .virtual-staging-prompt-side.prompt-on-left {
    padding: var(--space-lg) 0 0 0; /* Reset side padding for stacked layout */
  }
}

/*
* ============================================================================
* Styling Section
* ============================================================================
*/

/* Adds consistent vertical space between subsections */
.styling-section-bg > .section-header:not(:first-of-type) {
  margin-top: 10rem;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    /* This moves the track by the width of the first 7 images + their gaps */
    /* (Image Width + Gap) * 7 => (300px + 16px) * 7 = 2212px */
    transform: translateX(calc(-316px * 7));
  }
}

.styling-section-bg {
  background-color: var(--styling-bg-color);
  overflow: hidden; /* This is crucial to hide the overflowing track */
}

.styling-showcase {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(var(--image-height) * 1.15);
  margin-top: var(--space-xl);
  overflow: hidden;
}

.styling-original-image-container {
  border-radius: var(--border-radius);
  position: relative;
  z-index: 10;
}

.styling-original-image {
  height: calc(var(--image-height) * 1.05);
  width: auto;
  /* width: calc(var(--image-width) * 1.05); */
  border-radius: var(--border-radius);
  /* box-shadow: */
  /*   0 15px 35px rgba(0, 0, 0, 0.15), */
  /*   0 5px 15px rgba(0, 0, 0, 0.1); */
  transform: scale(1.05);
  border: 4px solid white;
}

.styling-track {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  white-space: nowrap;
  will-change: transform;
  animation: scroll 30s linear infinite;
}

.styling-track:hover {
  animation-play-state: paused; /* Pause the animation on hover for better UX */
}

.styling-generated-image {
  height: var(--image-height);
  width: auto;
  /* width: var(--image-width); */
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.styling-generated-image:hover {
  border-radius: var(--border-radius);
  transform: scale(1.1);
}

/* --- Masonry Styles --- */
.styling-container {
  display: flex;
  gap: var(--space-xxl); /* Generous gap between text and images */
  align-items: center;
  max-width: calc(var(--max-width-screen) * 0.85);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  margin-top: 5rem;
}

/* Left Column: Descriptive Text */
.styling-description {
  flex: 1 1 40%; /* Flex-grow, flex-shrink, flex-basis */
  min-width: 320px; /* Prevents the text from getting too squished */
}

/* Right Column: Image Grid Wrapper */
.styling-image-grid-container {
  flex: 1 1 60%; /* Make the image grid larger */
}

/* The Grid itself */
.styling-image-grid {
  display: grid;
  /* Creates 3 responsive columns */
  grid-template-columns: repeat(3, 1fr);
  /* Defines a standard "cell" height for items to span across */
  grid-auto-rows: 50px;
  /* This is the key for the masonry effect, allowing items to fill empty spaces */
  grid-auto-flow: dense;
  gap: var(--space-md);
}

/* A single item within the grid */
.grid-item {
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  grid-row: span 3;
}

/* Utility class to make a grid item 3x tall */
.grid-item.tall {
  grid-row: span 6;
}

/* Utility class to make a grid item twice as wide */
.grid-item.wide {
  grid-column: span 2;
  grid-row: span 3;
}

/* Styling for the actual <img> tag inside the grid item */
.grid-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures the image covers the area without distortion */
  transition: transform 0.3s ease;
}

.grid-image:hover {
  transform: scale(1.05); /* Subtle zoom on hover */
}

/* --- Style Masonry Grid --- */
.style-masonry-container {
  width: 100%;
  max-width: calc(var(--max-width-screen) * 0.85);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.style-masonry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 50px;
  grid-auto-flow: dense;
  gap: var(--space-md);
}

.style-masonry-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  grid-row: span 3;
}

.style-masonry-item.tall {
  grid-row: span 6;
}
.style-masonry-item.semitall {
  grid-row: span 5;
}
.style-masonry-item.littletall {
  grid-row: span 4;
}
.style-masonry-item.wide {
  grid-column: span 2;
  grid-row: span 4;
}

.style-masonry-item .grid-image {
  object-fit: cover;
}

.masonry-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  padding: var(--space-lg) var(--space-sm) var(--space-md);
  color: #fff;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translateY(15px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.style-masonry-item:hover .masonry-item-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* --- Video Tour Section --- */
.video-tour-container {
  margin-top: 1rem;
}

.video-tour-visual {
  flex: 1 1 60%; /* Make the video side larger */
  min-width: 320px;
}

.video-tour-visual video {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/*
* ============================================================================
* Pricing Section
* ============================================================================
*/

.pricing-section-bg {
  background-color: var(--hero-bg-color);
  border-top: 1px solid var(--color-border);
}

.pricing-cards {
  max-width: calc(var(--max-width-screen) * 0.85);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
