/* Critical CSS - Keep this at the top */
body {
    font-family: 'PT Sans', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-left: 280px;
    margin: 0;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    body {
        padding-left: 0;
        padding-top: 70px;
    }
}

/* Optimize images */
img {
    max-width: 100%;
    height: auto;
    content-visibility: auto; /* Modern browsers only */
}

/* Add will-change for elements that animate */
.slider-track, 
.testimonials-track {
    will-change: transform;
}

/* Use transform instead of opacity for better performance */
.slide, .testimonial {
    transform: translateZ(0); /* Hardware acceleration */
    backface-visibility: hidden;
}

/* Optimize animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Use more efficient properties for animations */
.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Optimize layout shifts */
.testimonials-track {
    min-height: 300px; /* Set minimum height to prevent layout shifts */
}

/* Optimize font loading */
@font-face {
    font-family: 'PT Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap; /* Prevent invisible text during font loading */
    src: local('PT Sans'), url('/assets/fonts/pt-sans.woff2') format('woff2');
}

/* --- BEGIN layout.css --- */
/* Base Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PT Sans', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-left: 280px;
    /* Match navigation width */
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    margin: 0 auto;
    padding: 0 0px;
    width: 100%;
    /* Ensure container doesn't exceed viewport */
    overflow-x: hidden;
    /* Prevent horizontal overflow */
}

/* Navigation Layout */
.main-navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.nav-brand {
    margin-bottom: 2rem;
    text-align: center;
}

.logo-mobile {
    display: none;
    max-width: 300px;
    height: auto;
}

.logo-desktop {
    max-width: 100%;
    height: auto;
}

.nav-menu {
    list-style: none;
    padding: 0;
    flex-grow: 1;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    display: block;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: #ec1c24;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: auto;
    padding: 1rem 0;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: scale(1.1);
}

.social-link.facebook {
    background: #3b5998;
}

.social-link.email {
    background: #000;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Responsive Layout */
@media (max-width: 768px) {
    body {
        padding-left: 0;
        padding-top: 70px;
        /* Height of mobile nav */
        overflow-x: hidden;
        /* Prevent horizontal scrolling */
    }

    .main-navigation {
        width: 100%;
        height: auto;
        padding: 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .nav-brand {
        margin: 0;
    }

    .logo-mobile {
        display: block;
        max-height: 50px;
        width: auto;
    }

    .logo-desktop {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        margin: 0;
        padding: 1rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: block;
    }

    .social-links {
        display: none;
    }
}

/* Hero Slider Layout */
.hero-quote-below {
    text-align: center; 
    padding: 60px 200px;
}

.hero-quote-below h1 {
    font-style: italic;
}

.hero-slider {
    position: relative;
    height: 800px;
    width: 100%;
    overflow: hidden;
}


.slider-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.slides {
    height: 100%;
    width: 100%;
}

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

.slide.active {
    opacity: 1;
}

.slide-content {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: .5rem;
    max-width: fit-content;
}

.slide-content-left {
    left: 10%;
}

.slide-content-right {
    right: 10%;
    text-align: right;
}

/* Navigation Elements */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 75px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.slide-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
}

/* Section Layout */
section {
    padding: 0 !important;
    width: 100%;
}

section#home {
    margin-top: 0px;
}

section#testimonials {
    margin-top: -20px;
    min-height: 750px;
}

.section-header {
    text-align: center;
}

.footer-divider {
    border-top: 2px solid #ececec;
    margin-bottom: 2rem;
}

#footer {
    padding: 2.5rem 0 1.5rem 0;
    background: #222;
    color: #fff;
    text-align: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

#contact {
    padding: 4rem 0;
    background: #f8f9fa;
}

#contact-form {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
    padding: 1rem;
}

#contact-form>div {
    display: flex;
    flex-direction: column;
}

#contact-form>div:last-child,
#contact-form>div.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .hero-slider {
        height: 600px;
    }

    .slider-nav {
        width: 50px;
        height: 50px;
    }

    #contact-form {
        grid-template-columns: 1fr;
    }
}

/* Services Section */
.services {
    padding: 4rem 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    align-items: stretch;
    padding: 0 3rem;
}

