﻿
/* ---------- Hero slider ---------- */
.hero {
    height: calc(100vh - 120px); /* 👈 full màn hình */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .hero img,
    .hero video {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: fill !important; /* 👈 cực quan trọng */
    }

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

    .slide.active {
        opacity: 1
    }

    .slide::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg,rgba(0,0,0,.2),rgba(0,0,0,.65))
    }

.slide-content {
    position: relative;
    text-align: center;
    color: #fff;
    padding: 20px;
    max-width: 900px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
    z-index: 2;
}

    .slide-content h2 {
        font-size: clamp(28px,4vw,52px);
        font-weight: 800;
        margin-bottom: 15px;
        text-shadow: 0 2px 10px rgba(0,0,0,.5);
        opacity: 1;
        z-index: 2;
    }

    .slide-content p {
        font-size: clamp(14px,1.4vw,18px);
        margin-bottom: 25px;
        opacity: 1;
        z-index: 2;
    }

.btn {
    display: inline-block;
    padding: 12px 32px;
    background: #d4af37;
    color: #fff;
    font-weight: 700;
    border-radius: 4px;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all .25s;
    border: none;
    cursor: pointer;
    z-index: 2;
}

    .btn:hover {
        background: #d4860a;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0,0,0,.2);
        z-index: 99999;
    }

.btn-outline {
    background: transparent;
    border: 2px solid #fff
}

    .btn-outline:hover {
        background: #fff;
        color: var(--brand)
    }

.slide-1 {
    background-image: linear-gradient(135deg,#0a4b8c 0%,#1e3a8a 100%)
}

.slide-2 {
    background-image: linear-gradient(135deg,#1f2937 0%,#0a4b8c 100%)
}

.slide-3 {
    background-image: linear-gradient(135deg,#065f46 0%,#0a4b8c 100%)
}

.slide-4 {
    background-image: linear-gradient(135deg,#7c2d12 0%,#0a4b8c 100%)
}

.dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    border: none;
    cursor: pointer;
    transition: all .2s
}

    .dot.active {
        background: #fff;
        width: 30px;
        border-radius: 6px
    }

/* ---------- Section common ---------- */
section {
    padding: 60px 0
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    /*color: var(--brand);*/
    color: #d4af37;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

    .section-title::after {
        content: "";
        display: block;
        width: 60px;
        height: 3px;
        background: #d4af37;
        margin: 12px auto 0;
    }

.section-subtitle {
    text-align: center;
    color: #fff;
    max-width: 700px;
    margin: 0 auto 40px;
}

/* ---------- Projects grid ---------- */
.project-section {
    background: #2C3539;
    color: #fff;
}

.projects-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
}

.projects-grid {
    scroll-behavior: smooth;
}

    .projects-grid::-webkit-scrollbar {
        height: 6px;
    }

    .projects-grid::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 10px;
    }

/* mỗi card thành 1 slide */
.projects-grid {
    overflow-x: auto;
    scroll-behavior: auto; /* ❗ cực kỳ quan trọng */
    cursor: grab;
    user-select: none;
}

    .projects-grid.dragging {
        cursor: grabbing;
    }

.projects-grid,
.project-card {
    user-select: none;
    -webkit-user-select: none;
}

    .project-card img {
        pointer-events: none;
        user-drag: none;
        -webkit-user-drag: none;
    }

    .projects-grid::-webkit-scrollbar {
        display: none;
    }

.projects-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.project-card {
    flex: 0 0 calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
    height: 420px; /* 👈 tăng chiều cao */
    border-radius: 14px;
    overflow: hidden;
    transition: all .4s ease;
    transform: scale(0.85);
    opacity: 1;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 12px #000;
}

    .project-card.active {
        transform: scale(1);
        box-shadow: 0 6px 12px rgba(0,0,0,.65);
        opacity: 1;
        z-index: 2;
    }

    .project-card:hover {
        transform: scale(1);
        box-shadow: 0 6px 12px #000;
        opacity: 1;
        z-index: 2;
    }

.project-thumb {
    height: 75%; /* 👈 tăng từ 65% → 75% */
    background-size: cover;
    background-position: center;
    position: relative;
}

    /*.project-thumb {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}
*/
    .project-thumb::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg,transparent 40%,rgba(0,0,0,.75))
    }

    .project-thumb img {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        height: 100%;
    }

