/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Lato:wght@400;700&display=swap');

/* --- CSS Variables --- */
:root {
    --primary-color: #F4B41A;
    --secondary-color: #C59D3F;
    --dark-green: #4A7336;
    --dark-color: #333333;
    --light-color: #ffffff;
    --light-grey-bg: #f7f9f6;
    --dark-bg: #222222;
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Lato', sans-serif;
}

/* --- Global Styles --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--body-font); line-height: 1.6; color: var(--dark-color); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--heading-font); }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 40px; color: var(--dark-color); }
.content-section { padding: 80px 0; }
.bg-light { background-color: var(--light-grey-bg); }
.bg-dark { background-color: var(--dark-bg); color: var(--light-color); }
.bg-dark h2, .bg-dark p, .bg-dark h3 { color: var(--light-color); }

/* --- Header --- */
header { background: var(--light-color); box-shadow: 0 2px 5px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; }
header .container { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; }
.logo { height: 60px; }
nav ul { list-style: none; display: flex; }
nav ul li { margin-left: 25px; }
nav ul li a { text-decoration: none; color: var(--dark-color); font-weight: 700; transition: color 0.3s ease; }
nav ul li a:hover { color: var(--dark-green); }

/* --- Hero Section & Slideshow --- */
#hero {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    color: var(--light-color);
    overflow: hidden;
}

.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slideshow-container .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.slideshow-container .slide.active {
    opacity: 1;
}

#slide-1 { background-image: url('ike-corner-before.jpg'); }
#slide-2 { background-image: url('ike-corner-after.jpg'); }
#slide-3 { background-image: url('big-john-before.jpg'); }
#slide-4 { background-image: url('big-john-after.jpg'); }
#slide-5 { background-image: url('mowing-dublin.jpg'); }

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: left;
}

#hero h2 { font-size: 1.2rem; color: var(--primary-color); text-align: left; margin: 0; font-weight: 700; letter-spacing: 1px; }
#hero h1 { font-size: 5rem; font-weight: 900; color: var(--light-color); text-shadow: 2px 2px 8px rgba(0,0,0,0.5); line-height: 1.1; margin: 10px 0; }
#hero .subtitle { font-size: 1.5rem; font-family: var(--heading-font); font-weight: 700; margin-bottom: 30px; }
.cta-button { display: inline-block; background: var(--dark-green); color: var(--light-color); padding: 18px 35px; text-decoration: none; font-family: var(--heading-font); font-weight: 700; font-size: 1.1rem; border-radius: 5px; transition: background-color 0.3s ease, transform 0.3s ease; border: none; cursor: pointer; }
.cta-button:hover { background-color: #3b5c2a; transform: translateY(-3px); }

#hero-caption { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 800px; font-family: var(--heading-font); font-weight: 700; font-size: 1.2rem; color: var(--light-color); text-align: center; text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7); opacity: 0; transition: opacity 1.5s ease-in-out; }
#hero-caption.visible { opacity: 1; }

.service-popup { position: absolute; bottom: 20px; right: 20px; z-index: 5; background-color: rgba(255, 255, 255, 0.9); color: var(--dark-color); border-radius: 8px; padding: 15px 20px; max-width: 250px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 15px; opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.service-popup i { font-size: 1.8rem; color: var(--dark-green); }
.service-popup h3 { margin: 0; font-size: 1rem; line-height: 1.2; text-align: left; color: var(--dark-color); }
.service-popup.visible { opacity: 1; transform: translateY(0); }

.before-after-label { position: absolute; bottom: 25px; left: 25px; z-index: 5; background-color: rgba(0, 0, 0, 0.4); color: var(--light-color); font-family: var(--heading-font); font-weight: 700; font-size: 1.2rem; padding: 8px 15px; border-radius: 4px; letter-spacing: 1px; text-transform: uppercase; opacity: 0; transition: opacity 0.5s ease-out; }
.before-after-label.visible { opacity: 1; }

/* --- Why Choose Us Section --- */
#why-us { padding: 60px 0; background: #fff; border-bottom: 1px solid #eee; }
.why-us-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.feature-card { text-align: center; }
.feature-card i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 15px; }
.feature-card h3 { margin-bottom: 10px; font-size: 1.4rem; color: var(--dark-color); }

/* --- Services Section --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; }
.service-card { background: var(--light-color); border-radius: 8px; padding: 30px; text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid #e0e0e0; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.service-card i { font-size: 3rem; color: var(--dark-green); margin-bottom: 20px; }
.service-card h3 { margin-bottom: 15px; font-size: 1.4rem; }

/* --- About & Gallery Section Styles --- */
.about-text { max-width: 800px; margin: 0 auto; text-align: center; font-size: 1.1rem; line-height: 1.8; }
.about-gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, 1fr); gap: 20px; margin-top: 50px; height: 500px; }
.gallery-item { overflow: hidden; border-radius: 8px; }
.gallery-item.large { grid-row: 1 / 3; grid-column: 1 / 2; }

