
/* CSS Reset and Variables */
:root {
    --primary: #607040;
    --secondary: #8b9576;
    --accent: #b1b7a3;
    --light-bg: #f2f3ef;
    --light-gray: #d2d6ca;
    --dark-text: #333333;
    --light-text: #ffffff;
    --scroll-padding: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--scroll-padding);
}

body {
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 300;
    background-color: var(--primary);
    color: var(--light-bg);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .btn, .hero-kicker {
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 500;
    color: var(--light-text);
}

h1, h2 {
    text-transform: uppercase;
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 1.5rem; text-align: center; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
p { margin-bottom: 1rem; font-family: 'Red Hat Display', sans-serif; font-weight: 300; color: var(--light-bg); font-size: 1.125rem;}
a { color: var(--light-text); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}
.container-large {
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    background-color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--light-bg);
    color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--accent);
    color: var(--dark-text);
}

.btn-secondary {
    background-color: transparent;
    color: var(--light-bg);
    border: 2px solid var(--light-bg);
}

.btn-secondary:hover {
    background-color: var(--light-bg);
    color: var(--primary);
}

/* Header & Navigation */
.header {
    background-color: transparent;
    padding: 1rem 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.4s ease, border-bottom 0.4s ease;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    position: fixed;
    background-color: rgba(96, 112, 64, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    max-height: 180px; /* Increased from 60px to 180px (Triple size) */
    width: auto;
    transition: max-height 0.4s ease; /* Smooth transition when shrinking */
}

/* Shrink logo back to original size on scroll */
.header.scrolled .nav-logo img {
    max-height: 60px;
}

.hamburger {
    cursor: pointer;
    z-index: 1002;
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: var(--light-text);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:first-child { transform: translateY(10px) rotate(45deg); }
.hamburger.active span:last-child { transform: translateY(-10px) rotate(-45deg); }


/* Sidebar Menu */
.sidebar-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background-color: rgba(96, 112, 64, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1001;
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.sidebar-menu.active { right: 0; }
.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sidebar-logo img { max-height: 60px; }
.close-menu-btn { cursor: pointer; width: 30px; height: 22px; position: relative; }
.close-menu-btn span {
    display: block; width: 100%; height: 2px; background-color: var(--light-text);
    position: absolute; left: 0; top: 10px; transition: transform 0.3s ease; transform-origin: center;
}
.close-menu-btn span:first-child { transform: rotate(45deg); }
.close-menu-btn span:last-child { transform: rotate(-45deg); }
.sidebar-nav-links { list-style: none; padding: 0; margin: 0; }
.sidebar-nav-links li a {
    display: block; padding: 1.1rem 2rem; color: var(--light-text); font-family: 'Red Hat Display', sans-serif;
    font-weight: 500; font-size: 1rem; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}
.sidebar-nav-links li a:hover { background-color: rgba(255, 255, 255, 0.1); }
.sidebar-preview { padding: 1rem; margin-top: auto; }
.sidebar-preview img { width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover; transition: opacity 0.4s ease; }
.sidebar-description { padding: 1rem; text-align: center; }
.sidebar-description p { font-size: 1rem; color: var(--light-gray); transition: color 0.3s ease; }
.sidebar-description:hover p { color: var(--light-text); }

/* Active Nav Link Style */
.sidebar-nav-links li a.is-active, .sidebar-nav-links li a[aria-current="page"] {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

/* Hero Section */
#home {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center;
    color: var(--light-text); padding: 0; position: relative; overflow: hidden;
}
#home.hero-short {
    min-height: 50vh;
    background-image: url('https://images.unsplash.com/photo-1600585152220-90363fe7e115?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.slide.active {
    opacity: 1;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    z-index: 1;
}
.hero-content {
    position: relative; z-index: 2; display: flex; flex-direction: column;
    align-items: center; padding: 0 2rem;
}
.hero-kicker {
    font-size: 1.2rem; letter-spacing: 2px; text-transform: uppercase;
    margin-bottom: 1rem; color: var(--accent); display: inline-block;
}
.hero-content h1 { color: var(--light-text); font-size: 3.5rem; transition: letter-spacing 0.4s ease; margin-bottom: 0; }
.hero-content h1:hover { letter-spacing: 3px; }
.hero-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}
.hero-buttons .btn {
    padding: 0.6rem 1.5rem; /* Vertically smaller by 20% */
}

/* Intro Section */
#intro { padding: 1.5rem; }
.intro-section-grid { display: grid; grid-template-columns: 3fr 1fr; gap: 1.5rem; align-items: stretch; min-height: 70vh; }
.intro-image-container { grid-column: 1 / 2; position: relative; display: flex; justify-content: center; align-items: center; }
.intro-image-container > img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.intro-cards-wrapper { position: absolute; top: 1rem; bottom: 1rem; left: 1rem; right: 1rem; z-index: 2; display: flex; gap: 1rem; }
.intro-card {
    background-color: rgba(0,0,0,0.22); backdrop-filter: blur(5px); padding: 3rem 2rem; text-align: center;
    border: 1px solid rgba(255,255,255,0.2); transition: backdrop-filter 0.3s ease, background-color 0.3s ease; flex: 1;
    display: flex; flex-direction: column; justify-content: center;
}
.intro-card:hover { backdrop-filter: blur(10px); background-color: rgba(0,0,0,0.4); }
.intro-card h3 { margin-bottom: 1.5rem; }
.intro-card .btn {
    opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 0.45rem 0.9rem; font-size: 0.8rem;
}
.intro-card:hover .btn { opacity: 1; transform: translateY(0); }
.intro-description-container { grid-column: 2 / 3; display: flex; justify-content: flex-end; align-items: flex-end; }
.intro-description-container p { font-size: 1em; }


/* Services Section */
#services .container { padding: 0; }
.services-header-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: flex-start; margin-bottom: 4rem; }
.services-header-content { padding: 1.5rem; }
.services-header-content h2, .services-header-content p { text-align: left; margin: 0; }
.services-header-content h2 { margin-bottom: 1rem; font-size: 2.375rem; }
.services-header-content p { font-size: 1rem; }
.services-header-image { padding: 1.5rem; height: 100%; }
.services-header-image img { width: 100%; height: 100%; object-fit: cover; }
.services-grid-container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 3rem 2rem; }
.service-item-wrapper { display: flex; flex-direction: column; }
.service-card { background-color: transparent; border: none; overflow: hidden; position: relative; aspect-ratio: 4/3; }
.service-card:hover { transform: none; }
.service-card img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.4s ease; }
.service-card:hover img { filter: blur(4px); }
.service-card-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6);
    opacity: 0; transition: opacity 0.4s ease; display: flex; flex-direction: column; justify-content: center;
    align-items: center; text-align: center; padding: 1.5rem;
}
.service-card:hover .service-card-overlay { opacity: 1; }
.service-card-overlay p { font-size: 0.95em; margin-bottom: 1rem; }
.service-card-title { margin-top: 0.5rem; align-self: flex-start; }

