﻿/* ===================================
   LUXURY LINE — Promotion Carousel / Projects Section
   Source: luxury-main/css/styles.css
   =================================== */

.projects-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-background-light, #ebe6e1);
}

.projects-section--alt {
    background-color: var(--color-background-light, #ebe6e1);
}

.projects-section--dark {
    background-color: var(--color-background-dark);
}

.projects-section--dark .section-title,
.projects-section--dark .section-description {
    color: var(--color-text-white, #ebe6e1);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 342px));
    justify-content: start;
    gap: 28px;
}

.project-card {
    background-color: var(--color-background-light, #ebe6e1);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    height: 450px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .project-card {
        height: 450px;
    }
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-badge {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    padding: 4px 12px;
    background-color: var(--color-accent);
    color: var(--color-text-white);
    font-size: 9px;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 25px;
    z-index: 3;
}

.project-info {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.0) 0%,
            rgba(0, 0, 0, 0.0) 30%,
            rgba(0, 0, 0, 0.45) 58%,
            rgba(0, 0, 0, 0.82) 100%);
    z-index: 2;
    color: var(--color-text-white, #ebe6e1);
}

/* Name + location + price — anchored at ~48% from top */
.project-header {
    position: absolute;
    left: 22px;
    right: 22px;
    top: 35%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* CTA button — anchored at bottom */
.project-footer {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    display: flex;
    justify-content: center;
}

.project-name {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text-white, #ebe6e1);
    margin-bottom: 4px;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

.project-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    margin-bottom: 0;
}

.project-location svg {
    width: 16px;
    height: 16px;
    fill: rgba(255, 255, 255, 0.85);
    flex-shrink: 0;
}

.project-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.4;
    margin: 20px 0;
}

.project-cta {
    display: inline-block;
    padding: 6px 18px;
    background-color: var(--color-accent);
    color: var(--color-text-white);
    font-size: 10px;
    font-family: var(--font-primary);
    font-weight: var(--font-weight-semibold);
    text-transform: none;
    letter-spacing: 0.02em;
    border-radius: 25px;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.project-cta:hover {
    background-color: var(--color-accent-dark, #721d2c);
    transform: translateY(-2px);
}

/* Projects Slider */
.projects-slider-container {
    position: relative;
    padding-top: var(--spacing-lg);
    width: 100%;
    overflow: visible;
    /* allows nav buttons to sit on the clip boundary */
}

/* Clips the half-visible card at the container boundary.
   transform: translateZ(0) forces a compositing layer so that Swiper's
   translate3d slides are properly clipped even in webkit-based browsers. */
.projects-swiper-clip {
    overflow: hidden;
    position: relative;
    transform: translateZ(0);
}

.projectsSwiper {
    overflow: visible;
    padding-bottom: 0;
}

.projectsSwiper .swiper-slide {
    height: auto;
}

.projectsSwiper .swiper-pagination {
    position: static !important;
    margin-top: 18px;
    bottom: auto !important;
    line-height: 1;
}

.projectsSwiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #d4d4d4;
    opacity: 1;
}

.projectsSwiper .swiper-pagination-bullet-active {
    background: var(--color-accent);
}

.projects-nav-btn {
    position: absolute;
    top: calc(50% - 26px);
    /* 26px = half card height offset to stay within clip area */
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-background-light, #ebe6e1);
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
    font-size: 18px;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: background var(--transition-normal), color var(--transition-normal), transform var(--transition-normal);
}

.projects-nav-btn:hover {
    background: var(--color-accent);
    color: var(--color-text-white, #ebe6e1);
    transform: translateY(-50%) scale(1.08);
}

/* Buttons are now outside the clip, positioned relative to .projects-slider-container.
   Centred on the clip's left/right boundary = container content edge. */
.projects-nav-prev {
    left: 0;
    transform: translateY(-50%) translateX(-50%);
}

.projects-nav-next {
    right: 0;
    transform: translateY(-50%) translateX(50%);
}

.projects-nav-prev:hover {
    transform: translateY(-50%) translateX(-50%) scale(1.08);
}

.projects-nav-next:hover {
    transform: translateY(-50%) translateX(50%) scale(1.08);
}

.projects-nav-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.projects-slider-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 16px var(--spacing-lg) 16px;
}

.view-all-projects-grid-cta {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.view-all-projects-btn {
    display: inline-block;
    padding: 15px 48px;
    background-color: var(--color-accent);
    color: var(--color-text-white);
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    text-transform: none;
    letter-spacing: 0.02em;
    border-radius: 30px;
    transition: all var(--transition-normal);
    text-decoration: none;
    cursor: pointer;
}

.view-all-projects-btn:hover {
    background-color: var(--color-accent-dark, #721d2c);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.lux-promotion-carousel-empty {
    max-width: var(--container-max-width, 1400px);
    margin: 24px auto 0;
    padding: 0 var(--spacing-md);
    color: var(--color-text-muted, #777);
    font-size: 16px;
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .projectsSwiper {
        padding-left: 16px;
        padding-right: 16px;
    }

    .projects-nav-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    .projectsSwiper {
        padding-left: 0px;
        padding-right: 0px;
    }
}