.service-card {
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card.featured {
    transform: scale(1.05);
    background: #fff;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    /* min-height: 180px; */
    /* margin-bottom: 1rem; */
    /* margin-top: 1.3rem; */
}

.service-header {
    background: #fff;
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #ededed;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-header h3 {
    /* padding-top: 20px; */
    margin: 0;
    color: #333;
    font-size: 1.25rem;
    line-height: 1.4;
    /* min-height: 120px; */
    /* text-transform: uppercase; */
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-top: 1rem;
}

.price a.button {
    background-color: #cd1b1b;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    text-align: center;
}

.service-features {
    list-style: none;
    margin: 0;
    padding: 2rem;
    flex-grow: 1;
    background: #f8f8f8;
}

.service-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #919191;
    color: #666;
    text-align: center;
}

.service-features li:last-child {
    border-bottom: none;
}

.service-footer {
    padding: 2rem 1rem;
    text-align: center;
    background: #f8f8f8;
}

/* Testimonials Section */
.testimonials-subtitle {
    text-align: center;
    font-size: 2rem;
    color: #333;
    margin-bottom: 3rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    gap: 2rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.testimonial-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.testimonial-icon i {
    font-size: 3rem;
    width: 100px;
    height: 100px;
    line-height: 100px;
    text-align: center;
    color: #fff;
    background: #333;
    border-radius: 50%;
}

.testimonials-slider {
    position: relative;
    background: #f6f6f6;
    padding: .85rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: auto;
}

.testimonials-track {
    position: relative;
    height: 400px; /* Fixed height for all testimonials */
    overflow: hidden;
}

.testimonial {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto; /* Add scrolling for overflow content */
    padding-right: 10px; /* Space for scrollbar */
}

.testimonial blockquote {
    margin: 0;
    padding: 15px 0;
}

/* Style the scrollbar for better appearance */
.testimonial::-webkit-scrollbar {
    width: 6px;
}

.testimonial::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.testimonial::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.testimonial::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.testimonial.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.testimonial-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: .5rem;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #231f20;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.nav-dot.active {
    background: #231f20;
}

/* Add this to assets/css/style.css */
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
}

.pest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.pest-card {
    text-align: center;
    padding: 2rem;
    background: #f6f6f6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.pest-card:hover {
    transform: translateY(-5px);
}

.pest-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
}

/* Typography & Colors */
body {
    color: #333;
    background: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'PT Sans', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

/* Section Headers */
.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    display: inline-block;
}

.section-header h2::before,
.section-header h2::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 100px;
    height: 1px;
    background: #ec1c24;
}

.section-header h2::before {
    right: 100%;
}

.section-header h2::after {
    left: 100%;
}

/* Hero Slider Styles */
.slide-content {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.title-wrapper,
.subtitle-wrapper {
    background-color: rgba(0, 0, 0, 0.6);
    padding: .75rem 1.5rem;
    margin: 0.5rem 0;
    display: inline-block;
    border-radius: 1.5rem;
}

.slide-title h2 {
    font-size: 3.75rem;
    line-height: 1.2;
    font-weight: 700;
}

.slide-subtitle h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: 500;
}

.slider-nav {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.indicator:hover {
    transform: scale(1.2);
}

.indicator.active {
    background: #fff;
    transform: scale(1.2);
}

/* Contact Form Styles */
#contact {
    background: linear-gradient(to bottom, #fff, #f8f9fa);
}

#contact-form-h2 {
    margin-top: 50px;
    margin-bottom: 70px;
    margin-left: 15px;
    margin-right: 15px;
}

#contact-form label {
    font-weight: 600;
    color: #333;
    font-size: .75rem;
    /* margin-bottom: 0.5rem; */
}

#contact-form .required {
    color: #ec1c24;
    margin-left: 0.25rem;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form input[type="tel"],
#contact-form input[type="number"],
#contact-form select,
#contact-form textarea {
    padding: 0.55rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: .55rem;
    width: 100%;
    transition: all 0.3s ease;
}

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
    border-color: #ec1c24;
    outline: none;
    box-shadow: 0 0 0 2px rgba(236, 28, 36, 0.1);
}

#contact-form-button {
    background-color: #ec1c24 !important;
    color: white !important;
    padding: 1rem 2rem !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.service-footer a.button {
    background-color: #2d2d2d;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#contact-form-button:hover {
    background-color: #d31118 !important;
    transform: translateY(-2px) !important;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal !important;
    margin: 0 !important;
    cursor: pointer;
    font-size: .5rem;
}

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

