/* ============================================
   HOME.CSS — Home Page Styles
   Maddy's Dancing Tails
   ============================================ */

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-primary);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    135deg,
    rgba(106, 24, 6, 0.8) 0%,
    rgba(106, 24, 6, 0.4) 50%,
    rgba(106, 24, 6, 0.6) 100%
  );
  opacity: 0; /* GSAP will fade this in */
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: 720px;
  padding-top: 80px;
  padding-bottom: 120px;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: var(--fs-tag);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: var(--space-xl);
}

.hero__tag::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--color-accent);
}

.hero__title {
  font-size: var(--fs-display);
  font-weight: var(--fw-extrabold);
  color: #fff;
  margin-bottom: var(--space-lg);
  line-height: var(--lh-tight);
  letter-spacing: -0.03em;
}

.hero__title-line {
  display: inline-block;
}

.hero__subtitle {
  font-size: var(--fs-body-lg);
  color: rgba(255, 255, 255, 0.7);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-2xl);
  max-width: 520px;
}

.hero__ctas {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero__stats {
  position: absolute;
  bottom: 60px;
  right: var(--container-px);
  z-index: 3;
  display: flex;
  gap: var(--space-md);
}

/* ---------- Services Bento Grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.services-grid .card-service:nth-child(1) {
  grid-column: span 2;
}

.services-grid .card-service:nth-child(4) {
  grid-column: span 2;
}

/* ---------- Why Choose Us ---------- */
.why-us {
  background: var(--color-card);
}

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

.why-us__image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.why-us__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.why-us__image-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow: var(--shadow-md);
}

.why-us__image-badge i {
  color: var(--color-accent);
}

.why-us__image-badge span {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h3);
}

.why-us__image-badge p {
  font-size: var(--fs-caption);
  color: var(--color-secondary);
}

.why-us__content .section-tag {
  justify-content: flex-start;
}

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

.why-us__feature {
  display: flex;
  gap: var(--space-md);
}

.why-us__feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-section-bg);
  border-radius: var(--radius-md);
  color: var(--color-brand);
  flex-shrink: 0;
}

.why-us__feature h4 {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  margin-bottom: 4px;
}

.why-us__feature p {
  font-size: var(--fs-caption);
  color: var(--color-secondary);
}

/* Counter Row */
.counters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border-light);
}

.counter-item {
  text-align: center;
}

.counter-item__number {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-extrabold);
  color: var(--color-primary);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.counter-item__number .suffix {
  color: var(--color-accent);
  font-size: var(--fs-h3);
}

.counter-item__label {
  font-size: var(--fs-caption);
  color: var(--color-secondary);
  margin-top: 4px;
}

/* ---------- Premium Gallery ---------- */
.premium-gallery-section {
  position: relative;
  background: var(--color-bg);
  overflow: hidden;
}

.pg-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
}

.pg-header__main {
  max-width: 500px;
}

.pg-header__main h2 {
  margin: var(--space-xs) 0 var(--space-sm);
}

.pg-header__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-md);
  text-align: right;
}

.pg-header__story {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-secondary);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
}

.pg-header__story span {
  font-size: 1.25rem;
}

/* Filters (Removed per request) */

/* Composition Area */
.pg-composition {
  position: relative;
  width: 100%;
  height: 700px;
  border-radius: var(--radius-2xl);
  perspective: 1500px;
}

.pg-item {
  position: absolute;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
  cursor: pointer;
  will-change: transform, opacity, filter;
  /* initial vars */
  --z-rot: 0deg;
  --x-pos: 0;
  --y-pos: 0;
  transform: translate(var(--x-pos), var(--y-pos)) rotate(var(--z-rot));
}

.pg-item__inner {
  width: 100%;
  height: 100%;
  position: relative;
}

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

.pg-item:hover {
  z-index: 50 !important;
  box-shadow: var(--shadow-lg);
  transform: translate(var(--x-pos), var(--y-pos)) scale(1.05) rotate(0deg) !important;
  filter: blur(0) !important;
  opacity: 1 !important;
}

.pg-item:hover img {
  transform: scale(1.08);
}

/* Center Image */
.pg-item--center {
  width: 380px;
  height: 520px;
  left: 50%;
  top: 50%;
  --x-pos: -50%;
  --y-pos: -50%;
  z-index: 20;
  box-shadow: var(--shadow-lg);
}

.pg-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-xl);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.pg-item--center:hover .pg-item__overlay {
  opacity: 1;
}

.pg-item__title {
  color: #fff;
  margin-bottom: 4px;
}

.pg-item__caption {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--fs-small);
}

/* Side Images */
.pg-item--side {
  opacity: 0.9;
  filter: blur(1px);
}

