/**
 * ============================================================================
 * Institutional Photo Gallery Stylesheet
 * G.B. Shah College for Technology and Management
 * Palette: Primary: #1c2f4d, Secondary: #37acb6, Light: #f3f6f8, White: #ffffff, Text: #344054
 * ============================================================================
 */

/* --------------------------------------------------
   1. Homepage Gallery Section & Cards
   -------------------------------------------------- */
.campus-gallery-section {
    background-color: #ffffff;
    padding: 80px 0 90px;
    position: relative;
}

.campus-gallery-header {
    margin-bottom: 40px;
}

.gallery-subtitle-wrap {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin-bottom: 8px;
}

.gallery-main-title {
    text-align: center !important;
    margin-bottom: 0 !important;
    color: #1c2f4d;
    font-weight: 700;
}

.campus-gallery-row {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}

.campus-gallery-col {
    padding-left: 12px;
    padding-right: 12px;
    margin-bottom: 24px;
}

/* Homepage Gallery Card Structure */
.home-gallery-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eaeff4;
    box-shadow: 0 4px 18px rgba(28, 47, 77, 0.06);
    -webkit-transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 100%;
}

.home-gallery-card:hover {
    -webkit-transform: translateY(-5px);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(28, 47, 77, 0.12);
    border-color: rgba(55, 172, 182, 0.4);
}

.home-gallery-img-link {
    display: block;
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 1200x800 aspect ratio */
    overflow: hidden;
    background-color: #f3f6f8;
    text-decoration: none;
}

.home-gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-transition: transform 0.5s ease;
    transition: transform 0.5s ease;
}

.home-gallery-card:hover .home-gallery-img {
    -webkit-transform: scale(1.06);
    transform: scale(1.06);
}

.home-gallery-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(28, 47, 77, 0.05) 0%, rgba(28, 47, 77, 0.55) 100%);
    opacity: 0;
    -webkit-transition: opacity 0.35s ease;
    transition: opacity 0.35s ease;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.home-gallery-card:hover .home-gallery-img-overlay {
    opacity: 1;
}

.home-gallery-overlay-badge {
    color: #ffffff;
    background-color: #37acb6;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    -webkit-transform: translateY(10px);
    transform: translateY(10px);
    -webkit-transition: transform 0.35s ease;
    transition: transform 0.35s ease;
}

.home-gallery-card:hover .home-gallery-overlay-badge {
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

.home-gallery-body {
    padding: 18px 20px 20px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    background-color: #ffffff;
}

.home-gallery-title {
    margin: 0 0 14px;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 600;
    color: #1c2f4d;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 46px;
}

.home-gallery-title a {
    color: #1c2f4d;
    text-decoration: none;
    -webkit-transition: color 0.25s ease;
    transition: color 0.25s ease;
}

.home-gallery-title a:hover {
    color: #37acb6;
}

.home-gallery-footer {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f1f4f7;
}

.home-gallery-meta-count {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.home-gallery-meta-count i {
    color: #37acb6;
    margin-right: 4px;
}

.home-gallery-btn {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1c2f4d;
    background-color: #f3f6f8;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    -webkit-transition: all 0.25s ease;
    transition: all 0.25s ease;
}

.home-gallery-btn i {
    font-size: 11px;
    -webkit-transition: transform 0.25s ease;
    transition: transform 0.25s ease;
}

.home-gallery-btn:hover {
    color: #ffffff;
    background-color: #37acb6;
    border-color: #37acb6;
    text-decoration: none;
}

.home-gallery-btn:hover i {
    -webkit-transform: translateX(3px);
    transform: translateX(3px);
}

.home-gallery-action-wrap {
    margin-top: 40px;
    text-align: center;
}

.home-gallery-all-btn {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background-color: #1c2f4d;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(28, 47, 77, 0.15);
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.home-gallery-all-btn:hover {
    background-color: #37acb6;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(55, 172, 182, 0.3);
    text-decoration: none;
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
}

/* --------------------------------------------------
   2. Empty State Handling
   -------------------------------------------------- */
.gallery-empty-state {
    text-align: center;
    padding: 60px 20px;
    background-color: #f3f6f8;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    margin: 20px 0;
}

.gallery-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #37acb6;
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(28, 47, 77, 0.08);
}

.gallery-empty-heading {
    font-size: 20px;
    font-weight: 600;
    color: #1c2f4d;
    margin: 0 0 8px;
}

.gallery-empty-text {
    font-size: 14px;
    color: #64748b;
    max-width: 480px;
    margin: 0 auto;
}

.gallery-empty-actions {
    margin-top: 20px;
}

/* --------------------------------------------------
   3. Public Photo Gallery Listing Page (`photo-gallery.php`)
   -------------------------------------------------- */
.pg-listing-section {
    background-color: #ffffff;
    padding: 90px 0;
}

.pg-listing-intro {
    margin-bottom: 36px;
    max-width: 800px;
}

.pg-listing-lead {
    font-size: 16px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.pg-listing-grid {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}

.pg-listing-col {
    padding-left: 12px;
    padding-right: 12px;
    margin-bottom: 30px;
}

/* Listing Gallery Card */
.pg-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eaeff4;
    box-shadow: 0 4px 18px rgba(28, 47, 77, 0.06);
    -webkit-transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 100%;
}

.pg-card:hover {
    -webkit-transform: translateY(-6px);
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(28, 47, 77, 0.12);
    border-color: rgba(55, 172, 182, 0.45);
}

.pg-card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 1200x800 aspect ratio */
    overflow: hidden;
    background-color: #f3f6f8;
}

.pg-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-transition: transform 0.5s ease;
    transition: transform 0.5s ease;
}

