/* ============================================
 * Project List Page Styles
 * ============================================ */

/* ---- Banner "Projects" text left offset (desktop only) ---- */
@media (min-width: 1024px) {
    .-translate-x-\[-140\%\] {
        transform: translateX(-140%);
    }
}

/* ---- Banner Title — 4.6rem on desktop ---- */
.projects-banner-title {
    /* mobile inherits text-4xl (2.25rem) */
}
@media (min-width: 1024px) {
    .projects-banner-title {
        font-size: 4.6rem;
        line-height: 1;
    }
}

/* ============================================
 * Carousel Dots (Ring-style)
 * ============================================ */
.products-carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.5em;
    z-index: 20;
}
.products-carousel-dots .carousel-dot {
    width: 1em;
    height: 1em;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    position: relative;
    transition: all 0.5s;
    flex-shrink: 0;
    padding: 0;
}
.products-carousel-dots .carousel-dot::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0.3em;
    height: 0.3em;
    background: transparent;
    border-radius: 50%;
}
.products-carousel-dots .carousel-dot.active {
    border-color: #fff;
    background: transparent;
    transform: none;
}
.products-carousel-dots .carousel-dot.active::after {
    display: none;
}
.products-carousel-dots .carousel-dot:not(.active) {
    background: transparent;
}
.products-carousel-dots .carousel-dot:not(.active):hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: transparent;
}

/* ---- Section top spacing — 8rem from banner ---- */
.projects-section-pt {
    padding-top: 8rem;
}
/* ---- Heading bottom spacing — 4rem to cards ---- */
.projects-heading-gap {
    margin-bottom: 4rem;
}

/* ============================================
 * Section Heading (unified with products page)
 * ============================================ */
.projects-grid-subtitle {
    font-family: 'Google Sans Flex', sans-serif;
    font-weight: 400;
    font-size: 1.15rem;
    color: #b71c1c;
}
.projects-grid-heading {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1.775rem;
    color: #1a1a1a;
}
@media (min-width: 1024px) {
    .projects-grid-heading {
        font-size: 3.6rem;
    }
}

/* ---- Featured Card (first, full-width) ---- */
.project-card-featured {
    display: block;
    position: relative;
    overflow: hidden;
    margin-bottom: 4rem;
    text-decoration: none;
    color: inherit;
}
.project-card-featured-img {
    position: relative;
    aspect-ratio: 21 / 9;
    overflow: hidden;
    background: #f5f5f5;
}
.project-card-featured-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.project-card-featured:hover .project-card-featured-img img {
    transform: scale(1.05);
}
.project-card-featured-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #475569, #1e293b);
}

/* ---- 2-Column Grid ---- */
.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

/* ---- Regular Cards ---- */
.project-card {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}
.project-card-img {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f5f5f5;
}
.project-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.project-card:hover .project-card-img img {
    transform: scale(1.05);
}
.project-card-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #475569, #1e293b);
}

/* ---- Card Overlay (shared) ---- */
.project-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 40%, transparent 70%);
    transition: background 0.3s ease;
}
@media (min-width: 1024px) {
    .project-card-overlay {
        padding: 3rem;
    }
}
.project-card-featured:hover .project-card-overlay,
.project-card:hover .project-card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 40%, transparent 70%);
}
.project-card-overlay-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.project-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    margin: 0;
    text-decoration: none;
    text-underline-offset: 0.25em;
    transition: text-decoration 0.2s ease;
}
@media (min-width: 64rem) {
    .project-card-title {
        font-size: 2.8rem;
    }
}
.project-card-featured:hover .project-card-title,
.project-card:hover .project-card-title {
    text-decoration: underline;
}
.project-card-location {
    font-size: 1.6rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    margin: 0;
    width: fit-content;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}
.project-card-featured:hover .project-card-location,
.project-card:hover .project-card-location {
    border-bottom-color: rgba(255,255,255,0.8);
}

/* ---- Card Arrow — hidden by default, shown on hover ---- */
.project-card-arrow {
    width: 2rem;
    height: 2rem;
    align-self: flex-end;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.project-card-arrow svg {
    width: 100%;
    height: 100%;
    display: block;
}
@media (min-width: 64rem) {
    .project-card-arrow {
        width: 2.5rem;
        height: 2.5rem;
    }
}
.project-card:hover .project-card-arrow,
.project-card-featured:hover .project-card-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* ---- CTA Section ---- */
.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 {
    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: #fff;
    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);
}

/* ---- Pagination ---- */
.product-pagination {
    margin-top: 3rem;
}
.product-pagination .page-numbers {
    font-size: 1.5rem;
}
@media (min-width: 1024px) {
    .product-pagination {
        margin-top: 6rem;
    }
    .projects-cta-btn { font-size: 1.2rem; }
}

/* ---- Mobile ---- */
@media (max-width: 63.9375rem) {
    .project-card-featured-img {
        aspect-ratio: 4 / 3;
    }
    .project-card-location {
        font-size: 0.8rem;
    }
    .project-grid {
        grid-template-columns: 1fr;
    }
    .projects-cta-section {
        min-height: 400px;
    }
    .projects-section-pt { padding-top: 4rem; }
    .projects-heading-gap { margin-bottom: 2rem; }
    .project-card-featured { margin-bottom: 2rem; }
    .project-grid { gap: 2rem; }
    .product-pagination .page-numbers {
        font-size: 1rem;
    }
}
