/* =========================================================
   displayinfra.css
   Custom responsive styles for displayinfra.aspx
   No dependency on the page's existing gallery CSS
   ========================================================= */

.infra-page {
    width: 100%;
    padding: 0 18px 60px;
    box-sizing: border-box;
}

.infra-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.infra-intro {
    margin: 38px auto 32px;
    max-width: 1050px;
}

.infra-intro-card {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 30px 34px;
    border: 1px solid #e8edf3;
    box-shadow: 0 10px 35px rgba(25, 42, 70, 0.09);
    overflow: hidden;
}

.infra-intro-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    /*background: linear-gradient(180deg, #1769aa, #35a7d8);*/
}

.infra-intro-message {
    margin: 0;
    color: #4e5d6c;
    font-size: 16px;
    line-height: 1.85;
    text-align: justify;
}

.infra-gallery-section {
    margin-top: 34px;
}

.infra-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 0 0 24px;
}

.infra-section-heading h3 {
    margin: 0;
    color: #172b4d;
    font-size: 25px;
    font-weight: 700;
}

.infra-section-heading::after {
    content: "";
    flex: 1;
    max-width: 170px;
    height: 3px;
    border-radius: 10px;
    background: linear-gradient(90deg, #1769aa, #52c7e8);
}

.infra-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.infra-gallery-item {
    min-width: 0;
}

.infra-gallery-card {
    position: relative;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #e7ecf2;
    /*border-radius: 16px;*/
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(26, 45, 70, 0.08);
    transition: transform .3s ease, box-shadow .3s ease;
}

.infra-gallery-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 38px rgba(26, 45, 70, 0.16);
}

.infra-image-link {
    position: relative;
    display: block;
    width: 100%;
    height: 270px;
    overflow: hidden;
    background: #eef3f7;
    cursor: pointer;
}

.infra-image-link::after {
    content: "VIEW IMAGE";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -42%);
    padding: 9px 16px;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 30px;
    background: rgba(0,0,0,.48);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
    z-index: 2;
}

.infra-gallery-card:hover .infra-image-link::after {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.infra-gallery-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s ease;
}

.infra-gallery-card:hover .infra-gallery-image {
    transform: scale(1.08);
}

.infra-empty {
    grid-column: 1 / -1;
    padding: 40px 20px;
    border: 1px dashed #cbd5df;
    border-radius: 14px;
    background: #f8fafc;
    color: #687789;
    text-align: center;
    font-size: 16px;
}

/* Full-screen image viewer */
.infra-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    padding: 70px 25px 30px;
    background: rgba(8, 16, 28, .94);
    box-sizing: border-box;
    overflow: auto;
}

.infra-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: infraFadeIn .2s ease;
}

.infra-modal-content {
    display: block;
    max-width: min(1200px, 94vw);
    max-height: 82vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 20px 70px rgba(0,0,0,.45);
    animation: infraZoomIn .25s ease;
}

.infra-modal-close {
    position: fixed;
    top: 16px;
    right: 25px;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 34px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
    z-index: 3;
}

.infra-modal-close:hover {
    background: rgba(255,255,255,.25);
    transform: rotate(90deg);
}

.infra-modal-hint {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    color: rgba(255,255,255,.7);
    font-size: 12px;
    letter-spacing: .4px;
}

/* Responsive */
@media (max-width: 991px) {
    .infra-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .infra-image-link {
        height: 245px;
    }

    .infra-intro-card {
        padding: 26px 28px;
    }
}

@media (max-width: 650px) {
    .infra-page {
        padding: 0 12px 40px;
    }

    .infra-intro {
        margin-top: 25px;
    }

    .infra-intro-card {
        padding: 22px 20px;
        border-radius: 14px;
    }

    .infra-intro-message {
        font-size: 14px;
        line-height: 1.75;
    }

    .infra-section-heading {
        display: block;
    }

    .infra-section-heading h3 {
        font-size: 21px;
        margin-bottom: 9px;
    }

    .infra-section-heading::after {
        display: block;
        width: 80px;
        height: 3px;
    }

    .infra-gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .infra-image-link {
        height: min(72vw, 310px);
    }

    .infra-modal {
        padding: 65px 10px 30px;
    }

    .infra-modal-content {
        max-width: 96vw;
        max-height: 78vh;
        border-radius: 7px;
    }

    .infra-modal-close {
        top: 10px;
        right: 12px;
        width: 42px;
        height: 42px;
        line-height: 38px;
        font-size: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .infra-gallery-card,
    .infra-gallery-image,
    .infra-image-link::after,
    .infra-modal,
    .infra-modal-content,
    .infra-modal-close {
        transition: none !important;
        animation: none !important;
    }
}

@keyframes infraFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes infraZoomIn {
    from {
        transform: scale(.92);
        opacity: .4;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