/* Clickable Service & Gallery Cards */
.service-card-link,
.gallery-item-link {
    display: block;
    text-decoration: none;
    color: var(--light-bg);
    cursor: pointer;
    color: inherit;
}
.service-card-link .btn,
.gallery-item-link .btn {
    display: inline-block;
}

/* Why Choose Us Section */
.why-us-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}
.why-us-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.why-us-item { border-bottom: 1px solid var(--secondary); padding-bottom: 1.5rem; margin-bottom: 1.5rem; cursor: pointer; }
.why-us-item h4 { margin-bottom: 0; transition: color 0.3s ease; }
.why-us-item:hover h4 { color: var(--accent); }
.why-us-item p {
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out, margin-top 0.5s ease-out;
    margin-top: 0; margin-bottom: 0; color: var(--light-gray);
}
.why-us-item:hover p { max-height: 200px; opacity: 1; margin-top: 1rem; }

/* Comparison Slider */
.comparison-slider { position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; border-radius: 0; }
.comparison-slider img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.comparison-slider .image-after { clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%); }
.comparison-slider .slider-handle {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 4px; height: 100%;
    background-color: white; cursor: ew-resize; display: flex; align-items: center; justify-content: center;
}
.comparison-slider .handle-icon {
    width: 40px; height: 40px; background-color: white; border-radius: 50%; color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* Gallery Section */
.projects-header-split {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center;
    margin-bottom: 4rem; min-height: 350px; padding: 2rem 0;
}
.projects-header-left h2, .projects-header-left p { text-align: left; margin: 0; }
.projects-header-left h2 { margin-bottom: 1rem; }
.projects-header-right { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.projects-header-right img { width: 50%; max-width: 150px; aspect-ratio: 1/1; object-fit: cover; margin-bottom: 1.5rem; }
.social-icons { display: flex; gap: 1.5rem; }
.social-icons a { font-size: 1.5rem; color: var(--light-gray); transition: color 0.3s ease; }
.social-icons a:hover { color: var(--light-text); }
.gallery-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.gallery-item { position: relative; overflow: hidden; border-radius: 0; cursor: pointer; aspect-ratio: 1 / 1; }
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; border-radius: 0;
    transform: scale(1.2); /* 20% larger */
}
.gallery-item:hover img { transform: scale(1.3); } /* Maintain hover effect */
.gallery-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(96, 112, 64, 0.9), rgba(96, 112, 64, 0.2));
    color: var(--light-text); display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 1.5rem; opacity: 0; transition: opacity 0.4s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h4 {
    color: var(--light-text); margin-bottom: 1rem; transform: translateY(20px); transition: transform 0.4s ease;
}
.gallery-item:hover .gallery-overlay h4 { transform: translateY(0); }
.gallery-overlay .btn {
    opacity: 0; transform: translateY(20px); transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}
