/* --- Services Page Styles --- */

/* Keep sticky header from overlapping anchor headings */
:target::before {
  content: "";
  display: block;
  height: 80px;       /* match your header height */
  margin-top: -80px;  /* offset the scroll */
}

/* Service grid (2 columns desktop, stack mobile) */
.grid-2-cols,
.grid-2-cols-reverse {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

@media (max-width: 768px) {
  .grid-2-cols,
  .grid-2-cols-reverse {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
}

/* Service content (text block) */
.service-content {
  max-width: 600px;
  margin: 0 auto;
}

.service-content h3 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
}

.service-content p,
.service-content ul {
  font-size: 1rem;
  text-align: left; /* body text stays left aligned */
  width: 100%;
}

@media (max-width: 480px) {
  .service-content h3 {
    font-size: 1.5rem;
  }
  .service-content p,
  .service-content ul {
    font-size: 0.95rem;
  }
}

/* Center button inside service-content */
.service-content .button {
  display: inline-block;
  margin-top: var(--spacing-md);
}


/* --- Carousel Styles --- */
.service-image.carousel-js {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s ease;
}

.service-image.carousel-js:hover {
  transform: scale(1.03);
}

.slides img {
  display: none;
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.slides img.active {
  display: block;
}

/* Arrow Button Styles */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  z-index: 10;
}

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.carousel-btn--prev {
  left: 1rem;
}

.carousel-btn--next {
  right: 1rem;
}

/* --- Utility --- */
.section-sub-intro {
    color: var(--color-charcoal); 
}

@media (max-width: 768px) {
  
  /* --- Stacking for Service Grids --- */
  /* This rule should already be in your file, it ensures the main sections stack */
  .grid-2-cols,
  .grid-2-cols-reverse {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  /* --- Hero Section Text --- */
  #service-hero h1 {
    font-size: 2.8rem; /* Make hero title smaller */
  }

  .service-hero-p {
    font-size: 1.1rem; /* Adjust hero subtitle */
  }

  /* --- General Section Headings --- */
  .heading-serif {
    font-size: 2.2rem; /* Reduce size of main headings like "Transforming Your Property" */
  }

  /* --- Center Service Content on Stack --- */
  .service-content {
    text-align: center; /* Center the heading, paragraph, and button */
  }

  .service-content p,
  .service-content ul {
    text-align: center; /* Override the desktop 'left' alignment */
  }
}

#service-hero {
  position: relative; /* Required for positioning the image */
  overflow: hidden;
}

.service-hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* This makes the image cover the area like background-size: cover */
  z-index: -1; /* Pushes the image behind the content */
}

/* This keeps the text and overlay visible */
.service-hero-content {
  position: relative;
  z-index: 1;
}

.carousel-btn svg {
  fill: currentColor;
  width: 1.2rem;  /* Match the old font-size for consistent sizing */
  height: 1.2rem; /* Match the old font-size for consistent sizing */
}

/* --- from old rservices page --- */

/* --- Services Page Styles --- */

/* --- Service Hero --- */
#service-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.container {
    max-width: 1400px; /* desktop limit */
} 

#service-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(43, 43, 43, 0.5); 
}

.service-hero-content {
    position: relative;
    z-index: 2;
}

.service-hero-content h1 {
    color: #fff;
    font-size: 4rem;
    font-weight: 900;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    margin-bottom: var(--spacing-sm);
}

.service-hero-p {
    font-family: "Montserrat", sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #fff;
    opacity: 0.9;
}

/* --- Service Intro Section --- */
.service-feature-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-soft);
}

/* --- Types of Walls Section --- */
.service-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    margin-bottom: var(--spacing-xxl);
}

.service-type-grid:last-of-type {
    margin-bottom: 0;
}

.service-type-grid.reverse .service-type-img {
    order: 2;
}

/*
    NEW RULE ADDED
    This turns the image's container into a "centering box".
*/
.service-type-img {
    display: flex;
    justify-content: center;
    align-items: center;
}

