/* _home.css */

/* --- Intro Section --- */
.intro {
    padding: 5rem 0; /* More vertical space */
    text-align: center;
    background-color: #f8f8f8; /* Light grey background */
}

.intro h2 {
    font-size: 2.8rem; /* Larger heading */
    font-weight: 700;
    color: #1E1F25;
    margin-bottom: 1.5rem;
}

.intro p {
    font-size: 1.15rem; /* Larger body text */
    line-height: 1.7; /* Improved readability */
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Services Section --- */
.services {
    padding: 5rem 0;
    background-color: #ffffff; /* White background for services */
}

.services .centered-heading {
    font-size: 2.8rem;
    font-weight: 700;
    color: #1E1F25;
    text-align: center;
    margin-bottom: 3.5rem; /* More space below heading */
}

.service-card {
    max-width: 900px; /* Constrain width for better layout */
    margin: 0 auto 2.5rem auto; /* Space between cards */
    background-color: #fcfcfc; /* Very light background for cards */
    border-radius: 1.25rem; /* Rounded corners */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07); /* Subtle shadow */
    border: 1px solid #eee; /* Light border */
    overflow: hidden; /* Ensure rounded corners apply */
}

.service-card:last-child {
    margin-bottom: 0; /* No bottom margin on the last card */
}

.service-card .dropdown-toggle {
    background-color: #0A3D62; /* Blue header */
    color: #fff;
    padding: 1.5rem 2rem;
    font-size: 1.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease, border-radius 0.3s ease;
    border-radius: 1.25rem 1.25rem 0 0;
}

.service-card .dropdown-toggle:hover {
    background-color: #0056b3;
}

.service-card .dropdown-toggle.active {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1.25rem 1.25rem 0 0;
}

/* Adjusted ICON SIZE (slightly smaller for cleaner look) */
.service-card .dropdown-toggle i.fas {
    font-size: 1rem; /* Reduced from 1.2rem */
    transition: transform 0.3s ease;
    /* Transform handled by JS for precise control now */
}

/* ULTIMATE AGGRESSIVE PROTECTIVE RULE: Hide any ::after pseudo-elements on dropdown toggles */
/* This directly targets the conflicting arrow from _services-section.css */
.service-card .dropdown-toggle::after {
    content: none !important; /* Remove any content from ::after */
    display: none !important; /* Hide it completely */
    visibility: hidden !important; /* Ensure it's not visible */
    width: 0 !important; /* Collapse its space */
    height: 0 !important; /* Collapse its space */
    margin: 0 !important; /* Remove any margin */
    padding: 0 !important; /* Remove any padding */
}

/* ULTIMATE AGGRESSIVE PROTECTIVE RULE: Hide any i.fas elements that are NOT the first one */
.service-card .dropdown-toggle > i.fas:not(:first-of-type) {
    display: none !important; /* Force hide any subsequent i.fas elements */
    visibility: hidden !important; /* Ensure it's not just off-screen */
    width: 0 !important; /* Collapse space if display:none is ignored */
    overflow: hidden !important; /* Hide overflow if width is ignored */
}


.service-card .dropdown-content {
    display: none;
    list-style: none;
    padding: 1.5rem 2rem;
    margin: 0;
    background-color: #fff;
    animation: fadeIn 0.5s ease-out;
}

.service-card .dropdown-content.active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.service-card .dropdown-content li {
    margin: 0;
}

.service-card .dropdown-content a {
    display: block;
    padding: 0.8rem 1rem;
    background-color: #e6f7ff;
    color: #0A3D62;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.service-card .dropdown-content a:hover {
    background-color: #d1efff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* --- Feedback Section --- */
.feedback {
    padding: 5rem 0;
    background-color: #f0f0f0;
    text-align: center;
}

.feedback h2 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #1E1F25;
    margin-bottom: 2.5rem;
}

.feedback-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0;
    margin: 0 auto;
    max-width: 1200px;
}

.feedback-carousel::-webkit-scrollbar {
    height: 8px;
}

.feedback-carousel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.feedback-carousel::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.feedback-item {
    flex: 0 0 auto;
    width: 350px;
    scroll-snap-align: center;
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    margin: 0 1rem;
    text-align: left;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    border: 1px solid #eee;
}

.feedback-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.feedback-item p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    font-style: italic;
    margin-bottom: 1.5rem;
    min-height: 80px;
}

.feedback-item strong {
    display: block;
    font-size: 1.05rem;
    color: #0A3D62;
    font-weight: 600;
    margin-top: 1rem;
}

