/* TM Innovations — project detail (professional case study) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.pd-page,
.pd-page * {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body:has(.pd-page) {
    background: #f3f4f6 !important;
    color: #1e293b;
}

.pd-page::before,
.pd-page::after {
    display: none !important;
}

.pd-page {
    padding: 108px 24px 64px !important;
    background: #f3f4f6;
}

.pd-container {
    max-width: 1180px;
}

/* Stacked sections — each overlaps the previous on scroll */
.pd-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-bottom: min(16vh, 140px);
}

.pd-stack-item {
    position: sticky;
    top: 88px;
    margin-top: -56px;
    margin-bottom: min(11vh, 110px);
    padding: clamp(28px, 4vw, 40px);
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 -6px 28px rgba(15, 23, 42, 0.05),
        0 28px 56px rgba(15, 23, 42, 0.1);
    z-index: 1;
}

.pd-stack-item:first-child {
    margin-top: 0;
    z-index: 1;
}

.pd-stack-item:nth-child(2) { z-index: 2; }
.pd-stack-item:nth-child(3) { z-index: 3; }
.pd-stack-item:nth-child(4) { z-index: 4; }
.pd-stack-item:nth-child(5) { z-index: 5; }
.pd-stack-item:nth-child(6) { z-index: 6; }
.pd-stack-item:nth-child(7) { z-index: 7; }

.pd-stack-item:last-child {
    margin-bottom: 0;
}

.pd-stack-item--hero.pd-hero {
    margin-bottom: min(11vh, 110px) !important;
}

.pd-stack-item.pd-trusted {
    padding: 28px 36px;
    border-top: none;
    border-bottom: none;
    margin-bottom: min(11vh, 110px);
}

.pd-stack-item.pd-info-bar {
    padding: 20px 12px !important;
    margin-bottom: min(11vh, 110px) !important;
}

.pd-stack-item.pd-section {
    margin-bottom: min(11vh, 110px) !important;
    margin-top: -56px;
}

.pd-stack-item.pd-screenshots {
    margin-top: -56px !important;
    margin-bottom: min(11vh, 110px) !important;
}

.pd-stack-item--results.pd-results {
    margin-top: -56px;
    z-index: 8 !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 32px 64px rgba(15, 23, 42, 0.35) !important;
}

.pd-hero.pd-stack-item {
    margin-top: 0 !important;
}

.pd-hero {
    margin-bottom: 0 !important;
}

.pd-trusted {
    margin-bottom: 0 !important;
}

.pd-info-bar {
    margin-bottom: 0 !important;
}

.pd-section {
    margin-bottom: 0 !important;
}

.pd-screenshots {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.pd-breadcrumb {
    margin-bottom: 32px;
    font-size: 0.875rem;
}

.pd-breadcrumb .current {
    -webkit-text-fill-color: #4f46e5;
    color: #4f46e5;
    background: none;
}

/* Hero */
.pd-hero {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 1.05fr) !important;
    gap: 40px !important;
    margin-bottom: 40px !important;
    align-items: center !important;
}

.pd-label {
    background: #ede9fe !important;
    border: none !important;
    color: #5b21b6 !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.12em !important;
    box-shadow: none !important;
    padding: 6px 12px !important;
}

.pd-label::before {
    display: none;
}

.pd-title {
    font-size: clamp(2.25rem, 4.5vw, 3.5rem) !important;
    line-height: 1.08 !important;
    color: #0f172a !important;
    text-shadow: none !important;
    font-weight: 800 !important;
}

.pd-title span {
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 55%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: none;
}

.pd-lead {
    color: #64748b !important;
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
    max-width: 48ch;
}

.pd-btn-primary {
    background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%) !important;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.28) !important;
    border-radius: 999px !important;
}

.pd-btn-outline {
    border-radius: 999px !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
    background: #fff !important;
}

.pd-mockup {
    min-height: 420px !important;
}

.pd-mockup::before {
    display: none;
}

.pd-mockup-laptop {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    min-height: auto !important;
}

.pd-mockup-image {
    border-radius: 16px !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12) !important;
    min-height: 360px !important;
    height: auto !important;
    object-fit: cover;
}

.pd-hero-badges {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.pd-hero-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(226, 232, 240, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    max-width: 200px;
    line-height: 1.35;
}

.pd-hero-badge--chart {
    top: 8%;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
    border-radius: 50%;
    width: 88px;
    height: 88px;
    max-width: none;
    justify-content: center;
    text-align: center;
    font-size: 0.72rem;
}

.pd-hero-badge--chart strong {
    display: block;
    font-size: 1.35rem;
    color: #4f46e5;
    line-height: 1;
}

.pd-hero-badge--speed {
    right: 8%;
    bottom: 12%;
}

.pd-hero-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ede9fe;
    color: #4f46e5;
    flex-shrink: 0;
}

.pd-hero-badge-icon svg {
    width: 18px;
    height: 18px;
}

/* Trusted bar */
.pd-trusted {
    margin-bottom: 40px;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.pd-trusted p {
    margin: 0 0 14px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.pd-trusted-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 28px 40px;
    opacity: 0.55;
    filter: grayscale(1);
}

.pd-trusted-logos span {
    font-size: 0.95rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.02em;
}

/* Info bar */
.pd-info-bar {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04) !important;
    padding: 8px 0 !important;
    margin-bottom: 40px !important;
}

.pd-info-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
}

.pd-info-item span {
    font-size: 0.72rem !important;
    color: #94a3b8 !important;
}

.pd-info-item strong {
    font-size: 0.95rem !important;
    color: #0f172a !important;
    font-weight: 600 !important;
}

