/* ============================================
   AISMISR - Service Page Styles
   ============================================ */

.service-page-hero {
    min-height: 420px;
    display: flex;
    align-items: center;
    padding-top: 72px;
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
}

.sp-hero-bg {
    position: absolute;
    inset: -8%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    animation: heroZoomInOut 14s ease-in-out infinite;
    will-change: transform;
}

.sp-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(10, 21, 32, 0.92) 0%,
        rgba(13, 27, 42, 0.85) 50%,
        rgba(0, 212, 232, 0.12) 100%
    );
    pointer-events: none;
}

.sp-hero-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, transparent 55%);
    pointer-events: none;
}

@keyframes heroZoomInOut {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sp-hero-bg {
        animation: none;
        inset: 0;
    }
}

.service-page-hero::before {
    display: none;
}

.service-page-hero .container {
    position: relative;
    z-index: 2;
}

.sp-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 0;
    text-align: center;
}

.sp-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sp-breadcrumb a {
    color: var(--cyan);
    transition: var(--transition-fast);
}

.sp-breadcrumb a:hover {
    color: var(--cyan-light);
}

.sp-breadcrumb span {
    color: var(--text-muted);
}

.sp-hero-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.sp-hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.sp-hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 28px;
}

.sp-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.sp-hero-actions .btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.95);
    background: rgba(13, 27, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.sp-hero-actions .btn-outline:hover {
    background: #fff;
    color: var(--navy);
    border-color: #fff;
}

/* Main Content */
.sp-main {
    padding: 80px 0;
}

.sp-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
}

.sp-content h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.sp-intro {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 48px;
}

.sp-section {
    margin-bottom: 48px;
}

.sp-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.sp-feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
}

.sp-feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--shadow-cyan);
}

.sp-feature-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.sp-feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.sp-feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.sp-includes-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sp-includes-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.97rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
}

.check-icon {
    color: var(--cyan);
    font-weight: 800;
    flex-shrink: 0;
}

.sp-process {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.sp-process-step {
    text-align: center;
    position: relative;
}

.sp-step-num {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.1rem;
    margin: 0 auto 12px;
}

.sp-step-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.sp-tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-tech-badge {
    background: var(--cyan-glow);
    border: 1px solid var(--border-hover);
    color: var(--cyan);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Sidebar */
.sp-sidebar {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sp-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.sp-sidebar-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.sp-sidebar-body {
    padding: 24px;
}

.sp-sidebar-body h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.sp-sidebar-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.sp-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.sp-sidebar-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-right: 16px;
    position: relative;
}

.sp-sidebar-list li::before {
    content: '▸';
    position: absolute;
    right: 0;
    color: var(--cyan);
}

.sp-cta-card {
    background: linear-gradient(135deg, var(--navy-2), var(--navy-3));
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
}

[data-theme="light"] .sp-cta-card {
    background: linear-gradient(135deg, var(--cyan-dark), var(--cyan));
}

.sp-cta-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

[data-theme="light"] .sp-cta-card h3,
[data-theme="light"] .sp-cta-card p {
    color: var(--navy);
}

.sp-cta-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.sp-cta-card .btn-outline {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sp-cta-card .btn-outline:hover {
    background: #fff;
    color: var(--navy);
    border-color: #fff;
}

[data-theme="light"] .sp-cta-card .btn-outline {
    color: var(--navy);
    border-color: var(--navy);
    background: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .sp-cta-card .btn-outline:hover {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

/* Related Services */
.sp-related {
    background: var(--bg-secondary);
    padding: 80px 0;
}

/* FAQ Section */
.sp-faq {
    background: var(--bg-primary);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item.open {
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px var(--shadow-cyan);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
}

.faq-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cyan-glow);
    border: 1px solid var(--border-hover);
    border-radius: 50%;
    color: var(--cyan);
    font-size: 1.1rem;
    transition: var(--transition);
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
    background: var(--cyan);
    color: var(--navy);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 22px 18px;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.page-form-section {
    background: var(--bg-secondary);
}

.page-form-wrap {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.inline-form-success {
    display: none;
    margin-top: 12px;
}

.inline-form-success.show {
    display: block;
}

.sp-related .section-header {
    margin-bottom: 48px;
}

/* Service cards with images */
.service-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card-link:hover .service-card-image img,
.service-card:hover .service-card-image img {
    transform: scale(1.08);
}

.service-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 60%);
}

.service-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.service-card-link {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.service-card-link .service-icon-wrap {
    margin-top: -20px;
    position: relative;
    z-index: 2;
}

.services-grid .service-card-link {
    height: 100%;
}

/* Index service cards update */
.services-grid .service-card {
    padding: 0;
    overflow: hidden;
}

.services-grid .service-card .service-card-body {
    padding: 24px;
}

.services-grid .service-card .service-card-image {
    border-radius: 0;
}

/* Nav fix for subpages */
.nav-logo[href="../index.html"] .logo-text,
a[href="../index.html"].footer-logo span {
    color: var(--cyan);
}

@media (max-width: 1024px) {
    .sp-layout {
        grid-template-columns: 1fr;
    }

    .sp-sidebar {
        position: static;
    }

    .sp-process {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .service-page-hero {
        min-height: 360px;
    }

    .sp-features-grid {
        grid-template-columns: 1fr;
    }

    .sp-process {
        grid-template-columns: 1fr;
    }

    .sp-hero-actions {
        flex-direction: column;
    }

    .sp-hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
