/* ════════════════════════════════════════════════════════════════════════════
   Components CSS — port verbatim từ <style> block của các C_*.razor:
   - C_TourCard.razor (line 247-422)
   - C_FavoriteDestinationCard.razor (line 33-72)
   - C_ContainerViewMore.razor (line 56-86)
   - C_Modal.razor (line 53-181)  → giữ animation fade-in/pop-in
   - C_LoadingPage.razor (line 11-21)
   ════════════════════════════════════════════════════════════════════════════ */


/* ──────────── C_TourCard ──────────── */
.tour-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tour-card:hover {
    /* Phóng to + đẩy lên nhẹ + shadow đậm hơn để card "bật" ra khi hover */
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.08);
}
.tour-card .position-relative {
    overflow: hidden;
}
.tour-card-img {
    height: 15rem;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.tour-card-title {
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Min-height = 2 dòng (line-height * 2) → title ngắn vẫn chiếm chỗ 2 dòng để card đều height */
    min-height: 2.8em;
    height: auto;
    text-align: left;
}
.tour-card:hover .tour-card-img {
    transform: scale(1.08);
}
.tour-card button.btnbooknow {
    border-color: var(--BLUE);
    border: solid;
    border-width: 1px;
    color: white;
    transition: all 0.3s ease;
}
.tour-card:hover button.btnbooknow {
    border-color: var(--BLUE);
    border: solid;
    border-width: 1px;
    background-color: var(--WHITE);
    color: var(--BLUE);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 87, 146, 0.3);
}
.tour-card button.btnbooknow:active {
    transform: scale(0.98);
}
.tour-card-image-wrap {
    overflow: hidden;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}
.tour-card-ribbon {
    position: absolute;
    top: 0.75rem;
    /* Đẩy lệch ra ngoài thẻ cha nhiều hơn để ribbon "thò" rõ ràng */
    right: -0.6rem;
    /* Gradient đỏ rực thay vì màu phẳng → nổi bật hơn */
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    padding: 0.4rem 2rem 0.4rem 2rem;
    white-space: nowrap;
    max-width: calc(100% + 0.4rem);
    overflow: hidden;
    text-overflow: ellipsis;
    /* Shadow đậm + viền sáng nhẹ tạo cảm giác nổi 3D */
    box-shadow: 0 6px 14px rgba(220, 38, 38, 0.45), 0 2px 4px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    z-index: 3;
    clip-path: polygon(0.7rem 0, 100% 0, 100% 100%, 0.7rem 100%, 0 50%);
    transform-origin: right center;
    animation: tvRibbonPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.tour-card-ribbon2 {
    position: absolute;
    top: 1.4rem;
    /* Lệch ngoài cha thêm — đồng bộ với ribbon chính, tạo layer shadow phía sau */
    right: -0.6rem;
    background-color: #111111;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    padding: 0.4rem 2rem 0.4rem 2rem;
    white-space: nowrap;
    max-width: calc(100% + 0.4rem);
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
    opacity: 0.55;
    clip-path: polygon(0.7rem 0, 100% 0, 100% 100%, 0.7rem 100%, 0 50%);
}
@keyframes tvRibbonPop {
    0%   { transform: scale(0.5) translateX(10px); opacity: 0; }
    60%  { transform: scale(1.08) translateX(0); opacity: 1; }
    100% { transform: scale(1) translateX(0); opacity: 1; }
}
.tour-card-special {
    position: absolute;
    top: 1.5rem;
    left: -0.9rem;
    background: linear-gradient(135deg, #b91c1c 0%, #ef4444 45%, #f97316 100%);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    padding: 0.4rem 1.8rem 0.4rem 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.55), 0 0 18px rgba(249, 115, 22, 0.4);
    z-index: 10;
    clip-path: polygon(0 0, calc(100% - 0.85rem) 0, 100% 50%, calc(100% - 0.85rem) 100%, 0 100%);
    animation: tour-card-special-pulse 1.8s ease-in-out infinite;
    transform-origin: left center;
}
.tour-card-special::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.45rem;
    width: 0.9rem;
    height: 0.45rem;
    background: #7f1d1d;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    z-index: -1;
}
.tour-card-special::before {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
    transform: skewX(-20deg);
    animation: tour-card-special-shimmer 2.4s ease-in-out infinite;
}
@keyframes tour-card-special-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}
@keyframes tour-card-special-shimmer {
    0%   { left: -60%; }
    60%  { left: 120%; }
    100% { left: 120%; }
}
@media (max-width: 991.98px) {
    .tour-card-special {
        top: 1.75rem;
        left: -1.1rem;
        font-size: 1.15rem;
        letter-spacing: 0.05em;
        padding: 0.55rem 2.2rem 0.55rem 1.2rem;
        clip-path: polygon(0 0, calc(100% - 1rem) 0, 100% 50%, calc(100% - 1rem) 100%, 0 100%);
    }
    .tour-card-special::after {
        width: 1.1rem;
        height: 0.55rem;
        bottom: -0.55rem;
    }
}


