/* ===== CATEGORY STYLES - CSS CHUNG CHO CÁC TRANG CATEGORY ===== */

/* Title Animation */
.title-link:hover {
    color: #ffc107 !important;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
    transform: translateY(-2px);
}

.title-link:hover .fas {
    color: #fff !important;
    animation: bounce 0.8s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* Category Title Animation cho trang nhan-dinh-bong-da */
.category-title {
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.category-title:hover {
    transform: scale(1.02);
    color: #28a745 !important;
}

.category-title:hover .fa-futbol {
    animation: bounce-football 0.6s ease infinite;
}

@keyframes bounce-football {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Advanced Prediction Title Animation */
.category-title-prediction {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    padding: 5px 5px 5px 0px !important;
    margin-bottom: 0 !important;
    display: inline-block;
}

.category-title-prediction:hover {
    transform: translateY(-5px);
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.6), 0 0 40px rgba(40, 167, 69, 0.4);
    color: #ffc107 !important;
}

/* Điều chỉnh khoảng cách Hero Section */
.hero-title {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.hero-description {
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.5 !important;
    opacity: 0.9;
}

/* Tối ưu spacing cho hero section */
.hero-section {
    padding-top: 1.0rem !important;
    padding-bottom: 1.0rem !important;
}

.hero-badges {
    margin-top: 0.875rem !important;
}

.category-title-prediction:hover .football-icon {
    animation: bounce-football 0.6s ease infinite;
    color: #fff !important;
    filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.8));
}

.category-title-prediction:hover .title-text {
    animation: title-glow 1.5s ease-in-out infinite alternate;
}

@keyframes football-spin {
    0% { transform: rotate(0deg) translateY(0px); }
    25% { transform: rotate(90deg) translateY(-5px); }
    50% { transform: rotate(180deg) translateY(-8px); }
    75% { transform: rotate(270deg) translateY(-5px); }
    100% { transform: rotate(360deg) translateY(0px); }
}

@keyframes title-glow {
    0% { 
        color: #ffffff;
        text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
    }
    100% { 
        color: #ffc107;
        text-shadow: 0 0 20px rgba(255, 193, 7, 0.8), 0 0 30px rgba(40, 167, 69, 0.6);
    }
}

/* Badge Styles */
.badge-hot {
    background: linear-gradient(45deg, #ff4444, #ff6666);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 2px 4px rgba(255,68,68,0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 2px 4px rgba(255,68,68,0.3); }
    50% { box-shadow: 0 4px 8px rgba(255,68,68,0.6); }
    100% { box-shadow: 0 2px 4px rgba(255,68,68,0.3); }
}

/* Search Form Styles */
.search-form {
    background: rgba(40, 44, 52, 0.9);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.search-form input {
    background: #2c3e50;
    border: 1px solid #28a745;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    width: 100%;
}

.search-form input::placeholder {
    color: #adb5bd;
}

.search-form input:focus {
    border-color: #20c997;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    outline: none;
}

.search-form .form-control:focus {
    border-color: #20c997;
    box-shadow: 0 0 0 0.15rem rgba(23, 162, 184, 0.25);
    background-color: #2d2d2d;
}

.search-form .form-control::placeholder {
    color: #adb5bd;
    opacity: 0.8;
}

.search-form .btn:hover {
    background: linear-gradient(45deg, #20c997, #17a2b8);
    border-color: #20c997;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(23, 162, 184, 0.3);
}

.search-form .input-group {
    transition: all 0.3s ease;
}

.search-form .input-group:hover {
    transform: translateY(-1px);
}

/* ===== PAGINATION STYLES - THIẾT KẾ ĐẸP MẮT VÀ HIỆN ĐẠI ===== */

/* Container cho phân trang */
.pagination-wrapper {
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.95), rgba(45, 45, 45, 0.95));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    margin: 40px 0;
}

/* Styling cho các link phân trang */
.pagination-custom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-custom a,
.pagination-custom span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    min-width: 48px;
    height: 48px;
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    color: #28a745;
    border: 2px solid #28a745;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Hiệu ứng shimmer khi hover */
.pagination-custom a:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(40, 167, 69, 0.3), transparent);
    transition: left 0.6s;
}

.pagination-custom a:hover:before {
    left: 100%;
}

