/* ========================================
   SERVICE DETAIL PAGE - ULTRA PREMIUM
   ======================================== */

/* === HERO SECTION (Like Category Page) === */
.service-detail-hero {
    position: relative;
    margin-top: 110px;
    padding: 100px 0 80px;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
}

.service-detail-hero .container,
.service-detail-hero .row {
    position: relative;
}

.service-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='50%25' y='50%25' font-family='Arial' font-size='200' font-weight='900' fill='rgba(255,255,255,0.03)' text-anchor='middle' dominant-baseline='middle'%3EIMPERGO%3C/text%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    pointer-events: none;
}

.service-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
}

.service-detail-hero.has-video .service-hero-content {
    padding-right: 120px;
}

.service-hero-title {
    font-size: 55px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 22px;
    margin-bottom: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #fff;
    /* Added white color */
}

.service-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.service-breadcrumb a:hover {
    color: #fff;
}

.service-breadcrumb .separator {
    color: rgba(255, 255, 255, 0.4);
}

.service-breadcrumb span:not(.separator) {
    color: #fff;
    font-weight: 600;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.service-hero-desc-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.service-hero-desc {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* Video Trigger Hero (Grid Aligned - HIGH VISIBILITY) */
.service-video-trigger-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 50;
    position: absolute;
    right: 0;
    bottom: 0;
    opacity: 1 !important;
    /* Force visible */
}

.service-hero-video-col {
    position: static;
    z-index: 50;
}

.service-video-trigger-hero:hover {
    transform: scale(1.1);
}

.video-play-icon-hero {
    width: 90px;
    height: 90px;
    background: var(--tp-theme-primary);
    /* SOLID GOLD */
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    /* Black Icon */
    font-size: 30px;
    transition: all 0.3s ease;
    animation: pulse-glow-gold 2s infinite;
}

.video-play-icon-hero i {
    margin-left: 5px;
}

.service-video-trigger-hero:hover .video-play-icon-hero {
    background: #fff;
    color: var(--tp-theme-primary);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.4);
}

@keyframes pulse-glow-gold {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 178, 40, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(234, 178, 40, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(234, 178, 40, 0);
    }
}

/* Video Trigger Button */
.service-video-trigger {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    animation: pulse-glow 2s infinite;
    white-space: nowrap;
}

.service-video-trigger:hover {
    background: #fff;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.video-play-icon {
    width: 32px;
    height: 32px;
    background: var(--tp-theme-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 14px;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 178, 40, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(234, 178, 40, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(234, 178, 40, 0);
    }
}

/* === MAIN CONTENT PREMIUM === */
.service-premium-detail {
    padding: 100px 0;
    background: #fcfcfc;
}

.service-desc-wrapper {
    padding-right: 30px;
}

.project-code .code-badge {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--tp-theme-primary);
    border: 1px solid var(--tp-theme-primary);
    padding: 8px 16px;
    border-radius: 4px;
}

.service-text-content h2,
.service-text-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 30px 0 20px;
    color: #111;
}

.service-text-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

/* === GALLERY SLIDER PREMIUM === */
.premium-gallery-wrapper {
    position: relative;
    padding-bottom: 30px;
    /* Space for pagination */
}

.gallery-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.gallery-card img {
    display: block;
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.4));
    pointer-events: none;
}

/* Custom Navigation */
.slider-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.premium-nav-btn {
    position: static;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 !important;
}

.premium-nav-btn:hover {
    background: var(--tp-theme-primary);
    border-color: var(--tp-theme-primary);
    color: #fff;
}

.premium-nav-btn::after {
    display: none;
}

.premium-pagination {
    position: static !important;
    width: auto !important;
    font-family: inherit;
    font-weight: 600;
    color: #000;
}

.gallery-backdrop {
    position: absolute;
    top: 20px;
    right: -20px;
    bottom: -20px;
    left: 20px;
    border: 2px solid var(--tp-theme-primary);
    border-radius: 12px;
    z-index: -1;
    opacity: 0.3;
}

/* === BEFORE / AFTER SECTION === */
.service-transform-section {
    padding: 100px 0;
    background: #fff;
}

.section-header .sub-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--tp-theme-primary);
    margin-bottom: 10px;
}

.section-header .section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
}

.transform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.transform-card {
    background: #fff;
}

