@charset "utf-8";
/* CSS Document */
/* Basic Reset and Font Setup */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
}

/* --- Section Layout --- */
.services-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
}

/* --- Title Styling --- */
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5em;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
}

.section-title .highlight {
    color: #4a7044;
}

/* --- Grid Layout (The core of the structure) --- */
.services-grid {
    display: grid;
    /* Default: 3 columns for large screens */
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
}

/* --- Service Card Styling --- */
.service-card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.empty-card {
    box-shadow: none;
    background-color: transparent;
}


/* --- General Image Container Styling (Used for all cards) --- */
.card-image {
    width: 100%;
    /* Aspect Ratio Trick: 100% width, 60% height */
    height: 0;
    padding-bottom: 60%; 
    position: relative;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* --- Carousel Specific Styling (For the first card) --- */

/* Ensures the carousel container positions children absolutely, overriding general card-image styles if necessary */
.carousel-container {
    position: relative;
    overflow: hidden;
}

/* Individual slide (image) styling */
.carousel-slide {
    display: none; /* Hide all slides by default */
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Class to show the active slide */
.carousel-slide.active {
    display: block; 
}

/* Styling for the navigation buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5); 
    color: white;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 18px;
    font-weight: bold;
    z-index: 10;
    border-radius: 50%;
    line-height: 1;
    user-select: none;
    opacity: 0.8;
    transition: opacity 0.2s, background-color 0.2s;
}

.carousel-nav:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.7);
}

/* Positioning the left arrow */
.carousel-nav.prev {
    left: 10px;
    padding-right: 14px;
}

/* Positioning the right arrow */
.carousel-nav.next {
    right: 10px;
}


/* --- Content Styling --- */
.card-content {
    padding: 15px 20px 25px 20px;
    flex-grow: 1;
}

.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25em;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.card-description {
    font-size: 0.95em;
    color: #666;
    line-height: 1.4;
    margin: 0 0 20px 0;
}

.card-link {
    font-size: 0.95em;
    font-weight: 700;
    color: #ff9900;
    text-decoration: none;
    transition: color 0.2s;
}

.card-link:hover {
    color: #cc7a00;
}


/* ==================================== */
/* RESPONSIVE DESIGN           */
/* ==================================== */

/* 1. Tablet Layout (Max width 992px) */
@media (max-width: 992px) {
    .services-grid {
        /* Changes to 2 columns */
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 2. Mobile Layout (Max width 576px) */
@media (max-width: 576px) {
    .services-grid {
        /* Changes to a single column */
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2em;
        text-align: center;
    }

    /* Adjust the size and position of the carousel arrows for small screens */
    .carousel-nav {
        font-size: 16px;
        padding: 6px 10px;
    }

    .carousel-nav.prev {
        left: 5px; 
        padding-right: 12px;
    }
    
    .carousel-nav.next {
        right: 5px;
    }
}
