
/* =========================================
   HEC PROJECTS GALLERY
========================================= */

.hec-projects-section {
    --hec-navy: #17324b;
    --hec-gold: #d6a943;
    max-width: 1240px;
    margin: 58px auto;
    padding: 0 22px;
    color: #1e2933;
    font-family: inherit;
    box-sizing: border-box;
}

.hec-projects-section * {
    box-sizing: border-box;
}

.hec-projects-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    margin-bottom: 25px;
}

.hec-eyebrow {
    display: block;
    color: var(--hec-gold, #d6a943);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.2px;
    margin-bottom: 8px;
}

.hec-projects-heading h2 {
    font-size: clamp(27px, 3vw, 38px);
    line-height: 1.15;
    margin: 0;
    color: #17324b;
    font-weight: 750;
}

.hec-projects-heading p {
    margin: 9px 0 0;
    color: #687887;
    font-size: 15px;
}

.hec-projects-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
    flex: 0 0 auto;
}

.hec-project-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    padding: 0 !important;
    border: 1px solid #d7dee5;
    border-radius: 50%;
    background: #fff;
    color: #17324b;
    font-size: 22px;
    line-height: 1 !important;
    text-align: center;
    cursor: pointer;
    transition: .2s;
    box-sizing: border-box;
}

.hec-project-arrow:hover {
    background: #17324b;
    border-color: #17324b;
    color: #fff;
}

.hec-projects-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 40px) / 3);
    gap: 20px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 3px 2px 16px;
    scrollbar-width: thin;
    scrollbar-color: #c8d0d8 transparent;
}

.hec-projects-track::-webkit-scrollbar {
    height: 6px;
}

.hec-projects-track::-webkit-scrollbar-thumb {
    background: #c8d0d8;
    border-radius: 10px;
}

.hec-project-card {
    min-width: 0;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #e5e9ed;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(20,42,60,.07);
    transition: transform .25s, box-shadow .25s;
}

.hec-project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(20,42,60,.13);
}

.hec-project-card-link {
    display: block;
    color: inherit;
    text-decoration: none !important;
}

.hec-project-card-image {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: #edf1f4;
}

.hec-project-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .45s ease;
}

.hec-project-card:hover .hec-project-card-image img {
    transform: scale(1.045);
}

.hec-project-image-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #e8edf1, #cbd5df);
    color: #718096;
    font-weight: 800;
    font-size: 25px;
    letter-spacing: 4px;
}

.hec-project-card-cta {
    position: absolute;
    z-index: 3;
    right: 14px;
    bottom: 13px;
    background: #fff;
    color: #17324b;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(5px);
    transition: .2s;
    pointer-events: none;
}

.hec-project-card:hover .hec-project-card-cta {
    opacity: 1;
    transform: translateY(0);
}

.hec-project-card-body {
    padding: 20px 21px 22px;
}

.hec-project-date {
    display: block;
    color: #9a762e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .4px;
    margin-bottom: 8px;
}

.hec-project-card-body h3 {
    font-size: 18px;
    line-height: 1.38;
    color: #17324b;
    margin: 0 0 9px;
    font-weight: 750;
}

.hec-project-card-body h3 a {
    color: inherit;
    text-decoration: none !important;
}

.hec-project-card-body h3 a:hover {
    color: #b58b35;
}

.hec-project-card-body p {
    font-size: 14px;
    line-height: 1.65;
    color: #687887;
    margin: 0;
}

.hec-projects-empty {
    padding: 20px;
    background: #f7f8fa;
    border-left: 3px solid #d6a943;
}


/* =========================================
   PROJECT CARD IMAGE ROTATION
========================================= */

.hec-project-card-image .hec-card-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .35s ease, transform .45s ease;
}

.hec-project-card-image .hec-card-slide.is-active {
    opacity: 1;
}

.hec-project-card:hover .hec-project-card-image .hec-card-slide.is-active {
    transform: scale(1.025);
}

.hec-card-image-prev,
.hec-card-image-next {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0 !important;
    border: 0;
    border-radius: 50%;
    background: rgba(15,35,52,.82);
    color: #fff;
    font-size: 24px;
    line-height: 1 !important;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s;
}

.hec-card-image-prev {
    left: 10px;
}

.hec-card-image-next {
    right: 10px;
}

.hec-project-card-image:hover .hec-card-image-prev,
.hec-project-card-image:hover .hec-card-image-next {
    opacity: 1;
}

.hec-card-image-count {
    position: absolute;
    z-index: 4;
    left: 12px;
    bottom: 11px;
    padding: 4px 8px;
    border-radius: 20px;
    background: rgba(15,35,52,.78);
    color: #fff;
    font-size: 11px;
}

.hec-project-card-image-link {
    position: absolute;
    z-index: 2;
    inset: 0;
}


/* =========================================
   INDIVIDUAL PROJECT PAGE
========================================= */

.hec-project-single {
    max-width: 1160px;
    margin: 45px auto 70px;
    padding: 0 22px;
    color: #263746;
}

.hec-project-single-header {
    max-width: 850px;
    margin: 0 auto 28px;
    text-align: center;
}

