/* =================================
   RCSH COLLEGE GALLERY
   IIT Delhi inspired design
================================= */

.rcsh-gallery {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 3%;
    box-sizing: border-box;
}

/* Event album card layout */

.rcsh-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

/* Individual album card */

.rcsh-gallery-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rcsh-gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.13);
}

/* Card link */

.rcsh-gallery-link {
    display: block;
    color: #172033;
    text-decoration: none;
}

/* Album cover image */

.rcsh-gallery-image {
    width: 100%;
    height: 230px;
    overflow: hidden;
}

.rcsh-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.rcsh-gallery-card:hover .rcsh-gallery-image img {
    transform: scale(1.08);
}
}

.rcsh-gallery-card:hover .rcsh-gallery-image img {
    transform: scale(1.05);
}

/* Album title and description */

.rcsh-gallery-content {
    padding: 22px;
}

.rcsh-gallery-content h2 {
    font-size: 21px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #172033;
}

.rcsh-gallery-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #667085;
    margin: 0;
}

/* Tablet layout */

@media (max-width: 900px) {
    .rcsh-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile layout */

/* Mobile layout only */
@media (max-width: 600px) {
    .rcsh-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        padding: 15px 10px;
    }

    /* Horizontal gallery banner */
    .rcsh-gallery-hero {
    grid-column: 1 / -1;
    width: 100%;
    height: 110px !important;
    min-height: 110px !important;
    aspect-ratio: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
    background-size: cover;
    background-position: center;
}

.rcsh-gallery-hero-inner {
    width: 100%;
    text-align: center;
}

.rcsh-gallery-hero h1 {
    margin: 0;
    font-size: 28px;
    text-align: center;
}

    .rcsh-gallery-hero p {
        display: none;
    }

    .rcsh-gallery-image {
        height: 130px;
    }

    .rcsh-gallery-content {
        padding: 12px;
    }

    .rcsh-gallery-content h2 {
        font-size: 15px;
        line-height: 1.3;
        margin-bottom: 0;
    }

    .rcsh-gallery-content p {
        display: none;
    }
}
/* Gallery section heading */
.rcsh-gallery-heading {
    grid-column: 1 / -1;
}/* Gallery card scroll animation */
.rcsh-gallery-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.rcsh-gallery-card.reveal {
    opacity: 0;
    transform: translateY(35px);
}

.rcsh-gallery-card.reveal.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.rcsh-gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
}/* Continuous floating animation */
.rcsh-gallery-card {
    animation: rcsh-float 4s ease-in-out infinite;
}

.rcsh-gallery-card:nth-child(2) {
    animation-delay: 0.5s;
}

.rcsh-gallery-card:nth-child(3) {
    animation-delay: 1s;
}

.rcsh-gallery-card:nth-child(4) {
    animation-delay: 1.5s;
}

@keyframes rcsh-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}/* RCSH College Brand Banner */

.rcsh-brand-banner {
    background-color: #1E568F !important;
    color: #FFFFFF !important;
}

.rcsh-brand-banner h1,
.rcsh-brand-banner h2,
.rcsh-brand-banner h3,
.rcsh-brand-banner p {
    color: #FFFFFF !important;
}

.rcsh-brand-banner a,
.rcsh-brand-banner .wp-block-button__link {
    background-color: #FFFFFF;
    color: #1E568F;
    border-radius: 30px;
}/* Hide the duplicate WordPress page title */
body.page-id-19 .wp-block-post-title {
    display: none !important;
}

/* RCSh Gallery Lightbox */

.rcsh-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.rcsh-lightbox.active {
    display: flex;
}

.rcsh-lightbox img {
    max-width: 90%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.rcsh-lightbox button {
    position: absolute;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 38px;
}

.rcsh-lightbox-close {
    top: 20px;
    right: 30px;
}

.rcsh-lightbox-prev {
    left: 25px;
}

.rcsh-lightbox-next {
    right: 25px;
}

/* Full-width layout for individual gallery albums */
body.single-rcsh_gallery_album .wp-block-post-content,
body.single-rcsh_gallery_album .entry-content {
    width: 100% !important;
    max-width: none !important;
}

body.single-rcsh_gallery_album .wp-block-gallery {
    width: 100% !important;
    max-width: none !important;
}

/* Smooth hover effect for gallery photos */
.wp-block-gallery .wp-block-image {
    overflow: hidden;
}

.wp-block-gallery .wp-block-image img {
    transition: transform 0.4s ease;
}

.wp-block-gallery .wp-block-image:hover img {
    transform: scale(1.05);
}/* Make only the first album photo full width */
body.single-rcsh_gallery_album .wp-block-post-content > .wp-block-image:first-of-type img,
body.single-rcsh_gallery_album .entry-content > .wp-block-image:first-of-type img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
}/* Hide featured image inside individual albums only */
body.single-rcsh_gallery_album img.wp-post-image {
    display: none !important;
}/* RCSH album page - left side alignment */
body.single-rcsh_gallery_album .wp-block-post-content,
body.single-rcsh_gallery_album .entry-content {
    width: auto !important;
    max-width: none !important;
    margin-left: 40px !important;
    margin-right: 40px !important;
    text-align: left !important;
}

body.single-rcsh_gallery_album .wp-block-post-content > *,
body.single-rcsh_gallery_album .entry-content > * {
    max-width: none !important;
    text-align: left !important;
}

