/* Overlay */
.fhb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease;
    font-family: "Inter", sans-serif;
}

.fhb-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}


/* Modal */
.fhb-modal {
    background: #fff;
    width: 90%;
    max-width: 1100px;
    border-radius: 10px;
    padding: 24px;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.fhb-modal-body {
    overflow-y: auto;
}

.fhb-modal-header,
.fhb-modal-footer {
    flex-shrink: 0;
}

/* Close */
.fhb-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: none;
    font-size: 28px;
    cursor: pointer;
}

/* Header */
.fhb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.fhb-header-text {
    font-size: 14px;
    color: #333;
    text-align: right;
    max-width: 420px;
}

.fhb-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.fhb-logo img {
    height: 48px;
}

/* Search */
.fhb-search {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.fhb-search input {
    border: none;
    padding: 8px 12px;
    outline: none;
    min-width: 200px;
}

.fhb-search button {
    border: none;
    background: #0d6efd;
    color: #fff;
    padding: 0 16px;
    cursor: pointer;
}

/* Cards */
.fhb-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    justify-content: center;
}

.fhb-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    height: 200px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.fhb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay gradient */
.fhb-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85) 20%,
        rgba(0,0,0,0.55) 45%,
        rgba(0,0,0,0.15) 70%,
        rgba(0,0,0,0) 100%
    );
    color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.fhb-card-content h4 {
    font-size: 17px;
    margin: 0;
    font-weight: 600;
}

.fhb-price {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.fhb-card-content p {
    font-size: 13px;
    line-height: 1.4;
    margin: 8px 0 12px;
}

.fhb-card-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* khung chỉ áp dụng cho giá */
.fhb-price-value {
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.7);
    padding: 3px 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
}

/* phần còn lại */
.fhb-meta {
    color: #ddd;
    font-size: 13px;
}

/* Button */
.fhb-btn {
    align-self: flex-start;
    background: #0d6efd;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.fhb-btn:hover {
    background: #0b5ed7;
    transform: translateY(-1px);
}

/* Footer */
.fhb-modal-footer {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #777;
}

#featuredPackagesModal .fhb-card-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

#featuredPackagesModal .fhb-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 180px);
    gap: 16px;
}

/* Card 1: span 2 rows (cột trái) */
#featuredPackagesModal .fhb-card:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
}

/* Card 2 */
#featuredPackagesModal .fhb-card:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

/* Card 3 */
#featuredPackagesModal .fhb-card:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

/* Card 4 */
#featuredPackagesModal .fhb-card:nth-child(4) {
    grid-column: 1;
    grid-row: 3;
}

/* Card 5 */
#featuredPackagesModal .fhb-card:nth-child(5) {
    grid-column: 2;
    grid-row: 3;
}

#featuredPackagesModal .fhb-card {
    width: 100%;
    height: 100%;
}

#featuredPackagesModal .fhb-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .fhb-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .fhb-header-text {
        display: none;
    }

    .fhb-modal {
        height: 90vh;
        overflow: auto;
        padding: 12px;
    }
}

@media (max-width: 640px) {
    .fhb-cards {
        grid-template-columns: 1fr;
    }

    .fhb-card {
        height: 270px;
    }

    .fhb-card-content {
        flex-direction: column;
        align-items: normal;
    }

    .fhb-card-content h4 {
        font-size: 20px;
    }

    .fhb-card-content p {
        font-size: 13px;
    }

    .fhb-btn {
        width: 100%;
        text-align: center;
        padding: 12px;
        display: block;
    }

    .fhb-modal-footer {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    #featuredPackagesModal .fhb-cards {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
        gap: 12px;
    }

    #featuredPackagesModal .fhb-card {
        grid-column: auto !important;
        grid-row: auto !important;
    }

}


