@charset "utf-8";
/* CSS Document */
/* Variables for easy theme adjustments */
:root {
    --primary-color: #38643f; /* Deep Green from the original image borders */
    --accent-color: #a44848; /* Red/Brocade inspiration */
    --light-bg: #f7f7f7;
    --dark-text: #333;
    --caption-bg: rgba(56, 100, 63, 0.9); /* Semi-transparent Primary */
}

/* Global Reset and Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

.gallery-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-weight: 600;
}

/* --- Gallery Grid Layout (Responsive) --- */
.gallery-grid {
    display: grid;
    /* Default for smaller screens: 2 columns */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Responsive Grid Adjustments */
@media (min-width: 768px) {
    /* Tablet/Medium screens: 3 columns */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* was 3 */
    }
}

@media (min-width: 1024px) {
    /* Desktop screens: 4 columns, matching the original layout */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);/* was 4 */
    }
}

/* Item Styling */
.gallery-item {
    position: relative;
    overflow: hidden;
    border: 4px solid var(--primary-color); /* The signature green border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
    background-color: white; /* Fallback/background for non-image items */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images cover the area without distortion */
}

/* Caption Styles */
.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px 0;
    background-color: var(--caption-bg);
    color: white;
    text-align: center;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.caption.after {
    /* A subtle visual difference for 'AFTER' */
    background-color: var(--primary-color);
}

.caption.during {
    /* A different color for 'DURING' for distinction */
    background-color: #a07d47; /* Brownish-yellow inspiration */
}

/* Special Tag/Text Item */
.tag-item {
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    /* Ensure tag item has the same height as an image item in its row */
    height: 100%;
    min-height: 250px; /* Base height */
}

.tag-content img {
    width: 120px;
    height: auto;
    margin-bottom: 10px;
    object-fit: contain;
}

.tag-content p {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}


/* --- Pagination Styling --- */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.page-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
