/* Modern Individual Gallery Page Styles */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f8fbff 0%, #e8f4ff 100%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Enhanced Hero Section */
#gallery-hero {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #0066cc 0%, #00baff 100%);
    color: white;
    overflow: hidden;
}

.hero-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.hero-floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-circle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatCircle 20s ease-in-out infinite;
}

.circle-1 {
    width: 150px;
    height: 150px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 100px;
    height: 100px;
    top: 60%;
    right: 15%;
    animation-delay: -7s;
}

.circle-3 {
    width: 80px;
    height: 80px;
    top: 30%;
    right: 10%;
    animation-delay: -14s;
}

@keyframes floatCircle {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1); 
        opacity: 0.3;
    }
    25% { 
        transform: translateY(-30px) rotate(90deg) scale(1.1); 
        opacity: 0.5;
    }
    50% { 
        transform: translateY(-60px) rotate(180deg) scale(0.9); 
        opacity: 0.7;
    }
    75% { 
        transform: translateY(-30px) rotate(270deg) scale(1.1); 
        opacity: 0.5;
    }
}

/* Breadcrumb Styles */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
    content: ">";
    padding: 0 8px;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: white;
}

.breadcrumb-item.active {
    color: white;
    font-weight: 600;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.hero-btn.primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero-btn.primary:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.hero-btn.secondary {
    background: white;
    color: #0066cc;
    border: 2px solid transparent;
}

.hero-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

.hero-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Enhanced Gallery Stats */
#gallery-stats {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 186, 255, 0.1);
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 186, 255, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 186, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 186, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 186, 255, 0.2);
    border-color: rgba(0, 186, 255, 0.2);
}

.stat-item i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #00baff;
    transition: all 0.3s ease;
}

.stat-item:hover i {
    transform: scale(1.1);
    color: #0066cc;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0066cc;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

/* Gallery Section */
#gallery-section {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
}

.gallery-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.gallery-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(0, 186, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 186, 255, 0.05) 0%, transparent 50%);
}

.gallery-floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    background: linear-gradient(135deg, rgba(0, 186, 255, 0.1), rgba(0, 230, 255, 0.05));
    border-radius: 50%;
    animation: floatShape 25s ease-in-out infinite;
}

.shape-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 5%;
    animation-delay: 0s;
}

.shape-2 {
    width: 80px;
    height: 80px;
    top: 70%;
    right: 10%;
    animation-delay: -8s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    top: 40%;
    right: 5%;
    animation-delay: -16s;
}

.shape-4 {
    width: 60px;
    height: 60px;
    top: 85%;
    left: 20%;
    animation-delay: -24s;
}

@keyframes floatShape {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1); 
        opacity: 0.4;
    }
    25% { 
        transform: translateY(-25px) rotate(90deg) scale(1.1); 
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-50px) rotate(180deg) scale(0.9); 
        opacity: 0.8;
    }
    75% { 
        transform: translateY(-25px) rotate(270deg) scale(1.1); 
        opacity: 0.6;
    }
}

/* Gallery Header */
.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.gallery-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 186, 255, 0.1);
    border: 1px solid rgba(0, 186, 255, 0.2);
    border-radius: 50px;
    padding: 0.8rem 2rem;
    margin-bottom: 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0066cc;
}

.gallery-badge i {
    font-size: 1.2rem;
}

.gallery-main-title {
    font-size: 3rem;
    font-weight: 800;
    color: #0066cc;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #0066cc 0%, #00baff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.gallery-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Gallery Grid */
.gallery-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.gallery-grid {
    columns: 4;
    column-gap: 20px;
    margin-top: 2rem;
}

@media (max-width: 1200px) {
    .gallery-grid {
        columns: 3;
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        columns: 2;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        columns: 1;
    }
}

.gallery-item {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 186, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 186, 255, 0.1);
    margin-bottom: 20px;
    break-inside: avoid;
    display: block;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 186, 255, 0.2);
    border-color: rgba(0, 186, 255, 0.2);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    /* Skeleton placeholder sebelum gambar dimuat */
    background-color: #e8f4ff;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 102, 204, 0.7) 0%, 
        rgba(0, 186, 255, 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
    padding: 1rem;
    animation: fadeInUp 0.5s ease;
}

