/* ============================================
   Bella Concrete - Design System
   ============================================ */

/* ---------- CSS Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- Design Tokens ---------- */
:root {
  /* Colors - from logo */
  --color-primary: #1A1A1A;
  --color-accent: #E8A0BF;
  --color-accent-light: #F5D0E0;
  --color-accent-dark: #C77A9E;
  --color-background: #FAFAFA;
  --color-surface: #F5F5F5;
  --color-text: #0D0D0D;
  --color-muted: #6B7280;
  --color-white: #FFFFFF;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 100px;
}

/* ---------- Base Styles ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary);
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

p {
  margin-bottom: var(--space-4);
}

a {
  color: var(--color-accent-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Utility Classes ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--color-muted);
}

/* ---------- Button Component ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  min-height: 44px;
  /* Accessibility: touch target */
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-accent-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-secondary:hover {
  background-color: #333;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.nav-logo {
  height: 100px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: var(--space-8);
  list-style: none;
}

.nav-link {
  color: var(--color-primary);
  font-weight: 500;
  padding: var(--space-2) 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

/* Mobile Navigation */
/* Update: Trigger hamburger menu sooner (1100px) to prevent overlap */
@media (max-width: 1100px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--color-white);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .nav-cta {
    display: inline-flex;
  }
}

@media (min-width: 1101px) {
  .nav-cta {
    display: inline-flex;
  }
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  background-color: var(--color-surface);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
      rgba(26, 26, 26, 0.85) 0%,
      rgba(26, 26, 26, 0.6) 50%,
      rgba(26, 26, 26, 0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: var(--space-16) 0;
}

.hero-title {
  font-size: var(--text-5xl);
  color: var(--color-white);
  margin-bottom: var(--space-6);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-8);
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: var(--text-4xl);
  }

  .hero-subtitle {
    font-size: var(--text-lg);
  }
}

/* ---------- Section ---------- */
.section {
  padding: var(--space-20) 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-12);
}

.section-title {
  margin-bottom: var(--space-4);
}

.section-subtitle {
  color: var(--color-muted);
  font-size: var(--text-lg);
}

/* ---------- Service Cards ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
}

/* Force 2x2 grid on desktop (Pools page) */
@media (min-width: 901px) {
  .services-grid.grid-2x2 {
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}

.service-card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 50ms ease, box-shadow 50ms ease;
  /* Ultra-snappy 50ms as requested */
  cursor: pointer;
  position: relative;
}

.stretched-link::after {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  content: "";
}

.service-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Ensure the link itself doesn't trap the pseudo-element */
.stretched-link {
  position: static !important;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.service-card-image {
  height: 200px;
  overflow: hidden;
}

.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.service-card:hover .service-card-image img {
  transform: scale(1.05);
}

.service-card-content {
  padding: var(--space-6);
}

.service-card-title {
  margin-bottom: var(--space-3);
}

.service-card-text {
  color: var(--color-muted);
  margin-bottom: var(--space-4);
}

/* ---------- Feature Icons (Why Us) ---------- */
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background-color: var(--color-accent-light);
  color: var(--color-accent-dark);
  border-radius: 50%;
  margin-bottom: 1rem;
}

/* ---------- Testimonials ---------- */
.testimonials {
  background-color: var(--color-surface);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.testimonial-card {
  background-color: var(--color-white);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  /* Pro Max: Accent border */
  border-left: 4px solid var(--color-accent);
  cursor: default;
  /* Ensure no pointer cursor appears */
}

/* Pro Max: Star Ratings */
.star-rating {
  display: flex;
  gap: 2px;
  color: #fbbf24;
  /* Amber-400 equivalent for stars */
  margin-bottom: 1rem;
}

.testimonial-quote {
  font-size: var(--text-lg);
  font-style: italic;
  margin-bottom: var(--space-6);
  line-height: 1.7;
}

.testimonial-author {
  font-weight: 600;
  color: var(--color-primary);
}

/* Removed the large quote mark to cleaner look with stars */
.testimonial-card::before {
  content: none;
}

/* ---------- CTA Section ---------- */
.cta-section {
  position: relative;
  /* Pro Max: Background Image with Overlay */
  background-image: url('https://images.unsplash.com/photo-1621255557672-132d96c94404?q=80&w=2070&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  text-align: center;
  padding: var(--space-20) 0;
  overflow: hidden;
}

.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(26, 26, 26, 0.8) 100%);
  z-index: 1;
}

.cta-title {
  color: var(--color-white);
  margin-bottom: var(--space-4);
  font-size: var(--text-4xl);
}