.gallery-item:hover .gallery-overlay .btn { opacity: 1; transform: translateY(0); }

/* Testimonials Section */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; margin-top: 3rem; }
.testimonial-card { background-color: transparent; padding: 2rem; border-radius: 0; border: 1px solid var(--secondary); }
.testimonial-card p:first-of-type { font-style: italic; margin-bottom: 1.5rem; }
.testimonial-card p:last-of-type { font-weight: 600; color: var(--light-text); margin-bottom: 0; }
.testimonial-card .fa-quote-left { font-size: 2rem; color: var(--light-gray); margin-bottom: 1rem; }

/* About Section */
.about-container-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: min-content; gap: 2.5rem; }
.about-text-1 { grid-column: 1 / 2; }
.about-text-2 { grid-column: 2 / 3; }
.about-image-1 { grid-column: 1 / 3; }
.about-text-3 { 
    grid-column: 3 / 4; 
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column; 
}
.about-text-3 p:last-of-type { margin-bottom: 1.5rem; } /* Add space between text and button */
.about-col-4 { 
    grid-column: 4 / 5; 
    grid-row: 1 / 3; 
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem; 
}
.about-text-3 .btn,
.about-col-4 .btn {
    margin-top: auto; /* Pushes the button to the bottom of the flex container */
}


/* Contact Section */
.contact-container {
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; background-color: transparent;
    padding: 4rem; border-radius: 0; border: 1px solid var(--secondary);
}
.contact-info h3 { margin-bottom: 2rem; }
.contact-info-item { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.contact-info-item i { font-size: 1.5rem; color: var(--accent); width: 30px; }
.contact-info-item p { margin: 0; }
.map-container { width: 100%; height: 300px; margin-top: 2rem; }
.map-container iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(0.9) contrast(0.9); }
#contact-form .form-group { margin-bottom: 1.5rem; }
#contact-form label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
#contact-form input, #contact-form select, #contact-form textarea {
    width: 100%; padding: 0.75rem; border: 1px solid var(--secondary); border-radius: 0;
    font-family: 'Red Hat Display', sans-serif; font-size: 1rem; background-color: rgba(0,0,0,0.2); color: var(--light-text);
}
#contact-form input:focus, #contact-form select:focus, #contact-form textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(177, 183, 163, 0.3);
}
#contact-form textarea { min-height: 150px; resize: vertical; }
#contact-form button { width: 100%; }

/* Footer */
.footer { background-color: var(--primary); color: var(--light-text); padding: 4rem 0 2rem 0; text-align: center; }
.footer-callout { padding: 4rem 2rem; text-align: center; margin-bottom: 2rem; }
.footer-callout h2 { font-size: 3rem; transition: letter-spacing 0.4s ease, color 0.4s ease; }
.footer-callout a:hover h2 { letter-spacing: 2px; color: var(--accent); }
.footer-container {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem; text-align: left; margin-bottom: 4rem; padding-top: 4rem;
}
.footer-logo img { max-height: 128px; margin-bottom: 1rem; }
.footer-col h4 { color: var(--light-text); margin-bottom: 1rem; }
.footer-col p { font-size: 1em; }
.footer-col a { display: block; color: var(--light-gray); margin-bottom: 0.5rem; }
.footer-col a:hover { color: var(--light-text); }
.copyright { border-top: 1px solid var(--secondary); padding-top: 2rem; color: var(--light-gray); }
.copyright p { font-size: 0.8rem; }
.footer-powered-by { display: flex; justify-content: center; align-items: center; gap: 16px; margin-bottom: 10px; }
.footer-powered-by-group { display: inline-flex; align-items: center; gap: 10px; }
.footer-powered-by a { color: inherit; text-decoration: none; }
.footer-powered-by p { margin: 0; padding: 0; font-size: 0.8rem; }
.footer-powered-by img { height: 1rem; object-fit: contain; filter: brightness(0) invert(1); }

/* Back to Top Button */
.back-to-top-btn {
    position: fixed; bottom: 20px; right: 20px;
    width: 50px; height: 50px; background-color: var(--accent);
    color: var(--dark-text); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; z-index: 100;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
}
.back-to-top-btn.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* Back to Services / Projects Button */
.back-to-projects-btn,
.back-to-services-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: rgba(96, 112, 64, 0.5); /* var(--primary) with 50% opacity */
    color: var(--light-text);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 100;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.back-to-projects-btn:hover,
