/* project-hero-swiper */
.project-hero-swiper {
    position: absolute;
    inset: 0;
}
.project-hero-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* legal-swiper */
.legal-swiper {
    margin-bottom: 2.5rem;
    overflow: hidden !important;
}
.legal-swiper .swiper-wrapper {
    will-change: transform;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.legal-swiper .swiper-slide {
    transform: translate3d(0, 0, 0); /* Force GPU */
}
.legal-swiper .swiper-slide img {
    max-height: 70vh;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}
.project-hero-swiper .swiper-wrapper {
    will-change: transform;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Projects Page Specific Styles */
.project-featured-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .project-featured-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}

.project-card-featured {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    min-height: 480px; /* Fix for mobile height collapse */
    height: 100%;
}

@media (max-width: 767px) {
    .project-card-featured {
        min-height: 420px;
    }
    .project-card-featured h3 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    .project-card-featured p {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
    }
}

.project-card-small {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

@media (min-width: 768px) {
    .project-card-small {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
}

.project-image-small {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 1.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .project-image-small {
        width: 240px;
    }
}

.project-title {
    font-family: 'Playfair Display', serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.project-badge-new {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: #E51B23;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(229, 27, 35, 0.3);
}

.section-other-projects {
    background-color: #f1f5f9; /* Slate 100 for a cleaner look */
    padding: 100px 0;
    position: relative;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.section-other-projects h2 {
    color: #0f172a;
    font-weight: 800;
}

.other-projects-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .other-projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-horizontal-card {
    display: flex;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 1rem;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-horizontal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.15);
}

.project-horizontal-image {
    width: 45%;
    aspect-ratio: 16/10;
    overflow: hidden;
    flex-shrink: 0;
}

.project-horizontal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-horizontal-card:hover .project-horizontal-image img {
    filter: grayscale(0%);
    transform: scale(1.08);
}

.project-horizontal-info {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 24px 40px;
    background: #ffffff;
    position: relative;
}

/* The Arrow/Pointer Effect */
.project-horizontal-info::before {
    content: "";
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-right: 18px solid #ffffff;
    z-index: 5;
}

.project-horizontal-title {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    color: #0f172a; /* Slate 900 */
    text-transform: uppercase;
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.project-horizontal-card:hover .project-horizontal-title {
    color: #E51B23; /* Brand Red */
}



/* Fancybox Custom Titles */
.fancybox__caption {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.font-main {
    font-family: 'Manrope', sans-serif;
}

.font-display {
    font-family: 'Playfair Display', serif;
}

.Pj-detail-title h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Upgraded Modules Styles */
.lhag-fp-tab {
    will-change: transform, background-color;
}
.lhag-fp-content {
    backface-visibility: hidden;
    perspective: 1000px;
}

#nha-mau img {
    will-change: transform;
}

@media (max-width: 1023px) {
    #nha-mau .auto-rows-\[300px\] {
        grid-auto-rows: 250px;
    }
}

[data-reveal="left"] {
    transform: translate3d(-40px, 0, 0);
}
[data-reveal="right"] {
    transform: translate3d(40px, 0, 0);
}
[data-reveal="bottom"] {
    transform: translate3d(0, 40px, 0);
}


