/* ==========================================================================
   OASIS POOL SERVICES — Homepage Stylesheet
   Hero, services preview, why oasis, projects, testimonials, service areas,
   CTA section, trust bar, and Phase 3 visual differentiation
   ========================================================================== */

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

/* Background videos -- stacked, crossfade between them */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero__video--active {
  opacity: 1;
}

/* Static poster fallback -- shown when video not available or reduced-motion */
.hero__poster {
  position: absolute;
  inset: 0;
  background: url('../assets/hero-pool.jpg') center / cover no-repeat;
  z-index: 0;
  display: none;
}

/* Gradient overlay for text contrast on top of video */
.hero__bg-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(160deg, rgba(12, 35, 64, 0.82) 0%, rgba(15, 45, 79, 0.6) 40%, rgba(10, 30, 56, 0.45) 100%),
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(0, 180, 216, 0.1), transparent),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(255, 107, 44, 0.05), transparent);
  pointer-events: none;
}

/* prefers-reduced-motion: pause video, show static poster */
@media (prefers-reduced-motion: reduce) {
  .hero__video {
    display: none;
  }
  .hero__poster {
    display: block;
  }
}

/* Mobile: hide all hero videos, show static poster instead */
@media (max-width: 767px) {
  .hero__video {
    display: none !important;
  }
  .hero__poster {
    display: block !important;
  }
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-top: 8rem;
  padding-bottom: 4rem;
}

.hero__heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.08;
  color: var(--color-white);
  max-width: 740px;
  margin-bottom: 1.5rem;
}

.hero__sub {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: rgba(255, 255, 255, 0.75);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 2.5rem;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .hero__content {
    max-width: 55%;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 85vh;
  }
  .hero__heading {
    font-size: clamp(1.75rem, 6vw, 4.5rem);
  }
}

/* --------------------------------------------------------------------------
   TRUST BAR
   -------------------------------------------------------------------------- */
.trust-bar {
  background: var(--color-dark-bg);
  padding: 3rem 0;
}

.trust-bar__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.trust-bar__item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.trust-bar__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0, 180, 216, 0.12);
}

.trust-bar__icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-secondary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trust-bar__number {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-white);
  line-height: 1.1;
}

.trust-bar__label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

@media (min-width: 768px) {
  .trust-bar__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
  }

  .trust-bar__item {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   SERVICES PREVIEW
   -------------------------------------------------------------------------- */
.services {
  background: var(--color-bg);
}

.services__header {
  text-align: center;
  margin-bottom: 2rem;
}

.services__header .section-sub {
  margin-left: auto;
  margin-right: auto;
}

/* Services Showcase (image + copy side by side) */
.services__showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.services__showcase-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  position: relative;
}

.showcase-carousel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.showcase-carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.showcase-carousel__slide--active {
  opacity: 1;
}

.services__showcase-content .section-sub {
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .services__showcase {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.service-card {
  background: var(--color-white);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-card);
  transition: all 0.4s var(--ease);
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.service-card:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 48px rgba(0, 180, 216, 0.15);
}

.service-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(0, 180, 216, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-card__icon svg {
  width: 30px;
  height: 30px;
  stroke: var(--color-secondary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.service-card__desc {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .services__grid {
    grid-template-columns: 1.15fr 0.925fr 0.925fr;
  }
}

@media (max-width: 480px) {
  .service-card__title {
    font-size: 1.05rem;
  }
}

/* --------------------------------------------------------------------------
   WHY OASIS
   -------------------------------------------------------------------------- */
.why-oasis {
  background: var(--color-surface);
}

.why-oasis__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.why-oasis__image {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.15), rgba(12, 35, 64, 0.08));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 0.9rem;
  min-height: 300px;
}

.why-oasis__content {
}

.why-oasis__features {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-item__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 180, 216, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-item__icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-secondary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-item__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.feature-item__desc {
  color: var(--color-text-light);
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (min-width: 1024px) {
  .why-oasis__inner {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }

  .why-oasis__image {
    position: sticky;
    top: 100px;
    align-self: start;
  }
}

/* --------------------------------------------------------------------------
   FEATURED PROJECTS
   -------------------------------------------------------------------------- */
.projects {
  background: var(--color-dark-bg);
}

.projects__header {
  text-align: center;
  margin-bottom: 3rem;
}

.projects__header .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.projects__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.project-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.1), rgba(12, 35, 64, 0.3));
  cursor: pointer;
  transition: transform 0.5s var(--ease);
}

.project-card:hover {
  transform: scale(1.02);
}

.project-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(11, 27, 46, 0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  transition: background 0.4s ease;
}

.project-card:hover .project-card__overlay {
  background: linear-gradient(0deg, rgba(11, 27, 46, 0.95) 0%, rgba(11, 27, 46, 0.4) 100%);
}

.project-card__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--color-white);
  margin-bottom: 0.25rem;
}