/* ──────────── C_FavoriteDestinationCard ──────────── */
.fav-destination-card {
    cursor: pointer;
    transition: box-shadow 0.4s ease;
}
.fav-destination-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.fav-destination-img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.6s ease;
}
.fav-destination-card:hover .fav-destination-img {
    transform: scale(1.1);
}
.fav-destination-overlay {
    background: rgba(0,0,0,0.3);
}
.fav-destination-overlay h5 {
    font-size: 1.5rem;
    letter-spacing: 1px;
}


/* ──────────── C_ContainerViewMore ──────────── */
.containerViewMore {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 0;
    justify-content: space-between;
    padding: 0;
}
@media (max-width: 1800px) {
    .containerViewMore {
        top: unset;
        left: unset;
        right: unset;
        position: relative;
        gap: 1.5rem;
        padding-top: 1rem;
        justify-content: center;
    }
}


/* ──────────── C_Modal (animation) ──────────── */
body.modal-open { overflow: hidden; }
.modal-backdrop-tv {
    position: fixed; top: 0; left: 0; z-index: 1050;
    width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex; justify-content: center; align-items: center;
}
.modal-container-tv {
    background-color: var(--WHITE, #fff);
    max-width: 1400px;
    padding: 3rem;
    border-radius: 2rem;
    height: max-content;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}
.fade-in { animation: tvFadeIn 0.3s ease forwards; }
.fade-out { animation: tvFadeOut 0.3s ease forwards; }
.pop-in { animation: tvPopIn 0.35s ease forwards; }
.pop-out { animation: tvPopOut 0.35s ease forwards; }
@keyframes tvFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes tvFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes tvPopIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes tvPopOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.95); } }


/* ──────────── Header nav hover — underline xanh trượt từ trái ────────────
   Blazor không có CSS rule riêng cho hover (chỉ active state); thêm hover
   effect cho đẹp + match cảm quan "nổi lên" mà user mong đợi: text đổi sang
   xanh + gạch chân 3px scale từ trái phải, transition 0.25s. */
.main-nav li > a {
    position: relative;
    transition: color 0.2s ease;
}
.main-nav li > a:hover {
    color: var(--BLUE) !important;
}
.main-nav li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    height: 3px;
    background: var(--BLUE);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
}
.main-nav li > a:hover::after {
    transform: scaleX(1);
}


/* ──────────── Floating contact buttons (Messenger/Zalo/Phone) ────────────
   Port từ MainLayout.razor:1628-1674 (style block inline trong .razor — KHÔNG
   nằm trong .razor.css scoped). Hiệu ứng `contact-pulse` ripple box-shadow
   với màu khác nhau theo --pulse-color CSS var. */
.contact-btn {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    animation: contact-pulse 2s ease-out infinite;
}
.contact-btn img {
    width: 3.5rem;
    height: 3.5rem;
}
.messenger { --pulse-color: 120, 80, 255; }   /* tím */
.zalo      { --pulse-color: 0, 150, 255; }    /* xanh dương */
.phone     { --pulse-color: 255, 60, 60; }    /* đỏ */
@keyframes contact-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--pulse-color), 0.55),
                    0 0 0 0 rgba(var(--pulse-color), 0.35);
    }
    70% {
        box-shadow: 0 0 0 1rem rgba(var(--pulse-color), 0.15),
                    0 0 0 2rem rgba(var(--pulse-color), 0.05);
    }
    100% {
        box-shadow: 0 0 0 1.5rem rgba(var(--pulse-color), 0),
                    0 0 0 3rem rgba(var(--pulse-color), 0);
    }
}


/* ──────────── C_LoadingPage ──────────── */
.loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
    overflow: hidden;
}
