/* --- Services Section --- */
/* === INILAGAY ULIT: Gawing full-height (100vh) at i-center vertically === */
#services {
    min-height: 100vh;
    display: flex;       /* Gamit ng flex para sa alignment */
    align-items: center; /* I-center yung content (yung .container) */
    justify-content: center;
}

#services .container {
    max-width: 1200px; /* Limit max width for better layout */
    width: 100%; /* Siguraduhin na 100% width yung container sa loob */
}
/* === END NG DAGDAG === */


/* --- 1. Category Swiper (Top) --- */
.services-category-swiper {
    margin-bottom: 2rem;
    overflow: hidden; /* Itago ang overflow */
    padding-top: 10px;
    padding-bottom: 10px; 
    margin-top: -10px;
    margin-bottom: calc(2rem - 10px);
    
    /* BAGO: Ito yung nagpapa-fade sa gilid (para 'maglaho') */
    -webkit-mask-image: linear-gradient(to right, 
        transparent 0%, 
        black 5%, 
        black 95%, 
        transparent 100%);
    mask-image: linear-gradient(to right, 
        transparent 0%, 
        black 5%, 
        black 95%, 
        transparent 100%);
}
.service-category-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    height: 120px; /* Nagtakda ng height */
    width: 200px; /* Nagtakda ng width */
    min-width: 200px; /* Tiniyak ang width */
    overflow: hidden;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.service-category-card:hover img {
    transform: scale(1.1);
}
.service-category-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 1.5rem 0.75rem 0.75rem 0.75rem;
    text-align: left;
    transition: opacity 0.3s ease;
}
.service-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- 2. Main Content Swiper (Middle) --- */
.services-main-swiper {
    position: relative; /* Needed for arrows */
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-surface);
}
.service-main-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--color-white); /* Text on top of image should be white */
    overflow: hidden;
}
.service-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary); /* Fallback */
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.6s ease-out;
}
.swiper-slide-active .service-slide-bg {
    transform: scale(1.05);
}
.service-slide-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 2;
}
[data-theme="dark"] .service-slide-bg::after {
     background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.2) 100%);
}

.service-slide-content {
    position: relative;
    z-index: 3;
    padding: 2rem 3rem;
    max-width: 600px;
}

/* === BINAGO: Ginawang mas mabagal at mas malayo ang pagbaba === */
.service-slide-content h3,
.service-slide-content p,
.service-slide-content .service-explore-btn {
    opacity: 0;
    transform: translateY(-30px); /* Dating -20px */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; /* Dating 0.4s */
}
/* ======================================================== */

.swiper-slide-active .service-slide-content h3,
.swiper-slide-active .service-slide-content p,
.swiper-slide-active .service-slide-content .service-explore-btn {
    opacity: 1;
    transform: translateY(0); 
}

/* === BINAGO: In-adjust ang delays para sa bagong speed === */
.swiper-slide-active .service-slide-content h3 {
    transition-delay: 0.5s; /* Dating 0.3s */
}
.swiper-slide-active .service-slide-content p {
    transition-delay: 0.8s; /* Dating 0.5s */
}
.swiper-slide-active .service-slide-content .service-explore-btn {
    transition-delay: 1.1s; /* Dating 0.7s */
}
/* ==================================================== */


.service-slide-content h3 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--color-white);
    margin-bottom: 1rem;
    line-height: 1.2;
}
.service-slide-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    color: rgba(255, 255, 255, 0.9);
}
.service-explore-btn {
    height: 50px;
}
.service-explore-btn .btn-icon {
    width: 50px;
    font-size: 1.8rem;
}
.service-explore-btn .btn-text {
    font-size: 0.9rem;
    padding: 0 1.5rem 0 1.2rem;
}

/* Navigation Arrows */
.services-main-swiper .swiper-button-next,
.services-main-swiper .swiper-button-prev {
    color: var(--color-white);
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    transition: background 0.2s ease;
}
.services-main-swiper .swiper-button-next:hover,
.services-main-swiper .swiper-button-prev:hover {
    background: rgba(0,0,0,0.4);
}
.services-main-swiper .swiper-button-next:after,
.services-main-swiper .swiper-button-prev:after {
    font-size: 1.5rem;
    font-weight: 900;
}

/* --- 3. Thumbnail Swiper (Bottom) & Controls --- */
.services-controls-wrapper {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    height: 100px;
    align-items: center; 
}

.services-thumbs-swiper {
    flex-grow: 1; 
    height: 100%;
    box-sizing: border-box;
}

.service-thumb-slide {
    position: relative; 
    height: 100%;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--color-border);
}
.service-thumb-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.service-thumb-slide:hover {
    opacity: 0.8;
}
.service-thumb-slide.swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--color-primary);
}

.service-thumb-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 6px 6px;
}
.service-thumb-progress-bar {
    width: 0%; 
    height: 100%;
    background: var(--color-primary);
    border-radius: 0 0 6px 6px;
    transition: width 0.05s linear; 
}

.swiper-control-btn-small {
    flex-shrink: 0;
    width: 50px; 
    height: 50px; 
    font-size: 2.2rem; 
    border: none; 
    background: transparent; 
    color: var(--color-primary);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    display: grid;
    place-items: center;
    border-radius: 50%; 
}
.swiper-control-btn-small:hover {
    color: var(--color-secondary);
    transform: scale(1.1);
    background: var(--color-surface); 
}


/* --- Responsive Adjustments --- */
@media screen and (max-width: 768px) {
    .services-main-swiper {
        height: 450px;
    }
    .service-slide-content {
        padding: 2rem;
    }
    .service-slide-content h3 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }
    .service-slide-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    .services-controls-wrapper {
        height: 90px;
    }
    .swiper-control-btn-small {
        width: 45px;
        height: 45px;
        font-size: 2rem;
    }
    .services-main-swiper .swiper-button-next,
    .services-main-swiper .swiper-button-prev {
        width: 38px;
        height: 38px;
    }
    .services-main-swiper .swiper-button-next:after,
    .services-main-swiper .swiper-button-prev:after {
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    .service-category-card {
        height: 100px;
        width: 150px;
        min-width: 150px;
    }
     .service-category-label {
       font-size: 0.75rem;
     }
    .services-controls-wrapper {
        height: 70px;
    }
    .swiper-control-btn-small {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }
}