/**
 * News Cards Component CSS
 * Sistema de cards para News/Changelog
 */

/* ===========================================
   FIX ELEMENTOR OVERLAY BLOCKING CLICKS
   (Regras principais movidas para newStyle.css)
   =========================================== */
.elementor-element-3cb6c6a .elementor-background-overlay {
    pointer-events: none !important;
}

/* ===========================================
   NEWS CARDS CONTAINER
   =========================================== */
.news-cards-section {
    max-width: 1600px;
    margin: 60px auto 0 auto;
    padding: 0 20px 40px 20px;
    position: relative;
    z-index: 10;
}

/* Section Title */
.news-cards-section__title {
    text-align: center;
    margin-bottom: 30px;
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.news-cards-section__title span {
    color: #ff6666;
}

/* ===========================================
   FILTER TABS
   =========================================== */
.news-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1000;
}

.news-filter-tab {
    padding: 12px 32px;
    background: linear-gradient(180deg, rgba(60, 30, 30, 0.95) 0%, rgba(40, 20, 20, 0.95) 100%);
    border: 2px solid rgba(139, 69, 19, 0.6);
    border-radius: 25px;
    color: #c9a55c;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
    position: relative;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
    pointer-events: auto !important;
}

.news-filter-tab:hover {
    color: #fff;
    background: linear-gradient(180deg, rgba(139, 0, 0, 0.9) 0%, rgba(80, 20, 20, 0.95) 100%);
    border-color: #c9a55c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.news-filter-tab.active {
    background: linear-gradient(180deg, rgba(139, 0, 0, 1) 0%, rgba(100, 20, 20, 1) 100%);
    color: #fff;
    border-color: #c9a55c;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.6),
                0 0 20px rgba(201, 165, 92, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ===========================================
   SEARCH BAR
   =========================================== */
.news-search-container {
    max-width: 800px;
    margin: 0 auto 30px auto;
    position: relative;
    z-index: 1000;
}

.news-search-input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    pointer-events: auto !important;
}

.news-search-input::placeholder {
    color: #666;
}

.news-search-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.news-search-icon {
    display: none;
}

/* ===========================================
   CARDS GRID
   =========================================== */
.news-cards-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #444 #222;
    position: relative;
    z-index: 100;
}

.news-cards-grid::-webkit-scrollbar {
    height: 8px;
}

.news-cards-grid::-webkit-scrollbar-track {
    background: #222;
    border-radius: 4px;
}

.news-cards-grid::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.news-cards-grid::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===========================================
   INDIVIDUAL CARD
   =========================================== */
.news-card {
    flex: 0 0 auto;
    width: 280px;
    height: 280px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid rgba(100, 100, 100, 0.5);
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: rgba(180, 50, 50, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.news-card.active,
.news-card:focus {
    border-color: rgba(200, 50, 50, 1);
    box-shadow: 0 0 0 4px rgba(200, 50, 50, 0.3);
}

/* Card Background Image */
.news-card__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card__bg {
    transform: scale(1.05);
}

/* Gradient Overlay */
.news-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.95) 100%
    );
    z-index: 1;
}

/* Card Content */
.news-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
}

.news-card__title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
    /* Estilo especial para titulos tipo "Christmas is here!" */
    font-family: 'Georgia', serif;
}

.news-card__title--special {
    color: #ff4444;
    text-transform: uppercase;
    font-size: 20px;
    letter-spacing: 1px;
}

.news-card__description {
    margin: 0 0 15px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Footer */
.news-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-card__date {
    display: flex;
    flex-direction: column;
}

.news-card__date-day {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    line-height: 1;
}

.news-card__date-month {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: capitalize;
}

.news-card__readmore {
    color: #ff6666;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-card__readmore:hover {
    color: #ff8888;
    text-decoration: underline;
}

/* ===========================================
   CATEGORY BADGE
   =========================================== */
.news-card__category {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.news-card__category--news {
    color: #ff6666;
    border: 1px solid rgba(255, 100, 100, 0.5);
}

.news-card__category--changelog {
    color: #66aaff;
    border: 1px solid rgba(100, 150, 255, 0.5);
}

/* ===========================================
   EMPTY STATE
   =========================================== */
.news-cards-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.news-cards-empty__icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.news-cards-empty__text {
    font-size: 16px;
}

/* ===========================================
   LOADING STATE
   =========================================== */
.news-card--loading {
    background: rgba(30, 30, 30, 0.8);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1200px) {
    .news-card {
        width: 260px;
        height: 260px;
    }
}

@media (max-width: 768px) {
    .news-cards-section {
        padding: 15px;
    }

    .news-filter-tabs {
        flex-wrap: wrap;
    }

    .news-filter-tab {
        padding: 8px 20px;
        font-size: 13px;
    }

    .news-card {
        width: 240px;
        height: 240px;
    }

    .news-card__title {
        font-size: 16px;
    }

    .news-search-input {
        padding: 12px 15px 12px 45px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .news-card {
        width: 220px;
        height: 220px;
    }

    .news-card__content {
        padding: 15px;
    }

    .news-card__date-day {
        font-size: 20px;
    }
}

/* ===========================================
   PAGINATION
   =========================================== */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding: 15px 0;
}

.news-pagination__btn {
    padding: 10px 20px;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-pagination__btn:hover:not(:disabled) {
    background: rgba(60, 60, 60, 0.95);
    border-color: rgba(255, 100, 100, 0.5);
}

.news-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.news-pagination__pages {
    display: flex;
    gap: 8px;
}

.news-pagination__page {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #888;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-pagination__page:hover {
    color: #fff;
    background: rgba(60, 60, 60, 0.95);
}

.news-pagination__page.active {
    background: rgba(180, 50, 50, 0.8);
    border-color: rgba(200, 50, 50, 1);
    color: #fff;
}

@media (max-width: 768px) {
    .news-pagination {
        flex-wrap: wrap;
        gap: 10px;
    }

    .news-pagination__btn {
        padding: 8px 15px;
        font-size: 13px;
    }

    .news-pagination__page {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* ===========================================
   DEFAULT IMAGES
   =========================================== */
.news-card--default-news .news-card__bg {
    background-image: url('../img/newsheadline_background.png');
}

.news-card--default-changelog .news-card__bg {
    background-image: url('../img/newsheadline_background.png');
}
