/* ================================================
   GALLERY PAGE STYLES
   ================================================ */

/* Hero */
.gallery-hero {
    padding: 120px 0 80px;
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.gallery-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.gallery-hero p {
    font-size: 18px;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Gallery Section */
.gallery-section {
    padding: var(--section-padding) 0;
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition-base);
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-3d);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transition: var(--transition-base);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    color: var(--white);
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    margin-bottom: 5px;
}

.gallery-category {
    color: var(--white);
    font-size: 14px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gallery-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.gallery-item:hover .gallery-icon {
    transform: translate(-50%, -50%) scale(1);
}

.gallery-icon i {
    font-size: 24px;
    color: var(--jungle-green);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
}

.lightbox-close:hover {
    background: var(--ocean-teal);
    color: var(--white);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
}

.lightbox-nav:hover {
    background: var(--ocean-teal);
    color: var(--white);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--white);
    font-size: 18px;
    font-weight: var(--font-weight-medium);
}

/* ================================================
   GALLERY FILTER SECTION
   Uses global .btn-3d-outline for buttons
   ================================================ */
.gallery-filter {
    padding: 40px 0;
    background: var(--sand);
    border-top: 1px solid rgba(13, 148, 136, 0.1);
    border-bottom: 1px solid rgba(13, 148, 136, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-count {
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
    color: var(--slate-medium);
    font-weight: var(--font-weight-medium);
}

.filter-count span {
    color: var(--jungle-green);
    font-weight: var(--font-weight-bold);
    font-size: 20px;
}