.comparison-view {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
    cursor: ew-resize;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.view-before,
.view-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.view-before img,
.view-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-after {
    clip-path: inset(0 0 0 50%);
    /* Default 50% */
    z-index: 2;
}

.label-badge {
    position: absolute;
    top: 20px;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
}

.label-badge.before {
    left: 20px;
}

.label-badge.after {
    right: 20px;
}

/* Handle Scroller */
.scroller-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #fff;
    z-index: 10;
    pointer-events: none;
    /* Let range input handle events */
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tp-theme-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Range Input Hidden Overlay */
.comparison-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 20;
    margin: 0;
}

/* === SERVICE DETAIL PREMIUM DESIGN === */
/* ... (Hero section remains same) ... */

/* === GLASSMORPHISM CTA SECTION === */
.service-cta-glass {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-glass-card {
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    border-radius: 20px;
    padding: 60px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cta-glass-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 15px;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-glass-text {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    max-width: 90%;
}

.cta-glass-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 40px;
    background: var(--tp-theme-primary);
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(234, 178, 40, 0.2);
}

.cta-glass-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(234, 178, 40, 0.4);
    color: #000;
    background: #fff;
}

.circle-decoration {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--tp-theme-primary);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
}

/* === GALLERY SLIDER FIXES === */
.premium-gallery-wrapper {
    width: 100%;
    margin-bottom: 40px;
}

.service-gallery-slider {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.swiper-slide {
    height: auto;
    /* Let content dictate height */
}

/* Fix for stacked images if JS fails */
.swiper-wrapper {
    display: flex;
    /* Ensure horizontal layout */
}

/* === COMPARISON FOOTER UPDATE === */
.comparison-footer p {
    font-size: 1rem;
    font-weight: 600;
    color: #444;
    padding: 20px;
    background: #fff;
    border-top: 1px solid #eee;
    margin: 0;
    border-radius: 0 0 12px 12px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.comparison-footer p::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--tp-theme-primary);
    border-radius: 50%;
}

/* Video Modal */
/* Video Modal - FIXED VISIBILITY */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;

    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    display: flex;
    /* Always display flex but hide valid props */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1;
    /* Low z-index within modal */
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    z-index: 10000;
    /* Very high z-index */
    background: #000;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.video-modal.active .video-modal-content {
    transform: scale(1);
}

.video-modal-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.video-modal video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Before/After View Height Override */
.comparison-view {
    height: 600px !important;
}

@media (max-width: 991px) {
    .service-detail-hero.has-video .service-hero-content {
        padding-right: 0;
        padding-bottom: 74px;
    }

    .service-video-trigger-hero {
        right: auto;
        left: auto;
        bottom: 0;
    }

    .video-play-icon-hero {
        width: 58px;
        height: 58px;
        border-width: 2px;
        font-size: 18px;
    }

    .video-play-icon-hero i {
        margin-left: 3px;
    }

    .service-video-trigger-floating {
        position: relative;
        margin-bottom: 20px;
        right: auto;
        top: auto;
    }

    .comparison-view {
        height: 400px !important;
    }

    .service-hero-title {
        font-size: 2.5rem;
    }

    .row.g-5 {
        gap: 3rem !important;
    }

    .gallery-backdrop {
        display: none;
    }
}

@media (max-width: 767px) {
    .service-detail-hero {
        padding: 80px 0 60px;
    }

    .service-premium-detail .row {
        display: flex;
    }

    .service-detail-gallery-col {
        order: -1;
    }

    .service-detail-copy-col {
        order: 1;
    }

    .service-breadcrumb {
        gap: 6px 8px;
        font-size: 0.65rem;
        letter-spacing: 0.45px;
        align-items: flex-start;
    }

    .service-breadcrumb .current {
        flex: 0 0 100%;
        width: 100%;
        line-height: 1.55;
    }

    .service-detail-hero .service-video-trigger-hero {
        position: absolute !important;
        right: auto !important;
        left: 50% !important;
        bottom: 0 !important;
        transform: translateX(-50%) !important;
    }

    .service-detail-hero .service-video-trigger-hero:hover {
        transform: translateX(-50%) scale(1.08) !important;
    }

    .service-content-box {
        padding: 30px;
    }

    .gallery-slide-img {
        height: 300px;
    }

    .transformation-container {
        height: 400px;
    }

    .transformation-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
