﻿/* ===== article-showcase.css ===== */
.ra-container {
    direction: rtl;
    position: relative;
    overflow: hidden;
    padding: 0 var(--space-xs);
    box-sizing: border-box;
    background-image: var(--default-bg-image);
    background-color: var(--main-bg-color);
    background-blend-mode: multiply;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    margin: var(--space-xl) 0;
    /*max-height: 530px;*/
    transition: max-height 0.5s cubic-bezier(0.1, 0, 0.1, 1);
}

    .ra-container.expanded {
        max-height: 10000px;
    }

    .ra-container:not(.expanded)::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 80px;
        /*background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--main-bg-color) 100%);*/
        pointer-events: none;
        z-index: 5;
    }

.articles-container {
    position: relative;
    min-height: 300px;
}

/* ===== HEADER & FOOTER ===== */
.ra-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: var(--space-md) var(--space-sm);
    border-bottom: 1px solid var(--border-light);
}

.ra-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--dark);
    margin: 0;
    cursor: pointer !important;
    line-height: var(--leading-display);
    margin-left: var(--space-sm);
}

.ra-view-all {
    color: var(--antique-gold);
    text-decoration: none;
    font-weight: var(--font-semibold);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: var(--transition);
    font-size: var(--text-base);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius);
}

    .ra-view-all:hover {
        color: var(--success);
        background: var(--secondary-bg-light);
        transform: translateX(-2px);
    }

        .ra-view-all:hover .article-count {
            background: linear-gradient(135deg, var(--success), var(--turquoise-green));
            transform: translateY(-1px) scale(1.05);
            box-shadow: 0 4px 12px rgba(44, 62, 44, 0.4);
        }
.ra-categories-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 0;
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding-top:var(--space-md);
}

/* ===== FILTER COMPONENTS ===== */
.ra-category-filter {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    margin: 0 var(--space-xs) var(--space-xs) 0;
    border-radius: 30px;
    background: var(--success-100);
    color: var(--secondary);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: var(--text-xs);
}

    .ra-category-filter.active {
        background: var(--secondary);
        color: var(--light);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(93, 78, 71, 0.3);
    }

    .ra-category-filter:hover:not(.active) {
        background: var(--hover-gray);
        color: var(--secondary);
        transform: translateY(-1px);
    }

/* ===== CARD COMPONENTS ===== */
.ra-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: rgb(255,255,255,0.05);
    background-blend-mode: multiply;
    height: 100%;
    border: 1px solid var(--secondary-bg-light);
    margin: 0 var(--space-xs);
    width: 280px;
    max-width: 100%;
    display: block;
    position: relative;
}

    .ra-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(195, 225, 215, 0.9);
        border-color: var(--success-100);
    }

    .ra-card a {
        text-decoration: none !important;
        cursor: pointer !important;
    }

.ra-title-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: var(--space-sm);
    cursor: pointer !important;
}

.ra-image {
    height: 160px;
    overflow: hidden;
    position: relative;
}

    .ra-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
        object-position:top center;
    }

.ra-card:hover .ra-image img {
    transform: scale(1.08);
}

.ra-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    cursor: pointer !important;
    height: calc(100% - 160px);
}

.ra-card-title {
    margin: 0 0 var(--space-md) 0;
    font-size: var(--text-base);
    line-height: var(--leading-tight);
    font-weight: var(--font-bold);
    color: var(--primary);
    text-align: right;
    transition: var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ra-card:hover .ra-card-title {
    color: var(--secondary-h);
}

.ra-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: var(--text-xs);
    color: var(--gray);
    margin-bottom: var(--space-md);
    text-align: right;
}

.ra-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: var(--font-medium);
}

.ra-summary {
    color: var(--gray);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-md);
    text-align: right;
    font-size: var(--text-base);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* ===== CATEGORIES ===== */
.ra-categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: auto;
}

    .ra-categories a {
        text-decoration: none;
    }

.ra-category {
    display: inline-block;
    background: var(--success-100);
    color: var(--secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 20px;
    font-weight: var(--font-medium);
    font-size: var(--text-xs);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

    .ra-category:hover {
        background: var(--secondary);
        color: var(--light);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(93, 78, 71, 0.2);
    }

/* ===== SWIPER COMPONENTS ===== */
.ra-swiper-container {
    padding: var(--space-md) 0;
    position: relative;
}

.ra-swiper {
    padding: var(--space-sm);
    margin: 0 calc(-1 * var(--space-sm));
    overflow: visible;
}

    .ra-swiper .swiper-wrapper {
        box-sizing: content-box;
    }

    .ra-swiper .swiper-slide {
        width: auto;
        max-width: 100%;
        height: auto;
    }

/* ===== NAVIGATION ===== */
.ra-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--secondary-bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    z-index: 10;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.7;
    border: 1px solid var(--border-light);
}

    .ra-nav:hover {
        background: var(--secondary);
        color: var(--light);
        transform: translateY(-50%) scale(1.1);
        opacity: 1;
    }

.ra-prev {
    right: -20px;
}

.ra-next {
    left: -20px;
}



/* ===== SHOW MORE BUTTON ===== */
.ra-show-more-container {
    position: absolute;
    bottom: var(--space-sm);
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.ra-show-more-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--secondary);
    cursor: pointer;
    color: var(--secondary);
    padding: var(--space-sm);
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

    .ra-show-more-btn:hover {
        background: var(--secondary);
        color: var(--light);
        transform: translateY(2px);
    }

    .ra-show-more-btn svg {
        transition: transform 0.3s ease;
    }

.ra-container.expanded .ra-show-more-btn svg {
    transform: rotate(180deg);
}

/* ===== LOADING STATES ===== */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--border-radius);
    backdrop-filter: blur(4px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .ra-card {
        width: 260px;
    }

    .ra-image {
        height: 150px;
    }

    .ra-content {
        height: calc(100% - 150px);
        padding: var(--space-md);
    }
}

