/* ========================================
   TONRY Honor Gallery Styles
   ======================================== */

/* Gallery Section Container */
.honor-gallery-section {
    padding: 20px 0 80px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Gallery Grid Layout - 等高等宽 */
.honor-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 320px;
    gap: 30px;
}

/* Gallery Item - 固定宽高 */
.honor-gallery-item {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #cacaca;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.honor-gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Image Container - 固定高度 */
.honor-item-image {
    position: relative;
    width: 100%;
    height: 255px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    flex-shrink: 0;
}

.honor-item-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 92%;
    max-height: 92%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.honor-gallery-item:hover .honor-item-image img {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Overlay Effect */
.honor-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(135deg, rgba(250, 108, 36, 0.85), rgba(221, 88, 46, 0.9)); */
    background: none;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.honor-gallery-item:hover .honor-item-overlay {
    opacity: 1;
}

/* Zoom Icon */
.honor-zoom-icon {
    font-style: normal;
    width: 30px;
    height: 30px;
    line-height: 26px;
    text-align: center;
    background: #fa6c24;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 300;
    color: #fff;
    transform: scale(0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.honor-gallery-item:hover .honor-zoom-icon {
    transform: scale(1);
}

/* Item Title - 固定高度 */
.honor-item-title {
    height: 80px;
    line-height: 80px;
    padding: 0 15px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
    background: #fff;
}

.honor-gallery-item:hover .honor-item-title {
    color: #fa6c24;
}

/* ========================================
   Layui Photo Layer Custom Styles
   ======================================== */
.layui-layer-photos {
    background: rgba(0, 0, 0, 0.95) !important;
}

.layui-layer-photos .layui-layer-content {
    overflow: visible !important;
}

.layui-layer-photos .layui-layer-phimg img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.layui-layer-photos .layui-layer-imgtit {
    font-size: 16px;
    color: #fff;
    padding: 15px 0;
    text-align: center;
}

.layui-layer-photos .layui-layer-imguide a {
    width: 50px;
    height: 50px;
    background: rgba(250, 108, 36, 0.8);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.layui-layer-photos .layui-layer-imguide a:hover {
    background: #fa6c24;
    transform: scale(1.1);
}

.layui-layer-photos .layui-layer-imguide .layui-layer-iconext {
    font-size: 20px;
    color: #fff;
}

.layui-layer-photos .layui-layer-close {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.layui-layer-photos .layui-layer-close:hover {
    background: #fa6c24;
    transform: rotate(90deg);
}

/* ========================================
   Responsive Design - 等高等宽适配
   ======================================== */

@media (max-width: 1560px) {
    .honor-item-image {
        height: 235px;
    }
}


@media (max-width: 1200px) {
    .honor-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 300px;
        gap: 25px;
    }

    .honor-item-image {
        /* height: 225px; */
        height: 250px;
    }

    .honor-item-title {
        height: 75px;
        line-height: 75px;
    }
}

@media (max-width: 992px) {
    .honor-gallery-section {
        padding: 20px 0 60px;
    }

    .honor-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 280px;
        gap: 20px;
    }

    .honor-item-image {
        height: 210px;
    }

    .honor-item-title {
        height: 70px;
        line-height: 70px;
        font-size: 13px;
        padding: 0 12px;
    }
}

@media (max-width: 768px) {
    .honor-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 260px;
        gap: 15px;
    }

    .honor-gallery-item {
        border-radius: 10px;
    }

    .honor-item-image {
        height: 195px;
    }

    .honor-zoom-icon {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .honor-item-title {
        height: 65px;
        line-height: 65px;
        font-size: 12px;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .honor-gallery-section {
        padding: 10px 0 40px;
    }

    .honor-gallery-grid {
        grid-template-columns: repeat(1, 1fr);
        grid-auto-rows: auto;
        gap: 12px;
    }

    .honor-gallery-item {
        border-radius: 8px;
    }

    .honor-item-image {
        height: auto;
    }

    .honor-item-image img {
        position: relative;
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .honor-zoom-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .honor-item-title {
        height: 55px;
        line-height: 55px;
        font-size: 13px;
        padding: 0 8px;
    }
}

/* ========================================
   Animation for Gallery Items
   ======================================== */
.honor-gallery-item {
    opacity: 0;
    transform: translateY(30px);
    animation: honorFadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.honor-gallery-item:nth-child(1) {
    animation-delay: 0.1s;
}

.honor-gallery-item:nth-child(2) {
    animation-delay: 0.15s;
}

.honor-gallery-item:nth-child(3) {
    animation-delay: 0.2s;
}

.honor-gallery-item:nth-child(4) {
    animation-delay: 0.25s;
}

.honor-gallery-item:nth-child(5) {
    animation-delay: 0.3s;
}

.honor-gallery-item:nth-child(6) {
    animation-delay: 0.35s;
}

.honor-gallery-item:nth-child(7) {
    animation-delay: 0.4s;
}

.honor-gallery-item:nth-child(8) {
    animation-delay: 0.45s;
}

.honor-gallery-item:nth-child(9) {
    animation-delay: 0.5s;
}

.honor-gallery-item:nth-child(10) {
    animation-delay: 0.55s;
}

.honor-gallery-item:nth-child(11) {
    animation-delay: 0.6s;
}

.honor-gallery-item:nth-child(12) {
    animation-delay: 0.65s;
}

@keyframes honorFadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}