/* Using your exact style.css variable palette */
:root {
    --moss-green: #4F6D52;
    --bark-brown: #4A3728;
    --cream: #F9F7F2;
    --accent: #D4A373;
    --teal: #008080;
    --charcoal: #2c3e50;
    --light-bg: #f4efe6;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'PT Sans', sans-serif;
    background-color: var(--cream);
    color: var(--bark-brown);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Prata', serif;
}

.gallery-section {
    padding: 2rem 2rem 4rem;
    max-width: 1100px;
    margin: auto;
    text-align: center;
}

.gallery-section h1 {
    font-family: 'Prata', serif;
    color: var(--teal);
    font-size: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-style: italic;
    color: var(--moss-green);
    margin-bottom: 2rem;
}

/* Filter Buttons */
.filter-buttons {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 1px solid #ddd;
    color: var(--bark-brown);
    padding: 8px 18px;
    border-radius: 20px;
    font-family: 'PT Sans', sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
}

.filter-btn.active {
    background-color: var(--moss-green);
    border-color: var(--moss-green);
    color: white;
}

/* Gallery Grid (Matching your .grid and .card setup) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0;
}

.gallery-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.08);
}

.gallery-item.hide {
    display: none;
}

.gallery-item img {
    max-width: 100%;
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.item-info {
    padding-top: 1rem;
}

.item-info h3 {
    font-family: 'Prata', serif;
    color: var(--teal);
    font-size: 1.3rem;
    margin: 0.5rem 0;
}

.tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--moss-green);
    font-weight: bold;
}

/* Technique Tags Layout */
.technique-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 8px;
}

/* Sub-tag Style (Hand Pieced, EPP, FPP, Machine Pieced) */
.tech-tag {
    font-size: 0.72rem;
    font-family: 'PT Sans', sans-serif;
    color: var(--bark-brown);
    background-color: var(--light-bg);
    border: 1px solid var(--accent);
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    text-transform: capitalize;
}

.card-slider {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 4px;
}

.slides img {
    display: none;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.slides img.active-slide {
    display: block;
}

/* Clickable indicator for Lightbox cards */
.gallery-item.clickable {
    cursor: pointer;
}

/* Lightbox Overlay Background */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    max-width: 85%;
    max-height: 85%;
    display: flex;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 12px 16px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
    margin: 0 10px;
    transition: background 0.2s;
}

.lightbox-btn:hover {
    background: var(--moss-green);
}

/* Container needs relative positioning for ribbon overlay */
.gallery-item {
    position: relative;
}

/* Blue Ribbon Badge Styling */
.ribbon-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #1b4965; /* Deep Ribbon Blue */
    color: #ffffff;
    font-family: 'PT Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Award Filter Button Highlight */
.filter-btn.award-filter {
    border-color: #1b4965;
    color: #1b4965;
}

.filter-btn.award-filter:hover,
.filter-btn.award-filter.active {
    background-color: #1b4965;
    border-color: #1b4965;
    color: white;
}

.card-image-container {
    position: relative;
}

/* Invisible shield over the photo */
.card-image-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Prevent image highlighting, selection, and dragging */
.gallery-item img,
.lightbox-content img {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: auto;
}