/* ============================================
 * Single Project Page Styles
 * ============================================ */

/* ---- Banner — full image, left text, bottom-right nav ---- */
.sp-banner {
    position: relative;
    width: 100%;
    height: 85vh;
    overflow: hidden;
}
.sp-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.52) 0%, rgba(0, 0, 0, 0.34) 20%, rgba(0, 0, 0, 0.14) 40%, rgba(0, 0, 0, 0) 58%);
    pointer-events: none;
    z-index: 1;
}
.sp-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}
.sp-banner-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    z-index: 0;
}
.sp-banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    z-index: 2;
}

/* ---- Banner Left — same padding as product detail page ---- */
.sp-banner-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 1.5rem;
    padding-left: 1rem;
    max-width: 750px;
}
.sp-banner-left > div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sp-banner-label {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.sp-banner-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}
.sp-banner-location {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.5rem;
}
.sp-banner-desc {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}
@media (min-width: 64rem) {
    .sp-banner-left {
        padding-top: 2.5rem;
        padding-left: 3rem;
    }
    .sp-banner-label { font-size: 1.4rem; }
    .sp-banner-title { font-size: 4rem; }
    .sp-banner-location { font-size: 1.4rem; font-weight: 600; }
    .sp-banner-desc { font-size: 1.4rem; }
}

/* ---- Banner Nav — bottom-right absolute ---- */
.sp-banner-nav {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    flex-wrap: wrap;
    z-index: 2;
}
.sp-banner-nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease;
}
.sp-banner-nav-link:hover {
    color: #b71c1c;
}
.sp-banner-nav-dot {
    color: rgba(255,255,255,0.8);
    flex-shrink: 0;
}
.sp-banner-nav-cta {
    text-decoration: underline;
}
@media (min-width: 64rem) {
    .sp-banner-nav,
    .sp-banner-nav-link {
        font-size: 1.25rem;
    }
    .sp-banner-nav-dot {
        color: #fff;
    }
}

/* ---- Gallery 1+2 pattern ---- */
.sp-gallery {
    padding: 6rem 0;
    background: #fff;
}
.sp-gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}
.sp-gallery-item-full .sp-gallery-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}
.sp-gallery-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.sp-gallery-item-half .sp-gallery-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Prev/Next Nav ---- */
.sp-nav-section {
    border-top: 1px solid #e5e5e5;
    padding: 1.5rem 0;
}
.sp-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sp-nav-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-decoration: none;
    color: inherit;
}
.sp-nav-item:hover .sp-nav-title {
    color: #b71c1c;
}
.sp-nav-item:hover .sp-nav-label {
    color: #b71c1c;
}
.sp-nav-label {
    font-size: 1rem;
    font-weight: 400;
    color: #1a1a1a;
    transition: color 0.2s ease;
}
.sp-nav-title {
    font-size: 0.875rem;
    font-weight: 300;
    color: #666;
    transition: color 0.2s ease;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 64rem) {
    .sp-nav-label { font-size: 1.15rem; }
    .sp-nav-title {
        font-size: 1rem;
        max-width: none;
        white-space: normal;
        overflow: visible;
    }
}

/* ---- Recommend ---- */
.sp-recommend {
    padding: 2rem 0 8rem;
    background: #fff;
}
.sp-recommend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}
.sp-recommend-title {
    font-family: 'Google Sans Flex', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: #1a1a1a;
}
@media (min-width: 64rem) {
    .sp-recommend-title {
        font-family: 'Montserrat', sans-serif;
        font-size: 2.9rem;
        font-weight: 500;
    }
}
.sp-recommend-more {
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
@media (min-width: 64rem) {
    .sp-recommend-more { font-size: 1.3rem; }
}
.sp-recommend-more:hover {
    color: #b71c1c;
    border-color: #b71c1c;
    opacity: 1;
}

.sp-recommend-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4.5rem;
}

