
/* =========================================================
   CMM UPDATES SECTION
========================================================= */

.cmm-updates-section {
    position: relative;
    padding: 50px 0 60px;
    background: #f8fafc;
    overflow: hidden;
}

.cmm-updates-section .container {
    position: relative;
    z-index: 2;
}


/* =========================================================
   SECTION HEADER
========================================================= */

.cmm-section-header {
    max-width: 760px;
    margin: 0 auto 35px;
    text-align: center;
}

.cmm-section-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;

    color: #0d6efd;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cmm-section-label::before,
.cmm-section-label::after {
    content: "";

    width: 24px;
    height: 2px;

    background: #0d6efd;
    border-radius: 10px;
}

.cmm-section-header h2 {
    margin: 0 0 14px;

    color: #172033;

    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

.cmm-section-header p {
    margin: 0;

    color: #667085;

    font-size: 15px;
    line-height: 1.8;
}


/* =========================================================
   GALLERY TOOLBAR
========================================================= */

.cmm-gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
    padding: 14px 18px;

    background: #ffffff;

    border: 1px solid #e5eaf0;
    border-radius: 12px;

    box-shadow:
        0 4px 15px rgba(15, 23, 42, 0.04);
}


/* =========================================================
   RESULTS INFORMATION
========================================================= */

.cmm-results-info {
    color: #667085;

    font-size: 13px;
    font-weight: 500;
}

.cmm-results-info strong {
    color: #172033;
    font-weight: 700;
}


/* =========================================================
   ITEMS PER PAGE
========================================================= */

.cmm-per-page {
    display: flex;
    align-items: center;
    gap: 7px;

    color: #667085;

    font-size: 13px;
}

.cmm-page-select {
    min-width: 70px;

    padding: 7px 28px 7px 10px;

    border: 1px solid #dfe5ec;
    border-radius: 8px;

    background: #ffffff;
    color: #344054;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.cmm-page-select:hover {
    border-color: #b9c3d0;
}

.cmm-page-select:focus {
    outline: none;

    border-color: #86b7fe;

    box-shadow:
        0 0 0 3px rgba(13, 110, 253, 0.10);
}


/* =========================================================
   GALLERY GRID
   5 CARDS PER ROW
========================================================= */

.cmm-gallery-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 24px;

    width: 100%;
}


/* =========================================================
   GALLERY ITEM
========================================================= */

.cmm-gallery-item {
    min-width: 0;
    width: 100%;
}

.cmm-gallery-link {
    display: block;

    width: 100%;
    height: 100%;

    color: inherit;
    text-decoration: none;
}


/* =========================================================
   CARD
========================================================= */

.cmm-card {
    position: relative;

    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e5eaf0 !important;
    border-radius: 18px !important;

    box-shadow:
        0 8px 25px rgba(15, 23, 42, 0.07) !important;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}


/* =========================================================
   CARD HOVER
========================================================= */

.cmm-card:hover {
    transform: translateY(-7px);

    border-color:
        rgba(13, 110, 253, 0.25) !important;

    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.13),
        0 5px 15px rgba(13, 110, 253, 0.06) !important;
}


/* =========================================================
   IMAGE AREA
========================================================= */

.cmm-card-image {
    position: relative;

    width: 100%;
    height: 210px;
    min-height: 210px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    flex-shrink: 0;

    background: #eef3f8;
}


/* =========================================================
   IMAGE
========================================================= */

.cmm-card-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;
    object-position: center;

    transition:
        transform 0.5s ease;
}


/* =========================================================
   IMAGE HOVER
========================================================= */

.cmm-card:hover .cmm-card-image img {
    transform: scale(1.025);
}


/* =========================================================
   IMAGE OVERLAY
========================================================= */

.cmm-card-image::after {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.00) 55%,
            rgba(0, 0, 0, 0.12) 100%
        );
}


/* =========================================================
   PHOTO COUNT
========================================================= */

