/* Modern Gallery Styles */

/* Gallery Filter Section */
.gallery-filters-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.gallery-filters-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="50" r="1.5" fill="rgba(255,255,255,0.15)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.filter-content {
    position: relative;
    z-index: 2;
}

.section-header {
    margin-bottom: 40px;
}

.section-title {
    color: #ffffff;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.section-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 0;
}

/* Filter Controls - Standalone Modern Design */
.filter-controls {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    max-width: 600px;
}

.filter-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 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%);
    pointer-events: none;
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px;
}

.filter-label {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
}

.filter-label i {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 320px;
}

.form-select {
    background: rgba(255,255,255,0.95);
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    padding: 16px 50px 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    width: 100%;
    appearance: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    text-align: center;
}

.form-select:hover {
    background: rgba(255,255,255,0.98);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.form-select:focus {
    outline: none;
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    transform: translateY(-3px);
}

.select-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.2rem;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.select-wrapper:hover .select-icon {
    color: #5a67d8;
    transform: translateY(-50%) scale(1.1);
}

.form-select:focus + .select-icon {
    transform: translateY(-50%) rotate(180deg) scale(1.1);
    color: #4c51bf;
}

.debug-info {
    background: rgba(0,0,0,0.2);
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 15px;
    padding: 8px 16px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design for Filter Controls */
@media (max-width: 768px) {
    .filter-controls {
        margin: 20px;
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .filter-label {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .form-select {
        font-size: 1rem;
        padding: 14px 45px 14px 20px;
    }
    
    .select-wrapper {
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .filter-controls {
        margin: 15px;
        padding: 25px 15px;
    }
    
    .filter-label {
        font-size: 1rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .form-select {
        font-size: 0.95rem;
        padding: 12px 40px 12px 18px;
    }
    
    .select-wrapper {
        max-width: 260px;
    }
}

/* Modern Gallery Section */
.modern-gallery {
    background: #f8f9fa;
    padding: 80px 0;
    position: relative;
}

.gallery-container {
    position: relative;
}

.gallery-grid {
    margin: -15px;
}

.gallery-item {
    padding: 15px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item.filtered-in {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item.filtered-out {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
    pointer-events: none;
}

.gallery-item.filtering {
    transition-duration: 0.3s;
}

.gallery-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.image-wrapper {
    position: relative;
    overflow: hidden;
    height: 280px;
    background: linear-gradient(45deg, #f0f0f0, #e8e8e8);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.gallery-card:hover .image-wrapper img {
    transform: scale(1.1);
}

.btn-view {
    cursor: pointer;
}

.gallery-image {
    cursor: pointer !important;
}

.overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102,126,234,0.9) 0%, rgba(118,75,162,0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(20px);
}

.gallery-card:hover .overlay-content,
.overlay-content.show {
    opacity: 1;
    transform: translateY(0);
}

.gallery-info {
    text-align: center;
    padding: 20px;
    color: #ffffff;
}

.gallery-info h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.gallery-type {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 10px;
    backdrop-filter: blur(10px);
}

.gallery-desc {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.4;
    margin-bottom: 0;
}

.gallery-actions {
    margin-top: 20px;
}

.btn-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-view:hover {
    background: #ffffff;
    color: #667eea;
    border-color: #ffffff;
    transform: scale(1.1);
    text-decoration: none;
}

.card-footer {
    padding: 20px 25px;
    background: #ffffff;
    margin-top: auto;
}

.image-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.image-title {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-category {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

/* No Results States */
.no-results {
    text-align: center;
    padding: 80px 20px;
    display: none;
}

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #6c757d;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.no-results p {
    color: #adb5bd;
    font-size: 1rem;
    line-height: 1.6;
}

.no-images-message {
    text-align: center;
    padding: 100px 20px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.no-images-message i {
    font-size: 5rem;
    color: #dee2e6;
    margin-bottom: 30px;
}

.no-images-message h3 {
    color: #495057;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.no-images-message p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.4rem;
    }
    
    .gallery-item {
        margin-bottom: 30px;
    }
    
    .image-wrapper {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .form-select {
        min-width: 200px;
        padding: 10px 35px 10px 15px;
        font-size: 0.9rem;
    }
    
    .gallery-filters-section {
        padding: 40px 0;
    }
    
    .modern-gallery {
        padding: 60px 0;
    }
    
    .image-wrapper {
        height: 220px;
    }
    
    .gallery-info h4 {
        font-size: 1.2rem;
    }
    
    .image-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .form-select {
        width: 100%;
        min-width: auto;
    }
    
    .gallery-grid {
        margin: -10px;
    }
    
    .gallery-item {
        padding: 10px;
    }
    
    .image-wrapper {
        height: 200px;
    }
    
    .card-footer {
        padding: 15px 20px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.gallery-loading {
    animation: pulse 2s infinite;
}

/* Magnific Popup Enhancements */
.mfp-with-anim {
    opacity: 0;
    transition: all 0.3s ease-in-out;
    transform: scale(0.8);
}

.mfp-with-anim.mfp-ready {
    opacity: 1;
    transform: scale(1);
}

.mfp-with-anim.mfp-removing {
    opacity: 0;
    transform: scale(0.8);
}

.mfp-bg {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.mfp-counter {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 500;
}

.type-filter-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.type-filter-container label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0;
}

/* Gallery Grid Styles */
.gallery-container {
    position: relative;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.gallery-item {
    width: 300px;
    height: 250px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.gallery-item figure {
    margin: 0;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.7));
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item .overlay h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.gallery-item .overlay p {
    font-size: 14px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.9);
}

.gallery-item .overlay a {
    display: inline-block;
    margin-right: 10px;
    color: white;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.gallery-item .overlay a:hover {
    color: #007bff;
}

/* Filter Animation */
.gallery-item.filtering {
    opacity: 0.5;
    transform: scale(0.8);
}

.gallery-item.filtered-out {
    display: none !important;
}

.gallery-item.filtered-in {
    display: block;
    animation: fadeInUp 0.5s ease-in-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No Results Message */
.no-results {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
}

.no-results h3 {
    color: #495057;
    font-size: 22px;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-buttons {
        text-align: center;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 12px;
        margin: 3px;
    }
    
    .type-filter-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .gallery-item {
        width: 280px;
        height: 220px;
    }
    
    .gallery {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        width: 100%;
        max-width: 350px;
        height: 250px;
    }
    
    .filter-buttons-container h3 {
        font-size: 20px;
    }
}

/* Loading State */
.gallery-loading {
    text-align: center;
    padding: 50px;
    color: #6c757d;
}

.gallery-loading:after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Filtering Animation Styles */
.gallery-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item.filtering {
    opacity: 0.5;
}

.gallery-item.filtered-out {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.gallery-item.filtered-in {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* No results message styling */
.no-results {
    text-align: center;
    padding: 50px;
    color: #6c757d;
}

.no-results h3 {
    color: #495057;
    margin-bottom: 10px;
}

.no-results p {
    color: #6c757d;
    margin-bottom: 0;
}