/**
 * Desire Gym Dynamic Project Case Study Styles (Phase 2)
 * Scoped to single-dg_project.php template
 */

:root {
    --dg-red: #d71920;
    --dg-red-dark: #b9141b;
    --dg-ink: #151515;
    --dg-muted: #626262;
    --dg-line: #e7e7e7;
    --dg-soft: #f6f6f6;
    --dg-white: #ffffff;
}

/* Base Page Wrapper */
.dg-single-project-page {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #2b2b2b;
    box-sizing: border-box;
}

.dg-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Breadcrumb Navigation */
.dg-project-breadcrumb {
    background: #0f0f10;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dg-breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #888888;
}

.dg-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dg-breadcrumb-item a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dg-breadcrumb-item a:hover {
    color: var(--dg-red);
}

.dg-breadcrumb-sep {
    color: #555555;
    font-size: 14px;
}

.dg-breadcrumb-current {
    color: #ffffff;
    font-weight: 500;
}

/* Project Hero Section */
.dg-project-hero {
    background: var(--dg-ink);
    color: #ffffff;
    padding: 50px 0 60px 0;
    position: relative;
    box-sizing: border-box;
}

.dg-hero-content-wrap {
    max-width: 920px;
    margin-bottom: 35px;
}

.dg-hero-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dg-red);
    margin-bottom: 14px;
}

.dg-hero-h1 {
    font-size: 34px;
    line-height: 1.25;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 18px 0;
    word-break: break-word;
}

/* Overview Meta Badges */
.dg-hero-meta-badges {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dg-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
}

.dg-pill-type {
    background: rgba(215, 25, 32, 0.15);
    color: #ff525a;
    border: 1px solid rgba(215, 25, 32, 0.35);
}

.dg-pill-location {
    background: rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.dg-hero-summary {
    font-size: 16.5px;
    line-height: 1.65;
    color: #cccccc;
    margin: 0;
}

/* Hero Featured Image */
.dg-hero-image-wrap {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    background: #202020;
}

.dg-hero-featured-img {
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: cover;
    display: block;
}

/* Case Study Body Container */
.dg-case-study-body {
    padding: 60px 0 80px 0;
    background: #ffffff;
}

.dg-body-container {
    box-sizing: border-box;
}

/* Individual Case Study Blocks */
.dg-cs-block {
    margin-bottom: 50px;
    box-sizing: border-box;
}

/* Constrain narrative reading sections for optimal reading comfort */
.dg-cs-block:not(.dg-cs-galleries):not(.dg-cs-equipment-list-block):not(.dg-cs-services-block) .dg-cs-content {
    max-width: 840px;
}

.dg-cs-header {
    margin-bottom: 16px;
}

.dg-cs-h2 {
    font-size: 23px;
    font-weight: 700;
    color: var(--dg-ink);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}

.dg-cs-h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--dg-red);
    border-radius: 2px;
    flex-shrink: 0;
}

.dg-cs-content {
    font-size: 16px;
    line-height: 1.75;
    color: #3b3b3b;
}

.dg-cs-content p {
    margin: 0 0 16px 0;
}

.dg-cs-content p:last-child {
    margin-bottom: 0;
}

/* Project Snapshot Card */
.dg-cs-snapshot {
    margin-bottom: 35px;
}

.dg-snapshot-card {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 30px;
    background: var(--dg-soft);
    border: 1px solid var(--dg-line);
    border-radius: 10px;
    padding: 18px 24px;
}

.dg-snapshot-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dg-snapshot-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--dg-muted);
}

.dg-snapshot-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--dg-ink);
}

/* About the Project & Scope */
.dg-project-main-summary {
    font-size: 16.5px;
    line-height: 1.7;
    color: #333333;
    margin-bottom: 20px;
}

.dg-project-scope-box {
    background: #fdf2f2;
    border-left: 4px solid var(--dg-red);
    border-radius: 4px;
    padding: 16px 20px;
    margin-top: 20px;
}

.dg-scope-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dg-red);
    margin-bottom: 4px;
}

.dg-scope-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--dg-ink);
    margin: 0;
    font-weight: 500;
}

/* Equipment & Work Highlights */
.dg-highlights-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.dg-highlight-item {
    background: #ffffff;
    border: 1px solid var(--dg-line);
    border-radius: 8px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.dg-highlight-bullet {
    color: var(--dg-red);
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.dg-highlight-text {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--dg-ink);
    line-height: 1.4;
}

/* Project Overview Lead Card */
.dg-cs-overview {
    background: var(--dg-soft);
    border: 1px solid var(--dg-line);
    border-radius: 10px;
    padding: 28px 30px;
}

.dg-lead-text p {
    font-size: 17px;
    color: #262626;
    font-weight: 500;
    line-height: 1.7;
}

/* Visual Galleries */
.dg-gallery-stage {
    margin-bottom: 35px;
}

.dg-gallery-stage:last-child {
    margin-bottom: 0;
}

.dg-gallery-stage-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dg-ink);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dg-stage-dot {
    width: 8px;
    height: 8px;
    background: var(--dg-red);
    border-radius: 50%;
    display: inline-block;
}

.dg-case-study-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.dg-gallery-photo-item {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    border: 1px solid #ebebeb;
}

