/* custom.css */

/* Navigation Auth Buttons Styles - Using template classes */
.auth {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    grid-gap: 1.5625rem;
    gap: 1.5625rem;
}

.auth__btn {
    color: #d1d1d1;
    color: rgba(var(--color-1), 1);
    font-size: 1rem;
    font-weight: 400;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s;
}

.auth__btn:hover {
    color: #dfc683;
    color: rgba(var(--color-accent), 1);
}

/* Navigation Box Right Alignment */
.navigation__box_side_right {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

/* Navigation Height Adjustment */
.navigation {
    min-height: 60px;
}

/* Responsive Design for Auth Buttons */
@media (max-width: 768px) {
    .navigation__box_side_right .auth {
        display: none;
    }
}

/* Mobile Menu Auth Container */
.menu__el_continer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.menu__el_continer_divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

/* Mobile Menu Auth Items - Only show on mobile */
@media (min-width: 769px) {
    .menu__el_continer {
        display: none !important;
    }
}

/* News Section Styles */
.news__box {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.news__control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.news__btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.news__btns .btn {
    padding: 8px 16px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.news__btns .btn:hover,
.news__btns .btn.active {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-color: #ff6b35;
    transform: translateY(-2px);
}

.news__arrows {
    display: flex;
    gap: 10px;
}

.news__arrow {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.news__arrow:hover {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-color: #ff6b35;
    transform: translateY(-2px);
}

.news__arrow:before {
    content: '';
    width: 8px;
    height: 8px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(-45deg);
}

.news__arrow_prev:before {
    transform: rotate(-135deg);
    margin-left: 2px;
}

.news__arrow_next:before {
    transform: rotate(45deg);
    margin-right: 2px;
}

.news__wrap {
    position: relative;
    overflow: hidden;
}

.news__list {
    position: relative;
}

.news__item {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.news__item-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news__item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news__item:hover .news__item-image img {
    transform: scale(1.05);
}

.news__item-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news__item-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.news__item-excerpt {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
}

.news__item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
    color: #999;
}

.news__item-date {
    color: #ff6b35;
}

.news__item-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.news__item-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
    color: #fff;
    text-decoration: none;
}

/* Post card styles for news index page */
.post {
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.post:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.post:hover::before {
    left: 100%;
}

.post:hover .post__bg {
    transform: scale(1.1);
    filter: brightness(1.1) contrast(1.1);
}

.post__bg {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.post__container {
    position: relative;
    z-index: 2;
}

.post__link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    text-decoration: none;
    color: transparent;
}

.post__btns {
    position: relative;
    z-index: 20;
}

.post__btns .btn {
    pointer-events: none;
}

/* News slider item styles */
.news__item {
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.news__item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.2), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.news__item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 107, 53, 0.3);
}

.news__item:hover::before {
    left: 100%;
}

.news__item:hover .news__img img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.news__img {
    overflow: hidden;
}

.news__img img {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.news__content {
    position: relative;
    z-index: 2;
}

.news__link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    text-decoration: none;
    color: transparent;
}

/* Ensure read more buttons are still accessible */
.post__btns .btn:hover {
    pointer-events: auto;
    z-index: 30;
    position: relative;
}

/* Add visual feedback for clickable cards */
.news-card:hover .news-card__button {
    opacity: 0.8;
}

/* Enhanced news-card animations */
.news-card {
    cursor: pointer !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Ensure cards are visible by default */
    opacity: 1;
    visibility: visible;
    display: block;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.15), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.news-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.news-card:hover::before {
    left: 100%;
}

.news-card:hover .news-card__image img {
    transform: scale(1.15) rotate(1deg);
    filter: brightness(1.2) contrast(1.1);
}

.news-card__image {
    overflow: hidden;
}

.news-card__image img {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card__content {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.news-card:hover .news-card__content {
    transform: translateY(-2px);
}

.news-card:hover .news-card__title {
    color: #ff6b35;
    text-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

.news-card__title {
    transition: all 0.3s ease;
}

/* Pulse animation for new items */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
}

.news-card.new-item {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* News Cards Container */
.news__cards {
    width: 100%;
    opacity: 1;
    visibility: visible;
}

.news-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    opacity: 1;
    visibility: visible;
}

/* News Card Styling - Đồng nhất chiều cao */
.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 420px; /* Chiều cao tối thiểu để đảm bảo đồng nhất */
}

.news-card__image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0; /* Không co lại */
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card__content {
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0 0 8px 8px;
    display: flex;
    flex-direction: column;
    flex: 1; /* Chiếm hết không gian còn lại */
    justify-content: space-between;
}

.news-card__title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    flex-shrink: 0; /* Không co lại */
}

.news-card__excerpt {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1; /* Chiếm không gian còn lại */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Giới hạn 4 dòng */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.news-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
    flex-shrink: 0; /* Không co lại */
}

.news-card__date {
    color: #999;
}

.news-card__type {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.news-card__button {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.news-card__button:hover {
    background: linear-gradient(135deg, #f7931e, #ff6b35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Logo Override */
.logo {
    max-width: none !important;
}

.logo__img {
    width: 9rem !important;
    max-width: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .news__control {
        flex-direction: column;
        gap: 20px;
        padding: 0 10px;
    }

    .news__btns {
        justify-content: center;
    }

    .news__item-content {
        padding: 15px;
    }

    .news__item-title {
        font-size: 16px;
    }

    .news__item-excerpt {
        font-size: 13px;
    }

    /* Responsive cho news cards */
    .news-card {
        min-height: 380px; /* Giảm chiều cao trên mobile */
    }

    .news-card__image {
        height: 180px; /* Giảm chiều cao hình ảnh */
    }

    .news-card__content {
        padding: 15px;
    }

    .news-card__title {
        font-size: 16px;
    }

    .news-card__excerpt {
        font-size: 13px;
        -webkit-line-clamp: 3; /* Giảm xuống 3 dòng trên mobile */
    }
}
