/* Từ lg trở xuống (max-width: 1199.98px) */
@media (max-width: 1199.98px) {
    .mb-lg-down {
        margin-bottom: 1rem;
        /* hoặc giá trị bạn muốn */
    }
}

/* Adjust Main Slider Height */
.slide-one-item.home-slider .owl-item .site-cover {
    height: 80vh;
    max-height: 700px;
}

/* Custom Navigation Buttons */
.slider-custom-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    z-index: 1000;
    transform: translateY(-50%);
    pointer-events: none;
}

.slider-custom-prev,
.slider-custom-next {
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: rgba(23, 72, 152, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
}

.slider-custom-prev {
    left: 20px;
}

.slider-custom-next {
    right: 20px;
}

.slider-custom-prev:hover,
.slider-custom-next:hover {
    background-color: rgba(23, 72, 152, 1);
    transform: scale(1.1);
}

/* Mobile responsive for custom navigation */
@media (max-width: 768px) {
    .slider-custom-prev,
    .slider-custom-next {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .slider-custom-prev {
        left: 10px;
    }

    .slider-custom-next {
        right: 10px;
    }
}

/* Fix for owl carousel navigation buttons */
.slide-one-item.home-slider {
    position: relative;
}

.slide-one-item.home-slider .owl-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    margin-top: -30px;
    z-index: 1000 !important;
    width: 100%;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.slide-one-item.home-slider .owl-prev,
.slide-one-item.home-slider .owl-next {
    position: absolute;
    width: 60px !important;
    height: 60px !important;
    background-color: rgba(23, 72, 152, 0.8) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 30px !important;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    z-index: 9999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    cursor: pointer !important;
    transform: translateY(-50%);
    top: 50%;
    margin: 0 !important;
}

.slide-one-item.home-slider .owl-prev span,
.slide-one-item.home-slider .owl-next span {
    display: block !important;
    font-size: 36px !important;
    position: relative;
    top: -4px;
    line-height: 1;
    color: white !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.slide-one-item.home-slider .owl-prev {
    left: 20px !important;
}

.slide-one-item.home-slider .owl-next {
    right: 20px !important;
}

/* Remove any hidden overflow that might be clipping the buttons */
.site-cover {
    overflow: visible !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .slide-one-item.home-slider .owl-prev,
    .slide-one-item.home-slider .owl-next {
        width: 45px !important;
        height: 45px !important;
        font-size: 22px !important;
    }

    .slide-one-item.home-slider .owl-prev {
        left: 10px !important;
    }

    .slide-one-item.home-slider .owl-next {
        right: 10px !important;
    }
}

/* Shorten Map & Business Buttons */
.custom-btn {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    height: 100px;
    font-weight: 500;
    border: none;
    width: 100%;
    text-decoration: none;
}

.custom-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: white;
    text-decoration: none;
}

.btn-icon {
    margin-right: 10px;
    font-size: 18px;
}

/* Section Headings Styling */
.section-heading {
    text-align: center;
    position: relative;
    margin-bottom: 40px;
}

.section-heading h2 {
    display: inline-block;
    position: relative;
    color: var(--primary-color);
    font-weight: 700;
    padding-bottom: 10px;
    text-transform: uppercase;
}

.section-heading h2:after {
    content: "";
    position: absolute;
    width: 70%;
    height: 3px;
    background: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translate(-50%);
}

/* Section Background Alternating */
.site-section:nth-child(even) {
    background-color: var(--light-gray);
}

/* News Carousel Styles */
.news-carousel .item {
    padding: 10px;
}

.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.news-img {
    height: 200px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover .news-img img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-category {
    display: inline-block;
    background-color: var(--primary-light);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
}

.news-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.news-date {
    color: #666;
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
}

.news-excerpt {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

/* Category Tabs Styling */
.category-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 8px 20px;
    margin: 0 5px 10px;
    background-color: #f0f0f0;
    color: #333;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.category-tab.active {
    background-color: var(--primary-color);
    color: white;
}

.category-tab:hover:not(.active) {
    background-color: #e0e0e0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* DearFlip Customizations */
._df_book-title {
    display: none !important;
}

/* Tạo hiệu ứng bìa tạp chí */
.df-book {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
}

/* Tùy chỉnh bìa trước */
.df-book-cover {
    background-color: #e91e63;
    border-radius: 3px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

/* Tùy chỉnh gáy sách */
.df-book-spine {
    background-color: #c2185b;
    box-shadow: inset -2px 0 5px rgba(0, 0, 0, 0.25);
}

/* Hiệu ứng phản chiếu cho bìa sáng hơn */
.df-book:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0) 60%
    );
    pointer-events: none;
}

/* Tùy chỉnh hiệu ứng lật trang */
.df-book .df-page {
    transition: transform 0.5s ease;
}

/* Đảm bảo thumbnail có hiệu ứng bìa tạp chí */
._df_thumb {
    width: 300px;
    height: 400px;
    position: relative;
    background-color: #f9f9f9;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

._df_thumb:hover {
    transform: translateY(-10px) rotateY(10deg);
    box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.2);
}

/* Thêm hiệu ứng gáy cho thumbnail */
._df_thumb:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 10px;
    height: 100%;
    background-color: #c2185b;
    box-shadow: inset -2px 0 5px rgba(0, 0, 0, 0.25);
    transform: translateX(-5px) rotateY(-20deg);
    z-index: -1;
}

/* Thêm hiệu ứng độ bóng cho các trang */
.df-book-page {
    background-color: #fff;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

.owl-carousel .item {
    padding: 10px;
}

.card {
    border: none;
    /* Remove the border of the card */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* Add shadow effect for cards */
    transition: transform 0.3s ease;
    /* Add smooth transition effect */
}

.card:hover {
    transform: scale(1.05);
    /* Slight zoom effect when hovered */
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
}

.card-text {
    color: #555;
}

.home-slider .owl-nav .owl-prev,
.home-slider .owl-nav .owl-next {
    transform: scale(1.01) !important;
}

.loading-container {
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: #174898;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    transition: transform 1s ease-in-out;
}

.loading-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: #174898;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    transition: transform 1s ease-in-out;
}

.logo {
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

.loading-dots {
    position: absolute;
    top: 65%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1001;
}

.dot {
    width: 12px;
    height: 12px;
    margin: 0 6px;
    border-radius: 50%;
    background-color: white;
    animation: dot-pulse 1.5s infinite ease-in-out;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

.content {
    opacity: 0;
    transition: opacity 1s ease-in-out;
    padding: 2rem;
    text-align: center;
}

.content.show {
    opacity: 1;
}

@keyframes dot-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.5);
        opacity: 0.5;
    }
}

/* Classes for the animation */
.loading-top.open {
    transform: translateY(-100%);
}

.loading-bottom.open {
    transform: translateY(100%);
}