/* --- Request a Free Quote Form Section --- */
.quote-form {
    padding: 5rem 0;
    background: linear-gradient(90deg, #0A3D62 0%, #007acc 100%);
    color: #fff;
    text-align: center;
    border-radius: 2rem 2rem 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
}

.quote-form h2 {
    color: #fff;
    margin-bottom: 2.5rem;
    font-size: 2.8rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.quote-form form {
    max-width: 600px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quote-form input[type="text"],
.quote-form input[type="email"],
.quote-form input[type="tel"],
.quote-form textarea {
    width: 100%;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.quote-form input::placeholder,
.quote-form textarea::placeholder {
    color: #888;
}

.quote-form input:focus,
.quote-form textarea:focus {
    border-color: #0A3D62;
    box-shadow: 0 0 0 4px rgba(0, 122, 204, 0.25);
    background-color: #fff;
    outline: none;
}

.quote-form textarea {
    resize: vertical;
    min-height: 120px;
}

.quote-form .btn {
    width: auto;
    padding: 1.2rem 3rem;
    font-size: 1.25rem;
    font-weight: 700;
    background-color: #0A3D62;
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.quote-form .btn:hover {
    background-color: #0056b3;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.quote-form #formMessage {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 0.75rem;
    display: inline-block;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.quote-form #formMessage.show {
    opacity: 1;
}

/* --- Call to Action Section (Consistent) --- */
.cta {
    padding: 4rem 0;
    background-color: #f8f8f8;
    color: #1E1F25;
    text-align: center;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.cta h2 {
    color: #1E1F25;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.cta .btn {
    padding: 1.2rem 3rem;
    font-size: 1.25rem;
    font-weight: 700;
    background-color: #0A3D62;
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cta .btn:hover {
    background-color: #0056b3;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}


/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .intro h2,
    .services .centered-heading,
    .feedback h2,
    .quote-form h2,
    .cta h2 {
        font-size: 2.2rem;
    }
    .intro p {
        font-size: 1.05rem;
    }
    .service-card .dropdown-toggle {
        font-size: 1.5rem;
        padding: 1.2rem 1.5rem;
    }
    .service-card .dropdown-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        padding: 1rem 1.5rem;
    }
    .service-card .dropdown-content a {
        padding: 0.7rem 0.8rem;
        font-size: 0.95rem;
    }
    .feedback-item {
        width: 300px;
        padding: 2rem;
    }
    .feedback-item p {
        font-size: 1rem;
        min-height: 70px;
    }
    .quote-form form {
        padding: 2rem;
    }
    .quote-form input,
    .quote-form textarea {
        padding: 1rem;
        font-size: 1rem;
    }
    .quote-form .btn,
    .cta .btn { /* Keep this part for non-hero buttons */
        padding: 1rem 2.5rem;
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {
    .intro h2,
    .services .centered-heading,
    .feedback h2,
    .quote-form h2,
    .cta h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    .intro p {
        font-size: 0.95rem;
    }
    .service-card .dropdown-toggle {
        font-size: 1.3rem;
        padding: 1rem 1.2rem;
    }
    .service-card .dropdown-content {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    .feedback-carousel {
        padding: 0.5rem 0;
    }
    .feedback-item {
        width: 90%;
        margin: 0 0.5rem;
        padding: 1.5rem;
    }
    .feedback-item p {
        min-height: auto;
    }
    .quote-form form {
        padding: 1.5rem;
        border-radius: 1rem;
    }
    .quote-form input,
    .quote-form textarea {
        padding: 1rem;
        font-size: 1rem;
    }
    .quote-form .btn,
    .cta .btn {
        padding: 1rem 2.5rem;
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .intro h2,
    .services .centered-heading,
    .feedback h2,
    .quote-form h2,
    .cta h2 {
        font-size: 1.6rem;
    }
    .service-card .dropdown-toggle {
        font-size: 1.1rem;
        padding: 0.8rem 1rem;
        border-radius: 1rem 1rem 0 0;
    }
    .service-card {
        border-radius: 1rem;
    }
    .service-card .dropdown-content {
        padding: 0.8rem;
    }
    .service-card .dropdown-content a {
        font-size: 0.85rem;
        padding: 0.6rem 0.7rem;
    }
    .feedback-item {
        padding: 1.2rem;
        border-radius: 1rem;
    }
    .feedback-item p {
        font-size: 0.9rem;
    }
    .feedback-item strong {
        font-size: 0.95rem;
    }
    .quote-form input,
    .quote-form textarea {
        padding: 0.8rem;
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    .quote-form .btn,
    .cta .btn {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
}

/* Keyframe for fadeIn animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add this to the end of your _home.css file */

/* --- Image Sizing for Service Blocks --- */
.service-details-section .service-block .service-image {
    /* This ensures the image container is properly sized */
    max-width: 50%; /* Adjust this percentage as needed for your desired layout */
    margin: 0;
}

.service-details-section .service-image img {
    /* This is the key to making the image responsive */
    max-width: 100%; /* Makes the image fit inside its container */
    height: auto;   /* Maintains the image's aspect ratio */
    display: block; /* Removes any extra space below the image */
    border-radius: 8px; /* Optional: adds a nice rounded corner to match your other styles */
}

/* For the responsive layout, this ensures the image takes full width on smaller screens */
@media (max-width: 768px) {
    .service-details-section .service-block .service-image {
        max-width: 100%; 
    }
}