.hec-project-single-header .hec-eyebrow {
    margin-bottom: 10px;
}

.hec-project-single-header h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
    color: #17324b;
    margin: 0 0 12px;
}

.hec-project-single-date {
    color: #9a762e;
    font-weight: 700;
    font-size: 13px;
}

.hec-project-description {
    max-width: 900px;
    margin: 35px auto 0;
    color: #586b7a;
    font-size: 16px;
    line-height: 1.85;
}


/* =========================================
   MAIN PROJECT PHOTO CAROUSEL
========================================= */

.hec-project-photo-carousel {
    position: relative;
    max-width: 1050px;
    margin: 0 auto 34px;
    background: transparent;
    overflow: visible;
}

.hec-project-photo-stage {
    height: min(62vw, 570px);
    min-height: 280px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #101b25;
    border-radius: 10px;
    overflow: hidden;
}

.hec-project-photo-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity .35s ease;
}

.hec-project-photo-slide.is-active {
    opacity: 1;
}


/* Main carousel arrows */
.hec-photo-prev,
.hec-photo-next {
    position: absolute;
    z-index: 7;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0 !important;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    background: rgba(8,22,34,.75);
    color: #fff;
    font-size: 30px;
    line-height: 1 !important;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
}

.hec-photo-prev {
    left: 16px;
}

.hec-photo-next {
    right: 16px;
}


/* Carousel bottom counter and dots */
.hec-photo-carousel-footer {
    position: absolute;
    z-index: 6;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(transparent, rgba(0,0,0,.58));
    color: #fff;
}

.hec-photo-count {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .7px;
}

.hec-photo-dots {
    display: flex;
    gap: 7px;
    align-items: center;
}

.hec-photo-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.6);
    cursor: pointer;
}

.hec-photo-dot.is-active {
    width: 22px;
    border-radius: 8px;
    background: #fff;
}


/* =========================================
   THUMBNAIL SELECTOR
   Separate from the main image
========================================= */

.hec-project-thumbnails {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 14px;
    padding: 4px 2px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #c8d0d8 transparent;
}

.hec-project-thumbnails::-webkit-scrollbar {
    height: 5px;
}

.hec-project-thumbnails::-webkit-scrollbar-thumb {
    background: #c8d0d8;
    border-radius: 10px;
}

.hec-photo-thumb {
    position: relative;
    z-index: 11;
    display: block;
    flex: 0 0 105px;
    width: 105px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    background: #eef1f3;
    cursor: pointer;
    opacity: .75;
    pointer-events: auto;
    transition: opacity .2s, border-color .2s;
    box-sizing: border-box;
}

.hec-photo-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.hec-photo-thumb:hover {
    opacity: 1;
}

.hec-photo-thumb.is-active {
    border-color: #d6a943;
    opacity: 1;
}


/* =========================================
   RESPONSIVE DESIGN
========================================= */

@media (max-width: 900px) {

    .hec-projects-track {
        grid-auto-columns: calc((100% - 20px) / 2);
    }

    .hec-project-card-image {
        height: 205px;
    }

    .hec-card-image-prev,
    .hec-card-image-next {
        opacity: 1;
    }

}

@media (max-width: 600px) {

    .hec-projects-section {
        margin: 38px auto;
        padding: 0 16px;
    }

    .hec-projects-heading {
        align-items: center;
        gap: 12px;
    }

    .hec-projects-heading h2 {
        font-size: 27px;
    }

    .hec-projects-controls {
        gap: 6px;
    }

    .hec-project-arrow {
        flex-basis: 37px;
        width: 37px;
        height: 37px;
    }

    .hec-projects-track {
        grid-auto-columns: 88%;
        gap: 14px;
    }

    .hec-project-card-image {
        height: 215px;
    }

    .hec-project-card-body {
        padding: 17px;
    }

    .hec-project-single {
        margin: 30px auto 50px;
        padding: 0 16px;
    }

    .hec-project-photo-stage {
        height: 68vw;
        min-height: 230px;
    }

    .hec-photo-prev,
    .hec-photo-next {
        width: 38px;
        height: 38px;
        font-size: 27px;
    }

    .hec-photo-prev {
        left: 9px;
    }

    .hec-photo-next {
        right: 9px;
    }

    .hec-project-thumbnails {
        gap: 8px;
        margin-top: 12px;
    }

    .hec-photo-thumb {
        flex-basis: 82px;
        width: 82px;
        height: 60px;
    }

    .hec-project-description {
        margin-top: 25px;
    }

}


/* =========================================
   OPTIONAL LEGACY LIGHTBOX
========================================= */

.hec-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(7,15,23,.94);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 55px 70px;
}

.hec-lightbox.is-open {
    display: flex;
}

.hec-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 8px 40px #0005;
}

.hec-lightbox button {
    position: absolute;
    border: 0;
    background: rgba(255,255,255,.13);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 27px;
    line-height: 1;
}

.hec-lightbox-close {
    top: 18px;
    right: 22px;
}

.hec-lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.hec-lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.hec-lightbox-count {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 13px;
    letter-spacing: 1px;
}