/* public/css/services.css */

/* --- Services Section (Carousel on index.html) --- */
.services-section {
    padding: 80px 20px;
    background-color: #f8f8f8;
    text-align: center;
    position: relative; /* For positioning navigation arrows */
    overflow: hidden; /* Hide overflowing content initially */
}

.services-section h2 {
    margin-bottom: 50px;
    font-size: 2.8em;
    color: #2c3e50; /* Darker heading */
    position: relative;
    padding-bottom: 10px;
}

.services-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #007bff; /* Accent color */
    border-radius: 2px;
}

.services-carousel-container {
    overflow-x: auto; /* Enable horizontal scrolling */
    white-space: nowrap; /* Prevent items from wrapping */
    scroll-behavior: smooth; /* Smooth scrolling for navigation */
    -webkit-overflow-scrolling: touch; /* Smoother scrolling on iOS */
    padding-bottom: 20px; /* Space for scrollbar if visible */
    margin: 0 auto; /* Center the container */
    max-width: 1200px; /* Max width for consistency */
}

/* Hide scrollbar for a cleaner look (optional, but common for carousels) */
.services-carousel-container::-webkit-scrollbar {
    display: none;
}
.services-carousel-container {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.services-carousel-wrapper {
    display: inline-flex; /* Arrange items in a row */
    gap: 30px; /* Space between service items */
    padding: 10px; /* Padding inside the wrapper */
    justify-content: flex-start; /* Align items to the start */
    align-items: stretch; /* Make items take full height */
}

.service-item {
    flex: 0 0 calc(33.333% - 20px); /* 3 columns - adjust gap (30px gap means 10px per side) */
    max-width: calc(33.333% - 20px);
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 35px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box; /* Include padding in width calculation */
    min-width: 300px; /* A reasonable minimum width for each card */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.service-item img {
    width: 90px;
    height: 90px;
    margin-bottom: 25px;
    /* Example: Optional filter for icons */
    /* filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2)); */
}

.service-item h3 {
    font-size: 1.7em;
    color: #007bff; /* Example main color */
    margin-bottom: 15px;
    font-weight: 600;
}

.service-item p {
    font-size: 1em;
    color: #666;
    line-height: 1.7;
    margin-bottom: 25px;
    flex-grow: 1; /* Allows description to take up available space */
}

.service-item .read-more-btn {
    display: inline-block;
    background-color: #28a745; /* Green button */
    color: #fff;
    padding: 12px 25px;
    border-radius: 50px; /* Pill shape */
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.service-item .read-more-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* Carousel Navigation Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 18px;
    cursor: pointer;
    font-size: 1.8em;
    z-index: 10;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    opacity: 0.8;
}

.carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 1;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* --- Services Page Content (services.html) --- */
.services-page-content {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.services-page-content .hero-section {
    text-align: center;
    margin-bottom: 60px;
    padding: 50px;
    background: linear-gradient(135deg, #e0f2f7 0%, #d1e8ef 100%); /* Light blue gradient */
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.services-page-content .hero-section h1 {
    font-size: 3.5em;
    color: #0056b3;
    margin-bottom: 20px;
    font-weight: 700;
}

.services-page-content .hero-section p {
    font-size: 1.3em;
    color: #444;
    max-width: 800px;
    margin: 0 auto;
}

.all-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 40px; /* Space between grid items */
    padding-bottom: 50px;
}

/* Adjustments for .service-item within the grid */
.all-services-grid .service-item {
    flex: unset; /* Override flex properties from carousel */
    max-width: unset;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* Slightly stronger shadow for grid items */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.all-services-grid .service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}


/* --- Responsive Adjustments --- */
@media (max-width: 1200px) {
    .services-carousel-container {
        max-width: 100%; /* Allow container to take full width */
    }
}

@media (max-width: 992px) {
    .service-item {
        flex: 0 0 calc(50% - 20px); /* 2 columns on medium screens */
        max-width: calc(50% - 20px);
    }
    .services-carousel-wrapper {
        gap: 20px;
    }
    .carousel-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }
    .prev-btn {
        left: 10px;
    }
    .next-btn {
        right: 10px;
    }

    .services-page-content .hero-section h1 {
        font-size: 2.8em;
    }
    .services-page-content .hero-section p {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    .services-section {
        padding: 60px 10px;
    }
    .services-section h2 {
        font-size: 2.2em;
        margin-bottom: 40px;
    }
    .service-item {
        flex: 0 0 calc(100% - 20px); /* 1 column on small screens */
        max-width: calc(100% - 20px);
        padding: 25px;
        min-width: unset; /* Allow to shrink for very small screens */
    }
    .carousel-nav {
        display: none; /* Hide arrows on very small screens, rely on touch scroll */
    }

    .services-page-content {
        padding: 30px 15px;
    }
    .services-page-content .hero-section {
        padding: 30px;
    }
    .services-page-content .hero-section h1 {
        font-size: 2.2em;
    }
    .services-page-content .hero-section p {
        font-size: 1em;
    }
    .all-services-grid {
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .services-section h2 {
        font-size: 1.8em;
    }
    .service-item h3 {
        font-size: 1.5em;
    }
    .service-item p {
        font-size: 0.9em;
    }
    .service-item .read-more-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

#services-list {
    display: grid;
    /* This will be handled by utility classes like grid-cols-1 md:grid-cols-2 lg:grid-cols-3 */
}

.service-card {
    background-color: var(--white);
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: var(--shadow-medium); /* shadow-md */
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
}

.service-card:hover {
    transform: scale(1.02); /* hover:scale-105 */
}

.service-card img {
    width: 100%;
    height: 12rem; /* h-48 */
    object-fit: cover;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.service-card .p-6 {
    padding: 1.5rem;
}

.service-card .text-center {
    text-align: center;
}

.service-card .text-primary {
    color: var(--primary);
}

.service-card .text-xl {
    font-size: 1.25rem;
}

.service-card .font-semibold {
    font-weight: 600;
}

.service-card .text-gray-800 {
    color: var(--dark);
}

.service-card .text-gray-600 {
    color: var(--dark-gray);
}

.service-card .text-sm {
    font-size: 0.875rem;
}

/* Specific styling for the placeholder icon if no image */
.service-card .bg-gray-200 {
    background-color: var(--gray);
}
.service-card .text-6xl {
    font-size: 4rem; /* For the icon placeholder */
}
.service-card .flex {
    display: flex;
}
.service-card .items-center {
    align-items: center;
}
.service-card .justify-center {
    justify-content: center;
}


/* Read More button style (already likely in styles.css) */
.btn-primary-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.btn-primary-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Service Detail Page Styling */
#service-detail {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-medium);
}

#service-detail .detail-image img {
    width: 100%;
    max-height: 400px; /* Adjust as needed */
    object-fit: contain; /* or cover, depending on desired image behavior */
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

#detail-service-title {
    color: var(--primary);
}

#detail-service-long-description {
    line-height: 1.75;
}

/* Utility for hidden elements */
.hidden {
    display: none !important;
}