/* Gallery */

#waterfall {
    margin: 10px;
    overflow: hidden;
}

#waterfall.min {
    margin: 0;
}

#waterfall li {
    /* Layout handled by photo_file.css (CSS column-count masonry) */
    z-index: 0;
}

#waterfall li:hover {
    z-index: 1;
}

#waterfall li>div {
    color: rgba(0, 0, 0, 0.6);
    font-size: 32px;
    border-radius: 3px;
    margin: 10px;
    background: rgb(255, 255, 255);
    border: 1px solid rgba(038, 191, 64, 0);
    transition: all 0.5s;
}

#waterfall li>div:hover {
    /* transform: translateY(-10px); */
    /* border: 1px solid var(--secondary-color2);
    box-shadow: 0px 0px 80px var(--secondary-color2); */
    transition: all 0.3s;
    cursor: pointer;
}

#waterfall li.min>div {
    margin: 0;
    transform: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#waterfall li.min>div:hover {
    transform: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

ol,
ul {
    list-style: none
}

;

.upperBigImg1 .detailArr span,
.videosGallery .detailArr span {
    color: #fff;
    font-weight: 500;
    font-size: 16px;
}

.photosGallery img {
    border-radius: 8px;
}

.photosGallery a span,
.videosGalleryContainer a span {
    color: #fff;
    font-weight: 500;
    font-size: 16px;
}

.thumbnail {
    width: 100%;
    /* Ensure thumbnails fill their containers */
    height: auto;
    cursor: pointer;
    transition: 0.3s;
}

.thumbnail:hover {
    opacity: 0.7;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 10;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);

}

.lightbox-content {
    display: block;
    margin: auto;
    max-width: 80%;
    max-height: 70vh;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 15px 15px;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    background-color: unset !important;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
}

.caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
}

.responsive-iframe {
    max-height: 80vh;
    border: none;
}

footer .copyRightText span p {
    margin-bottom: 0rem !important;
}
/* ===== Spectra Royal Schools only: arch-framed About picture =====
   Scoped to images stored under school-website/spectra/, so other schools keep the default look.
   Copy kept in /root/spectra/about-frame.css (an eSchool update may overwrite this file). */
.aboutImgWrapper:has(> img[src*="/school-website/spectra/"]) {
    --spx-navy: #1b3a68;
    --spx-gold: #e2b33c;
    position: relative;
    isolation: isolate;
    max-width: 520px;
    margin: 28px auto 44px;
    padding: 0 24px 24px 0;
}
.aboutImgWrapper:has(> img[src*="/school-website/spectra/"]) > img {
    display: block;
    width: 100%;
    aspect-ratio: 1100 / 1000;
    object-fit: cover;
    border: 8px solid #fff;
    /* Arch top, like the arches on the school building */
    border-radius: 50% 50% 28px 28px / 38% 38% 28px 28px;
    box-shadow: 24px 24px 0 -2px #fff, 24px 24px 0 0 var(--spx-gold), 0 30px 60px -24px rgba(27, 58, 104, .55);
    clip-path: inset(-80px);
    transition: clip-path 1.2s cubic-bezier(.2, .65, .3, 1) .2s, translate .5s ease, box-shadow .5s ease;
}
.aboutImgWrapper:has(> img[src*="/school-website/spectra/"]):hover > img {
    translate: -6px -6px;
    box-shadow: 32px 32px 0 -2px #fff, 32px 32px 0 0 var(--spx-gold), 0 36px 70px -24px rgba(27, 58, 104, .6);
}
/* Dotted navy shape behind the picture, slowly changing shape */
.aboutImgWrapper:has(> img[src*="/school-website/spectra/"])::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 22%;
    left: -9%;
    width: 62%;
    height: 78%;
    background-color: var(--spx-navy);
    background-image: radial-gradient(rgba(255, 255, 255, .28) 1.6px, transparent 1.8px);
    background-size: 16px 16px;
    border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
    animation: spx-morph 14s ease-in-out infinite alternate;
}
/* Floating badge */
.aboutImgWrapper:has(> img[src*="/school-website/spectra/"])::after {
    content: "Early Years \00B7  Primary \00B7  College";
    position: absolute;
    left: -4px;
    bottom: 54px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--spx-gold);
    color: var(--spx-navy);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .02em;
    white-space: nowrap;
    box-shadow: 0 12px 28px -10px rgba(27, 58, 104, .55);
    animation: spx-float 6s ease-in-out infinite;
    transition: opacity .6s ease .9s, scale .6s ease .9s;
}
/* Before it scrolls into view: picture hidden, then wiped in from the bottom */
.reveal-on [data-reveal]:not(.is-revealed) .aboutImgWrapper:has(> img[src*="/school-website/spectra/"]) > img {
    clip-path: inset(100% -80px -80px -80px);
}
.reveal-on [data-reveal]:not(.is-revealed) .aboutImgWrapper:has(> img[src*="/school-website/spectra/"])::after {
    opacity: 0;
    scale: .8;
}
@keyframes spx-morph {
    0%   { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; rotate: 0deg; }
    50%  { border-radius: 58% 42% 38% 62% / 55% 38% 62% 45%; rotate: 4deg; }
    100% { border-radius: 36% 64% 52% 48% / 46% 60% 40% 54%; rotate: -3deg; }
}
@keyframes spx-float {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -10px; }
}
@media (max-width: 575px) {
    .aboutImgWrapper:has(> img[src*="/school-website/spectra/"]) { max-width: 360px; padding: 0 18px 18px 0; }
    .aboutImgWrapper:has(> img[src*="/school-website/spectra/"]) > img {
        box-shadow: 18px 18px 0 -2px #fff, 18px 18px 0 0 var(--spx-gold), 0 24px 50px -24px rgba(27, 58, 104, .55);
    }
    .aboutImgWrapper:has(> img[src*="/school-website/spectra/"])::after { font-size: 12.5px; padding: 8px 14px; bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) {
    .aboutImgWrapper:has(> img[src*="/school-website/spectra/"])::before,
    .aboutImgWrapper:has(> img[src*="/school-website/spectra/"])::after { animation: none; }
    .aboutImgWrapper:has(> img[src*="/school-website/spectra/"]) > img { transition: none; }
}
section:has(.aboutImgWrapper > img[src*="/school-website/spectra/"]) { overflow-x: clip; }
