/* ============================================
   CSS Variables - Water/Nature Theme
   ============================================ */
:root {
  /* Colors */
  --color-primary: #0066cc;
  --color-primary-dark: #004d99;
  --color-primary-light: #3385d6;
  --color-secondary: #00a3a3;
  --color-accent: #2d8659;
  --color-text: #1a1a1a;
  --color-text-light: #666666;
  --color-bg: #ffffff;
  --color-bg-light: #f8f9fa;
  --color-bg-section: #f0f7ff;
  --color-border: #e0e0e0;
  --color-success: #28a745;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-small: 14px;
  --font-size-large: 18px;
  --font-size-h1: 2.5rem;
  --font-size-h2: 2rem;
  --font-size-h3: 1.5rem;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  
  /* Layout */
  --container-max-width: 1200px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition: all 0.3s ease;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  font-size: var(--font-size-h2);
}

h3 {
  font-size: var(--font-size-h3);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-light);
}

/* ============================================
   Container
   ============================================ */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: white;
}

.btn-full {
  width: 100%;
}

/* ============================================
   Header
   ============================================ */
.site-header {
  background-color: white;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 70px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.main-nav a {
  color: var(--color-text);
  font-weight: 500;
  padding: 0.5rem 0;
}

.main-nav a:hover {
  color: var(--color-primary);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--color-bg-section) 0%, white 100%);
  padding: var(--spacing-xl) 0;
  position: relative;
  overflow: hidden;
}

.hero.hero-with-bg {
  background-image: linear-gradient(135deg, rgba(240, 247, 255, 0.95) 0%, rgba(255, 255, 255, 0.92) 100%), url('../images/76858a7a39560138d598f10f201740f7-enhance-4x.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.hero-content h1 {
  color: var(--color-text);
  margin-bottom: var(--spacing-sm);
}

.hero-content > p {
  font-size: var(--font-size-large);
  margin-bottom: var(--spacing-md);
  color: var(--color-text-light);
}

/* Hero Search Form */
.hero-search {
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  margin: var(--spacing-md) 0;
}

.form-row {
  margin-bottom: var(--spacing-sm);
}

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
  font-size: var(--font-size-small);
}

.form-row input,
.form-row select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-family: var(--font-primary);
  transition: var(--transition);
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.hero-subnote {
  font-size: var(--font-size-small);
  color: var(--color-text-light);
  text-align: center;
  margin-top: var(--spacing-sm);
}

.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo-placeholder {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
}

/* ============================================
   How It Works
   ============================================ */
.how-it-works {
  padding: var(--spacing-xl) 0;
  background-color: white;
  position: relative;
}

.how-it-works.section-with-bg {
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.97)), url('../images/915f46a740c26fb8301437faf19c7711-enhance-4x.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.how-it-works h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.step {
  text-align: center;
  padding: var(--spacing-md);
}

.step img {
  display: block;
  margin: 0 auto var(--spacing-sm) auto;
}

.step-number {
  display: inline-block;
  width: 60px;
  height: 60px;
  background-color: var(--color-primary);
  color: white;
  border-radius: 50%;
  line-height: 60px;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  position: relative;
  z-index: 1;
}

.step h3 {
  color: var(--color-text);
  margin-bottom: var(--spacing-xs);
}

.step p {
  color: var(--color-text-light);
}

/* ============================================
   Popular Services
   ============================================ */
.popular-services {
  padding: var(--spacing-xl) 0;
  background-color: var(--color-bg-light);
}