/* Remove author information */
body.single-rcsh_gallery_album .wp-block-post-author,
body.single-rcsh_gallery_album .wp-block-post-author-name,
body.single-rcsh_gallery_album .wp-block-post-meta {
    display: none !important;
}/* Align album title to the left */
body.single-rcsh_gallery_album .wp-block-post-title {
    width: auto !important;
    max-width: none !important;
    margin-left: 40px !important;
    margin-right: 40px !important;
    text-align: left !important;
}/* Remove Written by information */
body.single-rcsh_gallery_album .wp-block-post-author,
body.single-rcsh_gallery_album .wp-block-post-author-name,
body.single-rcsh_gallery_album .wp-block-post-date,
body.single-rcsh_gallery_album .wp-block-post-terms {
    display: none !important;
}/* Completely hide author and post metadata on album pages */
body.single-rcsh_gallery_album .wp-block-post-author,
body.single-rcsh_gallery_album .wp-block-post-author-name,
body.single-rcsh_gallery_album .wp-block-post-date,
body.single-rcsh_gallery_album .wp-block-post-terms,
body.single-rcsh_gallery_album .wp-block-post-meta,
body.single-rcsh_gallery_album .entry-meta,
body.single-rcsh_gallery_album .post-meta {
    display: none !important;
}/* Hide the Written by metadata group */
body.single-rcsh_gallery_album .wp-block-group.has-small-font-size.is-layout-flex {
    display: none !important;
}/* RCSH Gallery - Uniform horizontal photo layout */
body.single-rcsh_gallery_album .wp-block-gallery {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px !important;
}

body.single-rcsh_gallery_album .wp-block-gallery .wp-block-image {
    width: 100% !important;
    aspect-ratio: 4 / 3 !important;
    overflow: hidden !important;
    margin: 0 !important;
}

body.single-rcsh_gallery_album .wp-block-gallery .wp-block-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Tablet */
@media (max-width: 900px) {
    body.single-rcsh_gallery_album .wp-block-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Mobile */
@media (max-width: 600px) {
    body.single-rcsh_gallery_album .wp-block-gallery {
        grid-template-columns: 1fr !important;
    }
}/* RCSH Gallery Homepage Banner */
.rcsh-gallery-hero {
    position: relative;
    width: 100%;
    min-height: 380px;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
        url("https://regionalharithagiri.ac.in/wp-content/uploads/2026/11/rcsh-gallery-banner-crop-3.jpg");
    background-size: cover;
    background-position: center 55%;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 14px;
    overflow: hidden;
}

.rcsh-gallery-hero-inner {
    position: relative;
    z-index: 2;
    padding: 50px 20px;
}

.rcsh-gallery-hero h1 {
    color: #ffffff !important;
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.rcsh-gallery-hero p {
    color: #ffffff !important;
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
}

/* Mobile banner */
@media (max-width: 600px) {
    .rcsh-gallery-hero {
        min-height: 260px;
        background-position: center 100%;
    }

    .rcsh-gallery-hero h1 {
        font-size: 30px;
    }

    .rcsh-gallery-hero p {
        font-size: 14px;
    }
}/* RCSH official logo watermark */
.rcsh-gallery {
    position: relative;
    isolation: isolate;
}

.rcsh-gallery::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("https://regionalharithagiri.ac.in/wp-content/uploads/2026/11/rcsh-logo-transparent.png");
    background-position: center 65%;
   background-size: 650px auto;
   opacity: 0.09;
    z-index: -1;
    pointer-events: none;
}

/* Slight transparency on album cards */
.rcsh-gallery-card {
    background: rgba(255, 255, 255, 0.94);
}
/* Three photos per row inside albums — mobile only */
@media (max-width: 600px) {
    body.single-rcsh_gallery_album .wp-block-gallery {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    body.single-rcsh_gallery_album .wp-block-gallery > .wp-block-image {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    body.single-rcsh_gallery_album .wp-block-gallery > .wp-block-image img {
        width: 100% !important;
        height: 90px !important;
        object-fit: cover !important;
        display: block;
    }
}
/* Full-width individual album pages on desktop */
@media (min-width: 601px) {
    body.single-rcsh_gallery_album .site-content .ast-container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 3% !important;
        padding-right: 3% !important;
    }

    body.single-rcsh_gallery_album .wp-block-gallery {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 16px !important;
    }

    body.single-rcsh_gallery_album .wp-block-gallery .wp-block-image {
        width: 100% !important;
        margin: 0 !important;
    }

    body.single-rcsh_gallery_album .wp-block-gallery img {
        width: 100% !important;
        height: 260px !important;
        object-fit: cover !important;
    }
}
/* Remove Astra width restriction on album pages */
body.single-rcsh_gallery_album .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 2% !important;
    padding-right: 2% !important;
}

body.single-rcsh_gallery_album .ast-article-single,
body.single-rcsh_gallery_album .entry-content {
    width: 100% !important;
    max-width: 100% !important;
}

/* Full-width Astra layout for gallery albums */
body.single-rcsh_gallery_album.ast-separate-container #content .ast-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.single-rcsh_gallery_album.ast-separate-container #primary {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

body.single-rcsh_gallery_album.ast-separate-container .ast-article-single {
    padding: 40px 3% !important;
    border-radius: 0 !important;
}

/* Expand only the white album content area */
body.single-rcsh_gallery_album #primary,
body.single-rcsh_gallery_album .ast-article-single {
    width: 100% !important;
    max-width: 100% !important;
}

body.single-rcsh_gallery_album .ast-article-single {
    margin: 0 !important;
    border-radius: 0 !important;
}


