/* Global Styles */
:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-color: #0d6efd;
    /* Bootstrap primary blue or custom */
    --hover-overlay: rgba(0, 0, 0, 0.5);
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation */
.gallery-nav {
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #333;
}

.gallery-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-link:hover {
    color: var(--accent-color);
}

.gallery-nav .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

.gallery-nav .logo img {
    height: 30px;
    width: auto;
}

/* Header */
.gallery-header {
    text-align: center;
    padding: 3rem 0;
}

.gallery-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.gallery-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Masonry Grid */
.gallery-container {
    padding-bottom: 4rem;
}

.masonry-grid {
    columns: 1;
    /* Mobile default */
    column-gap: 1.5rem;
}

@media (min-width: 600px) {
    .masonry-grid {
        columns: 2;
    }
}

@media (min-width: 900px) {
    .masonry-grid {
        columns: 3;
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Overlay Effect */
.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.gallery-item .overlay i {
    color: white;
    font-size: 2rem;
    transform: scale(0.8);
    transition: transform var(--transition-speed);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item:hover .overlay i {
    transform: scale(1);
}

/* Lightbox */
.lightbox {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 80%;
}

.lightbox-content {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--accent-color);
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 1001;
}

.prev {
    left: 20px;
    border-radius: 3px 0 0 3px;
}

.next {
    right: 20px;
    border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.caption {
    text-align: center;
    color: #ccc;
    padding: 10px 20px;
    font-size: 1rem;
    margin-top: 10px;
}

/* Footer */
.gallery-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid #333;
}