/* ============================================
   FRESH PROJECT DETAIL PAGE
   Based on Stitch Design 941f22d4
   ============================================ */

:root {
    --project-primary: #004A99;
    --project-accent: #E30613;
    --project-surface: #F8F9FA;
    --project-radius: 12px;
    --project-shadow: 0 4px 20px -2px rgba(0, 74, 153, 0.08), 0 2px 12px -4px rgba(0, 0, 0, 0.03);
    --project-shadow-hover: 0 10px 30px -5px rgba(0, 74, 153, 0.12), 0 8px 20px -6px rgba(0, 0, 0, 0.05);
}

/* ── Wrapper ── */
.project-single-wrapper {
    background: #fff;
}

.project-main-content {
    max-width: 1280px;
    padding: 48px 24px 0;
}

/* ── Breadcrumb ── */
.fresh-custom-breadcrumb {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #94a3b8;
    margin-bottom: 24px !important;
}

.fresh-custom-breadcrumb a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.fresh-custom-breadcrumb a:hover {
    color: var(--project-primary);
}

.fresh-custom-breadcrumb .sep {
    margin: 0 10px;
    color: #cbd5e1;
}

.fresh-custom-breadcrumb .current {
    color: #1e293b;
    font-weight: 500;
}

/* ── Title ── */
.project-header .project-title {
    color: var(--project-primary) !important;
    font-size: 42px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.15 !important;
    max-width: 900px;
    margin-bottom: 0 !important;
}

/* ── Gallery Grid: 4-col cinematic ── */
.project-gallery-css-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: repeat(2, 250px) !important;
    gap: 12px !important;
    height: auto !important;
    margin-bottom: 40px !important;
}

.project-gallery-css-grid .gallery-item {
    display: block;
    overflow: hidden;
    border-radius: var(--project-radius);
    position: relative;
    box-shadow: var(--project-shadow);
}

.project-gallery-css-grid .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--project-radius);
    transition: transform 0.7s ease;
}

.project-gallery-css-grid .gallery-item:hover img {
    transform: scale(1.05);
}

/* Hero image spans 2 col × 2 row */
.project-gallery-css-grid .gallery-main {
    grid-column: span 2 !important;
    grid-row: span 2 !important;
}

/* Thumb positions */
.project-gallery-css-grid .gallery-thumb:nth-of-type(2) {
    grid-column: 3;
    grid-row: 1;
}

.project-gallery-css-grid .gallery-thumb:nth-of-type(3) {
    grid-column: 4;
    grid-row: 1;
}

.project-gallery-css-grid .gallery-thumb:nth-of-type(4) {
    grid-column: 3;
    grid-row: 2;
}

.project-gallery-css-grid .gallery-thumb:nth-of-type(5) {
    grid-column: 4;
    grid-row: 2;
}

/* Gallery overlay */
.gallery-more-overlay {
    background: rgba(0, 74, 153, 0.85) !important;
}

.gallery-item.has-more:hover .gallery-more-overlay {
    background: rgba(227, 6, 19, 0.9) !important;
}

/* ── Meta Bar (horizontal, with icons) ── */
.project-meta-bar {
    background: var(--project-surface);
    border-radius: var(--project-radius);
    box-shadow: var(--project-shadow);
    padding: 8px;
    margin-bottom: 48px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.project-meta-bar .meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    position: relative;
}

.project-meta-bar .meta-item:not(:first-child)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: #e2e8f0;
}

.project-meta-bar .meta-item .material-symbols-outlined {
    font-size: 28px;
    color: var(--project-primary);
    margin-bottom: 10px;
    font-variation-settings: 'FILL' 0, 'wght' 300;
}

.project-meta-bar .meta-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #94a3b8;
    margin-bottom: 4px;
}

.project-meta-bar .meta-value {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--project-primary);
}

/* ── Content Area: 8/4 grid ── */
.project-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 64px;
    align-items: start;
}

/* Content Card (left 8 cols) */
.project-content-card {
    grid-column: span 8;
    background: #fff;
    padding: 40px;
    border-radius: var(--project-radius);
    box-shadow: var(--project-shadow);
}

.project-content-card .section-heading {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--project-primary);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.project-content-card .section-heading::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 4px;
    background: var(--project-accent);
    border-radius: 4px;
    flex-shrink: 0;
}

.project-content-card .entry-content {
    font-size: 17px;
    color: #64748b;
    line-height: 1.75;
}

.project-content-card .entry-content p {
    margin-bottom: 20px;
    color: inherit;
}

.project-content-card .entry-content p:last-child {
    margin-bottom: 0;
}

