/* --- Modern CSS Variables --- */
:root {
    --primary-green: #2ecc71;
    --primary-dark: #27ae60;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
}

/* --- Basic Reset --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    background-color: var(--bg-light); 
    font-family: 'Inter', sans-serif; /* Modern body font */
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif; /* Bold, modern heading font */
}

/* --- Sticky Modern Header --- */
.main-header { 
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 5%; 
    background-color: rgba(255, 255, 255, 0.95); /* Slightly transparent */
    backdrop-filter: blur(10px); /* Glassmorphism blur effect */
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); 
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-area h1 { 
    color: var(--text-dark); 
    font-size: 26px; 
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.header-logo {
    height: 42px;
    width: auto;
    display: block;
}

/* Styling for the green "target" text in the logo */
.logo-accent {
    color: var(--primary-green);
}

.header-actions { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
}

/* --- Modern Buttons --- */
.btn-primary { 
    background-color: var(--primary-green); 
    color: var(--white); 
    text-decoration: none; 
    padding: 12px 18px; 
    border-radius: 8px; /* Smooth rounded corners */
    font-weight: 600; 
    font-size: 15px;
    box-shadow: 0 4px 6px rgba(46, 204, 113, 0.25); /* Subtle glowing shadow */
    transition: all 0.3s ease; 
}

.btn-primary:hover { 
    background-color: var(--primary-dark); 
    transform: translateY(-2px); /* Lifts up slightly when hovered */
    box-shadow: 0 6px 12px rgba(46, 204, 113, 0.3);
}

.hamburger-btn { 
    font-size: 28px; 
    background: none; 
    border: none; 
    cursor: pointer; 
    color: var(--text-dark); 
    transition: transform 0.2s ease;
}

.hamburger-btn:hover {
    transform: scale(1.1);
    color: var(--primary-green); 
}

/* --- Modern Hero Section --- */
.hero { 
    /* Added a background image of grass with a blurred house */
    background-image: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('images/green-grass_blurry-house-background.png');
    background-size: cover; /* Set to cover so it fills the space */
    background-position: center; 
    background-repeat: no-repeat;
    
    color: var(--white); 
    min-height: 30vh; /* Shorter section */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center; 
    padding: 60px 20px; /* Reduced the top/bottom padding so it takes up less space */
}

.hero-content {
    max-width: 800px; /* Keeps text from stretching too wide */
}

.hero h2 { 
    font-size: 42px; /* Slightly reduced font size to fit the shorter section nicely */
    margin-bottom: 15px; 
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Helps text pop off background */
}

.hero p { 
    font-size: 18px; 
    margin-bottom: 25px; /* Tighter spacing below paragraph */
    color: #e2e8f0; /* Slightly off-white for readability */
}

.large-btn { 
    font-size: 16px; 
    padding: 14px 30px; 
    border-radius: 50px; /* Pill-shaped button for the main call to action */
}

/* --- New Sections Common CSS --- */
.section-padding {
    padding: 80px 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-light);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}
/* --- Pests Section Background --- */
.pests-section {
    /* Using 255, 255, 255 gives us white. 0.85 means it is 85% opaque */
    background-image: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85)), url('images/dead-bugs_white-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* --- Pests Grid Section --- */
.pest-grid {
    display: grid;
    /* This automatically creates as many columns as will fit, making it very mobile-friendly! */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.pest-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.pest-card:hover {
    transform: translateY(-5px); /* Lifts the card up */
    border-color: var(--primary-green); /* Adds a green border */
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.1);
}

/* SVG Pest Icon Styling */
.pest-icon-svg {
    width: 48px;
    height: 48px;
    stroke: var(--primary-green);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-bottom: 15px;
}

.pest-card h3 {
    font-size: 18px;
    color: var(--text-dark);
}

/* --- Why Choose Us Section --- */
.features-section {
    background-color: var(--white); /* White background to separate the sections */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 20px;
}

.feature-icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: #e8f5e9; /* Very light green tint */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

/* SVG Feature Icon Styling */
.feature-icon-svg {
    width: 36px;
    height: 36px;
    stroke: var(--primary-dark);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-light);
}

/* --- Slide-out Menu & Overlay --- */
.overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background-color: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(4px); /* Blurs the background when menu is open */
    z-index: 100; opacity: 0; visibility: hidden; transition: 0.3s ease; 
}

.overlay.active { opacity: 1; visibility: visible; }

