/**
 * News Card CSS - Unified Component
 * Created by: Stelios Mparmpounis
 *
 * Path: hello-elementor-child/ui/assets/css/news.css
 *
 * Covers: .psng-card (archive, carousel, related)
 *         .psng-archive (grid + load more)
 *         .psng-carousel (swiper wrapper)
 *         .psng-related (single post related)
 */

/* ═══════════════════════════════════════
   Tokens
   ═══════════════════════════════════════ */
:root {
    --psng-red: var(--e-global-color-primary, #9C0000);
    --psng-dark: #060606;
    --psng-gray: #7A7A7A;
    --psng-border: #D4BCBC;
    --psng-radius: 8px;
}

/* ═══════════════════════════════════════
   Card — Base
   ═══════════════════════════════════════ */
.psng-card {
    background: #fff;
    border-radius: var(--psng-radius);
    border: 0.5px solid var(--psng-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow .25s ease, transform .2s ease;
}

.psng-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
    transform: translateY(-3px);
}

/* ── Thumbnail ── */
.psng-card__thumb-link {
    display: block;
}

.psng-card__thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.psng-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.psng-card:hover .psng-card__thumb img {
    transform: scale(1.04);
}

.psng-card__thumb--empty {
    aspect-ratio: 16 / 10;
    background: #F0E8E8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.psng-card__thumb--empty img {
    width: 80px !important;
    height: 80px !important;
    object-fit: contain;
    opacity: .5;
}

/* ── Body ── */
.psng-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* ── Date ── */
.psng-card__date {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--psng-red);
    display: block;
}

/* ── Title ── */
.psng-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.psng-card__title a {
    color: var(--psng-dark);
    text-decoration: none;
    transition: color .2s;
}

.psng-card__title a:hover {
    color: var(--psng-red);
}

/* ── Excerpt ── */
.psng-card__excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: var(--psng-gray);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* ── CTA ── */
.psng-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--psng-red);
    text-decoration: none;
    padding: 8px 16px 8px 8px;
    border-radius: var(--psng-radius);
    border: 1px solid var(--psng-red);
    align-self: flex-start;
    margin-top: auto;
    transition: background .2s, color .2s;
}

.psng-card__cta:hover {
    background: var(--psng-red);
    color: #fff;
}

.psng-card__cta-icon {
    background: var(--psng-red);
    border-radius: 50px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s;
}

.psng-card__cta:hover .psng-card__cta-icon {
    background: #fff;
}

.psng-card__cta-icon svg {
    fill: #fff;
    width: 12px;
    height: 12px;
}

.psng-card__cta:hover .psng-card__cta-icon svg {
    fill: var(--psng-red);
}

/* ── Empty ── */
.psng-card-empty {
    color: var(--psng-gray);
    text-align: center;
    padding: 48px 0;
}

/* ═══════════════════════════════════════
   Archive Grid
   ═══════════════════════════════════════ */
.psng-archive__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .psng-archive__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .psng-archive__grid {
        grid-template-columns: 1fr;
    }
}

/* ── Load More ── */
.psng-archive__more {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.psng-load-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--psng-red);
    background: transparent;
    border: 1px solid var(--psng-red);
    padding: 12px 28px 12px 20px;
    border-radius: var(--psng-radius);
    cursor: pointer;
    transition: background .2s, color .2s;
}

.psng-load-more:hover {
    background: var(--psng-red);
    color: #fff;
}

.psng-load-more__icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.psng-load-more--loading .psng-load-more__icon {
    animation: psng-spin 1s linear infinite;
}

@keyframes psng-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ═══════════════════════════════════════
   Carousel (Swiper)
   ═══════════════════════════════════════ */
.psng-carousel {
    position: relative;
    width: 100%;
}

.psng-carousel .swiper-button-prev,
.psng-carousel .swiper-button-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--psng-red);
    background: transparent;
    backdrop-filter: blur(10px);
    color: var(--psng-red);
    transition: background .2s, color .2s;
    top: 40%;
}

.psng-carousel .swiper-button-prev::after,
.psng-carousel .swiper-button-next::after {
    font-size: 13px;
    font-weight: 700;
}

.psng-carousel .swiper-button-prev {
    left: 0;
}

.psng-carousel .swiper-button-next {
    right: 0;
}

.psng-carousel .swiper-button-prev:hover,
.psng-carousel .swiper-button-next:hover {
    background: var(--psng-red);
    color: #fff;
}

.psng-carousel .swiper-button-disabled {
    opacity: .3 !important;
    pointer-events: none;
}

/* ═══════════════════════════════════════
   Related Posts
   ═══════════════════════════════════════ */
.psng-related {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 2px solid var(--psng-red);
}

.psng-related__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--psng-red);
    margin: 0 0 24px;
}

.psng-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

@media (max-width: 600px) {
    .psng-related__grid {
        grid-template-columns: 1fr;
    }
}