/* ======== Layout Containers ======== */

.main-content {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    padding: 50px 20px;
    background-color: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    color: #0c4a6e;
}

.hero p {
    font-size: 1.2rem;
    color: #555;
}

.services {
    margin-bottom: 40px;
}

.services h2,
.about h2 {
    text-align: center;
    color: #0c4a6e;
    margin-bottom: 20px;
}

.about {
    padding: 20px;
    background-color: #e2e8f0;
    border-radius: 8px;
    text-align: center;
}

/* ======== Service Grid (Desktop) ======== */

.service-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 180px;
    gap: 15px;
    margin-top: 20px;
    overflow-x: scroll;
    overflow-y: hidden;
    padding-bottom: 10px;
    scroll-behavior: smooth;

    /* Hide scrollbar for cleaner look */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.service-grid::-webkit-scrollbar {
    display: none;
}

.service-grid:hover {
    -ms-overflow-style: auto;
    scrollbar-width: auto;
}

.service-grid::-webkit-scrollbar {
    height: 8px;
}

.service-grid::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.service-grid::-webkit-scrollbar-track {
    background: transparent;
}

/* ======== Service Card Styling ======== */

.service-card {
    background: #f7f7f7;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.service-card img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 6px;
}

.service-card h3 {
    color: #0c4a6e;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.service-card strong {
    margin-top: 10px;
    font-size: 1rem;
    color: #0c4a6e;
}

.service-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 100%;
}

/* Scroll Buttons */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #0c4a6e;
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    user-select: none;
    transition: background-color 0.3s ease;
}

.scroll-btn:hover {
    background-color: #07415a;
}

.scroll-left {
    left: 0;
}

.scroll-right {
    right: 0;
}

/* Adjust service grid width to leave space for buttons */
.service-grid {
    overflow-x: scroll;
    scroll-behavior: smooth;
    padding: 15px 50px;
    width: 100%;
    box-sizing: border-box;
}

/* ======== Responsive: Mobile / Tablet (max-width: 768px) ======== */

@media (max-width: 768px) {
    .main-content {
        padding: 20px 10px;
    }

    .hero {
        padding: 30px 15px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .scroll-btn {
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
    }

    .service-scroll-wrapper {
        overflow-x: hidden;
    }

    .service-grid {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 10px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .service-card {
        flex: 0 0 auto;
        width: 80%;
        max-width: 240px;
        scroll-snap-align: start;
    }
}

/* ======== Extra-Small Devices (max-width: 480px) ======== */

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .service-card h3 {
        font-size: 1rem;
    }

    .service-card strong {
        font-size: 0.95rem;
    }

    .service-card img {
        max-height: 100px;
    }

    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }
}