.cmm-photo-count {
    position: absolute;

    top: 12px;
    right: 12px;

    z-index: 5;

    display: inline-flex;
    align-items: center;

    gap: 6px;

    padding: 7px 10px;

    border-radius: 8px;

    background:
        rgba(17, 24, 39, 0.85);

    color: #ffffff;

    font-size: 11px;
    font-weight: 600;

    backdrop-filter: blur(8px);

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.cmm-card:hover .cmm-photo-count {
    background: #0d6efd;

    transform: translateY(-2px);
}


/* =========================================================
   DATE BADGE
========================================================= */

.cmm-date-badge {
    position: absolute;

    left: 12px;
    bottom: 12px;

    z-index: 5;

    display: inline-flex;
    align-items: center;

    gap: 6px;

    padding: 8px 11px;

    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.95);

    color: #344054;

    font-size: 10px;
    font-weight: 600;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.10);
}

.cmm-date-badge i {
    color: #0d6efd;
}


/* =========================================================
   CARD BODY
========================================================= */

.cmm-card .card-body {
    height: 180px;
    min-height: 180px;

    padding: 18px;

    display: flex;
    flex-direction: column;

    flex-shrink: 0;
}


/* =========================================================
   CARD TITLE
========================================================= */

.cmm-card-title {
    height: 46px;
    min-height: 46px;

    margin: 0 0 9px;

    overflow: hidden;

    color: #172033;

    font-size: 15px;
    font-weight: 700;

    line-height: 1.45;

    display: -webkit-box;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    transition:
        color 0.3s ease;
}

.cmm-card:hover .cmm-card-title {
    color: #0d6efd;
}


/* =========================================================
   DESCRIPTION
========================================================= */

.cmm-card-description {
    height: 53px;
    min-height: 53px;

    margin: 0 0 12px;

    overflow: hidden;

    color: #667085;

    font-size: 12px;

    line-height: 1.65;

    display: -webkit-box;

    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}


/* =========================================================
   CARD FOOTER
========================================================= */

.cmm-card-footer {
    height: 35px;
    min-height: 35px;

    margin-top: auto;
    padding-top: 10px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-top: 1px solid #eef1f5;
}


/* =========================================================
   VIEW PHOTOS
========================================================= */

.cmm-view-photos {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    color: #0d6efd;

    font-size: 12px;
    font-weight: 700;

    transition:
        gap 0.3s ease;
}

.cmm-view-photos i {
    transition:
        transform 0.3s ease;
}

.cmm-card:hover .cmm-view-photos {
    gap: 10px;
}

.cmm-card:hover .cmm-view-photos i {
    transform: translateX(3px);
}


/* =========================================================
   CAMERA ICON
========================================================= */

.cmm-camera-icon {
    color: #98a2b3;

    font-size: 16px;

    transition:
        color 0.3s ease,
        transform 0.3s ease;
}

.cmm-card:hover .cmm-camera-icon {
    color: #0d6efd;

    transform: scale(1.1);
}


/* =========================================================
   PAGINATION WRAPPER
========================================================= */

.cmm-pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    margin-top: 35px;
}


/* =========================================================
   PAGINATION
========================================================= */

.cmm-pagination {
    display: flex;
    align-items: center;

    gap: 5px;
}


/* =========================================================
   PAGINATION BUTTONS
========================================================= */

.cmm-pagination-btn,
.cmm-page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 38px;
    height: 38px;

    padding: 0 12px;

    border: 1px solid #dfe5ec;
    border-radius: 8px;

    background: #ffffff;

    color: #344054;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* =========================================================
   PREVIOUS / NEXT
========================================================= */

.cmm-pagination-btn {
    gap: 6px;
}

.cmm-pagination-btn:hover:not(:disabled) {
    border-color: #0d6efd;

    background: #ffffff;

    color: #0d6efd;

    transform: translateY(-1px);

    box-shadow:
        0 4px 10px rgba(13, 110, 253, 0.08);
}


/* =========================================================
   PAGE NUMBER HOVER
========================================================= */

.cmm-page-number:hover {
    border-color: #0d6efd;

    color: #0d6efd;

    transform: translateY(-1px);
}