.cta-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */
.footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-16) 0 var(--space-8);
  position: relative;
  /* Pro Max: Subtle Texture */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  /* Blend mode to make it subtle on dark bg */
}

/* Be sure texture doesn't overpower text */
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(26, 26, 26, 0.97);
  /* High opacity overlay to fade the noise */
  pointer-events: none;
}

/* Ensure content is above the overlay */
.footer .container {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}

.footer-title {
  color: var(--color-white);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
  color: var(--color-accent);
}

/* ---------- Value Section ---------- */
.value-section {
  position: relative;
  /* Simplified for performance: Solid color with noise overlay */
  background-color: #2a2a2a;
  background-image: linear-gradient(145deg, #303030 0%, #252525 100%);
  overflow: hidden;
}

.value-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Simplified: Just the subtle vignette */
  background-image: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.4) 100%);
  background-size: 100% 100%;
}

/* Noise texture overlay */
.value-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: overlay;
}

/* Grain texture for realism */
.value-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.7' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");
  opacity: 0.025;
}

.value-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: var(--color-primary);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(232, 160, 191, 0.3);
}

.value-title {
  color: white !important;
  font-size: var(--text-5xl);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.value-grid {
  gap: var(--space-8);
}

/* Value Card */
.value-card {
  position: relative;
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 10px 40px rgba(0, 0, 0, 0.15);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  animation: valueCardReveal 0.6s ease forwards;
}

.value-card[data-delay="0"] {
  animation-delay: 0.1s;
}

.value-card[data-delay="1"] {
  animation-delay: 0.25s;
}

.value-card[data-delay="2"] {
  animation-delay: 0.4s;
}

@keyframes valueCardReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.value-card:hover {
  transform: translateY(-5px);
  /* Reduced from -10px to prevent feeling 'stuck' up high */
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 0 0 2px var(--color-accent);
}

/* Accent bar at top */
.value-card-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  transform-origin: top;
  transition: transform var(--transition-base);
}

.value-card:hover .value-card-accent {
  transform: scaleY(1.5);
  /* Grows from 4px to 6px visually without layout shift */
}

.value-card-content {
  padding: var(--space-8);
  text-align: center;
}

/* Icon styling */
.value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, rgba(232, 160, 191, 0.15) 0%, rgba(232, 160, 191, 0.05) 100%);
  border-radius: 50%;
  margin-bottom: var(--space-5);
  transition: transform var(--transition-base), background var(--transition-base);
}

.value-icon svg {
  stroke: var(--color-accent-dark);
  transition: stroke var(--transition-base);
}

.value-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .value-actions {
    flex-direction: column;
    width: 100%;
  }

  .value-actions .btn {
    width: 100% !important;
    /* FORCE full width */
    box-sizing: border-box !important;
    /* FORCE border inclusion */
    display: flex !important;
  }
}

.value-card:hover .value-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
}

.value-card:hover .value-icon svg {
  stroke: white;
}

.value-card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}

.value-card-text {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

/* Feature list */
.value-features {
  list-style: none;
  text-align: left;
  margin: 0;
  padding: 0;
}

.value-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: var(--text-sm);
  color: var(--color-text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.value-features li:last-child {
  border-bottom: none;
}

.value-features svg {
  flex-shrink: 0;
  stroke: var(--color-accent-dark);
}

/* Value section buttons */
.value-btn-primary {
  background: white !important;
  color: var(--color-primary) !important;
  font-weight: 600;
  padding: 1rem 2rem;
  border: 2px solid transparent !important;
  /* Invisible border to match outline width */
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.value-btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.5) !important;
  color: white !important;
  padding: 1rem 2rem;
  /* Exact match now */
  font-weight: 600;
}

/* --- Mobile Responsiveness (Value Swipe) --- */
/* --- Mobile Responsiveness (Value Swipe) --- */
@media (max-width: 900px) {
  .value-grid {
    display: flex;
    /* Switch from Grid to Flex */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--space-4);

    /* Center Layout: 50% - (CardWidth/2) = Padding needed */
    /* for 80% card, we need 10% padding on each side */
    padding: 0 10%;
    padding-bottom: var(--space-8);

    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    /* Smooth momentum scrolling on iOS */
  }

  .value-grid::-webkit-scrollbar {
    display: none;
  }

  .value-card {
    /* 80% width + Center Align + 10% Padding = Perfectly Centered */
    flex: 0 0 80%;
    min-width: 80%;

    scroll-snap-align: center;

    margin-bottom: 0;
    /* Remove grid bottom margins */

    /* Ensure initial state is visible since we might override scroll reveal */
    opacity: 1;
    transform: none;
    animation: none;
  }
}