@media (max-width: 992px) {
    .ra-container {
    }

    .ra-card {
        width: 240px;
    }

    .ra-card-title {
        font-size: var(--text-base);
    }

    .ra-summary {
        font-size: var(--text-sm);
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 768px) {
    .ra-container {
        margin: var(--space-lg) 0;
    }

    .ra-header {
        padding: var(--space-sm);
    }

    .ra-title {
        font-size: var(--text-base);
    }

    .ra-view-all {
        font-size: var(--text-sm);
    }

    .ra-card {
        width: 220px;
        margin: 0 var(--space-xs);
    }

    .ra-image {
        height: 140px;
    }

    .ra-content {
        height: calc(100% - 140px);
        padding: var(--space-sm);
    }

    .ra-nav {
        width: 36px;
        height: 36px;
    }

    .ra-prev {
        right: -15px;
    }

    .ra-next {
        left: -15px;
    }
}

@media (max-width: 576px) {
    .ra-container {
        padding: 0 var(--space-xs);
    }

    .ra-header {
    }

    .ra-categories-footer {
        justify-content: flex-start;
        gap: var(--space-xs);
    }

    .ra-category-filter {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--text-xs);
        margin: 0 var(--space-xs) var(--space-xs) 0;
    }

    .ra-card {
        width: 200px;
    }

    .ra-image {
        height: 120px;
    }

    .ra-content {
        height: calc(100% - 120px);
        padding: var(--space-sm);
    }

    .ra-card-title {
        /*font-size: var(--text-sm);*/
        margin-bottom: var(--space-sm);
        -webkit-line-clamp: 2;
    }

    .ra-meta {
        gap: var(--space-sm);
        margin-bottom: var(--space-sm);
    }

    .ra-summary {
        -webkit-line-clamp: 2;
        margin-bottom: var(--space-md);
    }

    .ra-nav {
        width: 32px;
        height: 32px;
        opacity: 0.8;
    }

    .ra-show-more-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .ra-container {
    }

    .ra-card {
        width: 180px;
    }

    .ra-image {
        height: 100px;
    }

    .ra-content {
        height: calc(100% - 100px);
        padding: var(--space-xs);
    }

    .ra-card-title {
        /*font-size: var(--text-xs);*/
        -webkit-line-clamp: 2;
    }

    .ra-summary {
        display: none; /* Hide summary on very small screens */
    }

    .ra-nav {
        width: 28px;
        height: 28px;
    }

    .ra-prev {
        right: -10px;
    }

    .ra-next {
        left: -10px;
    }
}

/* Animation for card entrance */
@keyframes slideInArticle {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.swiper-slide-active .ra-card {
    animation: slideInArticle 0.6s ease-out;
}

/* ===== ARTICLE BADGES ===== */
.ra-article-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    animation: ra-slideInBadge 0.6s ease-out;
}

/* Brand New Badge (<= 7 days) - More prominent */
.ra-brandNew-badge span {
    background: linear-gradient(135deg, var(--soft-gold-1), var(--pale-gold));
    color: var(--antique-gold);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(156, 124, 90, 0.4);
    line-height: 1;
    white-space: nowrap;
    position: relative;
    animation: ra-pulse 2s infinite;
}

/* New Badge (<= 30 days) - Standard style */
.ra-new-badge {
    display: flex;
    align-items: center;
}

    .ra-new-badge span {
        background: linear-gradient(135deg, var(--success-400), var(--success-500));
        color: var(--light);
        font-size: var(--text-xs);
        font-weight: var(--font-bold);
        padding: var(--space-xs) var(--space-sm);
        border-radius: 4px 0 0 4px;
        text-align: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        line-height: 1;
        white-space: nowrap;
    }

.ra-badge-shadow {
    border: 4px solid var(--success-700);
    border-right: 4px solid transparent;
    border-bottom: 4px solid transparent;
    width: 0;
    height: 0;
}

/* Ensure the image container has relative positioning */
.ra-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

/* Animations */
@keyframes ra-slideInBadge {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ra-pulse {
    0%, 100% {
        box-shadow: 0 2px 12px rgba(156, 124, 90, 0.4);
    }

    50% {
        box-shadow: 0 2px 20px rgba(156, 124, 90, 0.8);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ra-article-badge {
        top: 8px;
        right: 8px;
    }

    .ra-brandNew-badge span,
    .ra-new-badge span {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    .ra-badge-shadow {
        border-width: 3px;
    }
}

@media (max-width: 480px) {
    .ra-article-badge {
        top: 6px;
        right: 6px;
    }

    .ra-brandNew-badge span,
    .ra-new-badge span {
        font-size: 0.65rem;
        padding: 1px 4px;
    }

    /* Reduce animation on mobile for performance */
    .ra-brandNew-badge span {
        animation: none;
    }
}