/* Section cards */
.pd-section {
    margin-bottom: 40px !important;
}

.pd-section-eyebrow {
    color: #6366f1 !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.1em !important;
}

.pd-section-eyebrow::before {
    background: #6366f1 !important;
    width: 24px !important;
}

.pd-section-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 20px !important;
}

.pd-section-title::after {
    display: none;
}

.pd-story-card {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
    padding: 28px !important;
}

.pd-story-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08) !important;
}

.pd-story-card--challenge .pd-story-icon {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    box-shadow: none !important;
}

.pd-story-card--solution .pd-story-icon {
    background: #ecfdf5 !important;
    color: #059669 !important;
    box-shadow: none !important;
}

.pd-story-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    box-shadow: none !important;
}

.pd-story-card h3 {
    font-size: 1.25rem !important;
    color: #0f172a !important;
}

.pd-story-card > p {
    margin-bottom: 16px !important;
    font-size: 0.95rem !important;
    line-height: 1.65 !important;
    color: #64748b !important;
}

.pd-challenge-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-challenge-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #475569;
}

.pd-challenge-list li::before {
    content: '✕';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fef2f2;
    color: #dc2626;
    font-size: 0.65rem;
    font-weight: 700;
}

.pd-solution-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pd-solution-item {
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
}

.pd-solution-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ede9fe;
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pd-solution-item-icon svg {
    width: 16px;
    height: 16px;
}

/* Features + tech */
.pd-features-wrap {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
}

.pd-features-wrap::after {
    display: none;
}

.pd-check {
    background: #4f46e5 !important;
    width: 22px !important;
    height: 22px !important;
    font-size: 0.7rem !important;
    box-shadow: none !important;
}

.pd-feature-text {
    font-weight: 500 !important;
    font-size: 0.92rem !important;
    color: #334155 !important;
}

.pd-feature-list li {
    border-bottom-color: #f1f5f9 !important;
}

.pd-tech-panel {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
}

.pd-tech-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.pd-tech-card {
    aspect-ratio: auto !important;
    min-height: 0 !important;
    padding: 16px 12px !important;
    border-radius: 12px !important;
    flex-direction: row !important;
    gap: 10px !important;
    justify-content: flex-start !important;
    text-align: left !important;
}

.pd-tech-logo {
    width: 40px !important;
    height: 40px !important;
    padding: 4px !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
}

.pd-tech-logo img {
    max-width: 32px !important;
    max-height: 32px !important;
}

.pd-tech-name {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    text-align: left !important;
}

.pd-tech-testimonial {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%) !important;
    border-radius: 14px !important;
}

/* Screenshots carousel */
.pd-screenshots-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.pd-screenshots-header .pd-section-title {
    margin-bottom: 0 !important;
}

.pd-screenshots-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
    white-space: nowrap;
}

.pd-screenshots-link:hover {
    color: #6366f1;
}

.pd-carousel {
    position: relative;
}

.pd-carousel-viewport {
    overflow: hidden;
    border-radius: 16px;
}

.pd-carousel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.pd-carousel .pd-screen-card {
    flex: 0 0 calc(25% - 12px);
    min-width: calc(25% - 12px);
    border-radius: 12px !important;
}

.pd-carousel .pd-screen-card img {
    min-height: 180px !important;
    height: 200px !important;
}

.pd-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    z-index: 2;
    transition: background 0.2s ease, color 0.2s ease;
}

.pd-carousel-btn:hover {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.pd-carousel-btn--prev {
    left: -18px;
}

.pd-carousel-btn--next {
    right: -18px;
}

.pd-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.pd-dots button.active {
    width: 22px;
    border-radius: 999px;
    background: #4f46e5;
}

/* Results */
.pd-results {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    border-radius: 20px !important;
    padding: 48px 32px !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2) !important;
}

.pd-results::before {
    display: none;
}

.pd-results h2 {
    font-weight: 700 !important;
    margin-bottom: 36px !important;
}

.pd-stat-icon {
    width: 56px !important;
    height: 56px !important;
    border-radius: 14px !important;
    background: rgba(99, 102, 241, 0.2) !important;
    border: 1px solid rgba(129, 140, 248, 0.35) !important;
    color: #a5b4fc !important;
}

.pd-stat strong {
    background: none !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
    font-size: 2.25rem !important;
    font-weight: 800 !important;
}

.pd-stat span {
    color: #94a3b8 !important;
    font-size: 0.9rem !important;
}

@media (prefers-reduced-motion: reduce) {
    .pd-stack-item {
        position: relative;
        top: auto;
        margin-top: 24px;
    }

    .pd-stack-item:first-child {
        margin-top: 0;
    }

    .pd-stack-item.pd-section,
    .pd-stack-item.pd-screenshots,
    .pd-stack-item--results.pd-results {
        margin-top: 24px;
    }
}

@media (max-width: 991px) {
    .pd-stack-item {
        top: 76px;
        margin-top: -40px;
    }

    .pd-hero {
        grid-template-columns: 1fr !important;
    }

    .pd-carousel .pd-screen-card {
        flex: 0 0 calc(50% - 8px);
        min-width: calc(50% - 8px);
    }

    .pd-solution-grid {
        grid-template-columns: 1fr;
    }

    .pd-carousel-btn--prev {
        left: 4px;
    }

    .pd-carousel-btn--next {
        right: 4px;
    }
}

@media (max-width: 640px) {
    .pd-carousel .pd-screen-card {
        flex: 0 0 85%;
        min-width: 85%;
    }

    .pd-tech-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .pd-hero-badge--chart {
        width: 72px;
        height: 72px;
        font-size: 0.62rem;
    }
}
