/* =========================================================================
   SCATTERED ART ONGOING PROJECTS (about.html)
   ========================================================================= */
.legendary-project-card {
    display: flex;
    align-items: stretch; /* Make children stretch or align vertically */
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 8rem;
    position: relative;
    z-index: 1;
}

.art-text-col {
    width: 48%;
    z-index: 4;
    position: relative;
    display: flex;
    align-items: center; /* Center the square text block vertically */
}

.art-img-col {
    width: 48%;
    position: relative;
    min-height: 550px;
    z-index: 1;
}

/* Default (Odd) - RTL (Text Right, Image Left) */
.legendary-project-card:not(.reverse-layout) .art-text-col {
    margin-left: 0; /* No overlap, clear spacing */
}
.legendary-project-card:not(.reverse-layout) .img-main {
    position: absolute;
    width: 75%;
    height: 90%;
    right: 0;
    top: 5%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    z-index: 2;
}
.legendary-project-card:not(.reverse-layout) .img-floating {
    position: absolute;
    width: 60%;
    height: 60%;
    left: -10%;
    bottom: 5%;
    object-fit: cover;
    border-radius: 20px;
    border: 8px solid var(--bg-dark);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    z-index: 3;
}

/* Reverse (Even) - RTL (Text Left, Image Right) */
.legendary-project-card.reverse-layout {
    flex-direction: row-reverse;
}
.legendary-project-card.reverse-layout .art-text-col {
    margin-right: 0; 
}
.legendary-project-card.reverse-layout .img-main {
    position: absolute;
    width: 75%;
    height: 90%;
    left: 0;
    top: 5%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    z-index: 2;
}
.legendary-project-card.reverse-layout .img-floating {
    position: absolute;
    width: 60%;
    height: 60%;
    right: -10%;
    bottom: 5%;
    object-fit: cover;
    border-radius: 20px;
    border: 8px solid var(--bg-dark);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    z-index: 3;
}

/* 3rd image addition */
.legendary-project-card .img-floating-2 {
    position: absolute;
    width: 45%;
    height: 40%;
    left: 10%;
    top: -5%;
    object-fit: cover;
    border-radius: 20px;
    border: 6px solid var(--bg-dark);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 4;
}
.legendary-project-card.reverse-layout .img-floating-2 {
    right: 10%;
    left: auto;
}

/* Light Mode Borders */
.light-mode .img-floating,
.light-mode .img-floating-2 {
    border-color: #f8fafc;
}

/* Single Image */
.legendary-project-card .img-main.single {
    width: 100%;
    height: 100%;
    right: 0;
    left: 0;
    top: 0;
}

.legendary-text-glass {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    position: relative;
    overflow-y: auto;
    width: 100%;
    max-height: 600px; /* Allow slightly larger height */
    aspect-ratio: auto; /* Remove strict aspect ratio to allow more comfortable width */
    min-height: 400px;
}
/* custom scrollbar for text glass */
.legendary-text-glass::-webkit-scrollbar {
    width: 6px;
}
.legendary-text-glass::-webkit-scrollbar-track {
    background: transparent;
}
.legendary-text-glass::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}
.light-mode .legendary-text-glass {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.legendary-number {
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 8rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    z-index: -1;
    line-height: 1;
    pointer-events: none;
}
.light-mode .legendary-number {
    color: rgba(0, 0, 0, 0.03);
}

.legendary-title {
    color: var(--sky-blue);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 15px;
}
.light-mode .legendary-title {
    color: var(--sky-blue);
}
.legendary-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 4px;
    background: var(--sky-blue);
    border-radius: 2px;
}
.light-mode .legendary-title::before {
    background: var(--sky-blue);
}

.legendary-body {
    color: var(--text-dark);
    line-height: 1.8;
}
.light-mode .legendary-body {
    color: var(--text-light);
}

.legendary-body ul.d-list-bullet {
    list-style: none;
    padding: 0;
    margin: 0;
}
.legendary-body ul.d-list-bullet > li {
    position: relative;
    padding-right: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}
.legendary-body ul.d-list-bullet > li::before {
    content: '\f111';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.5rem;
    color: var(--sky-blue);
    position: absolute;
    right: 0;
    top: 8px;
}
.light-mode .legendary-body ul.d-list-bullet > li::before {
    color: var(--primary-blue);
}

/* Animations */
.art-img-col img {
    cursor: pointer;
}
.art-img-col img:hover {
    z-index: 10 !important;
}
.legendary-project-card:hover .img-main {
    transform: scale(1.02);
    transition: transform 0.5s ease;
}
.legendary-project-card:hover .img-floating {
    transform: translateY(-10px);
    transition: transform 0.5s ease;
}
.legendary-project-card:hover .img-floating-2 {
    transform: translateY(10px);
    transition: transform 0.5s ease;
}

@media (max-width: 991px) {
    .legendary-project-card, .legendary-project-card.reverse-layout {
        flex-direction: column;
        margin-bottom: 5rem;
    }
    .art-text-col, .art-img-col {
        width: 100%;
    }
    .art-img-col {
        height: 400px;
        order: -1; /* image always on top on mobile */
        margin-bottom: 2rem;
    }
    .legendary-project-card:not(.reverse-layout) .art-text-col,
    .legendary-project-card.reverse-layout .art-text-col {
        margin: 0;
        margin-top: -5rem; 
        padding: 0 1rem;
    }
    .legendary-text-glass {
        padding: 2rem;
    }
}