#about-img-1 { background-image: url('about-1.jpg'); }
#about-img-2 { background-image: url('about-2.jpg'); }
#about-img-3 { background-image: url('about-3.jpg'); }
.gallery-image { width: 100%; height: 100%; background-size: cover; background-position: center center; background-repeat: no-repeat; transition: transform 0.4s ease; }
.gallery-item:hover .gallery-image { transform: scale(1.05); }
.gallery-item.image-top-aligned .gallery-image { background-position: center 0; }

/* --- Testimonials Section --- */
.testimonial-container { max-width: 750px; margin: 0 auto; text-align: center; }
.testimonial-placeholder p { font-style: italic; color: #888; font-size: 1.2rem; }

/* --- Contact Section --- */
#contact .container { max-width: 1100px; }
.contact-layout { display: flex; gap: 50px; margin-top: 40px; align-items: flex-start; }
.contact-form { flex: 2; }
.direct-contact { flex: 1; }
.form-group { display: flex; gap: 20px; margin-bottom: 20px; }
.form-group input, .form-group textarea { width: 100%; padding: 15px; border-radius: 5px; border: 1px solid #555; background: #444; color: var(--light-color); font-size: 1rem; font-family: var(--body-font); resize: none; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); }
.direct-contact h3 { text-align: left; margin-bottom: 20px; }
.contact-info-link { display: flex; align-items: center; text-decoration: none; color: #ddd; font-size: 1.1rem; margin-bottom: 20px; transition: color 0.3s ease; }
.contact-info-link:hover { color: var(--primary-color); }
.contact-info-link i { font-size: 1.5rem; width: 40px; text-align: center; margin-right: 15px; color: var(--primary-color); }
.location-info { display: flex; align-items: center; color: #ddd; font-size: 1.1rem; }
.location-info i { font-size: 1.5rem; width: 40px; text-align: center; margin-right: 15px; color: var(--primary-color); }
.hidden { display: none; }

/* --- Footer --- */
footer { background: #1c1c1c; color: #aaa; text-align: center; padding: 30px 0; }

/* --- Animation for Content Sections --- */
.content-section { opacity: 0; transform: translateY(20px); transition: opacity 1.0s ease-out, transform 1.0s ease-out; }
.content-section.visible { opacity: 1; transform: translateY(0); }

/* --- Style for ALL Custom SVG Icons --- */
.service-card svg, .service-popup svg { display: block; width: 3.3rem; height: 3.3rem; margin: 0 auto 20px; }
.service-popup svg { width: 2.5rem; height: 2.5rem; margin: 0; }
.service-card svg.icon-medium, .service-popup svg.icon-medium { width: 3.9rem; height: 3.9rem; }
.service-card svg.icon-large, .service-popup svg.icon-large { width: 4.1rem; height: 4.1rem; }
.service-card svg path, .service-popup svg path { fill: var(--dark-green); }


/*
==========================================================================
    Responsive Design - ALL MOBILE FIXES ARE IN THIS SECTION
==========================================================================
*/
@media (max-width: 768px) {
    /* --- General Mobile Layout --- */
    header .container { flex-direction: column; }
    nav ul { margin: 15px 0; }
    #hero .hero-content { text-align: center; }
    #hero h1 { font-size: 3.5rem; }
    #hero h2 { text-align: center; }
    .about-gallery { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
    .gallery-item.large { grid-row: auto; grid-column: auto; height: 400px; }
    .gallery-item.small { height: 250px; }
    .contact-layout { flex-direction: column; gap: 40px; }
    .direct-contact h3 { text-align: center; }
    .form-group { flex-direction: column; }
    #contact .container > p { text-align: center; }
    .contact-form { width: 100%; text-align: center; }
    .direct-contact { display: flex; flex-direction: column; align-items: center; width: 100%; }
    
    /* --- Fix for Contact Section Location Text --- */
    .location-info { flex-direction: column; text-align: center; }
    .location-info i { margin-right: 0; margin-bottom: 8px; }

    /* --- FINAL FIX for Hero Section Elements --- */
    
    /* 1. Move the caption UP to give it space */
    #hero-caption {
        bottom: 95px; /* Safely above the corner elements */
        font-size: 1rem;
        padding: 0 15px; /* Prevent text from touching screen edges */
    }
    
    /* 2. Style the BEFORE/AFTER label in the bottom-left */
    .before-after-label {
        left: 15px;
        bottom: 20px;
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    /* 3. Style the service popup in the bottom-right */
    .service-popup {
        right: 15px;
        bottom: 20px;
        left: auto;       /* Reset conflicting properties */
        transform: none;  /* Reset conflicting properties */
        max-width: 190px;
        padding: 8px 12px;
        gap: 8px;
    }

    /* 4. Shrink the contents of the service popup */
    .service-popup h3 {
        font-size: 0.8rem;
    }

    .service-popup i, .service-popup svg {
        font-size: 1.4rem;
        width: 1.8rem;
        height: 1.8rem;
        margin: 0;
    }
}