/* Home page specific styles */

/* Inline contextual links in body copy */
.intro-content a,
.service-description a,
.service-list a {
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
  text-decoration: underline;
  text-decoration-color: var(--color-primary);
  text-underline-offset: 3px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.intro-content a:hover,
.service-description a:hover,
.service-list a:hover {
  color: var(--color-primary-dark);
  text-decoration-color: var(--color-primary-dark);
  background-color: var(--color-bg-dark);
  border-radius: 3px;
  padding: 1px 4px;
  margin: 0 -4px;
}

/* ============================================
   HOME HERO MOSAIC - MOBILE FIRST
============================================ */

.home-hero-mosaic {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home-hero-mosaic__grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
}

.home-hero-mosaic__img {
  background-size: cover;
  background-position: center;
}

.home-hero-mosaic__img:nth-child(n+2) {
  display: none;
}

.home-hero-mosaic__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.45) 100%
  );
  z-index: 1;
}

.home-hero-mosaic__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px var(--space-md) var(--space-2xl);
  max-width: 900px;
  width: 100%;
}

.home-hero-mosaic__title {
  font-family: var(--font-primary);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  color: #ffffff;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.home-hero-mosaic__subtitle {
  font-family: var(--font-secondary);
  font-size: var(--font-size-md);
  color: rgba(255, 255, 255, 0.92);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-xl);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.home-hero-mosaic__cta {
  display: flex;
  justify-content: center;
}

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

  .home-hero-mosaic__img:nth-child(2) {
    display: block;
  }

  .home-hero-mosaic__img:nth-child(n+3) {
    display: none;
  }

  .home-hero-mosaic__title {
    font-size: var(--font-size-3xl);
  }

  .home-hero-mosaic__subtitle {
    font-size: var(--font-size-lg);
  }
}

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

  .home-hero-mosaic__img:nth-child(n+2) {
    display: block;
  }

  .home-hero-mosaic__content {
    padding: 160px var(--space-2xl) var(--space-2xl);
  }

  .home-hero-mosaic__title {
    font-size: clamp(2rem, 4vw, 3.5rem);
  }

  .home-hero-mosaic__subtitle {
    font-size: var(--font-size-xl);
  }
}

/* Before-After Gallery Section - Enhanced styles */
.gallery-section {
  padding: var(--space-2xl) 0;
}

.before-after-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.comparison-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  background-color: var(--color-bg);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.comparison-card.full-width {
  grid-column: 1 / -1;
}

.comparison-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.comparison-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.comparison-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.comparison-label {
  position: absolute;
  color: white;
  background-color: rgba(0, 0, 0, 0.7);
  padding: var(--space-xs) var(--space-md);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 5;
  border-radius: var(--radius-full);
}

.before-label {
  top: var(--space-md);
  left: var(--space-md);
}

.after-label {
  top: var(--space-md);
  right: var(--space-md);
}

.comparison-before, .comparison-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
}

.comparison-after {
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
  transition: clip-path 0.5s ease;
}

.comparison-wrapper.dragging .comparison-after {
  transition: none;
}

.comparison-handle {
  transition: left 0.5s ease;
}

.comparison-wrapper.dragging .comparison-handle {
  transition: none;
}

.comparison-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  background-color: var(--color-accent);
  z-index: 10;
  cursor: ew-resize;
}

.handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.handle-arrows {
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1rem;
}

.comparison-wrapper.dragging .handle-circle {
  width: 46px;
  height: 46px;
  background-color: var(--color-accent-light);
}

.comparison-footer {
  padding: var(--space-md);
  text-align: center;
  background-color: var(--color-bg);
}

.comparison-title {
  font-weight: 600;
  color: var(--color-primary-dark);
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.comparison-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Set aspect ratios for different comparison cards */
.comparison-wrapper {
  padding-bottom: 75%; /* Default aspect ratio */
}

.comparison-wrapper.ratio-1 {
  padding-bottom: 37.7%; /* 490x185 */
}

.comparison-wrapper.ratio-2 {
  padding-bottom: 75%; /* 448x336 */
}

.comparison-wrapper.ratio-3 {
  padding-bottom: 102%; /* 411x419 */
}

/* Tablet Styles */
@media (min-width: 768px) {
  .before-after-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .comparison-card.full-width {
    grid-column: 1 / 3;
  }
}

/* Desktop Styles */
@media (min-width: 1024px) {
 
  .comparison-card.full-width .comparison-wrapper {
    max-height: 400px;
  }
 
}
/* Reviews Section */
.reviews-section {
  padding: var(--space-xl) 0;
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.review-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.review-stars {
  color: #f59e0b;
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: var(--space-xs);
}

.review-text {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-sm);
  font-style: italic;
}

.review-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin: 0;
}

.review-source {
  font-weight: 400;
  color: var(--color-text-muted);
}

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

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

/* Video card */
.video-card-stacked {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.video-thumb {
  position: relative;
  display: block;
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex: 1;
}

.video-thumb-bg {
  position: absolute;
  inset: 0;
  background: var(--color-bg-dark);
  transition: filter var(--transition-normal);
}

.video-thumb:hover .video-thumb-bg {
  filter: brightness(0.95);
}

.video-thumb-label {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  color: var(--color-primary-dark);
  background-color: rgba(255,255,255,0.85);
  padding: var(--space-xs) var(--space-md);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  z-index: 2;
}

.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform var(--transition-normal);
}

.video-thumb:hover .video-play-btn {
  transform: scale(1.1);
}

/* Video modal */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}

.video-modal.active {
  display: flex;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.video-modal-inner {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 900px;
}

.video-modal-inner video {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

.video-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: var(--space-xs);
}

/* Shared component styles are in css/components/components.css (built into combined.min.css) */