.side-menu { 
    position: fixed; top: 0; right: -350px; width: 350px; height: 100%; 
    background-color: var(--white); 
    color: var(--text-dark); 
    z-index: 200; transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    padding: 30px; 
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.side-menu.active { right: 0; }

.close-btn { 
    background: none; border: none; color: var(--text-light); 
    font-size: 40px; cursor: pointer; float: right; 
    transition: color 0.3s;
}

.close-btn:hover { color: var(--primary-dark); }

.side-menu ul { 
    list-style: none; margin-top: 80px; 
}

.side-menu ul li { margin-bottom: 25px; }

.side-menu ul li a { 
    color: var(--text-dark); 
    text-decoration: none; 
    font-size: 20px; 
    font-weight: 500;
    transition: color 0.3s, padding-left 0.3s; 
}

.side-menu ul li a:hover { 
    color: var(--primary-green); 
    padding-left: 10px; /* Cool hover effect: nudges text right */
}
/* --- Contact Form Section --- */
.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr; /* 1 column on mobile */
    gap: 40px;
    background-color: var(--bg-light);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Soft drop shadow */
}

/* When the screen is wider than 768px (tablets/desktops), split into 2 columns */
@media(min-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

.contact-text h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.contact-text p {
    color: var(--text-light);
    font-size: 18px;
    margin-bottom: 20px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

/* Styling the inputs so they look clean and modern */
.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: var(--white);
}

/* What happens when a user clicks inside the text box */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2); /* A glowing green ring */
}

/* Reusing our green button style, but making it fit the form */
.contact-form .btn-primary {
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 15px;
    margin-top: 10px;
}

/* --- Modern Footer --- */
.main-footer {
    background-color: var(--text-dark);
    color: #cbd5e1; /* Light slate text for readability on dark background */
    padding: 60px 5% 20px 5%;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid #334155;
    padding-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-col p {
    margin-bottom: 10px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* SVG Footer & Social Icon Styling */
.footer-icon-svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.social-icon-svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 15px;
}

.footer-col a:hover {
    color: var(--primary-green);
}

/* Social Media Icons */
.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #334155;
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-green);
    color: var(--white);
    transform: translateY(-3px); /* Lifts the icon slightly on hover */
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 14px;
}

/* --- Responsive Call Button Fix --- */
@media(max-width: 480px) {
    .call-text {
        display: none; /* Hides the word "Call: " on very small screens */
    }
    .btn-primary.call-btn {
        padding: 8px 12px; /* Shrinks the padding */
        font-size: 14px; /* Shrinks the text slightly */
    }
    .logo-area h1 {
        font-size: 22px; /* Shrinks the logo slightly to make room */
    }
    .header-logo {
        height: 32px; /* Shrinks the logo image as well on mobile */
    }
    .logo-area {
        gap: 8px; /* Slightly tighter gap on mobile */
    }
}

/* --- New Linear Desktop Navigation --- */
.desktop-nav {
    display: none; /* Hidden by default on mobile phones */
    padding: 10px 3%;
    box-shadow: 0 4px 10px -1px rgba(0,0,0,0.1);
}

.desktop-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 50px;
}

.desktop-nav ul li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 100;
    font-size: 14px;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.desktop-nav ul li a:hover {
    color: var(--primary-green);
    transform: translateY(-2px); /* Slight lift effect on hover */
}

/* --- The Magic Swap (Hamburger to Linear Menu) --- */
@media(min-width: 1080px) {
    /* When the screen is wider than 1080px */
    .desktop-nav {
        display: block; /* Show the linear menu */
    }
    .hamburger-btn {
        display: none; /* Hide the hamburger icon */
    }
}

/* --- Form Status Message --- */
#form-status-msg {
    margin-top: 10px;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    padding: 10px;
    display: none; /* Hidden by default! */
}

/* We will add these classes using JavaScript based on if it succeeds or fails */
.status-success {
    display: block !important;
    background-color: #e8f5e9;
    color: var(--primary-dark);
    border: 1px solid var(--primary-green);
}

.status-error {
    display: block !important;
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #ef4444;
}

/* --- Email Suggestions Dropdown --- */
.email-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
}

.email-suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
    transition: background-color 0.2s;
    text-align: left;
}

.email-suggestion-item:hover {
    background-color: #f1f5f9;
}

.email-suggestion-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.email-suggestion-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* --- Footer Layout & Responsiveness --- */
.footer-contact-item {
    margin-bottom: 10px;
    font-size: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}

.footer-contact-item .footer-icon-svg {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Stacking footer sections on mobile screens */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}