﻿/* Base Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #f2f7f4; /* Soft Mint White */
    --card-bg: #ffffff; /* Clean Pure White */
    --text-main: #2c3e35; /* Deep Forest Gray */
    --text-muted: #607369; /* Muted Sage */
    --accent: #2e7d32; /* Vibrant Leaf Green */
    --accent-light: #e8f5e9; /* Pastel Green Highlight */
    --overlay: rgba(20, 30, 25, 0.95); /* Deep Sage Dark Overlay */
    --btn-disabled: #e0e8e3;
    --border-color: #d1ded6;
}

.gallery-container {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
  
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    text-align: center;
     
    font-size: 2.5rem;
    
    color: var(--accent);
}

/* Responsive Grid System */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex-grow: 1;
}

/* Gallery Cards */
.gallery-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.05);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .gallery-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 20px rgba(46, 125, 50, 0.12);
        border-color: var(--accent);
    }

.image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #e8eee9;
}

    .image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

.gallery-item:hover .image-wrapper img {
    transform: scale(1.05);
}

.item-details {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--card-bg) 0%, #f9fbf9 100%);
}

.item-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.item-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Pagination Controls Styling */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding: 1rem 0;
}

.page-btn {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    min-width: 40px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

    .page-btn:hover:not(:disabled) {
        background-color: var(--accent);
        color: #ffffff;
        border-color: var(--accent);
    }

    .page-btn.active {
        background-color: var(--accent);
        color: #ffffff;
        border-color: var(--accent);
    }

    .page-btn:disabled {
        background-color: var(--btn-disabled);
        color: #a0b0a6;
        cursor: not-allowed;
        border-color: transparent;
    }

/* Lightbox Modal & Zoom System */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .lightbox.active {
        display: flex;
        opacity: 1;
    }

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-viewframe {
    overflow: hidden;
    border-radius: 8px;
    background-color: #1b2620;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.lightbox-img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    transition: transform 0.2s cubic-bezier(0.1, 0.8, 0.3, 1);
    transform-origin: center center;
}

.lightbox-info {
    text-align: center;
    margin-top: 1.25rem;
    max-width: 600px;
}

.lightbox-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: #a3e2b7;
    font-weight: 600;
}

.lightbox-desc {
    font-size: 1rem;
    color: #cbdad0;
}

.close-btn {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: #cbdad0;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

    .close-btn:hover {
        color: #ffffff;
    }

.zoom-controls {
    position: absolute;
    bottom: -55px;
    display: flex;
    gap: 0.75rem;
    background: rgba(44, 62, 53, 0.85);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
}

.zoom-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s, transform 0.1s;
}

    .zoom-btn:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .zoom-btn:active {
        transform: scale(0.95);
    }