.popular-services h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.service-card {
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 2px solid transparent;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.service-card h3 {
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.service-card p {
  color: var(--color-text-light);
  margin-bottom: 0;
}

/* ============================================
   Why Us
   ============================================ */
.why-us {
  padding: var(--spacing-xl) 0;
  background-color: white;
  position: relative;
}

.why-us.section-with-bg {
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96)), url('../images/74fbce0371cdb09efb1c704f539bc7f6-enhance-4x.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.why-us h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.why-item {
  text-align: center;
  padding: var(--spacing-md);
}

.why-item img {
  display: block;
  margin: 0 auto var(--spacing-sm) auto;
}

.why-item h3 {
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.why-item p {
  color: var(--color-text-light);
}

/* ============================================
   Featured Contractors
   ============================================ */
.featured-contractors {
  padding: var(--spacing-xl) 0;
  background-color: var(--color-bg-light);
  position: relative;
}

.featured-contractors.section-with-bg {
  background-image: linear-gradient(to bottom, rgba(248, 249, 250, 0.95), rgba(248, 249, 250, 0.95)), url('../images/735e2dfc82cdc5f4ee2cede5bd9c631f-enhance-4x.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.featured-contractors h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.contractor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.contractor-card {
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.contractor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.contractor-card h3 {
  color: var(--color-text);
  margin-bottom: var(--spacing-xs);
}

.contractor-location,
.card-location {
  color: var(--color-text-light);
  font-size: var(--font-size-small);
  margin-bottom: var(--spacing-xs);
}

.contractor-rating,
.card-rating {
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.contractor-services,
.card-services {
  color: var(--color-text-light);
  font-size: var(--font-size-small);
  margin-bottom: var(--spacing-sm);
}

.card-website {
  margin-top: var(--spacing-xs);
  font-size: var(--font-size-small);
}

.card-website a {
  color: var(--color-primary);
  text-decoration: underline;
}

.card-website a:hover {
  color: var(--color-primary-dark);
}

/* ============================================
   Bottom CTA
   ============================================ */
.bottom-cta {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  text-align: center;
}

.bottom-cta h2 {
  color: white;
  margin-bottom: var(--spacing-sm);
}

.bottom-cta p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-large);
}

.bottom-cta .btn-primary {
  background-color: white;
  color: var(--color-primary);
}

.bottom-cta .btn-primary:hover {
  background-color: var(--color-bg-light);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background-color: var(--color-text);
  color: white;
  padding: var(--spacing-md) 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer-nav {
  display: flex;
  gap: var(--spacing-md);
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-nav a:hover {
  color: white;
}

/* ============================================
   Directory Page
   ============================================ */
.directory-hero {
  background: linear-gradient(135deg, var(--color-bg-section) 0%, white 100%);
  padding: var(--spacing-lg) 0;
  text-align: center;
}

.directory-hero h1 {
  margin-bottom: var(--spacing-sm);
}

.directory-hero > p {
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-large);
}

.directory-search {
  display: flex;
  gap: var(--spacing-sm);
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}

.directory-search input,
.directory-search select {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
}

.directory-content {
  padding: var(--spacing-lg) 0;
}

.directory-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: var(--spacing-lg);
}

/* Filters Sidebar */
.filters {
  background: var(--color-bg-light);
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.filters h2 {
  font-size: var(--font-size-h3);
  margin-bottom: var(--spacing-md);
}

.filter-group {
  margin-bottom: var(--spacing-md);
}

.filter-group h3 {
  font-size: 1rem;
  margin-bottom: var(--spacing-xs);
  color: var(--color-text);
}

.filter-group label {
  display: block;
  padding: 0.5rem 0;
  cursor: pointer;
  color: var(--color-text-light);
  font-size: var(--font-size-small);
}

.filter-group input[type="checkbox"] {
  margin-right: 0.5rem;
}

/* Results */
.results-header {
  margin-bottom: var(--spacing-md);
}

.results-header h2 {
  margin-bottom: var(--spacing-xs);
}

.results-location {
  color: var(--color-primary);
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.results-list .contractor-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.card-main {
  flex: 1;
}

.card-main h3 a {
  color: var(--color-primary);
}

.card-main h3 a:hover {
  text-decoration: underline;
}

.card-description {
  margin: var(--spacing-xs) 0;
  color: var(--color-text-light);
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  min-width: 150px;
}

.card-actions .btn {
  width: 100%;
  text-align: center;
}

/* Pagination */
.pagination {
  display: flex;
  gap: var(--spacing-xs);
  justify-content: center;
  margin-top: var(--spacing-lg);
}

.page-link {
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius);
  color: var(--color-text);
  transition: var(--transition);
}

.page-link:hover,
.page-link.active {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ============================================
   Contractor Profile Page
   ============================================ */
.contractor-hero {
  background: linear-gradient(135deg, var(--color-bg-section) 0%, white 100%);
  padding: var(--spacing-lg) 0;
}

.contractor-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-lg);
}

.hero-main h1 {
  margin-bottom: var(--spacing-xs);
}

.hero-actions {
  text-align: right;
}

.response-note {
  font-size: var(--font-size-small);
  color: var(--color-text-light);
  margin-top: var(--spacing-xs);
}

.contractor-body {
  padding: var(--spacing-lg) 0;
}

.contractor-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: var(--spacing-lg);
}

.contractor-main section {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
}

.contractor-main section:last-child {
  border-bottom: none;
}

.services-list {
  list-style: disc;
  padding-left: var(--spacing-md);
  color: var(--color-text-light);
}

.services-list li {
  margin-bottom: var(--spacing-xs);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.gallery-item {
  margin: 0;
}

.photo-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.gallery-item figcaption {
  font-size: var(--font-size-small);
  color: var(--color-text-light);
  text-align: center;
}

/* Reviews */
.review {
  background: var(--color-bg-light);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
}

.review-rating {
  color: var(--color-accent);
  font-size: 1.2rem;
  margin-bottom: var(--spacing-xs);
}

.review-text {
  font-style: italic;
  margin-bottom: var(--spacing-xs);
  color: var(--color-text);
}

.review-meta {
  font-size: var(--font-size-small);
  color: var(--color-text-light);
}

/* Sidebar */
.contractor-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.business-details {
  background: var(--color-bg-light);
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
}

.business-details h2 {
  margin-bottom: var(--spacing-sm);
}

.business-details ul {
  list-style: none;
  padding: 0;
}

.business-details li {
  margin-bottom: var(--spacing-xs);
  color: var(--color-text-light);
}

.business-details strong {
  color: var(--color-text);
}

/* Quote Form */
.quote-form {
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 100px;
}

.quote-form h2 {
  margin-bottom: var(--spacing-md);
}

.quote-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
  font-size: var(--font-size-small);
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-family: var(--font-primary);
  margin-bottom: var(--spacing-sm);
  transition: var(--transition);
}

.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.quote-form textarea {
  resize: vertical;
  min-height: 100px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 968px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  
  .hero-image {
    order: -1;
  }
  
  .directory-layout {
    grid-template-columns: 1fr;
  }
  
  .filters {
    position: static;
  }
  
  .contractor-layout {
    grid-template-columns: 1fr;
  }
  
  .contractor-hero-inner {
    flex-direction: column;
  }
  
  .hero-actions {
    text-align: left;
    width: 100%;
  }
  
  .quote-form {
    position: static;
  }
  
  .results-list .contractor-card {
    flex-direction: column;
  }
  
  .card-actions {
    width: 100%;
    flex-direction: row;
  }
}

@media (max-width: 768px) {
  :root {
    --font-size-h1: 2rem;
    --font-size-h2: 1.75rem;
    --font-size-h3: 1.25rem;
  }
  
  .header-inner {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
  }
  
  .directory-search {
    flex-direction: column;
  }
  
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .steps-grid,
  .services-grid,
  .why-grid,
  .contractor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .hero {
    padding: var(--spacing-md) 0;
  }
  
  .how-it-works,
  .popular-services,
  .why-us,
  .featured-contractors {
    padding: var(--spacing-md) 0;
  }
}

/* ============================================
   Image Enhancement Styles
   ============================================ */

/* Image overlay effect for cards */
.image-overlay-card {
  position: relative;
  overflow: hidden;
}

.image-overlay-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 102, 204, 0.15) 100%);
  opacity: 0;
  transition: var(--transition);
}