.back-to-services-btn:hover {
    background-color: rgba(96, 112, 64, 0.8); /* Darker on hover */
    transform: translateY(-2px);
}


/* --- Magazine / Service Page Specific Styles --- */
.magazine-section-header {
    text-align: center;
    margin: 6rem 0 4rem 0;
}
.magazine-section-header:first-of-type {
    margin-top: 0;
}
.magazine-section-header h2 {
    color: var(--light-text);
}
.magazine-section-header p {
    color: var(--light-gray);
    max-width: 600px;
    margin: 1rem auto 0 auto;
}

/* START: NEW 3-COLUMN LAYOUT STYLES */
.three-column-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    align-items: stretch; /* Stretches items to be equal height */
}

.three-column-grid.second-row {
    margin-top: 2.5rem; /* Replaces 1rem padding with a more consistent gap */
}

.grid-column {
    display: flex;
    flex-direction: column;
}

.grid-column img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-column.text-cell {
    padding: 0 1rem;
}

.grid-column .btn {
    margin-top: auto; /* Pushes button to the bottom */
}

.grid-column h3 {
    color: var(--accent);
}
/* END: NEW 3-COLUMN LAYOUT STYLES */


.magazine-grid,
.magazine-grid-2col,
.magazine-grid-3col {
    display: grid;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 6rem;
}

/* This is the default 4-column layout for service pages like outdoor-kitchens.html */
.magazine-grid {
    grid-template-columns: repeat(4, 1fr);
}

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

.magazine-grid-3col {
    grid-template-columns: repeat(3, 1fr);
}

.magazine-grid:last-of-type,
.magazine-grid-2col:last-of-type,
.magazine-grid-3col:last-of-type {
    margin-bottom: 0;
}

.grid-item {
    min-width: 0; /* Prevents grid blowout */
}

.grid-item.text-cell {
    padding: 0 1rem; /* Padding from column edges */
}
/* This selector gives padding to text cells that are inside grid items, like the last column */
.grid-item .text-cell {
    padding: 1rem;
}

.grid-item img {
    width: 100%;
    height: 100%; /* Make image fill the grid item space */
    display: block;
    object-fit: cover;
}

.image-padded-wrapper {
    padding: 1rem;
}
.image-padded-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-item .btn {
    margin-top: 1.5rem;
    display: block;
    width: 100%;
}

.why-design-image {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
}

/* This is the default h3 style for all service pages */
.grid-item.text-cell h3 {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.grid-item.text-cell p a,
.grid-item .text-cell p a {
    text-decoration: underline;
    transition: color 0.3s ease;
}

.grid-item.text-cell p a:hover,
.grid-item .text-cell p a:hover {
    color: var(--accent);
}

/* Adds space between a padded image and the content that follows it within the same grid item */
.grid-item .image-padded-wrapper + .text-cell {
    margin-top: 1rem;
}

/* START: NEW RULE FOR LAWN PAGE */
.grid-item.text-cell.with-action-button {
    display: flex;
    flex-direction: column;
}

.grid-item.text-cell.with-action-button .btn {
    margin-top: auto;
}
/* END: NEW RULE FOR LAWN PAGE */

/* START: LANDSCAPE DESIGN PAGE SPECIFIC STYLES */
.why-design-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}
/* END: LANDSCAPE DESIGN PAGE SPECIFIC STYLES */

/* --- Page-specific Overrides --- */

/* Outdoor Kitchens Page Specific Styles */
#outdoor-kitchens-content .three-column-grid:first-of-type {
    grid-template-columns: 1fr 1fr;
}
#outdoor-kitchens-content .grid-column h3 {
    color: var(--light-text);
}

/* Retaining Walls Page Specific Styles */
#retaining-walls-content .magazine-grid {
    grid-template-columns: repeat(3, 1fr);
}
#retaining-walls-content .grid-item:first-child h3 {
    color: var(--light-text);
}
#retaining-walls-content .grid-item:not(:first-child) h3 {
    color: var(--accent);
}

/* Lawn Installation Page Specific Styles */
.lawn-installation-grid {
    align-items: stretch;
}
/* **MODIFICATION START**: The nth-child selector was changed from (1) to (2) to target the text block in its new HTML position. */
.lawn-installation-grid .grid-item:nth-child(2),
.lawn-installation-grid .grid-item:nth-child(4) {
    grid-row: 1 / 3;
}
/* **MODIFICATION END** */
.lawn-installation-grid .grid-item:nth-child(5) {
    grid-column: 2 / 4;
    grid-row: 2 / 3;
}

