/* GALLERY PAGE STYLES */
html, body {
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #87CEEB 0%, #4682B4 100%);
    background-image: url('Images/pgg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(135, 206, 235, 0.8) 0%, 
        rgba(70, 130, 180, 0.9) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.2rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
}

/* Gallery Container */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.gallery-header h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.gallery-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Album Sections */
.album-section {
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out both;
}

.album-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(70, 130, 180, 0.1));
    border-radius: 15px;
    border: 1px solid rgba(135, 206, 235, 0.2);
}

.album-header h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.album-header p {
    font-size: 1rem;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.6;
}

.no-albums {
    text-align: center;
    padding: 4rem 2rem;
    color: #7f8c8d;
    font-size: 1.2rem;
}

/* Albums Grid */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0;
}

.album-folder {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border-radius: 15px;
    background: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out both;
}

.album-folder:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.folder-icon {
    position: relative;
    width: 120px;
    height: 90px;
    margin-bottom: 1rem;
}

.folder-back {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 8px 8px 4px 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.folder-back::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    width: 30px;
    height: 8px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 4px 4px 0 0;
}

.folder-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    border-radius: 8px 8px 4px 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-front::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    width: 35px;
    height: 8px;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    border-radius: 4px 4px 0 0;
}

.folder-front img {
    width: 80%;
    height: 70%;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0.9;
}

.album-info {
    text-align: center;
}

.album-info h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.album-info p {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 0;
}

/* Album View */
.album-view {
    animation: fadeInUp 0.8s ease-out both;
}

.album-breadcrumb {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(70, 130, 180, 0.1));
    border-radius: 15px;
    border: 1px solid rgba(135, 206, 235, 0.2);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #4682B4;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.back-btn:hover {
    background: #87CEEB;
    transform: translateX(-5px);
}

.album-breadcrumb h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0.5rem 0;
    font-weight: 600;
}

.album-breadcrumb p {
    font-size: 1rem;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.6;
}

/* Gallery Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    background: #fff;
    animation: fadeInUp 0.6s ease-out both;
}

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.gallery-item:nth-child(odd) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(even) {
    animation-delay: 0.2s;
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(135, 206, 235, 0.9) 0%, 
        rgba(70, 130, 180, 0.9) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.view-icon {
    font-size: 2rem;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 50%;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

.gallery-item:hover .view-icon {
    transform: scale(1.2);
}

/* Modern Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
    padding: 1rem;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    margin: auto;
    animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-content img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
}

.modal-header {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
}

.modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-weight: 300;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.modal-prev {
    left: -70px;
}

.modal-next {
    right: -70px;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.modal-footer {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 1001;
}

.modal-counter {
    color: white;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: #4682B4;
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 45px;
    height: 45px;
}

.page-btn:hover {
    background: #4682B4;
    color: white;
    border-color: #4682B4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(70, 130, 180, 0.3);
}

.page-btn.active {
    background: linear-gradient(135deg, #87CEEB, #4682B4);
    color: white;
    border-color: #4682B4;
    box-shadow: 0 5px 15px rgba(70, 130, 180, 0.3);
}

.next-btn {
    margin-left: 1rem;
    padding: 0.75rem 1.5rem;
}

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

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

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

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 350px;
        background-attachment: scroll;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .gallery-container {
        padding: 2rem 1rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .folder-icon {
        width: 100px;
        height: 75px;
    }
    
    .album-folder {
        padding: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .gallery-header h2 {
        font-size: 2rem;
    }
    
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        max-width: 98vw;
        max-height: 98vh;
    }
    
    .modal-content img {
        max-height: 80vh;
        border-radius: 8px;
    }
    
    .modal-header {
        top: -50px;
    }
    
    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .modal-nav {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .modal-prev {
        left: 15px;
    }
    
    .modal-next {
        right: 15px;
    }
    
    .modal-footer {
        bottom: -50px;
    }
    
    .modal-counter {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {

    .hero-section {
        height: 330px;
        background-attachment: scroll;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .folder-icon {
        width: 80px;
        height: 60px;
    }
    
    .album-info h3 {
        font-size: 1rem;
    }
    
    .album-info p {
        font-size: 0.8rem;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .gallery-header h2 {
        font-size: 1.8rem;
    }
    
    .view-icon {
        font-size: 1.5rem;
        padding: 0.75rem;
    }
    
    .modal {
        position: fixed;
        padding: 0.25rem;
        background-color: rgba(0,0,0,0.8);
    }
    
    .modal-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.6);
        border: none;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        z-index: 1002;
    }
    
    .modal-prev {
        left: 15px;
    }
    
    .modal-next {
        right: 15px;
    }
    
    .modal-header {
        top: -45px;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .modal-footer {
        bottom: -45px;
    }
    
    .modal-counter {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Header active state */
.header2-nav a.active {
    color: #87CEEB;
    font-weight: bold;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation for images */
.gallery-item img {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.gallery-item img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

/* Focus states for accessibility */
.gallery-item:focus,
.page-btn:focus,
.modal-close:focus,
.modal-nav:focus {
    outline: 2px solid #4682B4;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .modal,
    .pagination,
    .hero-section {
        display: none;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}