/* Gallery Section */
.gallery-section {
    padding: 5rem 5%;
    background-color: #f9f9f9;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background-color: white;
    border: 1px solid var(--primary-blue);
    border-radius: 50px;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background-color: var(--primary-blue);
    color: white;
}

.filter-btn:hover {
    background-color: var(--primary-blue);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 200px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .item-overlay {
    opacity: 1;
}

.item-overlay i {
    color: white;
    font-size: 2rem;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.media-container {
    max-width: 100%;
    max-height: 80vh;
    overflow: hidden;
}

.media-container img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}

.media-container iframe {
    width: 800px;
    height: 450px;
    border: none;
}

.caption {
    color: white;
    text-align: center;
    margin-top: 1rem;
    font-size: 1.2rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.lightbox-nav button {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.lightbox-nav button:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-blue);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .media-container iframe {
        width: 600px;
        height: 350px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .media-container iframe {
        width: 400px;
        height: 250px;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .media-container iframe {
        width: 300px;
        height: 200px;
    }
    
    .lightbox-nav button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}
/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
}

.lightbox-content img {
    max-height: 80vh;
    max-width: 100%;
    display: block;
}

.lightbox-content iframe {
    width: 800px;
    height: 450px;
    max-width: 90vw;
    max-height: 50.625vw; /* 16:9 aspect ratio */
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    cursor: pointer;
}

.caption {
    color: white;
    text-align: center;
    margin-top: 15px;
    font-size: 1.2rem;
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    top: 50%;
    transform: translateY(-50%);
}

.prev-btn, .next-btn {
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
}

/* Gallery Filter Styles */
.gallery-filter {
    margin: 20px 0;
    text-align: center;
}

.filter-btn {
    background: #f1f1f1;
    border: none;
    padding: 8px 16px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #2c3e50;
    color: white;
}
/* Video Thumbnail Styles */
.gallery-item.video {
    position: relative;
}

.gallery-item.video::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
}

/* Responsive Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 15px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
/* Watermark Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.watermark {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.watermark::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('images/logo-watermark.png');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 5px;
}

/* Adjust overlay to accommodate watermark */
.item-overlay {
    z-index: 1;
}
/* Protection Message Styles */
#protection-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 9999;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-content i {
    font-size: 1.2rem;
    color: #f1c40f;
}

.message-content p {
    margin: 0;
    font-size: 0.9rem;
}
/* Tambahkan ke gallery.css */
.gallery-item {
    position: relative;
}

.gallery-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 3;
    pointer-events: none;
}