/* Basic Resets & Global Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-dark: #333333; /* Deep charcoal */
    --accent-color: #e67e22; /* Terracotta orange */
    --light-background: #ecf0f1; /* Soft light grey */
    --dark-text: #5A5A5A; /* Dark grey */
    --white: #fff;
    --body-text: #7f8c8d; /* Muted grey */
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--body-text);
    background-color: var(--white);
}

.visually-hidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--primary-dark);
}

.subtle-background {
    background-color: var(--light-background);
    background-image: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxAPDw8QEA8QDw8PDw8PDw8PDw8PDw8PFREWFhURExMYHSggGBolGxMVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OFxAQFysfFx0rLS0tLSstKystLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tK//AABEIAKgBLAMBIgACEQEDEQH/xAAaAAEBAQEBAQEAAAAAAAAAAAAAAQIDBAUG/8QAMBABAQACAAIHBgYDAQAAAAAAAAECEQMSITFBUZGxYXGBocHR4fASIlJyMhMEQoIU/8QAGQEBAQEBAQEAAAAAAAAAAAAAAAECAwQF/8QAGhEBAQEBAQEAAAAAAAAAAAAAAAERIQISA//d");
    background-size: cover;
}

/* Header */
header {
    background: var(--white);
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 1px;
    padding-right: 1px;
}

header .logo-text {
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.logo-svg svg {
    display: block; /* Removes any extra space below the SVG */
    height: 50px; /* Adjust height as needed */
    width: auto; /* Maintain aspect ratio */
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-dark);
    text-decoration: none;
}

header nav ul {
    display: flex;
    align-items: center;
    list-style: none;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: var(--primary-dark);
    font-size: 0.9rem;
}

.button-estimate {
    background: var(--accent-color);
    color: var(--white);
    padding: 0.7rem 1.2rem;
    border-radius: 5px;
    font-weight: bold;
}

.button {
    background: var(--accent-color);
    color: var(--white);
    padding: 0.8rem 1.6rem;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 24px;
    height: 3px;
    background-color: var(--primary-dark);
    border-radius: 2px;
}

@media (max-width: 768px) {
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }

    header nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        display: none;
    }

    header nav.active {
        display: block;
    }

    header nav ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }

    header nav ul li {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .button-estimate {
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
        margin-right: 0.3rem;
    }

    body {
        padding-top: 80px;
    }

    header .container {
        padding-left: 0.75rem;
        padding-right: 0.25rem;
    }

    .menu-toggle {
        margin-right: 0.25rem;
    }
}

/* Hero Section */
.hero {
    background-color: var(--primary-dark);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='contourPattern' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Cpath d='M0 25 C 25 5, 75 45, 100 25' stroke='%237f8c8d' stroke-width='0.5' fill='none' opacity='0.1'/%3E%3Cpath d='M0 50 C 25 30, 75 70, 100 50' stroke='%237f8c8d' stroke-width='0.5' fill='none' opacity='0.1'/%3E%3Cpath d='M0 75 C 25 55, 75 95, 100 75' stroke='%237f8c8d' stroke-width='0.5' fill='none' opacity='0.1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23contourPattern)'/%3E%3C/svg%3E");
    background-position: center;
    color: var(--white);
    text-align: left;
    padding: 100px 0;
}

.hero .container {
    background-color: rgba(44, 62, 80, 0.8);
    padding: 2rem;
    max-width: 500px;
    border-radius: 5px;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--white);
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    margin: 1rem 0;
}

.hero .button {
    background: var(--white);
    color: var(--primary-dark);
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
}

/* Services Overview */
.services-overview {
    padding: 4rem 0;
    background-color: var(--light-background);
    text-align: center;
}

.services-overview .container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
}

.services-overview .service {
    max-width: 300px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.services-overview .service img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 1rem;
}

.service-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem auto;
    display: block;
    color: var(--primary-dark);
}

