/* ============================================
   GALLERY PAGE - COMPLETE REDESIGN
   Beautiful, Modern UI Interface
   ============================================ */

/* ============================================
   GALLERY HERO SECTION
   ============================================ */

.gallery-page-header {
    background: linear-gradient(135deg, #2d9374 0%, #88493d 100%);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.3;
}

.gallery-hero {
    position: relative;
    z-index: 1;
}

.hero-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.gallery-hero h1 {
    font-size: 3.5em;
    color: white;
    margin-bottom: 15px;
    font-family: 'Georgia', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.gallery-subtitle {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
}

/* ============================================
   GALLERY SECTION
   ============================================ */

.gallery-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 60vh;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* ============================================
   GALLERY ITEMS - MODERN CARDS
   ============================================ */

.gallery-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease-out;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2d9374, #88493d);
    z-index: 1;
}

.gallery-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 280px;
    background: #f0f0f0;
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
    position: relative;
    z-index: 1;
}

.gallery-item:hover .gallery-image-wrapper img {
    transform: scale(1.1);
}

/* Overlay Effect */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(45, 147, 116, 0.35), rgba(136, 73, 61, 0.35));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
    pointer-events: none;
    z-index: 2;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    pointer-events: auto;
}

.gallery-overlay-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.gallery-item:hover .gallery-overlay-content {
    transform: translateY(0);
}

.gallery-overlay-content h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-family: 'Georgia', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-overlay-content p {
    font-size: 1em;
    margin-bottom: 20px;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.view-image-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: white;
    color: #2d9374;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.view-image-btn:hover {
    background: #2d9374;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.view-image-btn svg {
    transition: transform 0.3s ease;
}

.view-image-btn:hover svg {
    transform: scale(1.1);
}

/* Gallery Content */
.gallery-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gallery-content h2 {
    font-size: 1.4em;
    color: #88493d;
    margin-bottom: 12px;
    font-family: 'Georgia', serif;
    font-weight: 600;
}

.gallery-content p {
    font-size: 1em;
    color: #666;
    line-height: 1.7;
    flex-grow: 1;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-gallery-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.empty-gallery-state svg {
    color: #ddd;
    margin-bottom: 30px;
}

.empty-gallery-state h3 {
    font-size: 2.5em;
    color: #88493d;
    margin-bottom: 15px;
    font-family: 'Georgia', serif;
}

.empty-gallery-state p {
    font-size: 1.2em;
    color: #666;
    line-height: 1.6;
}

/* ============================================
   LIGHTBOX MODAL
   ============================================ */

.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-info {
    margin-top: 25px;
    text-align: center;
    color: white;
    max-width: 800px;
}

.lightbox-info h3 {
    font-size: 2em;
    margin-bottom: 15px;
    font-family: 'Georgia', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.lightbox-info p {
    font-size: 1.2em;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

/* Navigation Buttons */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .gallery-page-header {
        padding: 60px 20px;
    }
    
    .gallery-hero h1 {
        font-size: 2.2em;
    }
    
    .gallery-subtitle {
        font-size: 1em;
    }
    
    .hero-icon {
        font-size: 3em;
    }
    
    .gallery-section {
        padding: 40px 15px;
    }
    
    .gallery-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-image-wrapper {
        height: 250px;
    }
    
    .gallery-content {
        padding: 20px;
    }
    
    .gallery-content h2 {
        font-size: 1.2em;
    }
    
    .gallery-content p {
        font-size: 0.95em;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-info h3 {
        font-size: 1.5em;
    }
    
    .lightbox-info p {
        font-size: 1em;
    }
    
    .empty-gallery-state {
        padding: 60px 20px;
    }
    
    .empty-gallery-state h3 {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .gallery-page-header {
        padding: 40px 15px;
    }
    
    .gallery-hero h1 {
        font-size: 1.8em;
    }
    
    .gallery-section {
        padding: 30px 10px;
    }
    
    .gallery-image-wrapper {
        height: 200px;
    }
    
    .gallery-overlay-content h3 {
        font-size: 1.2em;
    }
    
    .gallery-overlay-content p {
        font-size: 0.9em;
    }
    
    .view-image-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

/* ============================================
   LOADING STATE
   ============================================ */

.gallery-image-wrapper img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image-wrapper img.loaded {
    opacity: 1;
}

/* Lazy loading placeholder */
.gallery-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: 0;
}

.gallery-image-wrapper img.loaded ~ ::before {
    display: none;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