/* ---- Recommend Card ---- */
.sp-rec-card {
    display: block;
    text-decoration: none;
    color: inherit;
}
.sp-rec-card-img {
    position: relative;
    aspect-ratio: 5 / 3;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 0.75rem;
}
.sp-rec-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sp-rec-card-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #475569, #1e293b);
}

/* Black overlay + grayscale — same as sidebar project cards on product list */
.sp-rec-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: none;
    pointer-events: none;
}
.sp-rec-card:hover .sp-rec-card-overlay {
    opacity: 1;
}
.sp-rec-card:hover .sp-rec-card-img img {
    filter: grayscale(100%);
}
.sp-rec-card-img img {
    transition: filter 0.4s ease;
    will-change: filter;
}
.sp-rec-card-more {
    color: #fff;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
@media (min-width: 64rem) {
    .sp-rec-card-more { font-size: 1.4rem; }
}

.sp-rec-card-title {
    font-family: 'Google Sans Flex', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: #1a1a1a;
    margin: 0;
    transition: color 0.2s ease;
}
.sp-rec-card:hover .sp-rec-card-title {
    color: #dc2626;
    text-decoration: underline;
    text-underline-offset: 0.25em;
}
@media (min-width: 64rem) {
    .sp-rec-card-title { font-size: 1.6rem; }
}

/* ---- CTA Section — same as project list, own background ---- */
.projects-cta-section {
    position: relative;
    width: 100%;
    min-height: 400px;
    background-image: url('../images/news_img_CTA.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.projects-cta-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.projects-cta-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
@media (min-width: 1024px) {
    .projects-cta-row {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 4rem;
    }
}
.projects-cta-text-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.projects-cta-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
@media (min-width: 1024px) {
    .projects-cta-title { font-size: 3rem; }
}
.projects-cta-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}
@media (min-width: 1024px) {
    .projects-cta-text { font-size: 1rem; }
    .projects-cta-btn { font-size: 1.2rem; }
}
.projects-cta-btn {
    display: inline-flex;
    margin-bottom: 0.5rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    background: transparent;
    color: #1a1a1a;
    border: none;
    border-radius: 0.375rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 0;
    transition: color 0.7s ease;
    white-space: nowrap;
    flex-shrink: 0;
    width: fit-content;
}
.projects-cta-btn::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left center;
    background: #b71c1c;
    border-radius: inherit;
    transition: transform 0.7s ease;
}
.projects-cta-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background: #fff;
    border-radius: inherit;
}
.projects-cta-btn:hover {
    color: #fff;
}
.projects-cta-btn:hover::before {
    transform: scaleX(1);
}

/* ---- Mobile ---- */
@media (max-width: 63.9375rem) {
    .sp-banner {
        height: 550px;
    }
    .sp-banner::after {
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.48) 0%, rgba(0, 0, 0, 0.3) 26%, rgba(0, 0, 0, 0.12) 50%, rgba(0, 0, 0, 0) 72%);
    }
    .sp-banner-left {
        max-width: 100%;
    }
    .sp-banner-nav {
        bottom: 1.5rem;
        right: 1.5rem;
        gap: 1rem;
    }
    .sp-gallery-row-half {
        grid-template-columns: 1fr;
    }
    .sp-nav-row {
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
        justify-content: space-between;
    }
    .sp-nav-item {
        flex-direction: row;
        align-items: baseline;
        gap: 0.35rem;
    }
    .sp-nav-label {
        font-size: 0.75rem;
        white-space: nowrap;
    }
    .sp-nav-title {
        font-size: 0.7rem;
        max-width: 80px;
    }
    .sp-recommend-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .projects-cta-section {
        min-height: 400px;
    }
    .sp-gallery { padding: 3rem 0; }
    .sp-gallery-grid { gap: 1.5rem; }
    .sp-gallery-row-half { gap: 1.5rem; }
    .sp-recommend { padding-bottom: 4rem; }
    .sp-recommend-header { margin-bottom: 1.5rem; }
}

@media (min-width: 1024px) {
    .projects-cta-btn { font-size: 1.2rem; }
}
