/* ==============================
   GALLERY SECTION
================================*/

.gallery-section {
    padding: 10px 0 15px 0; 
    background: hsl(0, 100%, 100%);
    /* Screenshot light grey tone */
}

.container {
    width: 85%;
    margin: auto;
}

/* ==============================
   TITLE
================================*/

.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: #411E59;
    font-family: 'Playfair Display', serif;
}

/* ==============================
   GRID
================================*/

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 320px);
    justify-content: center;
    column-gap: 90px;
    row-gap: 60px;
}

/* ==============================
   POLAROID CARD
================================*/

.photo-card {
    background: #ffffff;
    padding: 18px 18px 65px 18px;
    /* Thick bottom like polaroid */
    width: 100%;
    max-width: 340px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    text-align: center;
    transition: 0.4s ease;
    position: relative;
}

/* Tilt effect stronger like screenshot */

.photo-card:nth-child(odd) {
    transform: rotate(-4deg);
}

.photo-card:nth-child(even) {
    transform: rotate(3deg);
}

/* Hover straighten */

/* Hover Effect - Gradient Glow */

.photo-card:hover {
    transform: rotate(0deg) scale(1.06);
    z-index: 10;

    /* Remove dark shadow */
    box-shadow: 0 0 0 transparent;

    /* Gradient glow border */
    border-radius: 10px;
    background: linear-gradient(135deg,
            #bfd5f0,
            #f4d0d0,
            rgba(124, 58, 237, 0.12),
            #cd91f3);

    padding: 3px;
    /* create glow border space */
}

/* Inner white card maintain panna */
.photo-card:hover::before {
    content: "";
    position: absolute;
    inset: -2px;
    /* 🔥 border thickness (change this) */
    border-radius: 12px;
    background: linear-gradient(135deg,
            #bfd5f0,
            #f4d0d0,
            rgba(124, 58, 237, 0.12),
            #cd91f3);
    z-index: -1;
}


/* IMAGE */

.photo-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

/* Caption */

.photo-card h3 {
    margin-top: 22px;
    font-size: 20px;
    font-weight: 500;
    color: #411E59;
    font-family: 'Comic Sans MS', cursive;
}

/* ==============================
   RESPONSIVE
================================*/

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px;
    }
}

@media (max-width: 576px) {
    .gallery-section {
        padding: 20px 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .photo-card {
        transform: rotate(0deg);
    }
}

/* SLIDER MODE */
.gallery-grid.slider-active {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    width: fit-content;
    margin: 70px auto;
}

/* POLAROID CARD STYLE */
.gallery-grid.slider-active .slide-card {
    width: 320px;
    background: white;
    padding: 18px;
    color: #411E59;
    font-family: 'Comic Sans Italic', cursive;
    transition: 0.4s ease;
    text-align: center;
}

/* IMAGE SIZE */
.gallery-grid.slider-active img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

/* CARD TEXT STYLE (Like Screenshot) */
.gallery-grid.slider-active .slide-card h4 {
    margin-top: 18px;
    font-size: 20px;
    color: #5b2a86; /* Purple tone */
    font-family: 'Comic Sans MS',cursive;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* POLAROID TILT EFFECT */
.gallery-grid.slider-active .slide-card:nth-child(1) {
    transform: rotate(-6deg);
}

.gallery-grid.slider-active .slide-card:nth-child(2) {
    transform: rotate(0deg);
}

.gallery-grid.slider-active .slide-card:nth-child(3) {
    transform: rotate(6deg);
}

/* ARROWS */
.gallery-grid.slider-active .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 50;
}

.gallery-grid.slider-active .arrow.left {
    left: -70px;
}

.gallery-grid.slider-active .arrow.right {
    right: -70px;
}

/* BACK BUTTON - GRADIENT OVAL */
.gallery-grid.slider-active .back-btn {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg,
        #bfd5f0,
        #f4d0d0,
        rgba(124, 58, 237, 0.12),
        #cd91f3);
    color: #4b2c5e;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;   /* OVAL shape */
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    transition: 0.3s ease;
}

/* Button Hover Effect */
.gallery-grid.slider-active .back-btn:hover {
    transform: translateX(-50%) scale(1.05);
}
/* SLIDER CARD TEXT SAME AS FRONT */
.gallery-grid.slider-active .slide-card h3 {
    margin-top: 22px;
    font-size: 20px;
    font-weight: 500;
    color: #411E59;   /* Same Purple */
    font-family: 'Comic Sans MS', cursive;
}
/* ============================= */
/* MOBILE RESPONSIVE FIX */
/* ============================= */

@media (max-width: 768px) {

    /* Slider container column layout */
    .gallery-grid.slider-active {
        flex-direction: column;
        width: 100%;
        margin: 100px auto 40px;
        gap: 25px; /* gap between cards */
    }

    /* Remove tilt for mobile */
    .gallery-grid.slider-active .slide-card {
        width: 88%;
        transform: rotate(0deg) !important;
    }

    /* Space between cards */
    .gallery-grid.slider-active .slide-card + .slide-card {
        margin-top: 15px;
    }

    /* IMAGE */
    .gallery-grid.slider-active img {
        height: 210px;
    }

    /* ARROWS POSITION FIX */
    .gallery-grid.slider-active .arrow {
        position: static;
        transform: none;
        margin: 10px auto;
        display: block;
    }

    /* LEFT ARROW (TOP) */
    .gallery-grid.slider-active .arrow.left {
        order: -1;   /* move to top */
    }

    /* RIGHT ARROW (BOTTOM) */
    .gallery-grid.slider-active .arrow.right {
        order: 10;   /* move to bottom */
    }

    /* BACK BUTTON */
    .gallery-grid.slider-active .back-btn {
        top: -80px;
    }
}
.image-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s ease;
    z-index: 9999;
}

.image-viewer.active {
    visibility: visible;
    opacity: 1;
}

.image-viewer img {
    width: 80%;
    max-width: 950px;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
}

/* CLOSE BUTTON */
.close-viewer {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* ARROWS */
.viewer-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 20px;
}

.viewer-arrow.left {
    left: 40px;
}

.viewer-arrow.right {
    right: 40px;
}
