/*
 * Portfolio project page — resources/views/pages/portfolio-details.blade.php
 * (sections in resources/views/sections/project-detail/, script in assets/js/project-detail.js)
 *
 * Everything is scoped under .project-detail / .pd-* so the theme's large heading styles don't leak in.
 * The hero laptop frame reuses .cx-pf-laptop / .cx-pf-screen / .cx-pf-base from chronex.css.
 *
 * Contents
 *   1. Base and design tokens      6. Key features      11. Related projects
 *   2. Hero                        7. Delivered solution 12. Lightbox
 *   3. Hero laptop (cover image)   8. Screenshots       13. Responsive
 *   4. Sticky section nav          9. Tech stack
 *   5. Section headings, overview  10. Call to action
 */

/* ---------- 1. Base and design tokens ---------- */
.project-detail {
    --pd-ink: #131b33;
    --pd-text: #4c5770;
    --pd-muted: #76819a;
    --pd-line: #e4e8f1;
    --pd-brand: #456ff8;
    --pd-brand-dark: #2f53d6;
    --pd-brand-soft: #eef2ff;
    --pd-violet: #7c5cf5;
    --pd-radius: 18px;
    --pd-header: 84px;
    color: var(--pd-ink);
    background: #fff;
}

.project-detail .pd-wrap {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

.project-detail h1,
.project-detail h2,
.project-detail h3 {
    font-family: inherit;
    color: var(--pd-ink);
    letter-spacing: -0.025em;
    text-transform: none;
}

.project-detail p {
    color: var(--pd-text);
}

.project-detail .pd-section {
    padding-block: 80px;
    scroll-margin-top: calc(var(--pd-header) + 64px);
}

.pd-label {
    display: inline-block;
    color: var(--pd-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* ---------- 2. Hero ---------- */
.project-detail .pd-hero {
    position: relative;
    overflow: hidden;
    padding: 28px 0 72px;
    background: radial-gradient(900px 420px at 85% 10%, #e4e9ff 0, transparent 60%), radial-gradient(700px 380px at 0 100%, #f1ebff 0, transparent 60%), linear-gradient(180deg, #f7f8ff, #fbfcff);
}

.pd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--pd-muted);
    margin-bottom: 44px;
}

.pd-breadcrumb a {
    color: #55627d;
    transition: color 0.15s;
}

.pd-breadcrumb a:hover {
    color: var(--pd-brand);
}

.pd-breadcrumb i {
    font-size: 9px;
    opacity: 0.6;
}

.pd-breadcrumb span {
    color: var(--pd-ink);
    font-weight: 600;
    max-width: 340px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pd-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 56px;
    align-items: center;
}

.pd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.pd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dfe5f3;
    color: #3a4a74;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 1px 2px #1320400a;
}

.pd-chip-star {
    background: linear-gradient(135deg, #fff6db, #ffecc0);
    border-color: #f5dc9c;
    color: #8a5a00;
}

.pd-chip-star i {
    color: #f0a500;
    font-size: 11px;
}

.project-detail h1 {
    font-size: clamp(32px, 3.6vw, 50px);
    line-height: 1.12;
    font-weight: 700;
    margin: 0 0 20px;
}

.project-detail .pd-summary {
    font-size: 17px;
    line-height: 1.8;
    margin: 0 0 30px;
    max-width: 560px;
}

.pd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.pd-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d9e0ef;
    color: var(--pd-ink);
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.pd-btn-ghost:hover {
    border-color: var(--pd-brand);
    color: var(--pd-brand);
    transform: translateY(-1px);
}

.pd-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0;
    margin: 36px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid #dfe4f0;
}

.pd-stats > div {
    padding-right: 16px;
}

.pd-stats > div + div {
    padding-left: 16px;
    border-left: 1px solid #dfe4f0;
}

.pd-stats dt {
    font-size: 12px;
    font-weight: 500;
    color: var(--pd-muted);
    margin-bottom: 6px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.pd-stats dt i {
    color: var(--pd-brand);
    font-size: 11px;
}

.pd-stats dd {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--pd-ink);
    line-height: 1.4;
}

/* ---------- 3. Hero laptop (cover image) ---------- */
.pd-cover {
    position: relative;
    margin: 0;
    padding: 24px 0 10px;
}

.pd-cover::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 6% 4% 0;
    border-radius: 50%;
    background: radial-gradient(closest-side, #c6d2ff 0, #e2e8ff 55%, transparent 100%);
    filter: blur(10px);
}

.pd-cover::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 12%;
    right: 12%;
    bottom: 0;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(closest-side, #13204040, transparent);
}

.project-detail .pd-cover-link.cx-pf-laptop {
    width: 88%;
    z-index: 1;
    transition: transform 0.4s ease;
}

.pd-cover-link:hover {
    transform: translateY(-4px);
}

.pd-cover-link .cx-pf-screen {
    border-width: 10px;
    border-bottom-width: 12px;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -2px 0 #2a3142 inset, 0 40px 60px -30px #0b153080;
}

.pd-cover-link .cx-pf-screen img {
    object-position: center top;
}

.pd-cover-link.is-tall:hover .cx-pf-screen img {
    object-position: center bottom;
}

.pd-cover-link .cx-pf-base {
    height: 14px;
}

.pd-active-preview.is-tall img {
    object-fit: cover;
    object-position: top;
}

.pd-zoom {
    position: absolute;
    z-index: 2;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #131b33d9;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s, transform 0.2s;
}

.pd-cover-link:hover .pd-zoom,
.pd-cover-link:focus-visible .pd-zoom,
.pd-active-preview:hover .pd-zoom,
.pd-active-preview:focus-visible .pd-zoom {
    opacity: 1;
    transform: none;
}

/* ---------- 4. Sticky section nav ---------- */
.pd-subnav {
    position: sticky;
    top: var(--pd-header);
    z-index: 20;
    background: #ffffffeb;
    backdrop-filter: blur(10px);
    border-block: 1px solid var(--pd-line);
}

.pd-subnav .pd-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pd-subnav-links {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.pd-subnav-links::-webkit-scrollbar {
    display: none;
}

.pd-subnav-links a {
    position: relative;
    padding: 17px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pd-muted);
    white-space: nowrap;
    transition: color 0.15s;
}

.pd-subnav-links a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--pd-brand);
    transform: scaleX(0);
    transition: transform 0.2s;
}