/* --- START: NEW PROJECT GALLERY STYLES (Applies to project-5.html) --- */
.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(250px, auto);
    gap: 1rem;
}

.project-gallery-item {
    overflow: hidden;
}

.project-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-gallery-item:hover img {
    transform: scale(1.05);
}

.project-gallery-text {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--secondary);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

.project-gallery-text p {
    color: var(--light-gray);
    font-size: 1.06rem;
    margin-bottom: 0;
}

.item-span-2-row { grid-row: span 2; }
.item-span-2-col { grid-column: span 2; }
/* --- END: NEW PROJECT GALLERY STYLES --- */

/* --- START: NEW PROJECT 6 DETAIL GALLERY STYLES (project-6.html) --- */
.project-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto); /* Flexible row height */
    gap: 1rem;
}

/* New, more balanced grid layout to make images more square */
.pg6-item-1 { grid-column: 1 / 3; grid-row: 1 / 3; } /* 2x2 */
.pg6-item-2 { grid-column: 3 / 4; grid-row: 2 / 3; } /* 1x1 */
.pg6-item-3 { grid-column: 3 / 5; grid-row: 1 / 2; } /* 2x1 */
.pg6-item-4 { grid-column: 3 / 5; grid-row: 3 / 5; } /* 2x2 */
.pg6-item-5 { grid-column: 1 / 3; grid-row: 3 / 4; } /* 2x1 text block */
.pg6-item-6 { grid-column: 2 / 3; grid-row: 4 / 5; } /* 1x1 */
.pg6-item-7 { grid-column: 1 / 3; grid-row: 5 / 6; } /* 2x1 */
.pg6-item-8 { grid-column: 1 / 2; grid-row: 4 / 5; } /* 1x1 */
.pg6-item-9 { grid-column: 4 / 5; grid-row: 2 / 3; } /* 1x1 */
.pg6-item-10 { grid-column: 3 / 5; grid-row: 5 / 6; } /* 2x1 */
/* --- END: NEW PROJECT 6 DETAIL GALLERY STYLES --- */

/* --- START: NEW PROJECT 7 DETAIL GALLERY STYLES (project-7.html) --- */
.project-7-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 1rem;
}
.p7-item {
    overflow: hidden;
}
.p7-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.p7-item:hover img {
    transform: scale(1.05);
}
/* Specific item placements for the mosaic layout */
.p7-item-1 { grid-column: 1 / 2; grid-row: 1 / 3; } /* Tall */
.p7-item-2 { grid-column: 2 / 3; grid-row: 1 / 2; }
.p7-item-3 { grid-column: 3 / 5; grid-row: 1 / 2; } /* Wide */
.p7-text-block { grid-column: 2 / 4; grid-row: 2 / 4; } /* Central text */
.p7-item-4 { grid-column: 4 / 5; grid-row: 2 / 4; } /* Tall */
.p7-item-5 { grid-column: 1 / 2; grid-row: 3 / 5; } /* Tall */
.p7-item-6 { grid-column: 2 / 3; grid-row: 4 / 5; }
.p7-item-7 { grid-column: 3 / 4; grid-row: 4 / 5; }
.p7-item-8 { grid-column: 4 / 5; grid-row: 4 / 5; }
/* --- END: NEW PROJECT 7 DETAIL GALLERY STYLES --- */

/* --- START: PROJECT 8 DETAIL GALLERY STYLES (project-8.html) --- */
.project-8-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 1rem;
    align-items: stretch; /* Ensures items fill row height */
}
.p8-item {
    overflow: hidden;
}
.p8-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.p8-item:hover img {
    transform: scale(1.05);
}
.p8-text-block {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--secondary);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.p8-text-block p {
    color: var(--light-gray);
    font-size: 1.06rem;
    margin-bottom: 1rem;
}
.p8-text-block p:last-child {
    margin-bottom: 0;
}
/* Mosaic layout for Project 8 */
.p8-item-1 { grid-column: 1 / 3; grid-row: 1 / 2; }      /* Wide */
.p8-item-2 { grid-column: 3 / 5; grid-row: 1 / 3; }      /* Tall */
.p8-text-block { grid-column: 1 / 3; grid-row: 2 / 3; }  /* Text Block */
.p8-item-3 { grid-column: 1 / 2; grid-row: 3 / 4; }      /* Small */
.p8-item-4 { grid-column: 2 / 5; grid-row: 3 / 4; }      /* Wide */
.p8-text-block-2 { grid-column: 1 / 5; grid-row: 4 / 5; } /* Full width text */
/* --- END: PROJECT 8 DETAIL GALLERY STYLES --- */