/* CTA Card (right 4 cols) */
.project-cta-card {
    grid-column: span 4;
    background: var(--project-primary);
    color: #fff;
    padding: 40px;
    border-radius: var(--project-radius);
    box-shadow: var(--project-shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-cta-card h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff !important;
    line-height: 1.3;
}

.project-cta-card p {
    color: rgba(191, 219, 254, 0.9);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 28px;
}

.project-cta-card .cta-button {
    display: block;
    width: 100%;
    background: var(--project-accent) !important;
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 13px;
    padding: 18px 24px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(227, 6, 19, 0.3);
    transition: all 0.3s ease;
    border: none;
}

.project-cta-card .cta-button:hover {
    background: #c50510 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(227, 6, 19, 0.4);
}

/* ── Related Projects ── */
.project-related {
    margin-top: 64px !important;
    margin-bottom: 64px !important;
}

.project-related .section-title-container {
    font-size: 18px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--project-primary) !important;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px !important;
}

.project-related .section-title-container::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 4px;
    background: var(--project-accent);
    border-radius: 4px;
    flex-shrink: 0;
}

.project-related .section-title-container::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
    margin-left: 16px;
}

/* ====== Related project cards ====== */

/* Card wrapper - the white rounded card */
.project-related .col .col-inner {
    background: #fff !important;
    border-radius: var(--project-radius) !important;
    overflow: hidden !important;
    box-shadow: var(--project-shadow) !important;
    transition: all 0.35s ease !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.project-related .col:hover .col-inner {
    box-shadow: var(--project-shadow-hover) !important;
    transform: translateY(-6px);
}

/* Image container */
.project-related .portfolio-box .box-image {
    overflow: hidden !important;
    position: relative !important;
}

/* Override Flatsome's inline padding-top:100% to 75% for 4:3 ratio */
.project-related .portfolio-box .box-image .image-zoom.image-cover {
    padding-top: 75% !important;
}

.project-related .portfolio-box .box-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.6s ease !important;
    border-radius: 0 !important;
}

.project-related .col:hover .portfolio-box .box-image img {
    transform: scale(1.08) !important;
}

/* Hover arrow - white circle with arrow icon */
.project-related .portfolio-box .box-image::after {
    content: '→';
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--project-primary);
    opacity: 0;
    transform: translateX(-12px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.project-related .col:hover .portfolio-box .box-image::after {
    opacity: 1;
    transform: translateX(0);
}

/* Dark gradient overlay on hover */
.project-related .portfolio-box .box-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 74, 153, 0.35) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 3;
    pointer-events: none;
}

.project-related .col:hover .portfolio-box .box-image::before {
    opacity: 1;
}

/* Card text area */
.project-related .portfolio-box .box-text {
    padding: 20px 20px 18px !important;
    background: #fff !important;
}

.project-related .portfolio-box .box-text h5,
.project-related .portfolio-box .box-text h6,
.project-related .portfolio-box .box-text .portfolio-box-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 1.4 !important;
    color: #1e293b !important;
    transition: color 0.3s;
}

.project-related .col:hover .portfolio-box .box-text h5,
.project-related .col:hover .portfolio-box .box-text h6,
.project-related .col:hover .portfolio-box .box-text .portfolio-box-title {
    color: var(--project-primary) !important;
}

/* Category subtitle */
.project-related .portfolio-box .box-text .portfolio-box-category {
    font-size: 10px !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #94a3b8 !important;
    opacity: 1 !important;
    margin-top: 6px !important;
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .project-content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .project-content-card,
    .project-cta-card {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .project-header .project-title {
        font-size: 26px !important;
    }

    .project-gallery-css-grid {
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: 220px 150px 150px !important;
        gap: 8px !important;
    }

    .project-gallery-css-grid .gallery-main {
        grid-column: 1 / 3 !important;
        grid-row: 1 !important;
    }

    .project-gallery-css-grid .gallery-thumb:nth-of-type(2) {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    .project-gallery-css-grid .gallery-thumb:nth-of-type(3) {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }

    .project-gallery-css-grid .gallery-thumb:nth-of-type(4) {
        grid-column: 1 !important;
        grid-row: 3 !important;
    }

    .project-gallery-css-grid .gallery-thumb:nth-of-type(5) {
        grid-column: 2 !important;
        grid-row: 3 !important;
    }

    .project-meta-bar {
        grid-template-columns: 1fr 1fr;
    }

    .project-meta-bar .meta-item:nth-child(2)::before {
        display: block;
    }

    .project-meta-bar .meta-item:nth-child(3)::before {
        display: none;
    }

    .project-content-card,
    .project-cta-card {
        padding: 28px 24px;
    }

    .project-content-card .entry-content {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .project-main-content {
        padding: 24px 16px 0;
    }

    .project-meta-bar {
        grid-template-columns: 1fr;
        padding: 4px;
    }

    .project-meta-bar .meta-item::before {
        display: none !important;
    }

    .project-meta-bar .meta-item {
        padding: 16px;
        border-bottom: 1px solid #e2e8f0;
    }

    .project-meta-bar .meta-item:last-child {
        border-bottom: none;
    }
}