.pd-subnav-links a:hover,
.pd-subnav-links a.is-active {
    color: var(--pd-ink);
}

.pd-subnav-links a.is-active::after {
    transform: scaleX(1);
}

.pd-subnav-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--pd-brand-soft);
    color: var(--pd-brand-dark);
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}

.pd-subnav-cta:hover {
    background: var(--pd-brand);
    color: #fff;
}

/* ---------- 5. Section headings ---------- */
.pd-head {
    margin-bottom: 40px;
}

.project-detail .pd-head h2 {
    font-size: clamp(26px, 2.6vw, 36px);
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 10px;
}

.pd-head p {
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
    color: var(--pd-muted);
}

.pd-head-center {
    text-align: center;
    max-width: 620px;
    margin-inline: auto;
}

.pd-head-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}

.pd-text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pd-brand);
    white-space: nowrap;
}

.pd-text-link:hover {
    color: var(--pd-brand-dark);
}

.pd-text-link i {
    transition: transform 0.2s;
}

.pd-text-link:hover i {
    transform: translateX(3px);
}

/* ---------- 5. Overview ---------- */
.pd-story {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.pd-lead p {
    font-size: 19px;
    line-height: 1.8;
    color: #334061;
    margin: 0 0 18px;
}

.pd-prose {
    font-size: 16px;
    line-height: 1.85;
    color: var(--pd-text);
    margin-top: 16px;
}

.project-detail .pd-prose h2 {
    font-size: 21px;
    margin: 28px 0 12px;
}

.pd-prose p {
    margin: 0 0 16px;
}

.pd-prose ul {
    padding-left: 20px;
}

.pd-prose li {
    margin: 8px 0;
}

.pd-prose li::marker {
    color: var(--pd-brand);
}

.pd-story-side {
    display: grid;
    gap: 16px;
}

.pd-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 22px;
    border-radius: var(--pd-radius);
    background: #fff;
    border: 1px solid var(--pd-line);
    box-shadow: 0 8px 24px -14px #1a2b6b26;
}

