/* public/css/home.css */

/* --- HERO SECTION --- */
/* --- HERO SECTION (STYLE MỚI) --- */
.hero-section {
    background-color: #faf3e0 !important; /* Giữ nguyên màu nền */
    padding: 30px 0 50px 0;
    overflow: hidden;
}

/* --- GRID LAYOUT --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile: 2 cột */
    gap: 15px; 
    
}

/* --- CARD DỊCH VỤ --- */
.service-item-grid {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 12px;
    overflow: hidden; /* Quan trọng để chứa hiệu ứng quét sáng */
    position: relative; /* Để định vị tia sáng */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); /* Bóng nhẹ tinh tế */
    transition: all 0.3s ease;
    border: 1px solid rgba(133, 99, 76, 0.1);
}

.service-item-grid:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(133, 99, 76, 0.15);
    border-color: #85634c;
}

/* Wrapper ảnh */
.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-item-grid:hover .image-wrapper img {
    transform: scale(1.1); /* Zoom ảnh mượt mà */
}

/* Tiêu đề dịch vụ */
.service-title {
    padding: 15px 5px;
    text-align: center;
    font-size: 0.95rem;
    color: #85634c !important; /* MÀU PRIMARY THEO YÊU CẦU */
    margin: 0;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    transition: color 0.3s;
}

/* --- HIỆU ỨNG QUÉT SÁNG (SHINE) CHO CARD --- */
.service-item-grid::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    z-index: 1;
    transition: none;
}

/* Khi hover vào card thì tia sáng chạy qua 1 lần */
.service-item-grid:hover::before {
    animation: shine-effect 1.25s;
}

/* --- BUTTON GROUP --- */
.cta-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.hero-btn {
    position: relative;
    width: 100%;
    max-width: 350px;
    padding: 14px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    color: #fff !important;
    border: none;
    overflow: hidden; /* Để chứa hiệu ứng quét sáng */
    transition: all 0.3s ease;
}

/* Hiệu ứng quét sáng LIÊN TỤC cho nút (Thu hút sự chú ý) */
.hero-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine-loop 3s infinite; /* Chạy mỗi 3 giây */
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3); /* Bóng đổ mềm mại, không phải 3D khối */
}