/*
    MODIFIED RULE
    This makes the image smaller while keeping it responsive.
*/
.service-type-grid img {
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-soft);
    width: 100%;          /* Ensures the image scales down on smaller screens */
    height: auto;         /* Maintains the image's aspect ratio */
    max-width: 600px;     /* Sets the maximum size. Feel free to adjust this pixel value! */
}

.service-type-text h3 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
}

.service-type-text ul {
    list-style: none;
    padding-left: 0;
    margin-top: var(--spacing-md);
}

.service-type-text ul li {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.service-type-text ul li i {
    color: var(--color-primary);
}


/* --- CTA Section --- */
.cta-text-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

section[aria-labelledby="cta-heading"] .grid-2-cols {
    column-gap: var(--spacing-xxl);
}


/* ==============================================
    Responsive Adjustments (Mobile First)
==============================================
*/
@media (max-width: 768px) {

    /* --- General Adjustments --- */
    .section-padded {
        padding: var(--spacing-xl) 0;
    }

    h2.heading-serif, 
    h2#types-heading,
    h2#values-heading {
        font-size: 2.5rem;
    }

    .grid-2-cols {
        grid-template-columns: 1fr; 
    }

    /* --- Hero Section --- */
    .service-hero-content h1 {
        font-size: 2.8rem;
    }

    .service-hero-p {
        font-size: 1.2rem;
    }

    /* --- Intro Section --- */
    .section-white-bg .grid-2-cols > div {
        text-align: center;
    }

    .section-white-bg .grid-2-cols .button {
        margin-left: auto;
        margin-right: auto;
    }
    
    .service-feature-image {
        margin-top: var(--spacing-lg);
    }
    
    .value-props {
        gap: var(--spacing-sm);
    }

    /* --- Types of Walls Section --- */
    .service-type-grid,
    .service-type-grid.reverse {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .service-type-grid.reverse .service-type-img {
        order: 0; 
    }
    
    .service-type-text ul {
        display: inline-block;
        text-align: left;
    }

    /* --- Final CTA Form Section --- */
    .cta-text-content {
        margin-bottom: var(--spacing-xl);
    }
    
    /* Removes the bottom margin from the last paragraph in the CTA text block */
    .cta-text-content > p:last-of-type {
        margin-bottom: 0;
    }
}


.service-feature-imagerock {
    max-height: 400px;
}

/* --- Fix for the hardscaping feature section --- */

/* 1. Vertically align the text and image columns */
.grid-2-cols {
    align-items: center;
}

/* 2. Style the portrait image to fill its container like a landscape photo */
.service-feature-imagerock {
    width: 100%;
    aspect-ratio: 2 / 3; /* Creates a pleasant landscape shape */
    object-fit: cover;   /* This is the magic part: it crops the image to fit */
    border-radius: 8px;  /* Optional: adds slightly rounded corners */
    display: block;
}

@media (max-width: 768px) {
    
    .container {
        max-width: 100%;
        overflow-x: hidden; 
        padding: 0 1rem;
    }

}

@media (max-width: 768px) {
  .service-content h2 {
    font-size: 1.8rem; /* closer to other pages */
  }
}

@media (max-width: 768px) {
  .service-content h2 {
    font-size: 1.8rem; /* closer to other pages */
  }
}

@media (max-width: 768px) {
  .grid-2-cols,
  .grid-2-cols-reverse {
    display: flex;
    flex-direction: column;
  }

  .service-image {
    order: 1;
    margin-bottom: var(--spacing-md);
  }

  .service-content {
    order: 2;
    text-align: center;
  }
}

/* The hero-gradient class is used on your main heading */
.hero-gradient {
    color: var(--color-primary);
}

/* This applies a base font size to the <h1> element */
h1 {
    font-size: 4.2rem;
}

/* This adjusts the spacing on the subheading in your contact form section */
#ctal {
    margin-top: -1.5rem;
    margin-bottom: 1rem;
}

.list-icon {
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
  color: var(--color-primary);
  flex-shrink: 0; 
}