/**
 * News Page Styles
 */

/* Main Container */
.news-page-container {
    width: 100%;
    /* max-width: 1200px; */
    margin: 0 auto;
}

p.no-news {
    text-align: center;
    width: 100%;
    grid-column: 2;
}

/* Search Section */
.news-search-section {
    margin-bottom: 50px;
}

.news-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.news-search-input {
    width: 100% !important;
    max-width: 100%;
    display: block;
    background: #D9D9D9;
    border: none !important;
    border-radius: 14px !important;
    padding: 16px 24px !important;
    font-size: 16px;
    color: #000;
    outline: none !important;
    text-align: center;
    font-style: italic;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.news-search-input:focus {
    border: none !important;
    box-shadow: none !important;
    background: #c9c9c9;
}

.news-search-input::placeholder {
    color: #fff;
    text-align: center;
}

/* News Grid */
.news-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.news-card-wrapper {
    position: relative;
    overflow: hidden;
    flex: 0 1 calc((100% - 80px) / 3); /* 3 columns with 40px gap */
}

/* News Card */
.news-card {
    position: relative;
    height: 100%;
    display: block;
    background: #000;
    overflow: hidden;
}

.news-card a {
    display: block;
    position: relative;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Card Image */
.news-card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #1a1a1a;
}

.news-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease!important;
}

/* Card Content */
.news-card-content {
    position: absolute;
    bottom: 0%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    padding: 20px;
    color: #fff;
    z-index: 2;
    text-align: center;
}

.news-card-category {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
    font-weight: 400;
}

.news-card-title {
    font-size: 18px !important;
    font-weight: 700!important;
    margin: 0 0 12px 0;
    line-height: 1.2;
    color: #fff !important;
    text-transform: uppercase;
}

.news-card-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 300;
}

/* Overlay Effect */
.news-card .overlay-nb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 51.89%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 1;
    transition: background 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

/* Hover Effects */
.news-card:hover .news-card-image {
    transform: scale(1.05);
}

.news-card:hover .overlay-nb {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.9) 100%);
}

/* See More Button */
.see_more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 40px auto 0;
    text-decoration: none;
    color: #000;
    cursor: pointer;
    transition: transform 0.3s ease;
    max-width: 200px;
    margin: 70px auto 0 auto;
}

.see_more:hover {
    transform: translateY(5px);
}

.seemore_text {
    font-size: 30px;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.see_more svg {
    transition: transform 0.3s ease;
}

.see_more:hover svg {
    transform: scale(1.1);
}

/* Loading Spinner */
.nb_loader {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.spinner {
    display: flex;
    gap: 5px;
}

.spinner i {
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.spinner i:nth-child(1) { animation-delay: -0.32s; }
.spinner i:nth-child(2) { animation-delay: -0.16s; }
.spinner i:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* No Results Message */
.no-news {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

/* Fade-in Animation (matching work page) */
.news-grid.fade-in-up2 {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.news-grid.active.fade-in-up2 {
    animation: fadeInUp2 0.5s ease-out;
    opacity: 1;
}

@keyframes fadeInUp2 {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .news-grid {
        gap: 20px;
    }

    .news-card-wrapper {
        flex: 0 1 calc((100% - 20px) / 2); /* 2 columns with 20px gap */
    }
    
    .news-page-container {
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    .news-grid {
        gap: 20px;
    }

    .news-card-wrapper {
        flex: 0 1 100%; /* Single column */
    }
    
    .news-search-input {
        padding: 14px 20px !important;
        font-size: 15px;
    }
    
    .news-card-title {
        font-size: 18px !important;
    }
    
    .news-card-category {
        font-size: 9px;
        letter-spacing: 1.5px;
    }
    
    .news-card-date {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .news-search-input {
        padding: 12px 16px !important;
        font-size: 14px;
    }
    
    .news-card-title {
        font-size: 16px !important;
    }
    
    .news-card-category {
        font-size: 8px;
        letter-spacing: 1px;
    }
    
    .news-card-date {
        font-size: 10px;
    }
    
    .news-page-container {
        padding: 20px 15px;
    }
}

/* Container Visibility */
.news_container_main,
.news_search_result {
    transition: opacity 0.3s ease;
}

.news_search_result {
    display: none;
}
