/* ==========================================================================
   Sohni Dharti Gallery & Album Styles
   ========================================================================== */

/* Layout & Containers */
.gallery-page-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 60px 20px 100px;
}

.gallery-section-intro {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-section-intro h2 {
    font-size: 38px;
    font-weight: 700;
    color: #0C1734;
    margin-bottom: 15px;
    font-family: "Poppins", sans-serif;
    letter-spacing: -0.5px;
}

.gallery-divider {
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, #057845, #61CE70);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.gallery-section-intro p {
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.7;
}

/* ==========================================================================
   Albums Grid (gallery.php)
   ========================================================================== */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.album-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
}

.album-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 35px rgba(5, 120, 69, 0.14);
    border-color: rgba(5, 120, 69, 0.15);
}

.album-card-cover-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f0f3f1;
}

.album-card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: block;
}

.album-card:hover .album-card-cover {
    transform: scale(1.06);
}

.album-card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(12, 23, 52, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.album-card-count {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(5, 120, 69, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.album-card-count svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.album-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.album-card-date {
    font-size: 13px;
    color: #057845;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.album-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #0C1734;
    margin: 0 0 10px 0;
    line-height: 1.4;
    transition: color 0.3s ease;
    font-family: "Poppins", sans-serif;
}

.album-card:hover .album-card-title {
    color: #057845;
}

.album-card-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.album-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.album-btn-link {
    color: #057845;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.2s ease, color 0.2s ease;
}

.album-card:hover .album-btn-link {
    gap: 12px;
    color: #045a34;
}

.album-btn-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

/* ==========================================================================
   Detail Gallery Page (gallery-detail.php)
   ========================================================================== */
.album-detail-header {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.album-breadcrumb-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.album-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #777;
}

.album-breadcrumbs a {
    color: #057845;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.album-breadcrumbs a:hover {
    color: #045a34;
    text-decoration: underline;
}

.album-breadcrumbs .separator {
    color: #ccc;
}

.album-breadcrumbs .current {
    color: #333;
    font-weight: 600;
}

.btn-back-albums {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f8f4;
    color: #057845;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
    text-decoration: none;
    border: 1px solid rgba(5, 120, 69, 0.15);
}

.btn-back-albums:hover {
    background: #057845;
    color: #ffffff;
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(5, 120, 69, 0.2);
}

.album-detail-meta-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.album-detail-title {
    font-size: 32px;
    font-weight: 700;
    color: #0C1734;
    margin: 0;
    font-family: "Poppins", sans-serif;
}

.album-detail-badges {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-tag {
    background: #eef7f2;
    color: #057845;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
}

.badge-count {
    background: #0C1734;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
}

.album-detail-description {
    margin-top: 12px;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    max-width: 850px;
}

/* Photo Grid */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.photo-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    aspect-ratio: 4 / 3;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(5, 120, 69, 0.18);
}

.photo-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.photo-item:hover .photo-img {
    transform: scale(1.08);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 120, 69, 0.72);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #ffffff;
}

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

.photo-zoom-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.7);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.photo-zoom-icon svg {
    width: 22px;
    height: 22px;
    fill: #ffffff;
}

.photo-item:hover .photo-zoom-icon {
    transform: scale(1);
}

.photo-index-label {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Lightbox z-index fix */
.sl-wrapper {
    z-index: 9999999 !important;
}

.sl-overlay {
    z-index: 9999998 !important;
    background: rgba(10, 20, 15, 0.94) !important;
}

/* Other Albums Navigation Bar */
.other-albums-section {
    margin-top: 80px;
    padding-top: 50px;
    border-top: 1px solid #e9ecef;
}

.other-albums-title {
    font-size: 24px;
    font-weight: 700;
    color: #0C1734;
    margin-bottom: 25px;
    font-family: "Poppins", sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.other-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    .gallery-section-intro h2 {
        font-size: 32px;
    }
    .album-detail-title {
        font-size: 26px;
    }
}

@media (max-width: 767px) {
    .gallery-page-container {
        padding: 40px 15px 70px;
    }
    .albums-grid {
        grid-template-columns: 1fr;
    }
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    .album-detail-header {
        padding: 20px;
    }
    .album-detail-title {
        font-size: 22px;
    }
}