.service-photo {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0 auto 1rem auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.button-explore {
    background: var(--primary-dark);
    color: var(--white);
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-weight: bold;
}

/* Difference Section */
.difference {
    padding: 4rem 0;
    background-color: var(--primary-dark);
    color: var(--white);
}

.difference .container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.difference-image img {
    border-radius: 50%;
}

.difference-text h2, .difference-text h3 {
    color: var(--white);
}

.difference-text h3 {
    font-style: italic;
    margin: 1rem 0;
}

@media (max-width: 900px) {
    .services-overview .container {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .difference .container {
        flex-direction: column;
        text-align: center;
    }
}

/* Testimonials */
.testimonials {
    padding: 4rem 0;
    background-color: var(--light-background);
    text-align: center;
}

.testimonial-carousel-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 0 3.5rem;
}

.testimonial-carousel {
    display: block;
    position: relative;
}

.testimonial {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    max-width: 700px;
    width: 100%;
    font-style: italic;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    margin: 0 auto;
    box-sizing: border-box; /* Include padding and border in the element's total width */
    text-align: center;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.testimonial.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.testimonial.is-entering-left {
    opacity: 0;
    transform: translateX(-40px);
}

.testimonial.is-entering-right {
    opacity: 0;
    transform: translateX(40px);
}

.testimonial.is-exiting-left {
    opacity: 0;
    transform: translateX(-40px);
}

.testimonial.is-exiting-right {
    opacity: 0;
    transform: translateX(40px);
}

.testimonial cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: bold;
    color: var(--primary-dark);
}

.testimonial img {
    border-radius: 50%;
    margin-bottom: 1rem;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.testimonial-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
    background: var(--white);
    color: var(--primary-dark);
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.testimonial-nav.prev {
    left: 0;
}

.testimonial-nav.next {
    right: 0;
}

.testimonial-nav:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .testimonial-carousel-container {
        padding: 0 2.75rem;
    }
    .testimonial-nav {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
}


/* Portfolio */
.portfolio {
    padding: 4rem 0;
    text-align: center;
}

.portfolio-hint {
    font-size: 0.95rem;
    color: var(--body-text);
    margin-bottom: 1rem;
    flex-basis: 100%;
    text-align: center;
}

.portfolio .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.portfolio .portfolio-item {
    border: 1px solid #ddd;
    padding: 1rem;
    max-width: 300px;
    text-align: left;
    position: relative; /* Add this for positioning the before/after images */
}

.portfolio .portfolio-item .before-after-container {
    position: relative;
    overflow: hidden;
}

.portfolio .portfolio-item .before-after-container .after-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio .portfolio-item:hover .before-after-container .after-image {
    opacity: 1;
}

@media (max-width: 768px) {
    .portfolio .portfolio-item .before-after-container .after-image {
        position: static;
        opacity: 1;
        transition: none;
    }
}

.portfolio .portfolio-item img {
    max-width: 100%;
    height: auto; /* Allow natural aspect ratio */
    display: block; /* Remove extra space below image */
    margin-bottom: 1rem;
}

.button-portfolio {
    margin-top: 2rem;
    background: var(--accent-color);
    color: var(--white);
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 3rem 0;
}

footer .container {
    display: flex;
    justify-content: center; /* Center content now that other columns are removed */
}

footer h3, footer h4 {
    color: var(--white);
}

footer a {
    color: var(--white);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-contact {
    text-align: center;
}

footer .footer-social a {
    display: inline-block;
    margin-right: 1rem;
    font-size: 1.5rem;
    color: var(--accent-color);
}

footer .copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--body-text);
}


/* CTA on Homepage (hero section) */
.hero .container {
    padding: 2rem;
    max-width: 500px;
    border-radius: 5px;
    margin-left: 0; /* Align left */
}
@media (max-width: 768px) {
    .hero .container {
        margin: 0 auto; /* Center on mobile */
    }
}

/* Services Page Specific Styles */
.page-hero {
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(44, 62, 80, 0.7); /* Dark overlay */
    z-index: 1;
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.services-detail-intro {
    padding: 3rem 0;
    text-align: center;
    background-color: var(--light-background);
}

.services-detail-intro h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.service-areas {
    padding: 3rem 0;
    text-align: center;
}

.service-areas p {
    margin-bottom: 1.5rem;
}

.service-area-list {
    list-style: none;
    padding: 0;
    margin: 0 auto 1.5rem auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem 1.5rem;
    max-width: 900px;
}

.service-area-list li {
    background-color: var(--light-background);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    color: var(--primary-dark);
}

.service-areas-note {
    font-size: 0.95rem;
    color: var(--body-text);
}

.service-categories {
    padding: 4rem 0;
}

.faq-section {
    padding: 4rem 0;
    background-color: var(--light-background);
    text-align: center;
}

.faq-section p {
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.faq-item {
    background-color: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.faq-item summary {
    font-weight: 700;
    color: var(--primary-dark);
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    float: right;
    color: var(--accent-color);
    font-weight: 700;
}

.faq-item[open] summary::after {
    content: "–";
}

.faq-item p {
    margin-top: 0.75rem;
    color: var(--body-text);
}

.service-categories .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.service-category {
    background-color: var(--white);
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 30%; /* Approx three columns */
    min-width: 280px;
    padding-bottom: 1.5rem;
    text-align: center;
    overflow: hidden;
}

.service-category img {
    width: 100%;
    height: auto; /* Allow natural aspect ratio */
    display: block; /* Remove extra space below image */
    margin-bottom: 1rem;
}

.service-category h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    padding: 0 1rem;
}

.service-category ul {
    list-style: disc inside;
    text-align: left;
    margin: 0 2rem;
    color: var(--body-text);
}

.service-category ul li {
    margin-bottom: 0.5rem;
}

.our-process {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.our-process h2 {
    color: var(--white);
    margin-bottom: 2rem;
}

.process-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.process-steps .step {
    background-color: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 1.5rem;
    width: 22%; /* Approx four columns */
    min-width: 200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.process-steps .step h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.process-steps .step p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

.cta-services {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--light-background);
}

.cta-services h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-services p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-services .button {
    background: var(--accent-color);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1rem;
}

.cta-note {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--body-text);
}

.cta-note a {
    color: inherit;
}

/* Responsive adjustments for service page */
@media (max-width: 1024px) {
    .service-category {
        width: 45%; /* Two columns */
    }
    .process-steps .step {
        width: 45%; /* Two columns */
    }
}

@media (max-width: 768px) {
    .service-categories .container,
    .our-process .process-steps {
        flex-direction: column;
        align-items: center;
    }
    .service-category, .process-steps .step {
        width: 90%; /* Single column */
    }
    .page-hero h1 {
        font-size: 2.5rem;
    }
    .page-hero p {
        font-size: 1rem;
    }
}

/* Portfolio Page Specific Styles */
.portfolio-intro {
    padding: 3rem 0;
    text-align: center;
    background-color: var(--light-background);
}

.portfolio-intro h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.portfolio-gallery {
    padding: 4rem 0;
}

.portfolio-gallery .container {
    text-align: center;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-btn {
    background-color: var(--light-background);
    color: var(--dark-text);
    padding: 0.7rem 1.5rem;
    margin: 0 0.5rem 0.5rem 0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.filter-btn:hover {
    background-color: #d35400; /* Darker terracotta */
    color: var(--white);
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    justify-content: center;
    align-items: start;
}

.project-item {
    background-color: var(--white);
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: left;
    max-width: 360px;
    justify-self: center;
}

.project-item img {
    width: 100%;
    height: auto; /* Allow natural aspect ratio */
    display: block; /* Remove extra space below image */
    margin-bottom: 1rem;
}

.project-item h4 {
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin: 0 1rem 0.5rem 1rem;
}

.project-item p {
    font-size: 0.9rem;
    color: var(--body-text);
    margin: 0 1rem 1rem 1rem;
}

.project-item[data-category="fencing"] img {
    max-width: 80%; /* Adjust as needed */
    margin-left: auto;
    margin-right: auto;
}

/* Responsive adjustments for portfolio page */
@media (max-width: 768px) {
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    .filter-btn {
        width: 80%;
        margin-bottom: 0.5rem;
    }
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* About Page Specific Styles */
.about-story {
    padding: 4rem 0;
}

.story-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.story-image {
    flex-basis: 350px;
    flex-shrink: 0;
}

.story-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.story-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.story-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.why-choose-us {
    padding: 4rem 0;
    background-color: var(--light-background);
    text-align: center;
}

.why-choose-us h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.reason {
    text-align: center;
}

.reason-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.reason h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* Responsive adjustments for about page */
@media (max-width: 768px) {
    .story-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Contact Page Specific Styles */
.contact-section {
    padding: 4rem 0;
    background-color: var(--light-background);
}

.contact-section .container {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

.contact-info, .contact-form-container {
    flex: 1;
    min-width: 300px;
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.contact-info h2, .contact-form-container h2 {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.contact-info p {
    margin-bottom: 1rem;
}

.contact-info a {
    display: inline-block;
    margin-bottom: 0.5rem;
}

.contact-info .social-links a {
    font-size: 1.8rem;
    margin-right: 1rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--primary-dark);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form .button:hover {
    background-color: var(--primary-dark);
}

.map-section {
    padding: 4rem 0;
    text-align: center;
}

.map-section h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.map-placeholder iframe {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Responsive adjustments for contact page */
@media (max-width: 768px) {
    .contact-section .container {
        flex-direction: column;
        align-items: center;
    }
    .contact-info, .contact-form-container {
        min-width: unset;
        width: 90%;
    }
}

/* Project Case Study Specific Styles */
.project-case-study {
    padding: 4rem 0;
    background-color: var(--light-background);
}

.project-case-study h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.project-case-study .case-study-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
    line-height: 1.6;
}

.case-study-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.case-study-steps .step {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
}

.case-study-steps .step h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.case-study-steps .step img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.case-study-steps .step p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--body-text);
}

.case-study-outcome {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Responsive adjustments for case study section */
@media (max-width: 768px) {
    .case-study-steps {
        flex-direction: column;
        align-items: center;
    }
    .case-study-steps .step {
        width: 90%;
    }
}

/* Blog Listing Specific Styles */
.blog-listing {
    padding: 4rem 0;
}

.post-preview {
    display: flex;
    margin-bottom: 3rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.post-preview:last-child {
    margin-bottom: 0;
}

.post-image {
    flex: 1;
    min-width: 300px;
    background-size: cover;
    background-position: center;
}

.post-content {
    flex: 2;
    padding: 2rem;
}

.post-title a {
    color: var(--primary-dark);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--accent-color);
}

.post-meta {
    font-size: 0.85rem;
    color: #95a5a6;
    margin-bottom: 1rem;
}

.post-excerpt {
    margin-bottom: 1.5rem;
}

/* Responsive adjustments for blog listing */
@media (max-width: 768px) {
    .post-preview {
        flex-direction: column;
    }
    .post-image {
        height: 250px;
    }
}

/* Single Post Specific Styles */
.post-container {
    display: flex;
    gap: 3rem;
    padding: 4rem 0;
    align-items: flex-start;
}

.post-content-full {
    flex: 3;
}

.post-content-full h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content-full p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.post-content-full ul {
    margin-bottom: 1.5rem;
    list-style: disc;
    padding-left: 20px;
}

.in-post-image {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.post-sidebar {
    flex: 1;
    min-width: 250px;
}

.sidebar-widget {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.sidebar-widget h4 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
}

.sidebar-widget ul li {
    margin-bottom: 0.5rem;
}

.sidebar-widget ul li a {
    text-decoration: none;
    color: var(--accent-color);
}

.sidebar-widget ul li a:hover {
    text-decoration: underline;
}

/* Responsive adjustments for single post */
@media (max-width: 992px) {
    .post-container {
        flex-direction: column-reverse;
    }
    .post-sidebar {
        width: 100%;
    }
}

/* Project Calculator Styles */
.project-calculator-section {
    padding: 4rem 0;
    background-color: var(--light-background);
}

.project-calculator-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.project-calculator-section > .container > p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1rem;
    color: var(--body-text);
}

.calculator-container {
    display: flex;
    gap: 3rem;
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.calculator-form {
    flex: 2;
}

.calculator-form .form-group {
    margin-bottom: 1.5rem;
}

.calculator-form label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: bold;
    color: var(--primary-dark);
}

.calculator-form select,
.calculator-form input[type="number"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
}

.radio-group label {
    display: inline-flex;
    align-items: center;
    margin-right: 1.5rem;
    font-weight: normal;
    color: var(--dark-text);
}

.radio-group input[type="radio"] {
    margin-right: 0.5rem;
}

.calculator-form .button {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    margin-top: 1rem;
}

.is-hidden {
    display: none;
}

.calculator-result {
    flex: 1;
    background-color: var(--light-background);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calculator-result h3 {
    margin-bottom: 1rem;
}

#result-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

#result-display.result-placeholder {
    font-size: 1.2rem;
    font-weight: normal;
    color: var(--body-text);
    padding: 2rem 0;
}

#result-display .button {
    font-size: 0.9rem;
    padding: 0.7rem 1.2rem;
}

.disclaimer {
    font-size: 0.8rem;
    color: #95a5a6;
    margin-top: auto;
}

/* Responsive adjustments for calculator */
@media (max-width: 992px) {
    .calculator-container {
        flex-direction: column;
    }
}
.project-item[data-category="fencing"] img {
    max-width: 80%; /* Adjust as needed */
    margin-left: auto;
    margin-right: auto;
}