/* Footer Styles */
#footer {
    background: #333;
    color: #fff;
}

#footer a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

#footer a:hover {
    color: #ec1c24;
}

.form-wrapper {
    margin-bottom: 1rem;
}

.fusion-social-networks-wrapper {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.fusion-social-network-icon {
    margin: 0 0.5rem;
}

.fusion-facebook {
    background: #3b5998;
}

.fusion-facebook::before {
    content: '\f39e';
}

.fusion-mail {
    background: #000;
}

.fusion-mail::before {
    content: '\f0e0';
}

.learning-center {
    padding: 4rem 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#learning-center-container {
    background-image: url('/assets/images/backgrounds/pattern-bg.png');
    padding: 4rem 0;
}

#services-container {
    background-image: url('/assets/images/backgrounds/grass-bg.jpeg');
    padding: 4rem 0;
}

.section-header {
    position: relative;
    text-align: center;
}

.header-bg {
    background-image: url('/assets/images/backgrounds/header-bg.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100px;
    margin: 1rem 0;
    border-top: 1px dotted #ec1c24;
    border-bottom: 1px dotted #ec1c24;
}

.section-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0 2rem;
    color: #333;
    font-size: 2.5rem;
    text-transform: uppercase;
}

/* Pest Card Styles */
.pest-card {
    text-align: center;
    padding: 2rem;
    background: #f6f6f6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.pest-card:hover {
    transform: translateY(-5px);
}

.pest-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
}

.learn-more-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.learn-more-btn:hover {
    background: #ec1c24;
}

.learn-more-btn i {
    margin-right: 0.5rem;
}

/* Modal Styles */
.pest-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pest-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(50px);
    transition: transform 0.3s ease;
}

.pest-modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 2rem;
}

.modal-body h4 {
    margin: 1.5rem 0 1rem;
    color: #333;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-body ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

/* Contact Grid Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* 1/3 for image, 2/3 for form */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    align-items: start;
}

.contact-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-image img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {

    .contact-image img {
        display: none;
    }
    .section-title {
        font-size: 2rem;
    }

    .pest-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        padding: 0 0.5rem;
        /* Reduce padding on mobile to prevent overflow */
    }

    .modal-content {
        margin: 1rem;
        width: auto;
    }

    .pest-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 300px;
        margin: 0px 70px;
    }

    .pest-icon {
        margin-bottom: 1rem;
    }

    .learn-more-btn {
        margin-top: 1rem;
    }
    .service-title {
        font-size: 3.5rem;
    }
    .service-header>h3 {
        font-size: 2rem;
        padding: 40px;
    }

    .section-header h2 {
        font-size: 2.5rem;
        padding-bottom: 5px;
    }

    .section-header h2::before,
    .section-header h2::after {
        width: 50px;
    }
    .service-features li {
        font-size: 1.5rem;
        padding: .3rem 0rem;
    }

    .slide-title h2 {
        font-size: 2.5rem;
    }

    .slide-subtitle h3 {
        font-size: 1.2rem;
    }

    .slider-nav {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    .slide-content {
        max-width: 80vw;
    }   

    .service-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        padding: 0 1rem;
        /* Reduce padding on mobile to prevent overflow */
    }

    .service-card.featured {
        transform: none;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-icon {
        display: none;
    }

    .testimonials-subtitle {
        font-size: 1.5rem;
        padding: 0 1rem;
    }

    .testimonials-slider {
        min-height: 350px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
        padding: 0 0.5rem;
    }

    .contact-image {
        margin-bottom: 2rem;
    }

    .contact-image img {
        max-width: 300px;
        /* Limit image size on mobile */
    }

    .form-wrapper {
        margin: 0 auto;
    }

    #contact-form input[type="text"],
    #contact-form input[type="email"],
    #contact-form input[type="tel"],
    #contact-form input[type="number"],
    #contact-form select,
    #contact-form textarea {
        padding: 1rem;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: .85rem;
        width: 100%;
        transition: all 0.3s ease;
    }
    #contact-form label {
        font-weight: 600;
        color: #333;
        font-size: 1rem;
        /* margin-bottom: 0.5rem; */
    }
    .form-wrapper {
        margin-bottom: 1rem;
    }
    .hero-quote-below {
        padding: 20px 40px;
    }
}

html {
    scroll-behavior: smooth;
}
