/* GALLERY STYLES FOR PROGRAM PAGES */
/* THE EDITORIAL HERO (No Glass) */
.editorial-hero {
    display: flex;
    align-items: center;
    max-width: 1400px;
    margin: 150px auto 100px;
    padding: 0 40px;
    gap: 50px;
    position: relative;
}

.editorial-text {
    flex: 1;
    z-index: 2;
    animation: fadeRight 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateX(-30px);
}

@keyframes fadeRight {
    to { opacity: 1; transform: translateX(0); }
}

.editorial-text .subtitle {
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 14px;
}

.editorial-text h1 {
    font-size: 70px;
    font-family: 'Playfair Display', serif;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 30px;
}

.editorial-text h1 span {
    font-size: 90px;
    color: #10b981;
    display: block;
}

.editorial-text p {
    font-size: 22px;
    color: #475569;
    max-width: 450px;
    line-height: 1.8;
}

.editorial-image {
    flex: 1.2;
    position: relative;
    animation: fadeLeft 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateX(30px);
}

@keyframes fadeLeft {
    to { opacity: 1; transform: translateX(0); }
}

.editorial-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    /* Asymmetrical editorial crop */
    border-radius: 60px 0 60px 0; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

@media(max-width: 900px) {
    .editorial-hero {
        flex-direction: column-reverse;
        margin-top: 100px;
        text-align: center;
    }
    .editorial-text h1 { font-size: 50px; }
    .editorial-text h1 span { font-size: 60px; }
    .editorial-text p { margin: 0 auto; }
    .editorial-image img { height: 400px; border-radius: 30px 0 30px 0; }
}

.program-details {
    padding: 60px 40px;
    background: white;
    color: #0f0f0f;
    text-align: center;
}

.program-details h2 {
    font-size: 36px;
    margin-bottom: 30px;
}

.program-details p {
    font-size: 18px;
    color: #555;
    max-width: 900px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

/* INNOVATIVE MASONRY GALLERY */
.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 250px;
    gap: 20px;
    padding: 20px 40px 60px;
    background: white;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* DIFFERENT SIZES FOR MASONRY LOOK */
.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

/* OVERLAY FOR GALLERY */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay ion-icon {
    font-size: 48px;
    color: white;
}

/* LIGHTBOX MODAL */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #10b981;
}

@media(max-width: 768px) {
    .program-hero h1 { font-size: 36px; }
    .program-hero { padding: 120px 20px 60px; }
    .masonry-gallery {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    .gallery-item.large, .gallery-item.tall, .gallery-item.wide {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* STICKY SPLIT SCROLL */
.split-scroll-section {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 40px;
    gap: 80px;
}

.split-left {
    flex: 1;
    position: relative;
}

.sticky-image {
    position: sticky;
    top: 120px;
    height: 70vh;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.sticky-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.split-right {
    flex: 1;
    padding-top: 30vh;
    padding-bottom: 30vh;
}

.split-right h2 {
    font-size: 48px;
    margin-bottom: 30px;
    color: #1e293b;
    font-family: 'Playfair Display', serif;
}

.split-right p {
    font-size: 24px;
    line-height: 1.8;
    color: #475569;
}

@media(max-width: 900px) {
    .split-scroll-section {
        flex-direction: column;
        padding: 60px 20px;
    }
    .sticky-image {
        position: relative;
        top: 0;
        height: 40vh;
        margin-bottom: 40px;
    }
    .split-right {
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* EXPANDING ACCORDION GALLERY */
.accordion-gallery-section {
    padding: 80px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.accordion-gallery-section h2 {
    text-align: center;
    font-size: 40px;
    margin-bottom: 40px;
    font-family: 'Playfair Display', serif;
}

.accordion-gallery {
    display: flex;
    height: 600px;
    gap: 20px;
    width: 100%;
}

.accordion-item {
    flex: 1;
    border-radius: 30px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: flex 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.accordion-item::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.accordion-item:hover {
    flex: 5;
}

.accordion-item:hover::before {
    opacity: 1;
}

.accordion-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: 0.1s;
}

.accordion-item:hover .accordion-content {
    opacity: 1;
    transform: translateY(0);
}

.accordion-content h3 {
    color: white;
    font-size: 28px;
    font-family: 'Playfair Display', serif;
}

@media(max-width: 900px) {
    .accordion-gallery {
        flex-direction: column;
        height: 800px;
    }
}
