/* ===========================
   Service Detail Page Styles
   =========================== */

/* Page Transition Animation */
/* Page Transition Animation - Appied to sections instead of body to avoid fixed positioning issues */
.service-hero,
.section,
.footer {
    animation: pageEnter 0.5s ease-out forwards;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service Hero Section */
.service-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 160px;
    padding-bottom: 60px;
    overflow: hidden;
}

.service-hero__background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0a2a6e 100%);
    z-index: 0;
}

.service-hero__overlay {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.service-hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.service-hero__title {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.service-hero__subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    font-weight: 400;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.breadcrumb__separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0.5rem;
}

.breadcrumb__current {
    color: #ffffff;
    font-weight: 500;
}

/* Service Content Section */
.service-content {
    background: var(--color-bg);
}

.service-content__wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.service-content__text {
    padding: 0 1rem;
}

.service-content__heading {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.service-content__description {
    color: var(--color-text-light);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Features List */
.service-content__features {
    background: var(--color-secondary);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.service-content__features h3 {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.service-features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.service-features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-white);
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-features-list li:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.feature-check {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Image Gallery */
.service-gallery {
    margin-top: 4rem;
    padding-top: 2rem;
}

.service-gallery__title {
    font-size: 1.5rem;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 2rem;
}

.service-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-secondary);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.gallery-item__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-secondary) 0%, #e8ecf5 100%);
    border: 2px dashed var(--color-border);
    border-radius: 12px;
    transition: border-color 0.3s ease;
}

.gallery-item:hover .gallery-item__placeholder {
    border-color: var(--color-primary);
}

.gallery-item__icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.gallery-item__label {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: 500;
}

/* When images are present */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* CTA Section */
.service-cta {
    margin-top: 4rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0a2a6e 100%);
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.service-cta__content {
    position: relative;
    z-index: 1;
}

.service-cta__title {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.service-cta__text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.service-cta__button {
    display: inline-block;
    background: #ffffff;
    color: var(--color-primary);
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.service-cta__button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: var(--color-secondary);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .service-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .service-hero {
        padding-top: 130px;
        padding-bottom: 30px;
        min-height: 30vh;
    }

    /* Reposition background image to top on mobile to avoid cutting off figures */
    .service-hero__background {
        background-position: top center !important;
    }

    /* Smooth gradient fade at bottom of hero for clean transition */
    .service-hero::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: linear-gradient(to bottom, transparent, var(--color-bg, #ffffff));
        z-index: 1;
        pointer-events: none;
    }

    .service-hero__title {
        font-size: 2rem;
    }

    .service-hero__subtitle {
        font-size: 1rem;
    }

    .service-content__heading {
        font-size: 1.5rem;
    }

    .service-content__description {
        font-size: 1rem;
    }

    .service-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .service-cta {
        padding: 2rem 1.5rem;
    }

    .service-cta__title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .service-hero {
        padding-top: 100px;
        padding-bottom: 24px;
        min-height: 25vh;
    }

    .service-hero__title {
        font-size: 1.75rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    .service-gallery__grid {
        grid-template-columns: 1fr;
    }

    .service-content__features {
        padding: 1.5rem 1rem;
    }

    .service-features-list {
        grid-template-columns: 1fr;
    }
}