.pd-card-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: var(--pd-brand-soft);
    color: var(--pd-brand);
    font-size: 18px;
}

.pd-type .pd-card-icon {
    background: #f3eeff;
    color: var(--pd-violet);
}

.project-detail .pd-card h3 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--pd-muted);
    margin: 0 0 4px;
}

.pd-card p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--pd-ink);
}

/* ---------- 6. Key features ---------- */
.pd-features-section {
    background: linear-gradient(180deg, #f7f9fe, #f3f6fd);
    border-block: 1px solid #e9edf6;
}

.pd-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.pd-feature {
    position: relative;
    padding: 28px 26px 26px;
    border-radius: var(--pd-radius);
    background: #fff;
    border: 1px solid var(--pd-line);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.pd-feature:hover {
    transform: translateY(-4px);
    border-color: #cdd7fb;
    box-shadow: 0 18px 40px -20px #2b49c24d;
}

.pd-feature-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--pd-brand), var(--pd-violet));
    color: #fff;
    font-size: 20px;
    box-shadow: 0 10px 20px -10px #456ff8b3;
}

.pd-feature-num {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 13px;
    font-weight: 700;
    color: #c7cfe2;
}

.pd-feature p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--pd-ink);
}

/* ---------- 7. Delivered solution ---------- */
.pd-result {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-top: 80px;
    padding: 40px 44px;
    border-radius: 24px;
    background: linear-gradient(135deg, #f0fbf5, #eef7ff);
    border: 1px solid #d6eee2;
}

.pd-result-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: #18a058;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 12px 24px -12px #18a058b3;
}

.pd-result .pd-label {
    color: #138a4b;
}

.project-detail .pd-result h2 {
    font-size: clamp(22px, 2vw, 28px);
    margin: 0 0 10px;
}

.pd-result-text p {
    font-size: 17px;
    line-height: 1.8;
    color: #3a4a60;
    margin: 0;
}

/* ---------- 8. Screenshots ---------- */
.pd-gallery-section {
    background: #0f1630;
    margin-top: 80px;
}

.pd-gallery-section .pd-label {
    color: #8fa6ff;
}

.project-detail .pd-gallery-section h2 {
    color: #fff;
}

.pd-gallery-section .pd-head p {
    color: #a7b1cc;
}

.pd-count {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 999px;
    background: #ffffff14;
    border: 1px solid #ffffff24;
    color: #dfe5f7;
    font-size: 13px;
    font-weight: 600;
}

.pd-viewer {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 30px 80px -30px #000c;
}

.pd-viewer-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    background: #f6f8fc;
    border-bottom: 1px solid var(--pd-line);
}

.project-detail .pd-viewer-bar h3 {
    flex: 1;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    text-align: center;
}

.pd-dots {
    display: inline-flex;
    gap: 6px;
}

.pd-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff6058;
}

.pd-dots i:nth-child(2) {
    background: #ffbd2e;
}

.pd-dots i:nth-child(3) {
    background: #28c941;
}

.pd-viewer-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--pd-muted);
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--pd-line);
    white-space: nowrap;
}

.pd-stage {
    position: relative;
}

.pd-active-preview {
    display: block;
    position: relative;
    aspect-ratio: 16/10;
    max-height: 680px;
    width: 100%;
    background: #eef2f8;
    overflow: hidden;
    cursor: zoom-in;
}

.pd-active-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pd-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: #fffffff2;
    color: var(--pd-ink);
    font-size: 16px;
    box-shadow: 0 8px 24px -6px #13204059;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.pd-nav-btn:hover {
    background: var(--pd-brand);
    color: #fff;
    transform: translateY(-50%) scale(1.06);
}

.pd-nav-prev {
    left: 16px;
}

.pd-nav-next {
    right: 16px;
}

