/* ========================================
   GALLERY PAGE STYLES
   Simple, Formal & Modern Design
   ======================================== */

.gallery-section {
    padding: 4rem 0;
    background: #f8fafc;
    min-height: 60vh;
}

/* Search Bar */
.gallery-search-wrapper {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.gallery-search-container {
    position: relative;
    max-width: 600px;
    width: 100%;
    display: flex;
    align-items: center;
}

.gallery-search-icon {
    position: absolute;
    left: 1.25rem;
    color: #9ca3af;
    font-size: 1.1rem;
    z-index: 2;
    pointer-events: none;
}

.gallery-search-input {
    width: 100%;
    padding: 0.875rem 3.5rem 0.875rem 3.5rem;
    font-size: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #1f2937;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.gallery-search-input:focus {
    outline: none;
    border-color: #2d5a9c;
    box-shadow: 0 4px 12px rgba(45, 90, 156, 0.15);
}

.gallery-search-input::placeholder {
    color: #9ca3af;
}

.gallery-search-clear {
    position: absolute;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.gallery-search-clear:hover {
    background: #e5e7eb;
    color: #374151;
}

.gallery-search-clear i {
    font-size: 0.875rem;
}

/* Results Count */
.gallery-results-count {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.gallery-results-count span {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 500;
}

/* Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-btn {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #666666;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: inline-block;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: #2d5a9c;
    color: #2d5a9c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.filter-btn:focus {
    outline: none;
    border-color: #2d5a9c;
    box-shadow: 0 4px 12px rgba(45, 90, 156, 0.15);
}

.filter-btn.active {
    background: #2d5a9c;
    color: #ffffff;
    border-color: #2d5a9c;
    box-shadow: 0 4px 12px rgba(45, 90, 156, 0.2);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    background: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.gallery-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 90, 156, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    text-align: center;
    color: #ffffff;
}

.gallery-overlay-content i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.gallery-view-text {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gallery-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-description {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-date {
    font-size: 0.85rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.gallery-date i {
    font-size: 0.8rem;
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 0.75rem;
    border: 2px dashed #e5e7eb;
}

.gallery-empty i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.gallery-empty p {
    font-size: 1.1rem;
    color: #9ca3af;
    margin: 0;
}

.gallery-empty-hint {
    font-size: 0.9rem !important;
    color: #9ca3af !important;
    margin-top: 0.5rem !important;
    opacity: 0.8;
}

/* Responsive Design - Tablet */
@media (max-width: 991.98px) {
    .gallery-section {
        padding: 3rem 0;
    }

    .gallery-search-wrapper {
        margin-bottom: 1.5rem;
    }

    .gallery-search-container {
        max-width: 100%;
    }

    .gallery-search-input {
        padding: 0.75rem 3rem 0.75rem 3rem;
        font-size: 0.95rem;
    }

    .gallery-filters {
        margin-bottom: 1.75rem;
        gap: 0.75rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .gallery-info {
        padding: 1.25rem;
    }

    .gallery-title {
        font-size: 1.05rem;
    }

    .gallery-description {
        font-size: 0.85rem;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 767.98px) {
    .gallery-section {
        padding: 2.5rem 0;
    }

    .gallery-search-wrapper {
        margin-bottom: 1.25rem;
    }

    .gallery-search-input {
        padding: 0.7rem 2.75rem 0.7rem 2.75rem;
        font-size: 0.9rem;
    }

    .gallery-search-icon {
        left: 1rem;
        font-size: 1rem;
    }

    .gallery-search-clear {
        right: 0.5rem;
        width: 28px;
        height: 28px;
    }

    .gallery-results-count {
        margin-bottom: 1.25rem;
        padding: 0.625rem 0.875rem;
    }

    .gallery-results-count span {
        font-size: 0.875rem;
    }

    .gallery-filters {
        margin-bottom: 1.5rem;
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .gallery-image-wrapper {
        padding-top: 70%; /* Slightly taller on mobile */
    }

    .gallery-info {
        padding: 1rem;
    }

    .gallery-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .gallery-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .gallery-date {
        font-size: 0.8rem;
    }
}