/* --- START: PROJECT 9 DETAIL GALLERY STYLES (project-9.html) --- */
.project-9-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 1rem;
}
.p9-item {
    overflow: hidden;
}
.p9-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.p9-item:hover img {
    transform: scale(1.05);
}
.p9-text-block {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--secondary);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}
.p9-text-block p {
    color: var(--light-gray);
    font-size: 1.06rem;
    margin-bottom: 1rem;
}
.p9-text-block p:last-child {
    margin-bottom: 0;
}
/* Mosaic layout for Project 9 */
.p9-item-1 { grid-column: 1 / 2; grid-row: 1 / 3; }
.p9-item-2 { grid-column: 2 / 4; grid-row: 1 / 2; }
.p9-item-3 { grid-column: 4 / 5; grid-row: 1 / 2; }
.p9-item-text { grid-column: 2 / 4; grid-row: 2 / 4; }
.p9-item-4 { grid-column: 4 / 5; grid-row: 2 / 3; }
.p9-item-5 { grid-column: 1 / 2; grid-row: 3 / 5; }
.p9-item-6 { grid-column: 4 / 5; grid-row: 3 / 5; }
.p9-item-7 { grid-column: 2 / 3; grid-row: 4 / 5; }
.p9-item-8 { grid-column: 3 / 4; grid-row: 4 / 5; }
.p9-item-9 { grid-column: 1 / 5; grid-row: 5 / 6; }
/* --- END: PROJECT 9 DETAIL GALLERY STYLES --- */

/* --- START: PROJECT 10 DETAIL GALLERY STYLES (project-10.html) --- */
.project-10-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 1rem;
}
.p10-item {
    overflow: hidden;
}
.p10-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.p10-item:hover img {
    transform: scale(1.05);
}
.p10-text-block {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--secondary);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}
.p10-text-block p {
    color: var(--light-gray);
    font-size: 1.06rem;
    margin-bottom: 0;
}
/* Mosaic layout for Project 10 - Updated for square images at the bottom */
.p10-item-1 { grid-column: 1 / 3; grid-row: 1 / 3; }      /* 2x2 Main Image */
.p10-item-2 { grid-column: 3 / 5; grid-row: 1 / 2; }      /* 2x1 Wide Image */
.p10-text-block { grid-column: 3 / 5; grid-row: 2 / 3; }  /* 2x1 Text Block */
.p10-item-3 { grid-column: 1 / 2; grid-row: 3 / 4; }      /* 1x1 Square */
.p10-item-4 { grid-column: 2 / 3; grid-row: 3 / 4; }      /* 1x1 Square */
.p10-item-5 { grid-column: 3 / 4; grid-row: 3 / 4; }      /* 1x1 Square */
.p10-item-6 { grid-column: 4 / 5; grid-row: 3 / 4; }      /* 1x1 Square */
/* --- END: PROJECT 10 DETAIL GALLERY STYLES --- */