.value-btn-primary:hover {
  background: var(--color-accent) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(232, 160, 191, 0.4);
}

.value-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: white !important;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--text-sm);
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ============================================
   UI/UX IMPROVEMENTS
   ============================================ */

/* ---------- 1. Skip Link (Accessibility) ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ---------- 2. Sticky Navigation with Glassmorphism ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ---------- 3. Scroll Reveal Animations ---------- */
/* Smoother, subtle reveal - No large 'bump' */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  /* Reduced from 40px -> 20px for subtler entry */
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grid items */
.reveal[data-delay="1"] {
  transition-delay: 0.1s;
}

.reveal[data-delay="2"] {
  transition-delay: 0.2s;
}

.reveal[data-delay="3"] {
  transition-delay: 0.3s;
}

/* ---------- 4. Card Micro-interactions ---------- */
.service-card {
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Testimonial cards hover removed */

/* ---------- 5. Typography Enhancement ---------- */
h2 {
  letter-spacing: 0.02em;
}

.section-title {
  letter-spacing: 0.03em;
}

/* ---------- 6. Enhanced Button States ---------- */
.btn:active {
  transform: scale(0.98);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 160, 191, 0.4);
}

/* ---------- Additional Polish ---------- */
/* Smooth image loading */
img {
  opacity: 1;
  transition: opacity var(--transition-slow);
}

/* Link hover underline animation */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link {
  position: relative;
}

/* -----------------------------------------------------------------------------
   GALLERY MASONRY & LIGHTBOX
   ----------------------------------------------------------------------------- */

/* Masonry Layout */
.gallery-masonry {
  column-count: 3;
  column-gap: 1.5rem;
}

