/* ========================================
   Project Detail Page
======================================== */

.pd-page {
    --pd-text: var(--text, #172033);
    --pd-muted: var(--muted, #687386);
    --pd-line: var(--line, #e5e9f0);
    --pd-primary: var(--primary, #635bff);
    --pd-surface: var(--surface, #ffffff);

    width: 100%;
    padding: 34px 0 90px;
    color: var(--pd-text);
}

.pd-page *,
.pd-page *::before,
.pd-page *::after {
    box-sizing: border-box;
}

.pd-container {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

/* Breadcrumb */

.pd-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    font-size: 13px;
    color: var(--pd-muted);
}

.pd-breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pd-breadcrumb a:hover {
    color: var(--pd-primary);
}

.pd-breadcrumb > span {
    line-height: 1.5;
}

.pd-breadcrumb .pd-current {
    color: var(--pd-text);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Header */

.pd-header {
    max-width: 850px;
    margin-bottom: 30px;
}

.pd-service-label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 7px 13px;
    border: 1px solid rgba(99, 91, 255, 0.22);
    border-radius: 50px;
    background: rgba(99, 91, 255, 0.07);
    color: var(--pd-primary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.pd-title {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.16;
    letter-spacing: -1.5px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.pd-subtitle {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--pd-muted);
    font-size: 16px;
    line-height: 1.8;
}

/* Banner */

.pd-banner {
    width: 100%;
    height: 599px;
    margin-bottom: 58px;
    overflow: hidden;
    border: 1px solid var(--pd-line);
    border-radius: 16px;
    background: #f3f5f9;
}

.pd-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Main layout */

.pd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: start;
    gap: 48px;
}

.pd-main {
    min-width: 0;
}

.pd-section + .pd-section {
    margin-top: 58px;
}

.pd-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--pd-primary);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1.7px;
}

.pd-section h2 {
    margin: 0 0 22px;
    font-size: clamp(24px, 3vw, 31px);
    font-weight: 720;
    line-height: 1.3;
    letter-spacing: -0.6px;
}

/* Description */

.pd-description {
    color: var(--pd-muted);
    font-size: 15px;
    line-height: 1.95;
    overflow-wrap: anywhere;
}

.pd-description p {
    margin: 0 0 20px;
}

.pd-description p:last-child {
    margin-bottom: 0;
}

.pd-description h2,
.pd-description h3,
.pd-description h4 {
    margin: 28px 0 12px;
    color: var(--pd-text);
    line-height: 1.4;
}

.pd-description ul,
.pd-description ol {
    padding-left: 24px;
    margin: 16px 0;
}

.pd-description li {
    margin-bottom: 8px;
}

.pd-description img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Technologies */

.pd-tech-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.pd-tech-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 76px;
    padding: 14px;
    border: 1px solid var(--pd-line);
    border-radius: 11px;
    background: var(--pd-surface);
    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.pd-tech-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 91, 255, 0.4);
    box-shadow: 0 8px 22px rgba(22, 34, 65, 0.06);
}

.pd-tech-icon,
.pd-tech-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
}

.pd-tech-icon {
    object-fit: contain;
}

.pd-tech-placeholder {
    border-radius: 9px;
    background: rgba(99, 91, 255, 0.09);
    color: var(--pd-primary);
    font-size: 17px;
    font-weight: 750;
}

.pd-tech-name {
    min-width: 0;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.pd-empty {
    grid-column: 1 / -1;
    color: var(--pd-muted);
    font-size: 14px;
}

/* Sidebar */

.pd-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.pd-info-card,
.pd-cta-card {
    padding: 25px;
    border: 1px solid var(--pd-line);
    border-radius: 14px;
    background: var(--pd-surface);
}

.pd-info-card h3,
.pd-cta-card h3 {
    margin: 0;
    color: var(--pd-text);
    font-size: 18px;
    font-weight: 720;
    line-height: 1.5;
}

.pd-info-card h3 {
    margin-bottom: 24px;
}

.pd-info-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.pd-info-label {
    color: var(--pd-muted);
    font-size: 12px;
    line-height: 1.5;
}

.pd-info-value {
    color: var(--pd-text);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.pd-muted {
    color: var(--pd-muted);
    font-weight: 400;
}

.pd-info-divider {
    height: 1px;
    margin: 19px 0;
    background: var(--pd-line);
}

.pd-client-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--pd-primary);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.pd-client-link:hover {
    text-decoration: underline;
}

/* CTA */

.pd-cta-card {
    background:
        linear-gradient(
            145deg,
            rgba(99, 91, 255, 0.07),
            rgba(99, 91, 255, 0.015)
        );
}

.pd-cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    margin-bottom: 18px;
    border: 1px solid rgba(99, 91, 255, 0.2);
    border-radius: 12px;
    background: var(--pd-surface);
    color: var(--pd-primary);
    font-size: 24px;
}

.pd-cta-card h3 {
    font-size: 19px;
}

.pd-cta-card p {
    margin: 12px 0 22px;
    color: var(--pd-muted);
    font-size: 13px;
    line-height: 1.8;
}

.pd-cta-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 12px 15px;
    border: 0;
    border-radius: 8px;
    background: var(--pd-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.pd-cta-button:hover {
    opacity: 0.88;
}

/* Responsive */

@media (max-width: 1024px) {
    .pd-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
        gap: 28px;
    }

    .pd-tech-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pd-banner {
        height: 460px;
    }

    .pd-info-card,
    .pd-cta-card {
        padding: 21px;
    }
}

@media (max-width: 760px) {
    .pd-page {
        padding: 25px 0 60px;
    }

    .pd-container {
        width: calc(100% - 32px);
    }

    .pd-breadcrumb {
        gap: 7px;
        margin-bottom: 25px;
        font-size: 12px;
    }

    .pd-header {
        margin-bottom: 24px;
    }

    .pd-title {
        letter-spacing: -0.8px;
    }

    .pd-subtitle {
        font-size: 14px;
    }

    .pd-banner {
        height: auto;
        aspect-ratio: 16 / 10;
        margin-bottom: 38px;
        border-radius: 11px;
    }

    .pd-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 38px;
    }

    .pd-section + .pd-section {
        margin-top: 42px;
    }

    .pd-section h2 {
        margin-bottom: 18px;
    }

    .pd-description {
        font-size: 14px;
    }

    .pd-sidebar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .pd-tech-card {
        padding: 12px;
        gap: 10px;
    }

    .pd-tech-name {
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .pd-container {
        width: calc(100% - 24px);
    }

    .pd-tech-grid {
        grid-template-columns: 1fr;
    }

    .pd-tech-card {
        min-height: 65px;
    }

    .pd-info-card,
    .pd-cta-card {
        padding: 18px;
    }
}