/* =========================================================
   ACTIVE PAGE
========================================================= */

.cmm-page-number.active {
    border-color: #0d6efd;

    background: #0d6efd;

    color: #ffffff;

    box-shadow:
        0 5px 12px rgba(13, 110, 253, 0.18);
}

.cmm-page-number.active:hover {
    background: #0d6efd;

    color: #ffffff;

    transform: translateY(-1px);
}


/* =========================================================
   DISABLED BUTTON
========================================================= */

.cmm-pagination-btn:disabled {
    opacity: 0.45;

    cursor: not-allowed;

    transform: none;

    box-shadow: none;
}


/* =========================================================
   PAGINATION ELLIPSIS
========================================================= */

.cmm-page-ellipsis {
    width: 30px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #667085;

    font-size: 14px;
}


/* =========================================================
   NO RESULTS
========================================================= */

.cmm-no-results {
    padding: 60px 20px;

    text-align: center;

    color: #667085;
}

.cmm-no-results i {
    display: block;

    margin-bottom: 12px;

    color: #98a2b3;

    font-size: 45px;
}

.cmm-no-results h5 {
    margin: 0 0 5px;

    color: #343a40;

    font-size: 18px;
    font-weight: 700;
}

.cmm-no-results p {
    margin: 0;

    font-size: 14px;
}


/* =========================================================
   LARGE DESKTOP
   5 COLUMNS
========================================================= */

@media (min-width: 1400px) {

    .cmm-gallery-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));

        gap: 26px;
    }

    .cmm-card-image {
        height: 220px;
        min-height: 220px;
    }

}


/* =========================================================
   DESKTOP / LAPTOP
   4 COLUMNS
========================================================= */

@media (max-width: 1399px) {

    .cmm-gallery-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));

        gap: 22px;
    }

}


/* =========================================================
   TABLET
   3 COLUMNS
========================================================= */

@media (max-width: 1100px) {

    .cmm-gallery-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 20px;
    }

}


/* =========================================================
   SMALL TABLET
   2 COLUMNS
========================================================= */

@media (max-width: 800px) {

    .cmm-updates-section {
        padding: 60px 0;
    }

    .cmm-section-header h2 {
        font-size: 30px;
    }

    .cmm-gallery-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 18px;
    }

    .cmm-gallery-toolbar {
        flex-direction: column;
        align-items: stretch;

        gap: 12px;
    }

    .cmm-results-info {
        text-align: center;
    }

    .cmm-per-page {
        justify-content: center;
    }

}


/* =========================================================
   MOBILE
   1 COLUMN
========================================================= */

@media (max-width: 576px) {

    .cmm-updates-section {
        padding: 50px 0;
    }

    .cmm-section-header {
        margin-bottom: 28px;
    }

    .cmm-section-header h2 {
        font-size: 27px;
    }

    .cmm-section-header p {
        font-size: 14px;
        line-height: 1.7;
    }

    .cmm-gallery-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .cmm-card-image {
        height: 230px;
        min-height: 230px;
    }

    .cmm-card .card-body {
        height: 180px;
        min-height: 180px;
    }

    .cmm-pagination-wrapper {
        gap: 5px;
        flex-wrap: wrap;
    }

    .cmm-pagination-btn span {
        display: none;
    }

    .cmm-pagination-btn {
        width: 38px;
        min-width: 38px;

        padding: 0;
    }

    .cmm-page-number {
        min-width: 34px;
        height: 36px;

        padding: 0 8px;
    }

    .cmm-page-ellipsis {
        width: 24px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 400px) {

    .cmm-section-header h2 {
        font-size: 24px;
    }

    .cmm-card-image {
        height: 210px;
        min-height: 210px;
    }

    .cmm-pagination-wrapper {
        margin-top: 25px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .cmm-card,
    .cmm-card-image img,
    .cmm-view-photos,
    .cmm-view-photos i,
    .cmm-camera-icon,
    .cmm-photo-count,
    .cmm-page-number,
    .cmm-pagination-btn {
        transition: none !important;
    }

}