@media (max-width: 1024px) {
  .gallery-masonry {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .gallery-masonry {
    column-count: 1;
  }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background-color: var(--color-surface);
  /* Loading placeholder */
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-title {
  color: white;
  font-weight: 600;
  font-size: 1.125rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  border-radius: 4px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

/* Controls */
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 56px;
  height: 56px;
  cursor: pointer;
  border-radius: 50%;
  backdrop-filter: blur(4px);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10005;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

.lightbox-caption {
  position: absolute;
  bottom: 2rem;
  left: 0;
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  font-weight: 500;
  padding: 0 1rem;
  z-index: 10005;
}

@media (max-width: 768px) {
  .lightbox-nav {
    width: 44px;
    height: 44px;
  }

  .lightbox-prev {
    left: 1rem;
  }

  .lightbox-next {
    right: 1rem;
  }
}

img[loading="lazy"] {
  opacity: 1 !important;
}

/* ============================================
   PROCESS ACCORDION (POOLS PAGE)
   ============================================ */

.process-section-dark {
  background-color: #1a1a1a;
  padding: var(--space-20) 0;
  color: white;
  position: relative;
}

.process-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

/* --- Left Side: Visuals (Desktop) --- */
.process-visuals {
  position: relative;
  height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 120px;
  /* Sticky positioning for scrolling effect */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.process-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s ease;
  transform: scale(1.05);
  z-index: 1;
}

.process-img.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

/* --- Right Side: Steps List --- */
.process-steps {
  display: flex;
  flex-direction: column;
}

.process-step {
  padding: var(--space-8);
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

/* Interaction States */
.process-step:hover {
  background: rgba(255, 255, 255, 0.03);
  border-left-color: rgba(232, 160, 191, 0.3);
  /* Subtle pink hint */
}

.process-step.active {
  background: linear-gradient(90deg, rgba(232, 160, 191, 0.05) 0%, transparent 100%);
  border-left-color: var(--color-accent);
  /* Full pink border */
}

.step-header {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: var(--space-2);
}

.step-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.2);
  transition: color 0.3s ease, transform 0.3s ease;
}

.process-step:hover .step-num,
.process-step.active .step-num {
  color: var(--color-accent);
  transform: translateX(4px);
}

.step-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

/* Accordion Text Logic */
.step-desc {
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  font-size: 1.05rem;
  margin-left: calc(var(--space-5) + 30px);
  /* Align with title */

  /* Desktop: Collapsed by default unless active */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin-top 0.4s ease;
  margin-top: 0;
}

.process-step.active .step-desc {
  max-height: 120px;
  /* Expand to show text */
  opacity: 1;
  margin-top: var(--space-3);
}

/* Mobile Image Hidden on Desktop */
.mobile-process-img {
  display: none;
}

/* --- Mobile Responsiveness (Critical) --- */
/* --- Mobile Responsiveness (Horizontal Snap) --- */
@media (max-width: 900px) {
  .process-container {
    display: block;
  }

  /* Hide Desktop Visuals */
  .process-visuals {
    display: none;
  }

  /* Horizontal Scroll Container */
  .process-steps {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--space-4);
    padding-bottom: var(--space-8);

    /* Hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
  }

  .process-steps::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
  }

  /* Card Styling */
  .process-step {
    flex: 0 0 85%;
    /* Shows 85% of card to hint at scroll */
    scroll-snap-align: center;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: 0;
    cursor: default;
  }

  /* Remove Desktop Hover/Active Styles */
  .process-step:hover,
  .process-step.active {
    background: rgba(255, 255, 255, 0.03) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    /* Reset border */
  }

  .step-header {
    margin-bottom: var(--space-4);
    justify-content: space-between;
  }

  .step-num {
    color: var(--color-accent);
    font-size: 1.25rem;
    transform: none !important;
  }

  .step-title {
    font-size: 1.5rem;
  }

  /* Always show description */
  .step-desc {
    max-height: none;
    opacity: 1;
    margin-left: 0;
    margin-top: var(--space-4);
  }

  /* ============================================
   MOBILE SCALE CAROUSEL (Shared Utility)
   Applies "Scale-on-Focus" effect to any grid
   ============================================ */
  @media (max-width: 900px) {
    .mobile-scale-carousel {
      display: flex !important;
      flex-wrap: nowrap !important;
      /* Prevent wrapping */
      overflow-x: auto !important;
      justify-content: flex-start !important;
      /* FIX: Override inline center */
      scroll-snap-type: x mandatory !important;
      gap: var(--space-4);
      align-items: stretch;
      /* FORCE EQUAL HEIGHT */

      /* Center Layout: 90% card + 5% padding = perfect center */
      /* Large Top Padding (4rem) to accommodate 1.05x scale + shadow */
      padding: 4rem 5% 3rem 5%;

      scrollbar-width: none;
      /* Firefox */
      -ms-overflow-style: none;
      /* IE/Edge */
      -webkit-overflow-scrolling: touch;
    }

    .mobile-scale-carousel::-webkit-scrollbar {
      display: none;
    }

    /* Target direct children (cards) generically */
    .mobile-scale-carousel>* {
      flex: 0 0 90%;
      min-width: 90%;
      height: 100%;
      /* FORCE FULL HEIGHT */
      scroll-snap-align: center;
      margin-bottom: 0;

      /* Relaxed Default State: Accessible even if JS fails */
      transition: transform 0.4s ease,
        opacity 0.4s ease,
        filter 0.4s ease;
      transform: scale(0.95);
      opacity: 1;
      filter: none;
    }

    /* Active class applied by JS */
    .mobile-scale-carousel>*.is-active {
      transform: scale(1.05);
      /* Restored "Big Pop" (1.05x) */
      opacity: 1;
      filter: grayscale(0%);
      z-index: 2;
      box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
      /* Enhanced shadow for depth */
    }
  }



  /* Mobile Image */
  .mobile-process-img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
  }
}

/* Investment Grid Layout (Desktop) */
.investment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.investment-grid>*:last-child {
  grid-column: 1 / -1;
  /* Concrete spans full width */
}

/* Adjust grid gap for full-width card content */
.investment-grid>*:last-child p {
  max-width: 800px;
  /* Prevent text from getting too long on wide screens */
}

/* Ensure mobile image is hidden on desktop */
@media (min-width: 901px) {
  .mobile-process-img {
    display: none;
  }
}

/* =========================================
   Visual Feature Grid (Magazine Overlay)
   ========================================= */
.visual-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.visual-feature-grid .feature-image-wrapper {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.visual-feature-grid .feature-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

/* Mobile Layout: Magazine Overlay */
@media (max-width: 900px) {
  .visual-feature-grid {
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 0;
    /* CRITICAL: Reset desktop gap to allow overlap */
  }

  /* Make image a tall "hero" background */
  .visual-feature-grid .feature-image-wrapper {
    order: -1;
    aspect-ratio: 3/4;
    width: 100%;
    max-height: 50vh;
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 1;
    box-shadow: none;
  }

  /* The "Floating Card" Content */
  .visual-feature-grid .feature-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
    width: 90%;
    margin: -4rem auto 0;
  }
}

/* ---------- CTA Section (Added to fix visibility) ---------- */
.cta-section {
  position: relative;
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: var(--space-20) 0;
  overflow: hidden;
}

.cta-title {
  color: var(--color-white);
  margin-bottom: var(--space-4);
  font-size: var(--text-4xl);
}

.cta-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}