/* --- Global Styles & Variables --- */
:root {
    --color-primary: #417505;
    /* Dark Green CTA/Navbar */
    --color-secondary: #B8E986;
    /* Light Green Section Background */
    --color-text-dark: #000;
    --color-text-light: #fff;
    --font-family: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    color: var(--color-text-dark);
    /* FIX: Prevents horizontal overflow caused by wide elements */
    overflow-x: hidden;
}

/* SEO Optimization for Headings */
h1,
h2,
h3 {
    font-weight: 700;
    margin: 0.5em 0;
}

a {
    text-decoration: none;
    color: inherit;
}

section:nth-of-type(even) {
    background-color: var(--color-secondary);
}


/* --- Section Layouts (Full-Screen) --- */
.hero-section,
.services-section,
.reviews-section,
.gallery-section,
.areas-section {
    min-height: 100vh;
    /* Ensures full screen height */
    padding: 60px 5% 20px;
    /* Padding for mobile safety */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertical center alignment */
}

/* --- Section Specific Styles --- */
.hero-section {
    /* background-color: var(--color-text-light); */
    /* White background */
    color: var(--color-text-dark);
    /* Black fonts */
    text-align: center;
}

.services-section {
    /* background-color: var(--color-secondary); */
    /* Light Green */
    text-align: center;
    /* Horizontal center alignment for content */
}

.areas-section {
    /* background-color: var(--color-text-light); */
    /* Light Green */
    text-align: center;
}

/* Add this new block after .areas-section styles */
.reviews-section {
    /* background-color: var(--color-text-light); */
    /* White background */
    text-align: center;
}

/* Add this new block after .reviews-section styles */
.gallery-section {
    /* background-color: var(--color-secondary); */
    /* White background */
    text-align: center;
}

.section-title {
    font-size: 2.2em;
    margin-bottom: 1.5em;
    padding-top: 40px;
    /* Space from sticky navbar */
}

/* --- Navigation Bar (Sticky) --- */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--color-primary);
    color: var(--color-text-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* FIX: Use percentage padding, but ensure content isn't stretching */
    padding: 10px 5%;
    box-sizing: border-box;
    /* IMPORTANT: Includes padding in the element's total width */
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 1.5em;
    font-weight: 800;
    /* FIX: Added min-width to prevent the logo text from shrinking too much */
    min-width: fit-content;
}

.nav-menu {
    /* New base styles - these will be overridden by the desktop media query */
    transition: transform 0.3s ease-in-out;
}

.nav-link {
    font-weight: 600;
    padding: 5px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--color-secondary);
}

.menu-toggle {
    display: none;
    /* Hide on desktop */
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 1.5em;
    cursor: pointer;
}

.logo-img {
    height: 40px;
    /* Base height for the logo */
    width: auto;
}

@media (min-width: 769px) {

    /* Slightly larger logo on desktop */
    .logo-img {
        height: 50px;
    }
}

/* --- Hero Content & CTA --- */
.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-body {
    font-size: 1.2em;
    margin-bottom: 40px;
}

/* CTA Button (Capsule Style) */
.cta-button {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-radius: 50px;
    /* Capsule shape */
    font-size: 1.2em;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.1s;
}

.cta-button:hover {
    background-color: #559106;
    /* Slightly darker hover */
    transform: translateY(-2px);
}