/* Surrounding Image Placements */
.pg-item--1 { width: 220px; height: 280px; top: 5%; left: 0%; --z-rot: -6deg; z-index: 10; }
.pg-item--2 { width: 200px; height: 240px; top: 60%; left: 5%; --z-rot: 4deg; z-index: 15; }
.pg-item--3 { width: 240px; height: 320px; top: 15%; left: 22%; --z-rot: 2deg; z-index: 5; }
.pg-item--4 { width: 180px; height: 220px; top: 75%; left: 25%; --z-rot: -4deg; z-index: 25; }
.pg-item--5 { width: 260px; height: 340px; top: 2%; right: 20%; --z-rot: -2deg; z-index: 8; }
.pg-item--6 { width: 190px; height: 260px; top: 55%; right: 26%; --z-rot: 5deg; z-index: 18; }
.pg-item--7 { width: 210px; height: 280px; top: 12%; right: -2%; --z-rot: 6deg; z-index: 12; }
.pg-item--8 { width: 230px; height: 300px; top: 65%; right: 2%; --z-rot: -5deg; z-index: 14; }

/* Blurring others when hovering composition */
.pg-composition:hover .pg-item:not(:hover) {
  filter: blur(4px);
  opacity: 0.5;
}

/* Footer CTA */
.pg-footer {
  text-align: center;
  margin-top: var(--space-3xl);
}

.btn-pill {
  border-radius: 100px;
}
.btn-icon-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-icon-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-direction: row-reverse;
}
.btn-brand {
  background: var(--color-brand);
  color: var(--color-accent);
}
.btn-brand:hover {
  background: var(--color-brand-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

/* ---------- CTA Section ---------- */
.cta-section {
  position: relative;
  padding: var(--section-py) 0;
  background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-hover) 50%, var(--color-brand) 100%);
  text-align: center;
}

.cta-section__shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.cta-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  background: var(--color-accent);
}

.cta-shape--1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  animation: float-slow 8s ease-in-out infinite;
}

.cta-shape--2 {
  width: 250px;
  height: 250px;
  bottom: -80px;
  left: -60px;
  animation: float 6s ease-in-out infinite;
}

.cta-shape--3 {
  width: 150px;
  height: 150px;
  top: 40%;
  left: 20%;
  animation: float-reverse 7s ease-in-out infinite;
}

.cta-section .container {
  position: relative;
  z-index: 2;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: var(--space-md);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--fs-body-lg);
  max-width: 500px;
  margin: 0 auto var(--space-2xl);
}

/* ---------- Marquee Testimonials ---------- */
.marquee-testimonials {
  overflow: hidden;
  background: #fbf9f6; /* Premium Cream background */
  padding: var(--space-4xl) 0;
}

.mq-wrapper {
  margin-top: var(--space-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.mq-row {
  display: flex;
  width: max-content;
  will-change: transform;
}

.mq-track {
  display: flex;
  gap: var(--space-xl);
  padding: 0 var(--space-xl) 0 0; /* padding at end to separate from duplicate */
}

/* Card Styling */
.mq-card {
  width: 400px;
  border-radius: var(--radius-2xl);
  background: #ffffff;
  padding: var(--space-xl);
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  border: 1px solid rgba(106, 24, 6, 0.05); /* very light brown accent */
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
}

.mq-card:active {
  cursor: grabbing;
}

.mq-card__stars {
  display: flex;
  gap: 2px;
  color: #F59E0B;
  margin-bottom: var(--space-md);
}

.mq-card__text {
  font-size: var(--fs-body);
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
  flex-grow: 1;
}

.mq-card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.mq-card__avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.mq-card__meta h4 {
  font-size: var(--fs-body);
  margin-bottom: 2px;
}

.mq-card__meta p {
  font-size: var(--fs-small);
  color: var(--color-secondary);
  margin: 0;
}

.mq-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: var(--fs-xs);
  color: var(--color-brand);
  background: rgba(106, 24, 6, 0.08);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: var(--fw-medium);
  transition: background var(--transition-smooth);
}

/* Hover Effects */
.mq-card__stars i {
  transition: transform var(--transition-smooth), color var(--transition-smooth);
}

@media (hover: hover) and (pointer: fine) {
  .mq-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 25px 50px rgba(106, 24, 6, 0.08);
  }
  .mq-card:hover .mq-card__avatar {
    transform: scale(1.1);
  }
  .mq-card:hover .mq-badge {
    background: rgba(106, 24, 6, 0.15);
  }
  
  .mq-card:hover .mq-card__stars i {
    transform: scale(1.2);
  }
  .mq-card:hover .mq-card__stars i:nth-child(1) { transition-delay: 0.0s; }
  .mq-card:hover .mq-card__stars i:nth-child(2) { transition-delay: 0.05s; }
  .mq-card:hover .mq-card__stars i:nth-child(3) { transition-delay: 0.1s; }
  .mq-card:hover .mq-card__stars i:nth-child(4) { transition-delay: 0.15s; }
  .mq-card:hover .mq-card__stars i:nth-child(5) { transition-delay: 0.2s; }
}