.project-card__detail {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.4s ease;
}

.project-card:hover .project-card__detail {
  transform: translateY(0);
  opacity: 1;
}

.projects__footer {
  text-align: center;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .projects__grid {
    grid-template-columns: 1.4fr 0.8fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
  }

  .project-card--large {
    grid-row: 1 / 3;
    aspect-ratio: 3 / 4;
  }

  .project-card:not(.project-card--large) {
    aspect-ratio: 16 / 10;
  }
}

/* --------------------------------------------------------------------------
   TESTIMONIALS
   -------------------------------------------------------------------------- */
.testimonials {
  background: var(--color-bg);
}

.testimonials__header {
  text-align: center;
  margin-bottom: 3rem;
}

.testimonials__header .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.testimonials__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.testimonial-card {
  background: var(--color-white);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-card);
  transition: all 0.4s var(--ease);
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.testimonial-card:hover {
  border-left: 3px solid var(--color-secondary);
  box-shadow: var(--shadow-hover);
}

.testimonial-card__stars {
  display: flex;
  gap: 3px;
  margin-bottom: 1rem;
}

.testimonial-card__stars svg {
  width: 18px;
  height: 18px;
  fill: #FBB03B;
}

.testimonial-card__quote {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-card__author {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-primary);
}

.testimonial-card__location {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

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

/* --------------------------------------------------------------------------
   SERVICE AREAS
   -------------------------------------------------------------------------- */
.service-areas {
  background: var(--color-surface);
}

.service-areas__header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.service-areas__header .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.service-areas__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.service-areas__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1rem;
  min-height: 56px;
  background: var(--color-white);
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease;
  text-align: center;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  white-space: nowrap;
}

.service-areas__item:hover {
  transform: translateY(-2px);
}

.service-areas__item svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-secondary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

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

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

/* --------------------------------------------------------------------------
   CTA / CONTACT SECTION
   -------------------------------------------------------------------------- */
.cta-section {
  background: var(--color-dark-bg);
}

.cta-section__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

.cta-section__content {
}

.cta-section__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-secondary);
  margin-top: 1.5rem;
  transition: color 0.3s ease;
}

.cta-section__phone:hover {
  color: var(--color-white);
}

.cta-section__phone svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Contact Form */
.contact-form {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2.5rem 2rem;
}

.contact-form__group {
  margin-bottom: 1.25rem;
}

.contact-form__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.4rem;
}

.contact-form__input,
.contact-form__select,
.contact-form__textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  font-size: 0.95rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.contact-form__input:focus,
.contact-form__select:focus,
.contact-form__textarea:focus {
  border-color: var(--color-secondary);
  background: rgba(255, 255, 255, 0.1);
}

.contact-form__select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='rgba(255,255,255,0.5)' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.contact-form__select option {
  background: var(--color-primary);
  color: var(--color-white);
}

.contact-form__textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.contact-form__submit {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
}

.contact-form__error {
  font-size: 0.8rem;
  color: #FF6B6B;
  margin-top: 0.3rem;
  display: none;
}

.contact-form__success {
  text-align: center;
  padding: 2rem;
  color: var(--color-secondary);
  font-weight: 600;
  font-size: 1.1rem;
  display: none;
}

@media (min-width: 768px) {
  .contact-form__row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .cta-section__inner {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* --------------------------------------------------------------------------
   PHASE 3 — VISUAL DIFFERENTIATION
   -------------------------------------------------------------------------- */

/* Featured Service Card */
.service-card--featured {
  border: 2px solid var(--color-secondary);
  position: relative;
  background: linear-gradient(180deg, rgba(0, 180, 216, 0.04) 0%, var(--color-white) 100%);
}

.service-card__badge {
  position: absolute;
  top: -1px;
  right: 24px;
  background: var(--color-secondary);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 0 0 8px 8px;
}

/* Why Oasis — Editorial layout */
.feature-item--lead {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--color-surface);
  margin-bottom: 0.5rem;
}

.feature-item--lead .feature-item__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.feature-item--lead .feature-item__title {
  font-size: 1.25rem;
}

.feature-item--lead .feature-item__desc {
  font-size: 0.95rem;
}

.why-oasis__features-secondary {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

@media (min-width: 1024px) {
  .why-oasis__features-secondary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* Hero — Decorative rings removed (were causing visual issues) */

/* Subtle noise texture for depth */
.services,
.testimonials {
  position: relative;
}

.services::before,
.testimonials::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.services > *,
.testimonials > * {
  position: relative;
  z-index: 1;
}