.cta-button i {
    margin-right: 10px;
    font-size: 1.4em;
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.service-card {
    background-color: var(--color-text-light);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.2s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.card-title {
    color: var(--color-primary);
    font-size: 1.2em;
    margin-top: 0;
}

.card-description {
    font-size: 0.95em;
    /* Enforcing the 60 character limit for SEO purposes */
    height: 38px;
    overflow: hidden;
}

/* --- Reviews Grid --- */
.reviews-grid {
    display: grid;
    /* Two columns on desktop, stacking on mobile (via media query below) */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.review-card {
    background-color: var(--color-text-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    /* Center everything in the card */
    transition: transform 0.2s;
    height: 100%;
    /* Ensure all cards have the same height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.review-card:hover {
    transform: translateY(-5px);
}

.review-icon-container {
    color: var(--color-primary);
    font-size: 3em;
    /* Large icon */
    margin-bottom: 10px;
}

.review-name {
    font-weight: 700;
    margin: 5px 0 15px 0;
    font-size: 1.1em;
}

.review-description {
    font-style: italic;
    font-size: 0.95em;
    flex-grow: 1;
    /* Allows description to take up available space */
}

/* --- Gallery Grid --- */
/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    /* Desktop: Use minmax to ensure at least 3 columns fit if space allows */
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* Add media query for Tablets/Medium screens */
@media (max-width: 1024px) {
    .gallery-grid {
        /* Set to 2 columns for tablets */
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Add media query for Mobile phones */
@media (max-width: 500px) {
  .gallery-grid {
      grid-template-columns: 1fr;
      gap: 20px;
  }
}

.gallery-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* ✅ modern, stable way to keep square shape */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item:hover {
    transform: scale(1.03);
}

/* --- Lightbox/Modal Styles --- */
.lightbox-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    /* High z-index to be on top of everything */
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 700px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* --- Star Rating Styling --- */
.star-rating {
    color: gold;
    /* Classic star color */
    font-size: 1.1em;
    margin-top: 15px;
    /* Space between description and stars */
}

.star-rating i {
    margin: 0 2px;
    /* Small space between each star */
}

/* Adjust grid for smaller screens (tablet) */
@media (max-width: 1024px) {
    .reviews-grid {
        /* Two columns for tablets */
        grid-template-columns: repeat(2, 1fr);
        /* Increase horizontal padding on the grid container for better spacing on tablets */
        padding: 0 3%;
    }
}

@media (max-width: 768px) {

    /* Mobile Styles */
    .reviews-section {
        /* Reduce the huge 100vh height requirement on mobile to avoid excessive scrolling */
        min-height: auto;
        padding-top: 60px;
        /* Adjust top padding */
        padding-bottom: 60px;
        /* Adjust bottom padding */
    }

    .reviews-grid {
        /* One column for phones (cards stacked) */
        grid-template-columns: 1fr;
        /* Ensure spacing from the sides of the screen */
        padding: 0 5%;
    }

    .review-card {
        /* Add more vertical breathing room between the cards when stacked */
        margin-bottom: 20px;
        padding: 25px;
        /* Slightly less padding on tiny screens */
    }

    /* Make the Gallery section height adapt to content on mobile */
    .gallery-section {
        min-height: auto;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    /* Ensure the grid takes up full width with padding on mobile */
    .gallery-grid {
        padding: 0 5%;
    }
}

/* --- Service Areas Bubbles --- */
.areas-content {
    max-width: 900px;
    margin: 0 auto;
}

.areas-bubbles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding-bottom: 40px;
}

.area-bubble {
    background-color: var(--color-text-light);
    color: var(--color-text-dark);
    padding: 10px 20px;
    border-radius: 25px;
    /* Bubble shape */
    font-weight: 600;
    font-size: 1em;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--color-text-dark);
    color: var(--color-text-light);
    padding: 20px 5%;
    text-align: center;
    font-size: 0.9em;
    line-height: 1.6;
}

.site-footer a {
    color: var(--color-secondary);
    font-weight: 600;
}

/* --- Floating CTA Button (Sticky Phone Icon) --- */
.floating-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--color-primary);
    color: var(--color-text-light);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: none;
    /* Hidden by default, shown by JS on scroll/mobile */
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1050;
    transition: opacity 0.3s;
}

/* --- Mobile Responsiveness (Left-Sliding Sidebar Navbar) --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        /* Bring toggle to the right */
        order: 2;
    }

    .navbar {
        /* Ensure the logo is on the left and the toggle is on the right */
        justify-content: space-between;
    }

    /* Transform the nav-menu into a fixed sidebar */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        /* Full screen height */
        width: 70%;
        /* Occupy 70% of the screen width */
        max-width: 300px;
        /* Optional: Set a max width for large mobile devices */
        flex-direction: column;
        background-color: var(--color-primary);
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
        z-index: 999;
        /* Below the sticky navbar (1000) but above content */

        /* Initially hidden: slide off the screen to the left */
        transform: translateX(-100%);
    }

    /* State when the sidebar is open/visible */
    .nav-menu.open {
        transform: translateX(0);
    }

    /* Inside @media (max-width: 768px) { ... } */
    .nav-link {
        /* *** ADDED THIS LINE *** */
        display: block;
        /* ********************** */
        padding: 15px 5%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        /* Ensure text alignment is clean within the new block */
        text-align: left;
    }

    .hero-title {
        font-size: 2.2em;
    }

    .section-title {
        font-size: 1.8em;
    }

    /* Show floating CTA on mobile */
    .floating-cta {
        display: flex;
    }

    /* Hide desktop CTA on mobile to avoid redundancy */
    /* .cta-button {
        display: none;
    } */

    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Restore desktop styles that were removed from the global .nav-menu */
@media (min-width: 769px) {
    .nav-menu {
        display: flex;
        gap: 20px;
        flex-wrap: wrap;
        min-width: fit-content;
        margin-left: 20px;

        /* Ensure no mobile sidebar transformation on desktop */
        transform: none !important;
    }

    .floating-cta.visible {
        display: flex;
    }
}

/* Show floating CTA when scrolled on desktop */
@media (min-width: 769px) {
    .floating-cta.visible {
        display: flex;
    }
}

/* --- Video Section --- */
.video-section {
    /* Make sure this variable is defined in your root stylesheet! */
    /* e.g., :root { --color-text-light: #f8f9fa; } */
    background-color: var(--color-text-light, #f8f9fa); /* Added fallback color just in case */
    text-align: center;
    padding: 80px 5%;
}

.section-title {
    margin-bottom: 40px; /* Added some space below the title */
}

.video-container {
    max-width: 1236px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* Kept for structure, but the aspect ratio is now handled by the iframe CSS below */
    position: relative; 
}

/* NEW CSS FOR RESPONSIVE IFRAME */
.video-container iframe {
    width: 100%;
    /* This is the modern way to keep YouTube's 16:9 aspect ratio responsive */
    aspect-ratio: 16 / 9; 
    display: block;
    border: none;
    /* Ensure the iframe respects the container's rounded corners */
    border-radius: inherit; 
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .video-section {
        padding: 60px 5%;
    }
}

@media (max-width: 425px) {
    .hero-section,
    .services-section,
    .reviews-section,
    .gallery-section,
    .areas-section {
        justify-content: start;
    }
}

#view-more-gallery {
    display: block;
    margin: 0 auto;
    width: 100%;
    font-weight: bold;
}


#view-more-gallery:hover {
    color: blue;
}