/* EduPortalGallery Component Styles */

.gallery-container-wrapper {
    font-family: 'Be Vietnam Pro', 'Inter', sans-serif;
    color: #333333;
}

/* Breadcrumb */
.gallery-breadcrumb {
    font-size: 14px;
    color: #6C7A89;
}
.gallery-breadcrumb a {
    color: #123E74;
    text-decoration: none;
    font-weight: 500;
}
.gallery-breadcrumb a:hover {
    text-decoration: underline;
}
.gallery-breadcrumb span.divider {
    margin: 0 8px;
    color: #BDC3C7;
}

/* Card */
.gallery-card-custom {
    background: #FFFFFF;
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(18, 62, 116, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}
.gallery-card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(18, 62, 116, 0.12);
}

/* Filter Pills */
.filter-pills-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
}
.filter-pills-container::-webkit-scrollbar {
    height: 4px;
}
.filter-pills-container::-webkit-scrollbar-thumb {
    background: #BDC3C7;
    border-radius: 2px;
}

.filter-pill {
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    background: #EBF0F6;
    color: #4B5563;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}
.filter-pill:hover {
    background: #DCE4EC;
    color: #123E74;
}
.filter-pill.active {
    background: #123E74 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 10px rgba(18, 62, 116, 0.2);
}

/* Count Summary */
.gallery-count-summary {
    font-size: 14px;
    font-weight: 500;
    color: #4B5563;
    background: #FFFFFF;
    padding: 8px 16px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

/* Album Thumbnail */
.album-thumb-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
    background-color: #EBF0F6;
}
.album-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-card-custom:hover .album-thumb-img {
    transform: scale(1.08);
}

/* Badges */
.badge-count-images {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(18, 62, 116, 0.85);
    color: #FFFFFF;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.badge-category {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.badge-category.cat-su-kien {
    background-color: #FEE2E2;
    color: #EF4444;
}
.badge-category.cat-hoat-dong {
    background-color: #D1FAE5;
    color: #10B981;
}
.badge-category.cat-co-so-vat-chat {
    background-color: #DBEAFE;
    color: #3B82F6;
}
.badge-category.cat-default {
    background-color: #F3F4F6;
    color: #6B7280;
}

/* Title */
.album-title-custom {
    font-size: 16px;
    font-weight: 700;
    color: #123E74;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 15px;
}
.album-title-custom a {
    color: #123E74;
    text-decoration: none;
}
.album-title-custom a:hover {
    color: #1F60B4;
}

/* Footer Card */
.album-footer-info {
    font-size: 13px;
    color: #8A99AD;
    border-top: 1px solid #F0F4F8;
    padding-top: 12px;
}

/* Lightbox */
.gallery-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.gallery-lightbox-container {
    position: relative;
    max-width: 85%;
    max-height: 80%;
}
.gallery-lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 3px solid #fff;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.gallery-lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 35px;
    cursor: pointer;
}
.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 35px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
}
.gallery-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}
.gallery-lightbox-nav.prev {
    left: -70px;
}
.gallery-lightbox-nav.next {
    right: -70px;
}
.gallery-lightbox-info {
    color: #fff;
    margin-top: 15px;
    text-align: center;
    max-width: 80%;
}
.gallery-lightbox-caption {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}
.gallery-lightbox-counter {
    font-size: 13px;
    color: #ccc;
}

/* Layout adjustments for sidebar */
.row:has(> .col-lg-8 > .gallery-container-wrapper) {
    align-items: flex-start !important;
}

.col-lg-8:has(.gallery-container-wrapper) ~ .col-lg-4 {
    margin-top: 45px;
}

@media (max-width: 991px) {
    .col-lg-8:has(.gallery-container-wrapper) ~ .col-lg-4 {
        margin-top: 0;
    }
}

.col-lg-8:has(.gallery-container-wrapper) ~ .col-lg-4 .card-block {
    background: #FFFFFF !important;
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(18, 62, 116, 0.05) !important;
    overflow: hidden !important;
    margin-bottom: 24px !important;
}
.col-lg-8:has(.gallery-container-wrapper) ~ .col-lg-4 .panel-head {
    background-color: transparent !important;
    padding: 24px 24px 10px 24px !important;
    border-bottom: 2px solid #EBF0F6 !important;
}
.col-lg-8:has(.gallery-container-wrapper) ~ .col-lg-4 .panel-head h5 {
    color: #123E74 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    display: flex !important;
    align-items: center !important;
}
.col-lg-8:has(.gallery-container-wrapper) ~ .col-lg-4 .panel-body {
    border: none !important;
    padding: 12px 24px 24px 24px !important;
}