.pg-card:hover .pg-card-img {
    -webkit-transform: scale(1.06);
    transform: scale(1.06);
}

.pg-card-count-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background-color: rgba(28, 47, 77, 0.85);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.pg-card-count-badge i {
    color: #37acb6;
    margin-right: 4px;
}

.pg-card-body {
    padding: 22px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.pg-card-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #1c2f4d;
}

.pg-card-title a {
    color: #1c2f4d;
    text-decoration: none;
    -webkit-transition: color 0.25s ease;
    transition: color 0.25s ease;
}

.pg-card-title a:hover {
    color: #37acb6;
}

.pg-card-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pg-card-footer {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f1f4f7;
}

.pg-card-btn {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background-color: #1c2f4d;
    border-radius: 6px;
    text-decoration: none;
    -webkit-transition: all 0.25s ease;
    transition: all 0.25s ease;
}

.pg-card-btn:hover {
    background-color: #37acb6;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(55, 172, 182, 0.3);
}

.pg-card-btn i {
    font-size: 11px;
    -webkit-transition: transform 0.25s ease;
    transition: transform 0.25s ease;
}

.pg-card-btn:hover i {
    -webkit-transform: translateX(3px);
    transform: translateX(3px);
}

/* --------------------------------------------------
   4. Gallery Detail Page (`photo-gallery-detail.php`)
   -------------------------------------------------- */
.pg-detail-section {
    background-color: #ffffff;
    padding: 90px 0;
}

.pg-detail-header-card {
    background-color: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 32px 36px;
    margin-bottom: 40px;
    box-shadow: 0 4px 16px rgba(28, 47, 77, 0.04);
}

.pg-detail-top-nav {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    margin-bottom: 18px;
}

.pg-detail-back-link {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1c2f4d;
    text-decoration: none;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}

.pg-detail-back-link:hover {
    color: #37acb6;
    text-decoration: none;
}

.pg-detail-badge {
    background-color: #1c2f4d;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.pg-detail-badge i {
    color: #37acb6;
    margin-right: 4px;
}

.pg-detail-title {
    font-size: 26px;
    font-weight: 700;
    color: #1c2f4d;
    margin: 0 0 16px;
    line-height: 1.35;
}

.pg-detail-description {
    font-size: 15px;
    color: #344054;
    line-height: 1.7;
    margin-top: 12px;
}

.pg-detail-description p:last-child {
    margin-bottom: 0;
}

/* Photo Grid */
.pg-detail-grid {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

.pg-detail-col {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 20px;
}

.pg-detail-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f3f6f8;
    border: 1px solid #eaeff4;
    box-shadow: 0 4px 14px rgba(28, 47, 77, 0.05);
    -webkit-transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    cursor: pointer;
}

.pg-detail-item:hover {
    -webkit-transform: translateY(-4px);
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(28, 47, 77, 0.12);
    border-color: rgba(55, 172, 182, 0.5);
}

.pg-detail-thumb-wrap {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 1200x800 aspect ratio */
    overflow: hidden;
}

.pg-detail-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-transition: transform 0.45s ease;
    transition: transform 0.45s ease;
}

.pg-detail-item:hover .pg-detail-thumb {
    -webkit-transform: scale(1.06);
    transform: scale(1.06);
}

.pg-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(28, 47, 77, 0.4);
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    opacity: 0;
    -webkit-transition: opacity 0.35s ease;
    transition: opacity 0.35s ease;
    z-index: 2;
}

.pg-detail-item:hover .pg-detail-overlay {
    opacity: 1;
}

.pg-detail-zoom-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #37acb6;
    color: #ffffff;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    -webkit-transform: scale(0.85);
    transform: scale(0.85);
    -webkit-transition: transform 0.35s ease;
    transition: transform 0.35s ease;
}

.pg-detail-item:hover .pg-detail-zoom-icon {
    -webkit-transform: scale(1);
    transform: scale(1);
}

/* Fallback placeholder thumbnail */
.pg-fallback-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #94a3b8;
    gap: 8px;
}

.pg-fallback-thumb i {
    font-size: 36px;
}

.pg-fallback-thumb span {
    font-size: 13px;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .campus-gallery-section {
        padding: 60px 0;
    }

    .pg-detail-header-card {
        padding: 24px 24px;
    }

    .pg-detail-title {
        font-size: 22px;
    }
}

@media (max-width: 767px) {
    .campus-gallery-section {
        padding: 50px 0;
    }

    .home-gallery-card {
        margin-bottom: 20px;
    }

    .home-gallery-title {
        min-height: auto;
    }

    .pg-detail-top-nav {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: start;
        -webkit-align-items: flex-start;
        -ms-flex-align: start;
        align-items: flex-start;
        gap: 10px;
    }

    .pg-detail-header-card {
        padding: 20px 16px;
    }

    .pg-detail-title {
        font-size: 20px;
    }
}
