﻿/* ===========================================
   SC GALLERY - BENTO GRID COMPONENT
   =========================================== */

.sc-gallery-wrap {
    display: block;
    width: 100%;
    padding: 60px 20px 80px;
    background: linear-gradient(180deg, #FFF8E1 0%, #fef8f6 40%, #FFF8E1 100%);
    box-sizing: border-box;
}

    .sc-gallery-wrap *,
    .sc-gallery-wrap *::before,
    .sc-gallery-wrap *::after {
        box-sizing: border-box;
    }

/* ===========================================
   HEADER
   =========================================== */

.sc-gallery-head {
    text-align: center;
    margin-bottom: 50px;
}

/* TITLE — Luckiest Guy */
.sc-gallery-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 4.2rem;
    font-weight: 400;
    font-style: italic;
    color: #FFE600;
    -webkit-text-stroke: 2px #000000;
    paint-order: stroke fill;
    margin: 0;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* ===========================================
   FLOATING ICON
   =========================================== */

.sc-gallery-icon {
    display: inline-block;
    font-size: 2.5rem;
    animation: scFloatIcon 3s ease-in-out infinite;
}

@keyframes scFloatIcon {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

/* ===========================================
   GRID LAYOUT
   =========================================== */

.sc-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===========================================
   CARDS
   =========================================== */

.sc-gallery-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

    .sc-gallery-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 50px rgba(255, 230, 0, 0.2);
    }

    .sc-gallery-card:nth-child(7n+1) {
        grid-column: span 2;
        grid-row: span 2;
    }

    .sc-gallery-card:nth-child(7n+2) {
        grid-column: span 2;
    }

    .sc-gallery-card:nth-child(7n+3),
    .sc-gallery-card:nth-child(7n+4),
    .sc-gallery-card:nth-child(7n+5),
    .sc-gallery-card:nth-child(7n) {
        grid-column: span 1;
    }

    .sc-gallery-card:nth-child(7n+6) {
        grid-column: span 2;
    }

/* ===========================================
   IMAGE
   =========================================== */

.sc-gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sc-gallery-card:hover .sc-gallery-img {
    transform: scale(1.05);
}

/* ===========================================
   OVERLAY
   =========================================== */

.sc-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 50px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 10;
}

.sc-gallery-card:hover .sc-gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Card title — Luckiest Guy (overlay on image) */
.sc-gallery-card-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.25rem;
    font-weight: 400;
    color: #fff;
    margin: 0 0 8px 0;
}

/* Card text — Poppins */
.sc-gallery-card-text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
}

/* ===========================================
   RESPONSIVE — TABLET
   =========================================== */

@media (max-width: 1100px) {
    .sc-gallery-wrap {
        padding: 50px 16px 60px;
    }

    .sc-gallery-grid {
        grid-auto-rows: 250px;
        gap: 16px;
    }

    .sc-gallery-title {
        font-size: 3rem;
    }

    .sc-gallery-icon {
        font-size: 2.2rem;
    }
}

@media (max-width: 900px) {
    .sc-gallery-wrap {
        padding: 40px 14px 50px;
    }

    .sc-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 240px;
        gap: 14px;
    }

    .sc-gallery-card:nth-child(7n+1) {
        grid-column: span 2;
        grid-row: span 1;
    }

    .sc-gallery-card:nth-child(7n+2),
    .sc-gallery-card:nth-child(7n+3),
    .sc-gallery-card:nth-child(7n+4),
    .sc-gallery-card:nth-child(7n+5),
    .sc-gallery-card:nth-child(7n+6),
    .sc-gallery-card:nth-child(7n) {
        grid-column: span 1;
    }

    .sc-gallery-title {
        font-size: 2.6rem;
    }

    .sc-gallery-icon {
        font-size: 2rem;
    }

    .sc-gallery-head {
        margin-bottom: 35px;
    }
}

/* ===========================================
   RESPONSIVE — MOBILE
   =========================================== */

@media (max-width: 600px) {
    .sc-gallery-wrap {
        padding: 30px 12px 40px;
    }

    .sc-gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
        gap: 12px;
    }

    .sc-gallery-card:nth-child(7n+1),
    .sc-gallery-card:nth-child(7n+2),
    .sc-gallery-card:nth-child(7n+3),
    .sc-gallery-card:nth-child(7n+4),
    .sc-gallery-card:nth-child(7n+5),
    .sc-gallery-card:nth-child(7n+6),
    .sc-gallery-card:nth-child(7n) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .sc-gallery-title {
        font-size: 2.2rem;
    }

    .sc-gallery-icon {
        font-size: 1.8rem;
    }

    .sc-gallery-head {
        margin-bottom: 25px;
    }

    .sc-gallery-card-title {
        font-size: 1rem;
    }

    .sc-gallery-card-text {
        font-size: 0.85rem;
    }
}