.image-overlay-card:hover::after {
  opacity: 1;
}

/* Decorative corner images */
.section-decorative-bg {
  position: relative;
  overflow: hidden;
}

.section-decorative-bg::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  border-radius: 50%;
  z-index: 0;
}

.section-decorative-bg .container {
  position: relative;
  z-index: 1;
}

/* Full-width image showcase section */
.image-showcase {
  padding: var(--spacing-xl) 0;
  background-color: #f8f9fa;
  position: relative;
  overflow: hidden;
}

.image-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-sm);
}

.image-showcase-item {
  position: relative;
  height: 280px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}

.image-showcase-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.image-showcase-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.image-showcase-item:hover img {
  transform: scale(1.1);
}

.image-showcase-item .overlay-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-md);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  font-weight: 600;
  transform: translateY(100%);
  transition: var(--transition);
}

.image-showcase-item:hover .overlay-text {
  transform: translateY(0);
}

/* Alternating content with images */
.content-with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.content-with-image.reverse {
  direction: rtl;
}

.content-with-image.reverse > * {
  direction: ltr;
}

.content-with-image-img {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 400px;
}

.content-with-image-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.content-with-image-img:hover img {
  transform: scale(1.05);
}

@media (max-width: 968px) {
  .content-with-image {
    grid-template-columns: 1fr;
  }
  
  .content-with-image.reverse {
    direction: ltr;
  }
  
  .image-showcase-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Image grid masonry effect */
.image-grid-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-auto-rows: 200px;
  gap: var(--spacing-sm);
}

.image-grid-masonry .masonry-item:nth-child(3n+1) {
  grid-row: span 2;
}

.image-grid-masonry img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.image-grid-masonry img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
  z-index: 10;
}

/* Responsive parallax disable on mobile */
@media (max-width: 768px) {
  .hero.hero-with-bg,
  .how-it-works.section-with-bg,
  .why-us.section-with-bg,
  .featured-contractors.section-with-bg {
    background-attachment: scroll;
  }
}

/* ============================================
   Scroll Animations (Optional Enhancement)
   ============================================ */

/* Fade in animation for images */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Staggered animation delays for grids */
.image-showcase-item:nth-child(1) { animation-delay: 0.1s; }
.image-showcase-item:nth-child(2) { animation-delay: 0.2s; }
.image-showcase-item:nth-child(3) { animation-delay: 0.3s; }
.image-showcase-item:nth-child(4) { animation-delay: 0.4s; }
.image-showcase-item:nth-child(5) { animation-delay: 0.5s; }
.image-showcase-item:nth-child(6) { animation-delay: 0.6s; }

.masonry-item:nth-child(1) { animation-delay: 0.05s; }
.masonry-item:nth-child(2) { animation-delay: 0.1s; }
.masonry-item:nth-child(3) { animation-delay: 0.15s; }
.masonry-item:nth-child(4) { animation-delay: 0.2s; }
.masonry-item:nth-child(5) { animation-delay: 0.25s; }
.masonry-item:nth-child(6) { animation-delay: 0.3s; }

/* Pulse effect for featured images */
@keyframes pulse {
  0%, 100% {
    box-shadow: var(--shadow-sm);
  }
  50% {
    box-shadow: var(--shadow-md);
  }
}

.pulse-on-hover:hover {
  animation: pulse 2s infinite;
}