.overlay-content i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

.overlay-content h6 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.overlay-content p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Gallery Info */
.gallery-info {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.gallery-info h6 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.gallery-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0;
}

/* Hide gallery info on grid */
.gallery-info {
    display: none;
}

/* Enhanced Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

/* Lightbox loading state */
.lightbox.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #00baff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10001;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.lightbox-info {
    background: white;
    padding: 1.5rem;
    text-align: center;
}

.lightbox-info h5 {
    font-size: 1.5rem;
    color: #0066cc;
    margin-bottom: 0.5rem;
}

.lightbox-info p {
    color: #666;
    margin-bottom: 0;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.7);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.lightbox-close:hover {
    background: rgba(0, 186, 255, 0.8);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
}

.lightbox-nav-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox-nav-btn:hover {
    background: rgba(0, 186, 255, 0.8);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.lightbox-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty State */
.empty-gallery {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    margin: 2rem 0;
    border: 2px dashed rgba(0, 186, 255, 0.3);
}

.empty-gallery i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.empty-gallery h3 {
    color: #666;
    margin-bottom: 1rem;
}

.empty-gallery p {
    color: #888;
    margin-bottom: 2rem;
}

.empty-gallery .btn {
    background: linear-gradient(135deg, #00baff, #0066cc);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.empty-gallery .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 186, 255, 0.4);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
    position: relative;
    z-index: 10;
    padding: 2rem 0;
}

.load-more-btn {
    background: linear-gradient(135deg, #00baff, #0066cc);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 6px 20px rgba(0, 186, 255, 0.3);
    position: relative;
    z-index: 11;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 186, 255, 0.4);
    background: linear-gradient(135deg, #0066cc, #00baff);
}

.load-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 186, 255, 0.3);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.load-more-btn:focus {
    outline: 2px solid #00baff;
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    /* Hanya animasikan opacity & transform, bukan semua properti (menghindari CLS) */
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00baff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .gallery-main-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .gallery-main-title {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    #gallery-hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .gallery-main-title {
        font-size: 1.8rem;
    }
    
    .gallery-description {
        font-size: 1rem;
    }
    
    .gallery-grid {
        columns: 2;
        column-gap: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .lightbox-info {
        min-width: 280px;
        padding: 1.5rem;
    }
    
    .lightbox-close {
        top: 15px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .lightbox-nav-btn {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .lightbox-nav {
        padding: 0 20px;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        columns: 2;  /* Change from 1 to 2 columns to match tablet */
        column-gap: 10px;
        padding: 0 6px;
    }

    .gallery-container {
        padding: 0 6px;
        max-width: 100%;
    }

    .gallery-item {
        margin-bottom: 10px;
        break-inside: avoid;
    }

    .gallery-item img {
        width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
    }

    /* Rest of mobile styles remain the same */
    #gallery-hero {
        padding: 80px 0 40px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .gallery-main-title {
        font-size: 1.6rem;
    }

    .gallery-description {
        font-size: 0.9rem;
    }

    .gallery-badge {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    /* Lightbox adjustments */
    .lightbox-content {
        margin: 5px;
        max-width: 95vw; /* Match tablet view */
    }

    .lightbox-content img {
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 80vh;
        object-fit: contain;
    }

    .lightbox-info {
        padding: 0.8rem;
    }

    .lightbox-info h5 {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }

    .lightbox-info p {
        font-size: 0.9rem;
    }

    .lightbox-nav {
        padding: 0 5px;
    }

    .lightbox-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* Touch-specific optimizations */
@media (hover: none) and (pointer: coarse) {
    .gallery-item {
        -webkit-tap-highlight-color: transparent;
    }

    .image-overlay {
        background: linear-gradient(135deg, 
            rgba(0, 102, 204, 0.5) 0%, 
            rgba(0, 186, 255, 0.5) 100%);
    }

    .overlay-content i {
        font-size: 1.8rem;
    }

    .lightbox-nav-btn {
        padding: 12px;
    }

    .lightbox-close {
        padding: 8px;
    }
}