/* Responsive Styles */
@media (max-width: 1200px) {
    .about-container-grid { grid-template-columns: 1fr 1fr; }
    .about-text-1, .about-text-2, .about-image-1 { grid-column: 1 / 3; }
    .about-text-3 { grid-column: 1 / 2; grid-row: auto; }
    .about-col-4 { grid-column: 2 / 3; grid-row: auto; }
    .why-us-container { grid-template-columns: 1fr; }
    .why-us-image { display: none; }
    
    .three-column-grid {
        grid-template-columns: 1fr;
    }

    .magazine-grid,
    .magazine-grid-3col {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Retaining walls page responsive override */
    #retaining-walls-content .magazine-grid {
        grid-template-columns: 1fr; /* On tablet, stack the columns for a better flow */
    }

    /* **MODIFICATION START**: Forcing a 1-column layout on tablet and mobile for the lawn installation page. */
    .lawn-installation-grid {
        grid-template-columns: 1fr; /* Force single column layout on tablet and mobile */
    }
    /* Reset the specific desktop placement rules for proper stacking */
    .lawn-installation-grid .grid-item:nth-child(2),
    .lawn-installation-grid .grid-item:nth-child(4),
    .lawn-installation-grid .grid-item:nth-child(5) {
        grid-row: auto;
        grid-column: auto;
    }
    /* **MODIFICATION END** */

    /* Project Gallery responsive tablet */
    .project-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(200px, auto);
    }

    /* Project 6 Gallery responsive tablet */
    .project-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Reset explicit placement for tablet view */
    .project-detail-grid > * {
        grid-column: auto;
        grid-row: auto;
    }

    /* Project 7 Gallery responsive tablet */
    .project-7-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-7-gallery-grid > * {
        grid-column: auto;
        grid-row: auto;
    }
    .p7-text-block {
        grid-column: 1 / 3; /* Make text span full width */
        order: 5; /* Move text block down in the flow */
    }

    /* Project 8 Gallery responsive tablet */
    .project-8-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-8-gallery-grid > * {
        grid-column: auto;
        grid-row: auto;
    }
    
    /* Project 9 Gallery responsive tablet */
    .project-9-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-9-gallery-grid > * {
        grid-column: auto;
        grid-row: auto;
    }
    
    /* Project 10 Gallery responsive tablet */
    .project-10-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-10-gallery-grid > * {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 992px) {
    :root { --scroll-padding: 80px; }
    h1 { font-size: 2.5rem; } h2 { font-size: 2rem; }
    .hero-content h1 { font-size: 3rem; }
    .contact-container { grid-template-columns: 1fr; gap: 3rem; padding: 2rem; }
    
    /* --- MODIFICATION START: Improved intro section on tablet/mobile --- */
    .intro-section-grid { 
        grid-template-columns: 1fr; 
        min-height: auto; /* Allow content to define height */
    }
    .intro-description-container { 
        justify-content: center; 
        align-items: center; /* Center the text content vertically */
        text-align: center; 
        padding: 3rem 1.5rem 1rem; /* Adjust padding for better spacing after stacking */
    }
    /* --- MODIFICATION END --- */

    .services-header-grid, .projects-header-split { grid-template-columns: 1fr; }
    .projects-header-left h2, .projects-header-left p { text-align: center; }
    .about-container-grid { grid-template-columns: 1fr; }
    .about-text-1, .about-text-2, .about-image-1, .about-text-3, .about-col-4 { grid-column: 1 / 2; grid-row: auto; }
    
    .magazine-grid .grid-item {
        grid-column: span 2 !important; /* On tablet, all items span the full 2 columns */
    }
     .magazine-grid-3col .grid-item {
        grid-column: span 2 !important; /* On tablet, all items span the full 2 columns */
    }

    /* Stacks the 'Why Design' paragraphs on tablet/mobile */
    .why-design-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* --- START: CHANGE FOR OUTDOOR KITCHENS PAGE --- */
    /* Fix for Outdoor Kitchens intro section on tablet/mobile */
    #outdoor-kitchens-content .three-column-grid:first-of-type {
        grid-template-columns: 1fr; /* Stack the columns */
        gap: 2rem; /* Reduce gap for stacked view */
    }
    /* --- END: CHANGE FOR OUTDOOR KITCHENS PAGE --- */
}

@media (max-width: 768px) {
    section { padding: 4rem 0; } .container, .container-large { padding: 0 1rem; }
    #intro { padding: 1rem; } .intro-section-grid { gap: 1rem; }
    .hero-content h1 { font-size: 2.5rem; } .hero-kicker { font-size: 1rem; }
    
    /* --- START: IMPROVED HERO BUTTONS ON MOBILE --- */
    .hero-buttons {
        flex-direction: column; /* Stack buttons vertically */
        align-items: center;    /* Center the stacked buttons */
        width: 100%;
    }
    .hero-buttons .btn {
        width: 80%;
        max-width: 300px; /* Prevent buttons from being excessively wide */
    }
    /* --- END: IMPROVED HERO BUTTONS ON MOBILE --- */

    .intro-cards-wrapper { flex-direction: column; position: relative; top: auto; bottom: auto; left: auto; right: auto; padding: 1rem; }
    .services-grid, .testimonials-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .footer-container { text-align: center; }
    .footer-col { display: flex; flex-direction: column; align-items: center; }
    .footer-powered-by { flex-direction: column; margin-bottom: 16px; }
    .sidebar-menu { width: 300px; right: -300px; }

    /* --- MODIFICATION START: Improved contact container on mobile --- */
    .contact-container {
        padding: 1.5rem; /* Use a smaller, uniform padding on all sides */
        gap: 2rem;       /* Reduce the gap between stacked elements */
    }

    /* Add a safeguard for long text that might break the layout inside the contact info section */
    #contact .contact-info p {
        overflow-wrap: break-word;
        word-break: break-word; /* For better browser compatibility */
    }
    /* --- MODIFICATION END --- */

    /* Magazine/Service page responsive mobile */
    .magazine-grid,
    .magazine-grid-2col,
    .magazine-grid-3col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .grid-item.text-cell,
    .grid-item .text-cell {
        padding: 0 0.5rem;
    }
    .magazine-section-header {
        margin: 4rem 0 3rem 0;
    }

    .magazine-grid .grid-item,
    .magazine-grid-3col .grid-item {
        grid-column: span 1 !important; /* On mobile, all items span 1 column */
    }

    .back-to-top-btn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .back-to-projects-btn,
    .back-to-services-btn {
        bottom: 15px;
        left: 15px;
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    /* Project Gallery responsive mobile */
    .project-gallery-grid {
        grid-template-columns: 1fr;
    }
    .project-gallery-item, 
    .project-gallery-text {
        grid-column: auto !important;
        grid-row: auto !important;
    }
    .project-gallery-text {
        padding: 1.5rem;
    }
    
    /* Project 6 Gallery responsive mobile */
    .project-detail-grid {
        grid-template-columns: 1fr;
    }

    /* Project 7 Gallery responsive mobile */
    .project-7-gallery-grid {
        grid-template-columns: 1fr;
    }
    .p7-text-block {
        order: 0; /* Reset order for single column flow */
    }

    /* Project 8 Gallery responsive mobile */
    .project-8-gallery-grid {
        grid-template-columns: 1fr;
    }
    .p8-text-block {
        padding: 1.5rem;
    }
    
    /* Project 9 Gallery responsive mobile */
    .project-9-gallery-grid {
        grid-template-columns: 1fr;
    }
    .p9-text-block {
        padding: 1.5rem;
    }
    
    /* Project 10 Gallery responsive mobile */
    .project-10-gallery-grid {
        grid-template-columns: 1fr;
    }
    .p10-text-block {
        padding: 1.5rem;
    }
}