.pd-thumbnails {
    display: flex;
    gap: 14px;
    margin-top: 20px;
    padding: 4px 2px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #3a4670 transparent;
}

.pd-thumbnail {
    flex: 0 0 190px;
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
    background: #1b2443;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}

.pd-thumbnail:hover {
    opacity: 0.9;
}

.pd-thumbnail.is-active {
    opacity: 1;
    border-color: #7d95ff;
    transform: translateY(-2px);
}

.pd-thumb-image {
    display: block;
    aspect-ratio: 16/10;
    background: #eef2f8;
    overflow: hidden;
}

.pd-thumb-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.pd-thumb-caption {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 9px 11px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: #e7ebf8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-thumb-caption b {
    font-size: 11px;
    color: #8fa6ff;
}

/* ---------- 9. Tech stack ---------- */
.pd-stack {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.pd-stack li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 12px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--pd-line);
    font-size: 15px;
    font-weight: 600;
    color: var(--pd-ink);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.pd-stack li:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--brand) 40%, #fff);
    box-shadow: 0 12px 26px -16px color-mix(in srgb, var(--brand) 70%, transparent);
}

.pd-stack span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--brand) 12%, #fff);
    color: var(--brand);
    font-size: 20px;
}

/* ---------- 10. Call to action ---------- */
.pd-cta {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 48px 52px;
    border-radius: 26px;
    background: linear-gradient(120deg, #2f53d6, #456ff8 45%, #7c5cf5);
    box-shadow: 0 30px 60px -30px #2f53d6b3;
}

.pd-cta::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: #ffffff1a;
}

.project-detail .pd-cta h2 {
    color: #fff;
    font-size: clamp(24px, 2.4vw, 32px);
    margin: 0 0 8px;
}

.pd-cta p {
    margin: 0;
    color: #e3e9ff;
    font-size: 16px;
    line-height: 1.7;
    max-width: 520px;
}

.pd-cta-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

.pd-cta-primary,
.pd-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.2s, background 0.2s;
}

.pd-cta-primary {
    background: #fff;
    color: var(--pd-brand-dark);
}

.pd-cta-primary:hover {
    transform: translateY(-2px);
    color: var(--pd-brand-dark);
}

.pd-cta-secondary {
    color: #fff;
    border: 1px solid #ffffff66;
}

.pd-cta-secondary:hover {
    background: #ffffff1f;
    color: #fff;
}

/* ---------- 11. Related projects ---------- */
.project-detail .pd-related {
    padding-top: 80px;
}

/* Last section on the page: only a small gap before the site marquee/footer */
.project-detail > .pd-section:last-child {
    padding-bottom: var(--cx-content-end-space, 24px);
}

/* ---------- 12. Lightbox ---------- */
.pd-dialog {
    padding: 0;
    border: 0;
    border-radius: 14px;
    width: min(1440px, 94vw);
    max-width: 94vw;
    height: 90dvh;
    max-height: 90dvh;
    background: #edf1f7;
    color: var(--pd-ink);
    overflow: hidden;
}

.pd-dialog::backdrop {
    background: #0b1226e6;
    backdrop-filter: blur(6px);
}

.pd-dialog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    height: 64px;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #dce2ec;
}

.pd-dialog-toolbar p {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: var(--pd-ink);
}