/* ---------- Blog Preview ---------- */
.blog-preview__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.blog-preview__cta {
  text-align: center;
  margin-top: var(--space-2xl);
}

/* ---------- About Preview ---------- */
.about-preview__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.about-preview__image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.about-preview__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-preview__content .section-tag {
  justify-content: flex-start;
}

.about-preview__content h2 {
  margin-bottom: var(--space-md);
}

.about-preview__content > p {
  margin-bottom: var(--space-lg);
}

.about-preview__content .btn {
  margin-top: var(--space-lg);
}

/* ---------- FAQ ---------- */
.faq {
  background: var(--color-card);
}

.faq .container--narrow {
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .hero__stats {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: var(--space-2xl);
  }

  .hero__content {
    padding-bottom: 80px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid .card-service:nth-child(1),
  .services-grid .card-service:nth-child(4) {
    grid-column: span 1;
  }

  .why-us__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  /* Tablet Premium Gallery */
  .pg-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  .pg-header__meta {
    align-items: flex-start;
    text-align: left;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
  }
  .pg-composition {
    transform: scale(0.8);
    transform-origin: top center;
    height: 560px;
  }

  .gallery-preview__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }

  .gallery-preview__item:nth-child(1) {
    grid-column: span 2;
  }

  .gallery-preview__item:nth-child(4) {
    grid-column: span 1;
  }

  .about-preview__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .blog-preview__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .counters {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .hero {
    min-height: 100svh;
  }

  .hero__content {
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .hero__stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero__ctas {
    flex-direction: column;
  }

  .hero__ctas .btn {
    text-align: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .why-us__features {
    grid-template-columns: 1fr;
  }

  /* Mobile Premium Gallery - Custom Clustered Layout */
  .premium-gallery-section {
    padding: var(--space-xl) 0;
  }
  
  .pg-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
  }
  
  .pg-header__main {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .pg-header__meta {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    width: 100%;
  }
  
  .pg-composition {
    height: 480px;
    width: 100%;
    transform: none; /* Reset tablet scale */
    margin-bottom: var(--space-lg);
  }
  
  /* Resize and reposition elements for mobile */
  .pg-item--center {
    width: 220px;
    height: 300px;
    z-index: 30;
  }
  
  .pg-item--1 { width: 110px; height: 140px; top: 2%; left: -2%; --z-rot: -8deg; z-index: 10; }
  .pg-item--2 { width: 100px; height: 130px; top: 68%; left: 2%; --z-rot: 5deg; z-index: 25; }
  .pg-item--3 { width: 130px; height: 170px; top: 12%; left: 15%; --z-rot: 3deg; z-index: 5; }
  .pg-item--4 { width: 90px; height: 120px; top: 78%; left: 22%; --z-rot: -5deg; z-index: 28; }
  .pg-item--5 { width: 140px; height: 190px; top: 4%; right: -2%; --z-rot: -3deg; z-index: 8; }
  .pg-item--6 { width: 100px; height: 140px; top: 58%; right: 5%; --z-rot: 6deg; z-index: 18; }
  .pg-item--7 { width: 110px; height: 150px; top: 18%; right: -5%; --z-rot: 8deg; z-index: 12; }
  .pg-item--8 { width: 120px; height: 160px; top: 72%; right: -2%; --z-rot: -6deg; z-index: 20; }
  
  /* Fade outer elements slightly to focus the center */
  .pg-item--1, .pg-item--4, .pg-item--5, .pg-item--7 {
    opacity: 0.6 !important; 
    filter: blur(2px) !important;
  }
  
  .pg-footer {
    margin-top: var(--space-xl);
  }

  .gallery-preview__grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 150px;
  }

  .gallery-preview__item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
  }

  .blog-preview__grid {
    grid-template-columns: 1fr;
  }

  .counters {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .scroll-indicator {
    display: none;
  }
  
  /* Mobile Marquee Testimonials */
  .mq-card {
    width: 300px;
    padding: var(--space-lg);
  }
  .mq-track {
    gap: var(--space-lg);
    padding: 0 var(--space-lg) 0 0;
  }
  .mq-wrapper {
    gap: var(--space-lg);
  }
}
