﻿/* --- GALLERY SECTION STYLES --- */

:root {
    --primary-color: #0046ba;
    --hover-overlay: rgba(0, 70, 186, 0.85);
    --card-radius: 16px;
}

.gallery-section {
    padding: 80px 0;
    background-color: #f9fbfd; /* Màu nền sáng nhẹ tạo sự tách biệt */
}

/* 1. Header Styling */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.title-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

    .title-separator::before,
    .title-separator::after {
        content: '';
        width: 60px;
        height: 2px;
        background: #e0e0e0;
        margin: 0 15px;
    }

    .title-separator span {
        color: var(--primary-color);
        font-size: 1.2rem;
    }

.section-subtitle {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 2. Gallery Card & Image Frame */
.gallery-card {
    height: 100%;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #fff;
}

    .gallery-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    }

.img-frame {
    position: relative;
    width: 100%;
    /* Tỷ lệ khung hình chuẩn 4:3 cho ảnh gallery, đảm bảo đồng đều */
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: pointer;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cắt ảnh vừa khung mà không méo */
    transition: transform 0.8s ease; /* Zoom chậm và mượt */
}

/* Hiệu ứng Zoom ảnh khi hover */
.gallery-card:hover .gallery-img {
    transform: scale(1.15);
}

/* 3. Overlay Effects */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--hover-overlay), rgba(0, 70, 186, 0.4));
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(2px); /* Làm mờ ảnh phía sau lớp phủ */
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    transform: translateY(20px); /* Đẩy xuống dưới để chạy lên khi hover */
    transition: transform 0.4s ease;
}

.gallery-card:hover .overlay-content {
    transform: translateY(0);
}

.icon-box {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0 auto 10px auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.view-text {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 4. Button "Xem tất cả" Modern */
.btn-view-all {
    display: inline-flex;
    align-items: center;
    padding: 12px 35px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

    .btn-view-all::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 0%;
        height: 100%;
        background-color: var(--primary-color);
        transition: width 0.3s ease;
        z-index: -1;
    }

    .btn-view-all:hover {
        color: #fff;
        box-shadow: 0 10px 20px rgba(0, 70, 186, 0.2);
    }

        .btn-view-all:hover::before {
            width: 100%;
        }

.icon-arrow {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.btn-view-all:hover .icon-arrow {
    transform: translateX(5px);
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }

    .gallery-section {
        padding: 50px 0;
    }
    /* Trên mobile cho ảnh vuông để to hơn */
    .img-frame {
        aspect-ratio: 1 / 1;
    }
}
