/* ==========================================================================
   Service Detail Page
   ========================================================================== */

/* Hero */
.sd-hero {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 8rem 0 3rem;
}

.sd-breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    opacity: 0.85;
}
.sd-breadcrumb a {
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.sd-breadcrumb a:hover {
    opacity: 0.8;
}
.sd-breadcrumb span {
    font-weight: 600;
}

.sd-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.sd-hero-summary {
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 800px;
    opacity: 0.95;
}

.sd-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.sd-hero-tags .tag {
    background: rgba(255,255,255,0.2);
    color: var(--white);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
}

/* Hero Actions */
.sd-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}
.sd-hero-actions .btn {
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.sd-hero-actions .btn-primary-action {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.sd-hero-actions .btn-primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.sd-hero-actions .btn-secondary-action {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
}
.sd-hero-actions .btn-secondary-action:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
}
.sd-hero-actions .btn i {
    margin-right: 0.4rem;
}

/* Statistics Bar */
.sd-stats {
    background: var(--white);
    padding: 2.5rem 0;
    border-bottom: 1px solid #eee;
}
.sd-stats-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}
.sd-stat {
    text-align: center;
}
.sd-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    line-height: 1.2;
}
.sd-stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Process Flow */
.sd-flow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}
.sd-flow-step {
    text-align: center;
    padding: 2rem 1.25rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.sd-flow-step:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}
.sd-flow-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.sd-flow-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    display: block;
}
.sd-flow-step h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}
.sd-flow-step p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Process Flow with Images */
.sd-flow-step.has-image {
    padding: 0;
    overflow: hidden;
}
.sd-flow-step.has-image .sd-flow-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}
.sd-flow-step.has-image .sd-flow-body {
    padding: 1.25rem 1rem 1rem;
    position: relative;
}
.sd-flow-step.has-image .sd-flow-num {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.sd-flow-arrow {
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    opacity: 0.5;
}
@media (min-width: 769px) and (max-width: 1024px) {
    .sd-flow-grid.has-arrows {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .sd-flow-grid.has-arrows > .sd-flow-arrow {
        display: none;
    }
}
@media (min-width: 1025px) {
    .sd-flow-grid.has-arrows {
        grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
        align-items: center;
    }
    .sd-flow-grid.has-arrows > .sd-flow-arrow {
        display: flex;
    }
}

/* Gallery Showcase */
.sd-showcase {
    margin-top: 2.5rem;
}
.sd-showcase-main {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: #f5f5f5;
}
.sd-showcase-main img {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    display: block;
    transition: opacity 0.4s ease;
}
.sd-showcase-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: var(--white);
}
.sd-showcase-caption h3 {
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
}
.sd-showcase-caption p {
    font-size: 0.9rem;
    opacity: 0.9;
}
.sd-showcase-thumbs {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
}
.sd-thumb {
    flex-shrink: 0;
    width: 120px;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
    scroll-snap-align: start;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.sd-thumb.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
}
.sd-thumb:hover {
    border-color: var(--primary-color);
}
.sd-thumb img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}
.sd-thumb-label {
    display: block;
    font-size: 0.7rem;
    text-align: center;
    padding: 0.3rem 0.25rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sd-gallery-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.15rem 0.65rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 500;
}

/* Common Section */
.sd-section {
    padding: 5rem 0;
}
.sd-section:nth-child(even) {
    background: var(--bg-light);
}

/* Overview Grid */
.sd-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}
.sd-overview-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}
.sd-overview-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}
.sd-overview-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.sd-overview-card h3 {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}
.sd-overview-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Feature Grid */
.sd-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}
.sd-feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}
.sd-feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.sd-feature-card h3 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}
.sd-feature-card p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}
.sd-feature-benefit {
    color: var(--success);
    font-weight: 600;
    font-size: 0.9rem;
}
.sd-feature-benefit i {
    margin-right: 0.3rem;
}

/* Effects */
.sd-effects-list {
    max-width: 800px;
    margin: 3rem auto 0;
}
.sd-effect-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #eee;
}
.sd-effect-item:last-child {
    border-bottom: none;
}
.sd-effect-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}
.sd-effect-text {
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: 0.3rem;
}

/* FAQ Accordion */
.sd-faq-list {
    max-width: 800px;
    margin: 3rem auto 0;
}
.sd-faq-item {
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.sd-faq-q {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
}
.sd-faq-q:hover {
    color: var(--primary-color);
}
.sd-faq-q::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--text-light);
}
.sd-faq-item.active .sd-faq-q::after {
    transform: rotate(180deg);
}
.sd-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.sd-faq-item.active .sd-faq-a {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem;
}
.sd-faq-a p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Case Studies */
.sd-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.sd-case-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}
.sd-case-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}
.sd-case-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}
.sd-case-result {
    color: var(--text-dark);
    font-weight: 500;
}

/* Applications */
.sd-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
}
.sd-app-item {
    background: var(--white);
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}
.sd-app-item:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}
.sd-app-item i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}
.sd-app-item:hover i {
    color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    .sd-hero {
        padding: 6rem 0 2rem;
    }
    .sd-hero h1 {
        font-size: 1.75rem;
    }
    .sd-hero-summary {
        font-size: 1rem;
    }
    .sd-section {
        padding: 3rem 0;
    }
    .sd-overview-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .sd-feature-grid {
        grid-template-columns: 1fr;
    }
    .sd-app-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sd-stats-grid {
        gap: 1.5rem;
    }
    .sd-stat-value {
        font-size: 1.5rem;
    }
    .sd-flow-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .sd-flow-grid.has-arrows {
        grid-template-columns: 1fr;
    }
    .sd-flow-arrow {
        display: none !important;
    }
    .sd-flow-step:not(.has-image) {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
        padding: 1.25rem;
    }
    .sd-flow-step.has-image {
        display: grid;
        grid-template-columns: 120px 1fr;
        text-align: left;
    }
    .sd-flow-step.has-image .sd-flow-img {
        height: 100%;
        min-height: 90px;
        object-fit: cover;
    }
    .sd-flow-step.has-image .sd-flow-body {
        padding: 0.75rem 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .sd-flow-step.has-image .sd-flow-num {
        position: static;
        transform: none;
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    .sd-flow-step.has-image h3 {
        font-size: 0.9rem;
    }
    .sd-flow-step.has-image p {
        font-size: 0.8rem;
    }
    .sd-flow-num {
        flex-shrink: 0;
        margin-bottom: 0;
    }
    .sd-flow-icon {
        display: none;
    }
    .sd-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .sd-showcase-main img {
        max-height: 360px;
        object-fit: contain;
    }
    .sd-showcase-caption {
        padding: 1rem;
    }
    .sd-showcase-caption h3 {
        font-size: 1rem;
    }
    .sd-thumb {
        width: 90px;
    }
    .sd-thumb img {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .sd-app-grid {
        grid-template-columns: 1fr;
    }
}

/* Lightbox */
.sd-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}
.sd-lightbox.active {
    display: flex;
}
.sd-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.sd-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    border: none;
    transition: background 0.2s;
}
.sd-lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}
