/* Gallery Page Styles */

.hero-gallery {
    background: linear-gradient(rgba(30, 64, 175, 0.8), rgba(30, 58, 138, 0.8)), 
                url('https://images.unsplash.com/photo-1511632765486-a01980e01a18?ixlib=rb-4.0.3') center/cover;
    min-height: 60vh;
    display: flex;
    align-items: center;
    margin-top: 58px;
    position: relative;
    overflow: hidden;
}

.hero-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

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

.hero-gallery .row {
    align-items: center;
}

.hero-gallery h1 {
    animation: slideInLeft 0.8s ease-out;
}

.hero-gallery .lead {
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.hero-gallery .d-flex {
    animation: slideInLeft 0.8s ease-out 0.4s both;
}

.hero-gallery .gallery-preview {
    animation: slideInRight 0.8s ease-out 0.3s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Gallery Preview Animation */
.gallery-preview {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.preview-main {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
    max-width: 500px;
}

.preview-small {
    position: absolute;
    width: 120px;
    height: 90px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: 3px solid white;
    object-fit: cover;
}

.preview-1 {
    top: 20px;
    right: -30px;
    transform: rotate(15deg);
}

.preview-2 {
    bottom: 30px;
    right: -20px;
    transform: rotate(-10deg);
}

.gallery-preview:hover .preview-main {
    transform: scale(1.05);
}

.gallery-preview:hover .preview-1 {
    transform: rotate(20deg) translateY(-10px);
}

.gallery-preview:hover .preview-2 {
    transform: rotate(-15deg) translateY(-10px);
}

/* Featured Album */
.featured-album {
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-album:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15) !important;
}

.featured-album-images {
    position: relative;
    height: 100%;
}

.main-featured {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.mini-previews {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
}

.mini-previews img {
    width: 60px;
    height: 45px;
    border-radius: 8px;
    border: 2px solid white;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.mini-previews img:hover {
    opacity: 1;
}

.more-photos {
    width: 60px;
    height: 45px;
    background: rgba(0,0,0,0.7);
    color: white;
    border-radius: 8px;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Album Cards */
.album-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.album-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.album-cover {
    position: relative;
    overflow: hidden;
}

.album-main-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.album-card:hover .album-main-image {
    transform: scale(1.1);
}

.album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.album-card:hover .album-overlay {
    opacity: 1;
}

.photo-count {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.photo-count i {
    font-size: 1.5rem;
}

/* Album Info */
.album-info {
    background: white;
}

.album-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-blue);
}

.album-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.album-meta {
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

/* Album Stats */
.album-stats {
    background: rgba(30, 64, 175, 0.05);
    border-radius: 10px;
    padding: 20px;
}

.album-stats strong {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Filter Buttons */
.btn-custom.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Section Title */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Modal Styles */
.modal-xl {
    max-width: 1200px;
}

#albumPhotosGrid .col-md-4 {
    margin-bottom: 20px;
}

.photo-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photo-thumbnail:hover {
    transform: scale(1.05);
}

/* Photo Lightbox */
.photo-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.photo-nav-btn {
    pointer-events: all;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.photo-nav-btn:hover {
    transform: scale(1.1);
}

.photo-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
}

/* Load More Button */
#loadMoreBtn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#loadMoreBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.3);
}

/* Search Input */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

/* Animation Classes */
.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-gallery {
        min-height: 55vh;
        padding: 40px 0;
    }
    
    .hero-gallery .row {
        flex-direction: column-reverse;
    }
    
    .hero-gallery .col-lg-6:first-child {
        text-align: center;
        margin-top: 2rem;
    }
    
    .gallery-preview {
        margin: 0 auto;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .hero-gallery {
        min-height: auto;
        padding: 60px 0 40px;
        text-align: center;
    }
    
    .hero-gallery .container {
        padding: 0 20px;
    }
    
    .hero-gallery .row {
        gap: 2rem;
    }
    
    .hero-gallery h1 {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .hero-gallery .lead {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        padding: 0 10px;
    }
    
    .hero-gallery .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-bottom: 3rem;
    }
    
    .hero-gallery .btn {
        width: 200px;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .gallery-preview {
        max-width: 350px;
    }
    
    .preview-main {
        border-radius: 15px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    }
    
    .preview-small {
        width: 100px;
        height: 75px;
        border-radius: 8px;
        border: 2px solid white;
    }
    
    .preview-1 {
        top: 15px;
        right: -25px;
        transform: rotate(12deg);
    }
    
    .preview-2 {
        bottom: 25px;
        right: -15px;
        transform: rotate(-8deg);
    }
    
    .gallery-preview:hover .preview-1 {
        transform: rotate(15deg) translateY(-8px);
    }
    
    .gallery-preview:hover .preview-2 {
        transform: rotate(-12deg) translateY(-8px);
    }
    
    .featured-album .card-body {
        padding: 2rem !important;
    }
    
    .album-card {
        margin-bottom: 1.5rem;
    }
    
    .main-featured {
        height: 300px;
    }
    
    .mini-previews img,
    .more-photos {
        width: 50px;
        height: 38px;
    }
}

@media (max-width: 576px) {
    .hero-gallery {
        margin-top: 70px;
        padding: 40px 0 30px;
    }
    
    .hero-gallery .container {
        padding: 0 15px;
    }
    
    .hero-gallery h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-gallery .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 5px;
    }
    
    .hero-gallery .d-flex {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }
    
    .hero-gallery .btn {
        width: 180px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .gallery-preview {
        max-width: 300px;
    }
    
    .preview-main {
        border-radius: 12px;
    }
    
    .preview-small {
        width: 80px;
        height: 60px;
        border-radius: 6px;
    }
    
    .preview-1 {
        top: 10px;
        right: -20px;
        transform: rotate(10deg);
    }
    
    .preview-2 {
        bottom: 20px;
        right: -10px;
        transform: rotate(-6deg);
    }
    
    .featured-album .card-body {
        padding: 1.5rem !important;
    }
    
    .album-main-image {
        height: 200px;
    }
    
    .btn-custom, .btn-outline-primary {
        margin-bottom: 0.5rem;
    }
    
    .photo-navigation {
        padding: 0 10px;
    }
    
    .photo-nav-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hero-gallery h1 {
        font-size: 1.75rem;
    }
    
    .hero-gallery .lead {
        font-size: 0.95rem;
    }
    
    .hero-gallery .btn {
        width: 160px;
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .gallery-preview {
        max-width: 280px;
    }
    
    .preview-small {
        width: 70px;
        height: 53px;
    }
    
    .preview-1 {
        right: -15px;
    }
    
    .preview-2 {
        right: -8px;
    }
}

@media (max-width: 375px) {
    .hero-gallery {
        padding: 30px 0 25px;
    }
    
    .hero-gallery .container {
        padding: 0 10px;
    }
    
    .hero-gallery h1 {
        font-size: 1.6rem;
    }
    
    .gallery-preview {
        max-width: 260px;
    }
    
    .preview-small {
        width: 60px;
        height: 45px;
    }
    
    .preview-1 {
        top: 8px;
        right: -12px;
    }
    
    .preview-2 {
        bottom: 15px;
        right: -6px;
    }
}

/* Upload Section */
.bg-primary-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-blue) 100%);
}

/* Object Cover Utility */
.object-cover {
    object-fit: cover;
}