.dg-gallery-zoom-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.dg-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.dg-gallery-photo-item:hover .dg-gallery-img {
    transform: scale(1.04);
}

/* Equipment Checklist */
.dg-equipment-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.dg-equipment-item {
    background: #ffffff;
    border: 1px solid var(--dg-line);
    border-radius: 8px;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.dg-check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(215, 25, 32, 0.1);
    color: var(--dg-red);
    border-radius: 50%;
    flex-shrink: 0;
}

.dg-item-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--dg-ink);
    line-height: 1.4;
}

/* Related Services Cards */
.dg-related-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.dg-service-link-card {
    background: #ffffff;
    border: 1px solid var(--dg-line);
    border-radius: 10px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none !important;
    color: var(--dg-ink);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.dg-service-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dg-ink);
    transition: color 0.2s ease;
}

.dg-service-card-arrow {
    color: var(--dg-muted);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.dg-service-link-card:hover {
    border-color: var(--dg-red);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(215, 25, 32, 0.08);
}

.dg-service-link-card:hover .dg-service-card-title,
.dg-service-link-card:hover .dg-service-card-arrow {
    color: var(--dg-red);
}

.dg-service-link-card:hover .dg-service-card-arrow {
    transform: translateX(4px);
}

/* Consultation CTA Section */
.dg-project-consultation-cta {
    background: linear-gradient(135deg, #181a1f 0%, #0e1013 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 48px 40px;
    margin: 60px 0 50px 0;
    box-sizing: border-box;
    text-align: center;
    color: #ffffff;
}

.dg-cta-tagline {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dg-red);
    margin-bottom: 12px;
}

.dg-cta-h2 {
    font-size: 28px;
    line-height: 1.3;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 14px 0;
}

.dg-cta-desc {
    font-size: 15.5px;
    line-height: 1.65;
    color: #cccccc;
    margin: 0 auto 28px auto;
    max-width: 720px;
}

.dg-cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.dg-btn-primary {
    display: inline-block;
    background: var(--dg-red);
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 28px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.2s ease;
}

.dg-btn-primary:hover {
    background: var(--dg-red-dark);
    transform: translateY(-2px);
}

.dg-btn-outline {
    display: inline-block;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
    font-size: 14.5px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.dg-btn-outline:hover {
    border-color: var(--dg-red);
    color: var(--dg-red) !important;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Project Pager Navigation */
.dg-project-nav-pager {
    padding-top: 20px;
    border-top: 1px solid var(--dg-line);
}

.dg-nav-pager-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
}

.dg-pager-card {
    display: flex;
    flex-direction: column;
    padding: 14px 18px;
    border-radius: 8px;
    background: var(--dg-soft);
    border: 1px solid var(--dg-line);
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.dg-pager-prev {
    align-items: flex-start;
}

.dg-pager-next {
    align-items: flex-end;
}

.dg-pager-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dg-muted);
    margin-bottom: 4px;
}

.dg-pager-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dg-ink);
    line-height: 1.35;
}

.dg-pager-card:hover {
    border-color: var(--dg-red);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dg-pager-card:hover .dg-pager-title {
    color: var(--dg-red);
}

.dg-pager-center {
    display: flex;
    justify-content: center;
}

.dg-pager-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid var(--dg-line);
    color: var(--dg-ink);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.dg-pager-all-btn:hover {
    border-color: var(--dg-red);
    color: var(--dg-red);
}

.dg-pager-empty {
    visibility: hidden;
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .dg-hero-h1 {
        font-size: 30px;
    }

    .dg-case-study-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .dg-project-consultation-cta {
        padding: 40px 30px;
    }

    .dg-cta-h2 {
        font-size: 25px;
    }
}

@media (max-width: 768px) {
    .dg-project-hero {
        padding: 35px 0 45px 0;
    }

    .dg-hero-h1 {
        font-size: 25px;
        line-height: 1.3;
    }

    .dg-hero-summary {
        font-size: 15px;
    }

    .dg-cs-block {
        margin-bottom: 40px;
    }

    .dg-cs-h2 {
        font-size: 20px;
    }

    .dg-cs-content {
        font-size: 15px;
    }

    .dg-cs-overview {
        padding: 20px 22px;
    }

    .dg-lead-text p {
        font-size: 15.5px;
    }

    .dg-project-consultation-cta {
        padding: 32px 20px;
        margin: 40px 0;
    }

    .dg-cta-h2 {
        font-size: 22px;
    }

    .dg-cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .dg-btn-primary,
    .dg-btn-outline {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .dg-nav-pager-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dg-pager-prev,
    .dg-pager-next {
        align-items: flex-start;
    }

    .dg-pager-center {
        order: -1;
        margin-bottom: 8px;
    }

    .dg-pager-empty {
        display: none;
    }
}

@media (max-width: 640px) {
    .dg-case-study-gallery-grid {
        grid-template-columns: 1fr;
    }

    .dg-equipment-checklist {
        grid-template-columns: 1fr;
    }

    .dg-related-services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .dg-container {
        padding: 0 16px;
    }

    .dg-hero-h1 {
        font-size: 22px;
    }

    .dg-meta-pill {
        font-size: 11.5px;
        padding: 5px 11px;
    }

    .dg-cs-h2 {
        font-size: 18.5px;
    }
}