.pd-dialog-toolbar > div {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.pd-dialog-toolbar button {
    width: 40px;
    height: 40px;
    border: 1px solid #dce2ec;
    background: #f5f7fb;
    border-radius: 10px;
    color: #253452;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pd-dialog-toolbar button:hover {
    background: var(--pd-brand);
    border-color: var(--pd-brand);
    color: #fff;
}

/* Scroll area: .allow-natural-scroll + data-lenis-prevent (in the view) keep Lenis smooth scroll from blocking it */
.pd-dialog-scroll {
    height: calc(100% - 64px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
}

.pd-dialog-scroll:focus {
    outline: 0;
}

.pd-dialog-scroll img {
    display: block;
    width: 100%;
    height: auto;
    margin: auto;
    border-radius: 6px;
}

.pd-modal-open {
    overflow: hidden;
}

.project-detail a:focus-visible,
.project-detail button:focus-visible,
.pd-dialog button:focus-visible {
    outline: 3px solid var(--pd-brand);
    outline-offset: 3px;
}

/* ---------- 13. Responsive ---------- */
/* Laptop */
@media (max-width: 1199px) {
    .pd-hero-grid {
        gap: 40px;
    }

    .pd-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Tablet */
@media (max-width: 991px) {
    .pd-hero-grid {
        grid-template-columns: 1fr;
    }

    .pd-hero-copy {
        max-width: 720px;
    }

    .pd-story {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .pd-story-side {
        grid-template-columns: 1fr 1fr;
    }

    .pd-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 40px;
    }
}

/* Phone */
@media (max-width: 767px) {
    .project-detail .pd-wrap {
        width: calc(100% - 32px);
    }

    .project-detail .pd-section {
        padding-block: 56px;
    }

    .project-detail .pd-hero {
        padding: 18px 0 44px;
    }

    .pd-breadcrumb {
        margin-bottom: 26px;
        font-size: 12px;
    }

    .pd-breadcrumb span {
        max-width: 180px;
    }

    .project-detail .pd-summary {
        font-size: 16px;
    }

    .pd-actions > * {
        flex: 1 1 100%;
        justify-content: center;
    }

    .pd-stats {
        grid-template-columns: 1fr 1fr;
        gap: 16px 0;
    }

    .pd-stats > div:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }

    .pd-subnav-cta {
        display: none;
    }

    .pd-subnav-links a {
        padding: 14px 12px;
        font-size: 13px;
    }

    .pd-head {
        margin-bottom: 28px;
    }

    .pd-head-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .pd-lead p {
        font-size: 17px;
    }

    .pd-story-side {
        grid-template-columns: 1fr;
    }

    .pd-features {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .pd-feature {
        display: flex;
        gap: 16px;
        align-items: center;
        padding: 18px;
    }

    .pd-feature-icon {
        flex-shrink: 0;
        margin: 0;
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .pd-feature-num {
        display: none;
    }

    .pd-feature p {
        font-size: 15px;
    }

    .pd-result {
        flex-direction: column;
        gap: 18px;
        margin-top: 56px;
        padding: 28px 24px;
    }

    .pd-result-text p {
        font-size: 16px;
    }

    .pd-gallery-section {
        margin-top: 56px;
    }

    .pd-viewer-bar {
        padding: 10px 12px;
    }

    .pd-viewer-bar .pd-dots {
        display: none;
    }

    .project-detail .pd-viewer-bar h3 {
        text-align: left;
        font-size: 14px;
    }

    .pd-active-preview {
        aspect-ratio: 4/3;
    }

    .pd-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }

    .pd-nav-prev {
        left: 8px;
    }

    .pd-nav-next {
        right: 8px;
    }

    .pd-zoom {
        opacity: 1;
        transform: none;
        font-size: 11px;
        padding: 6px 10px;
        right: 10px;
        bottom: 10px;
    }

    .pd-thumbnail {
        flex-basis: 140px;
    }

    .pd-stack {
        gap: 10px;
    }

    .pd-stack li {
        font-size: 14px;
        padding: 8px 14px 8px 8px;
    }

    .pd-stack span {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }

    .pd-cta {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .pd-cta-actions {
        width: 100%;
    }

    .pd-cta-actions a {
        flex: 1 1 100%;
        justify-content: center;
    }

    .project-detail .pd-related {
        padding-top: 56px;
    }

    .project-detail > .pd-section:last-child {
        padding-bottom: var(--cx-content-end-space, 20px);
    }

    .pd-dialog-toolbar {
        padding: 10px;
        gap: 8px;
    }

    .pd-dialog-toolbar p {
        font-size: 12px;
    }

    .pd-dialog-toolbar button {
        width: 34px;
        height: 34px;
    }

    .pd-dialog-scroll {
        padding: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-detail *,
    .project-detail *::after {
        transition: none !important;
    }
}
