/* ========================================
   Gallery Page
   ======================================== */

/* ---- Gallery Hero ---- */
.mmc-gallery-hero {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
}

.mmc-gallery-hero-bg {
    background: linear-gradient(160deg, rgba(10, 10, 10, 0.75) 0%, rgba(2, 120, 212, 0.72) 100%), url('/images/gallery-hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.mmc-gallery-hero-bg::before {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -60px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.mmc-gallery-hero-content {
    text-align: center;
    color: var(--mmc-white);
    width: 100%;
    position: relative;
    z-index: 1;
}

.mmc-gallery-hero-label {
    display: inline-block;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 12px;
}

.mmc-gallery-hero h1 {
    font-family: var(--mmc-font-heading);
    font-size: 3.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    margin-bottom: 16px;
}

.mmc-gallery-hero-content p {
    font-size: 1.02rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---- Gallery Grid ---- */
.mmc-gallery-grid-section {
    background: var(--mmc-bg-light);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.mmc-gallery-grid-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10%;
    width: 50%;
    height: 100%;
    background: linear-gradient(160deg, rgba(2, 120, 212, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.mmc-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.mmc-gallery-item {
    position: relative;
    border-radius: var(--mmc-radius-lg);
    overflow: hidden;
    border: 1px solid var(--mmc-border);
    transition: all var(--mmc-transition);
    cursor: pointer;
    background: var(--mmc-white);
}

.mmc-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.mmc-gallery-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Minimal overlay — just a subtle darken + icon */
.mmc-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.mmc-gallery-overlay i {
    color: var(--mmc-white);
    font-size: 1.2rem;
    opacity: 0.8;
}

/* B/A badge — minimal pill */
.mmc-ba-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--mmc-white);
    padding: 4px 10px;
    border-radius: 20px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* ---- Lightbox — minimal fullscreen ---- */
.mmc-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

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

.mmc-lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
    background: none;
    border: none;
    font-family: 'Exo 2', sans-serif;
    line-height: 1;
    padding: 8px;
    transition: color 0.2s ease;
}

.mmc-lightbox-close:hover {
    color: var(--mmc-white);
}

.mmc-lightbox-body {
    max-width: 88%;
    max-height: 88%;
    text-align: center;
    cursor: default;
}

.mmc-lightbox-image {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: var(--mmc-radius);
}

/* Before/After */
.mmc-lightbox-ba { display: none; }
.mmc-lightbox-ba.active { display: block; }

.mmc-lightbox-ba-image {
    max-width: 100%;
    max-height: 74vh;
    object-fit: contain;
    border-radius: var(--mmc-radius);
}

.mmc-lightbox-ba-nav {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 2px;
}

.mmc-lightbox-ba-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 8px 24px;
    cursor: pointer;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.mmc-lightbox-ba-btn:first-child { border-radius: var(--mmc-radius) 0 0 var(--mmc-radius); }
.mmc-lightbox-ba-btn:last-child { border-radius: 0 var(--mmc-radius) var(--mmc-radius) 0; }

.mmc-lightbox-ba-btn.active,
.mmc-lightbox-ba-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--mmc-white);
}

/* Shimmer loading */
.mmc-gallery-item.loading {
    background: linear-gradient(90deg, var(--mmc-bg-light) 25%, var(--mmc-border) 50%, var(--mmc-bg-light) 75%);
    background-size: 200% 100%;
    animation: mmc-shimmer 1.5s infinite;
}

@keyframes mmc-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   Tablet Styles
   ======================================== */
@media (max-width: 768px) {
    .mmc-gallery-hero { min-height: 240px; }
    .mmc-gallery-hero-bg { min-height: 240px; background-attachment: scroll; }
    .mmc-gallery-hero h1 { font-size: 2.8rem; }
    .mmc-gallery-hero-content p { font-size: 0.92rem; }

    .mmc-gallery-grid-section { padding: 72px 0; }
    .mmc-gallery-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
    .mmc-gallery-item img { height: 220px; }
    .mmc-lightbox-body { max-width: 94%; }
}

/* ========================================
   Mobile Styles
   ======================================== */
@media (max-width: 480px) {
    .mmc-gallery-hero { min-height: 200px; }
    .mmc-gallery-hero-bg { min-height: 200px; }
    .mmc-gallery-hero h1 { font-size: 2.2rem; }
    .mmc-gallery-hero-label { font-size: 0.72rem; }
    .mmc-gallery-hero-content p { font-size: 0.88rem; max-width: none; }

    .mmc-gallery-grid-section { padding: 56px 0; }
    .mmc-gallery-grid { grid-template-columns: 1fr; gap: 16px; }
    .mmc-gallery-item img { height: 200px; }

    .mmc-lightbox-close { top: 12px; right: 16px; font-size: 1.8rem; }
    .mmc-lightbox-ba-btn { padding: 7px 18px; font-size: 0.68rem; }
}