/* Opening Roofs Page Specific Styles */
#opening-roofs .magazine-grid-3col {
    /* Ensures consistency with decking layout */
    align-items: start;
}

#opening-roofs .grid-item h3 {
    /* Matches specific accent color usage if h3s are added later */
    color: var(--accent); 
}

/* Tablet/Mobile Responsive tweaks for Opening Roofs */
@media (max-width: 992px) {
    #opening-roofs .magazine-grid-3col,
    #opening-roofs .magazine-grid-2col {
        grid-template-columns: 1fr; /* Stacks simpler on smaller tablets */
    }
}

/* --- START: PROJECT 11 DETAIL GALLERY STYLES (project-11.html) --- */
.project-11-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 1rem;
}
.p11-item {
    overflow: hidden;
}
.p11-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.p11-item:hover img {
    transform: scale(1.05);
}
.p11-text-block {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--secondary);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}
.p11-text-block p {
    color: var(--light-gray);
    font-size: 1.06rem;
    margin-bottom: 1rem;
}
.p11-text-block p:last-child {
    margin-bottom: 0;
}

/* Mosaic layout for Project 11 (11 Images + 1 Text Block) */
/* Row 1 */
.p11-item-1 { grid-column: 1 / 3; grid-row: 1 / 3; } /* 2x2 Feature Image */
.p11-item-2 { grid-column: 3 / 4; grid-row: 1 / 2; } /* 1x1 */
.p11-item-3 { grid-column: 4 / 5; grid-row: 1 / 2; } /* 1x1 */

/* Row 2 */
.p11-item-text { grid-column: 3 / 5; grid-row: 2 / 3; } /* 2x1 Text Block */

/* Row 3 */
.p11-item-4 { grid-column: 1 / 2; grid-row: 3 / 4; } /* 1x1 */
.p11-item-5 { grid-column: 2 / 3; grid-row: 3 / 4; } /* 1x1 */
.p11-item-6 { grid-column: 3 / 5; grid-row: 3 / 4; } /* 2x1 Wide */

/* Row 4 */
.p11-item-7 { grid-column: 1 / 3; grid-row: 4 / 5; } /* 2x1 Wide */
.p11-item-8 { grid-column: 3 / 5; grid-row: 4 / 6; } /* 2x2 Feature Image */

/* Row 5 */
.p11-item-9 { grid-column: 1 / 2; grid-row: 5 / 6; } /* 1x1 */
.p11-item-10 { grid-column: 2 / 3; grid-row: 5 / 6; } /* 1x1 */

/* Row 6 */
.p11-item-11 { grid-column: 1 / 5; grid-row: 6 / 7; } /* 4x1 Full Width Panorama */

/* Responsive: Tablet */
@media (max-width: 1200px) {
    .project-11-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-11-gallery-grid > * {
        grid-column: auto;
        grid-row: auto;
    }
    .p11-item-text {
        grid-column: 1 / 3;
        order: 2; /* Ensure text isn't lost at the top */
    }
    .p11-item-11 {
        grid-column: 1 / 3; /* Keep panorama full width on tablet */
    }
}

/* Responsive: Mobile */
@media (max-width: 768px) {
    .project-11-gallery-grid {
        grid-template-columns: 1fr;
    }
    .p11-item-text {
        padding: 1.5rem;
        grid-column: auto;
        order: 0;
    }
    .p11-item-11 {
        grid-column: auto;
    }
}
/* --- END: PROJECT 11 DETAIL GALLERY STYLES --- */