.project-body {
    height: 25%; /* 👈 giảm xuống */
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 👈 gọn lại */
}

    .project-body p {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* 👈 giới hạn 2 dòng */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

.project-link {
    /*color: var(--brand);*/
    color: inherit;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .project-link:hover {
        color: #d4af37;
    }

.slider-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}

    .slider-controls button {
        background: var(--brand);
        color: #fff;
        border: none;
        padding: 8px 14px;
        cursor: pointer;
        border-radius: 4px;
    }

        .slider-controls button:hover {
            background: #d4af37;
        }

/* Generated gradient thumbs */
.thumb-1 {
    background-image: linear-gradient(135deg,#3b82f6,#1e3a8a)
}

.thumb-2 {
    background-image: linear-gradient(135deg,#10b981,#065f46)
}

.thumb-3 {
    background-image: linear-gradient(135deg,#f59e0b,#b45309)
}

.thumb-4 {
    background-image: linear-gradient(135deg,#ef4444,#7f1d1d)
}

.thumb-5 {
    background-image: linear-gradient(135deg,#8b5cf6,#4c1d95)
}

.thumb-6 {
    background-image: linear-gradient(135deg,#06b6d4,#0e7490)
}

.thumb-7 {
    background-image: linear-gradient(135deg,#ec4899,#831843)
}

.thumb-8 {
    background-image: linear-gradient(135deg,#14b8a6,#115e59)
}

/* ---------- News section ---------- */
.news-section {
    background: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 30px
}

.news-col h3 {
    font-size: 20px;
    font-weight: 800;
    /*color: var(--brand);*/
    color: inherit;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #d4af37;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .news-col h3 a {
        font-size: 12px;
        /*color: var(--text-muted);*/
        color: inherit;
        font-weight: 500
    }

        .news-col h3 a:hover {
            /*color: var(--brand);*/
            color: #d4af37;
        }

.news-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .25s;
    box-shadow: 0 12px 28px #e5e7eb;
}

    .news-item:hover {
        transform: translateX(4px)
    }

.news-thumb {
    height: 300px;
    background-size: cover;
    background-position: center
}

    .news-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.news-body {
    padding: 15px;
}

    .news-body a {
        display: -webkit-box;
        -webkit-line-clamp: 1; /* 👈 giới hạn 2 dòng */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.5;
        max-height: 3em; /* fallback cho trình duyệt cũ */
    }

    .news-body h4 {
        font-size: 14px;
        font-weight: 700;
        color: #222;
        margin-bottom: 8px;
        line-height: 1.4
    }

        .news-body h4:hover {
            color: var(--brand);
        }

.news-date {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px
}

    .news-date::before {
        content: "📅"
    }

/* ---------- Services icons ---------- */
.services {
    background: #2C3539;
    color: #fff
}

    .services .section-title {
        color: #fff
    }

        .services .section-title::after {
            background: #fff
        }

.services-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 30px;
    margin-top: 30px;
}

.service-box {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255,255,255,.08);
    border-radius: 10px;
    transition: all .3s;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,.15);
}

    .service-box:hover {
        background: rgba(255,255,255,.18);
        transform: translateY(-4px)
    }

.service-icon {
    font-size: 40px;
    margin-bottom: 12px
}

.service-box h4 {
    font-size: 15px;
    font-weight: 700
}

/* ---------- Partners ---------- */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 20px;
    align-items: center;
}

.partner-logo {
    height: 100px;
    background: #fff;
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
    transition: all .25s;
    text-align: center;
    padding: 10px 0 10px 0;
}

    .partner-logo:hover {
        /*border-color: var(--brand);*/
        color: var(--brand);
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(10,75,140,.15);
    }

/* ---------- Responsive ---------- */
@media (max-width:900px) {
    .news-grid {
        grid-template-columns: 1fr
    }

    .services-grid {
        grid-template-columns: repeat(2,1fr)
    }

    .partners-grid {
        grid-template-columns: repeat(3,1fr)
    }

    .project-card {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .hero {
        height: calc(100vh - 150px); /* 👈 full màn hình */
    }
}

@media (max-width:500px) {
    .partners-grid {
        grid-template-columns: repeat(2,1fr)
    }

    .footer-grid {
        grid-template-columns: 1fr
    }

    .services-grid {
        grid-template-columns: 1fr
    }

    .project-card {
        flex: 0 0 80%;
        max-width: 80%;
    }

    .project-card {
        flex: 0 0 80%;
        max-width: 80%;
    }

    .hero {
        height: calc(100vh - 220px); /* 👈 full màn hình */
    }

    .floating-wrap {
        bottom: 70px;
    }

    .hero img,
    .hero video {
        object-fit: cover !important; /* 👈 cực quan trọng */
    }
}