/* Hover effects */
.pagination-custom a:hover {
    background: linear-gradient(145deg, #28a745, #20c997);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(40, 167, 69, 0.4),
        0 4px 15px rgba(40, 167, 69, 0.2);
    border-color: #20c997;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Trang hiện tại */
.pagination-custom .current {
    background: linear-gradient(145deg, #ffc107, #fd7e14) !important;
    color: #000 !important;
    border-color: #ffc107 !important;
    font-weight: 700;
    box-shadow: 
        0 6px 20px rgba(255, 193, 7, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.pagination-custom .current:hover {
    transform: scale(1.1) translateY(-1px);
    box-shadow: 
        0 8px 25px rgba(255, 193, 7, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Dots (dấu ...) - đồng bộ với thiết kế chung */
.pagination-custom .dots {
    color: #6c757d !important;
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f) !important;
    border: 2px solid #495057 !important;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: default;
    border-radius: 12px;
    padding: 12px 16px;
    min-width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pagination-custom .dots:hover {
    background: linear-gradient(145deg, #343a40, #495057) !important;
    color: #adb5bd !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(73, 80, 87, 0.2);
}

/* Nút Trước/Sau */
.pagination-custom a[rel="prev"],
.pagination-custom a[rel="next"] {
    background: linear-gradient(145deg, #0f3460, #1a5490);
    border-color: #17a2b8;
    color: white;
    padding: 12px 20px;
    font-weight: 600;
    min-width: auto;
}

.pagination-custom a[rel="prev"]:hover,
.pagination-custom a[rel="next"]:hover {
    background: linear-gradient(145deg, #17a2b8, #20c997);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(23, 162, 184, 0.4),
        0 4px 15px rgba(23, 162, 184, 0.2);
}

/* Thông tin phân trang */
.pagination-info {
    text-align: center;
    margin-bottom: 20px;
    color: #adb5bd;
    font-size: 0.95rem;
    font-weight: 500;
}

.pagination-info .current-page {
    color: #28a745;
    font-weight: 700;
}

.pagination-info .total-pages {
    color: #ffc107;
    font-weight: 700;
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .pagination-wrapper {
        padding: 20px 15px;
        margin: 30px 0;
    }
    
    .pagination-custom a,
    .pagination-custom span {
        padding: 10px 12px;
        min-width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }
    
    .pagination-custom a[rel="prev"],
    .pagination-custom a[rel="next"] {
        padding: 10px 15px;
    }
    
    .pagination-info {
        font-size: 0.9rem;
    }
}

/* Animation khi load trang */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pagination-wrapper {
    animation: fadeInUp 0.6s ease-out;
}

/* News Item Hover Effects */
.news-item a:hover {
    color: #ffc107 !important;
}

.news-item:hover {
    background: rgba(255,255,255,0.1) !important;
    transform: translateX(3px);
    transition: all 0.3s ease;
}

/* Card Hover Effects */
.card:hover img {
    transform: scale(1.05);
}

.card:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.card-title a:hover {
  color: #28a745 !important;
}

/* Card Title Text Truncation - Giới hạn title 2 dòng */
.card-title {
    margin-bottom: 1rem !important;
}

.card-title a {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-clamp: 2 !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important;
    text-overflow: ellipsis !important;
}

/* Card Body Layout Consistency */
.card-body {
    display: flex !important;
    flex-direction: column !important;
}

/* Card Text (Description) Truncation */
.card-text {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-clamp: 3 !important;
    flex-grow: 1 !important;
    margin-bottom: 1rem !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
}

/* Đảm bảo dấu ... hiển thị cho description */
.card-text.flex-grow-1 {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-clamp: 3 !important;
}

/* Ensure equal card heights */
.card.h-100 {
    height: 100% !important;
}

.btn-outline-success:hover {
  background: linear-gradient(45deg, #28a745, #20c997);
  border-color: transparent;
}

.bg-gradient-dark {
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}

/* Styles cho tính năng Xem tất cả */
.news-item {
  transition: all 0.3s ease;
  cursor: pointer;
}

.hidden-news {
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-item:hover .badge {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

#toggleAllNews {
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.3);
}

#toggleAllNews:hover {
  background: rgba(255,255,255,0.1) !important;
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-1px);
}

.btn-warning {
  background: linear-gradient(45deg, #ffc107, #fd7e14) !important;
  border-color: transparent !important;
  color: #000 !important;
}