/* 1. Nút Gọi (Gradient Xanh Lá) */
.btn-phone-hero {
    background: linear-gradient(90deg, #2E7D32 0%, #43A047 100%);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

/* 2. Nút Zalo (Gradient Xanh Dương) */
.btn-zalo-hero {
    background: linear-gradient(90deg, #0277BD 0%, #29B6F6 100%);
    box-shadow: 0 4px 15px rgba(2, 119, 189, 0.3);
}

/* Icon Rung */
.btn-icon-shake {
    animation: phone-shake 2s infinite;
}

/* --- KEYFRAMES --- */

/* Quét sáng 1 lần (Cho card) */
@keyframes shine-effect {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Quét sáng lặp lại (Cho nút) */
@keyframes shine-loop {
    0% { left: -100%; opacity: 0; }
    20% { left: 200%; opacity: 1; } /* Chạy nhanh qua */
    100% { left: 200%; opacity: 0; } /* Đợi một lúc rồi chạy lại */
}

/* Rung nhẹ */
@keyframes phone-shake {
    0%, 90%, 100% { transform: rotate(0) scale(1); }
    92% { transform: rotate(-10deg) scale(1.1); }
    94% { transform: rotate(10deg) scale(1.1); }
    96% { transform: rotate(-10deg) scale(1.1); }
    98% { transform: rotate(10deg) scale(1.1); }
}

/* --- PC RESPONSIVE --- */
@media (min-width: 992px) {
    .hero-section { padding: 40px 0 60px 0; }
    .service-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    .cta-container {
        flex-direction: row;
        gap: 30px;
    }
    .hero-btn {
        width: auto;
        min-width: 250px;
    }
    .service-title { font-size: 1.1rem; }
}
@media (max-width: 768px) {
    .hero-section {
        padding-top: 0px ; 
        padding-bottom: 20px ;
    }
    .image-wrapper {
        height: 140px;
        aspect-ratio: unset;
    }
}

/* --- 1. SỬA LỖI FONT CAM KẾT TRÊN MOBILE --- */
@media (max-width: 768px) {
    .small-text-mobile { font-size: 0.5rem ;  }
}

/* --- 2. PROJECTS SCROLLER (TRƯỢT NGANG TOÀN BỘ) --- */
.project-scroller {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 5px 30px 5px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth; /* Trượt mượt khi bấm nút */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.project-scroller::-webkit-scrollbar { display: none; }

/* 2. Cột chứa 2 ảnh (Column) */
.project-column {
    display: flex;
    flex-direction: column; /* Xếp 2 ảnh dọc */
    gap: 15px;
    flex-shrink: 0;
    scroll-snap-align: start;
    
    /* Kích thước cột */
    width: 80%; /* Mobile: hiện 1 cột + 1 xíu cột sau */
}

@media (min-width: 768px) {
    .project-column { width: 40%; }
}
@media (min-width: 992px) {
    .project-column { width: 28%; }
}
/* 3. Ảnh trong cột */
.project-img-box {
    position: relative;
    width: 100%;
    height: 220px; /* Chiều cao cố định cho đẹp */
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer; /* Con trỏ tay để biết bấm được */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 4. Nút điều hướng (Mũi tên trái phải) */
.nav-btn-custom {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid #c49963; /* Viền màu vàng cam */
    color: #c49963;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.nav-btn-custom:hover {
    background-color: #c49963;
    color: #fff;
    transform: scale(1.1); /* Phóng to nhẹ khi hover */
    box-shadow: 0 5px 15px rgba(196, 153, 99, 0.4);
}

/* --- 3. CĂN CHỈNH HÀNG NGANG CHO BỘ LỌC VÀ NÚT --- */
.filter-nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 20px;
    margin-bottom: 20px;
}

/* Trên mobile, thanh lọc chiếm hết chiều rộng, ẩn nút bấm (vì mobile vuốt tay) */
@media (max-width: 991px) {
    .filter-nav-wrapper {
        display: block; /* Quay về dạng khối để thanh lọc trượt ngang */
    }
}

/* 5. LIGHTBOX (Modal phóng to ảnh) */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}

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

/* Item Card trong thanh trượt */
.project-item-card {
    flex-shrink: 0;         /* Không bị co lại */
    scroll-snap-align: start; /* Căn chỉnh khi trượt */
    transition: transform 0.3s ease;
}

.project-item-card:hover {
    transform: translateY(-5px); /* Hiệu ứng nhấc lên nhẹ khi hover */
}

/* Kích thước ảnh theo thiết bị */
/* Mobile: Hiện khoảng 1.2 ảnh */
.project-item-card {
    width: 80%; 
}

/* Tablet: Hiện khoảng 2.5 ảnh */
@media (min-width: 768px) {
    .project-item-card {
        width: 40%;
    }
}

/* Desktop: Hiện khoảng 3.5 ảnh (để người dùng biết còn ảnh phía sau) */
@media (min-width: 992px) {
    .project-item-card {
        width: 28%; 
    }
}

/* --- SECTION SPACING & COLORS --- */

/* Tạo khoảng cách trên dưới cho các khối */
/* Nền xám nhẹ để tách biệt các khối (Màu chuẩn Bootstrap light gray hoặc custom) */
.bg-light-gray {
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

/* Thêm tiêu đề Section đẹp hơn để bớt trống */
.section-title-wrapper {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #282a29;
    text-transform: uppercase;
    display: inline-block;
    position: relative;
    padding-bottom: 15px;
}

/* Gạch chân trang trí dưới tiêu đề */
.section-title::after {
    content: "";
    width: 60px;
    height: 3px;
    background-color: #c49963; /* Màu vàng theme */
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Mobile spacing nhỏ hơn chút */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }
}

/* ===== Commitment Button ===== */
.btn-commitment {
    padding: 12px 34px;
    font-weight: 600;
    border-radius: 12px;
    color: white !important;

    background: linear-gradient(135deg, #d6a86a, #b8864a);

    box-shadow: 0 6px 16px rgba(184, 134, 74, 0.35);

    transition: all 0.25s ease;
}

/* hover */
.btn-commitment:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(184, 134, 74, 0.45);
}

/* icon trượt */
.btn-commitment i {
    transition: transform 0.25s ease;
}

.btn-commitment:hover i {
    transform: translateX(5px);
}

/* active click */
.btn-commitment:active {
    transform: scale(0.97);
}
.btn-commitment {
    animation: pulse-gold-soft 3s infinite;
}

/* ===== End Commitment Button ===== */

/* ===== Commitment text size ===== */
/* Mobile (mặc định) */
.commitment-text {
    font-size: 0.75rem;
    line-height: 1.3;
}

/* Tablet */
@media (min-width: 768px) {
    .commitment-text {
        font-size: 0.9rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .commitment-text {
        font-size: 1rem;
    }
}

/* Màn lớn */
@media (min-width: 1200px) {
    .commitment-text {
        font-size: 1.05rem;
    }
}
/* ===== End Commitment text size ===== */

/* =================================
   SERVICE CARD GLOW (UPGRADE)
================================= */

.service-item-grid{
    border: 1.5px solid rgba(196,153,99,0.85);

    box-shadow:
        0 8px 18px rgba(0,0,0,0.08),      /* shadow nền */
        0 0 0 3px rgba(196,153,99,0.28),  /* ring rõ */
        0 0 40px rgba(196,153,99,0.35);   /* glow mạnh */

    transition: all .35s ease;
}

/* hover = nổi bật hẳn */
.service-item-grid:hover{
    transform: translateY(-8px);

    border-color: #c49963;

    box-shadow:
        0 18px 36px rgba(0,0,0,0.18),
        0 0 0 4px rgba(196,153,99,0.45),
        0 0 65px rgba(196,153,99,0.55);
}

.testimonial-item-img-only {
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);

  display: flex;
  align-items: center;
  justify-content: center;
}

/* ảnh KHÔNG crop */
.testimonial-item-img-only img {
  width: 100%;
  height: 480px;
  object-fit: contain;
}

/* bo góc khung carousel */
.testimonial-carousel .owl-stage-outer {
  border-radius: 18px;
  overflow: hidden;   /* ⭐ cực quan trọng */
}

@media (max-width: 768px){
  .testimonial-item-img-only img {
    height: 380px;
  }
}


