/* ========================================================================== 
   NINO SEPO — Journal Post Card
   Shortcode: [ninosepo_post_card]
   ========================================================================== */

.ninosepo-post-card {
    --post-card-black: #080808;
    --post-card-panel: #0d0d0d;
    --post-card-white: #fff;
    --post-card-muted: rgba(255, 255, 255, 0.62);
    --post-card-line: rgba(255, 255, 255, 0.17);
    --post-card-accent: #bfa36a;

    position: relative;

    width: 100%;
    height: 100%;
    min-width: 0;

    overflow: hidden;

    color: var(--post-card-white);
    background: var(--post-card-black);

    border: 1px solid var(--post-card-line);

    transition:
        border-color 300ms ease,
        transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}


.ninosepo-post-card,
.ninosepo-post-card * {
    box-sizing: border-box;
}


/*
 * Elementor wraps every Loop item in several containers. Stretch the entire
 * wrapper chain so cards in the same grid row inherit one equal height.
 */
.elementor-loop-container .e-loop-item:has(.ninosepo-post-card),
.elementor-loop-container .e-loop-item:has(.ninosepo-post-card) > .elementor-element,
.elementor-loop-container .e-loop-item:has(.ninosepo-post-card) .elementor-widget-shortcode,
.elementor-loop-container .e-loop-item:has(.ninosepo-post-card) .elementor-widget-shortcode > .elementor-widget-container {
    height: 100%;
    min-height: 0;
}


.elementor-loop-container .e-loop-item:has(.ninosepo-post-card),
.elementor-loop-container .e-loop-item:has(.ninosepo-post-card) > .elementor-element,
.elementor-loop-container .e-loop-item:has(.ninosepo-post-card) .elementor-widget-shortcode > .elementor-widget-container {
    display: flex;
    flex-direction: column;
}


.elementor-loop-container .e-loop-item:has(.ninosepo-post-card) .ninosepo-post-card {
    flex: 1 1 auto;
}


.ninosepo-post-card__link {
    display: flex;
    flex-direction: column;

    width: 100%;
    height: 100%;

    color: inherit !important;
    background: transparent;
    text-decoration: none !important;
}


/* ========================================================================== 
   FEATURED IMAGE
   ========================================================================== */

.ninosepo-post-card__media {
    position: relative;
    isolation: isolate;

    flex: 0 0 auto;

    width: 100%;
    aspect-ratio: 4 / 5;
    margin: 0;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 42%,
            #232323 0%,
            #111 54%,
            #080808 100%
        );
}


.ninosepo-post-card__image--backdrop {
    position: absolute;
    z-index: 0;
    inset: -10%;

    display: block;

    width: 120% !important;
    max-width: none !important;
    height: 120% !important;

    object-fit: cover;
    object-position: center;

    filter:
        blur(18px)
        brightness(0.58)
        saturate(1.12);

    opacity: 0.94;
    transform: scale(1.08);

    pointer-events: none;
    user-select: none;

    transition:
        filter 800ms ease,
        opacity 800ms ease,
        transform 1000ms cubic-bezier(0.22, 1, 0.36, 1);
}


.ninosepo-post-card__media::before {
    position: absolute;
    z-index: 1;
    inset: 0;

    content: "";
    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(8, 8, 8, 0.12) 0%,
            transparent 30%,
            transparent 70%,
            rgba(8, 8, 8, 0.12) 100%
        );
}


.ninosepo-post-card__image:not(.ninosepo-post-card__image--backdrop) {
    position: absolute;
    z-index: 2;
    inset: 0;

    display: block;

    width: 100% !important;
    max-width: none !important;
    height: 100% !important;

    object-fit: contain;
    object-position: center;

    background: transparent;

    filter:
        drop-shadow(0 18px 34px rgba(0, 0, 0, 0.28));

    transform: scale(1);

    transition:
        filter 700ms ease,
        transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}


.ninosepo-post-card__media-inner-frame {
    position: absolute;
    z-index: 3;
    inset: 8px;

    border: 1px solid rgba(255, 255, 255, 0.055);

    pointer-events: none;
}


/* Smooth transition from artwork into the information panel. */

.ninosepo-post-card__media::after {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: 0;
    left: 0;

    height: 46px;

    content: "";
    pointer-events: none;

    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(8, 8, 8, 0.12) 52%,
        var(--post-card-black) 100%
    );
}


.ninosepo-post-card__placeholder {
    position: absolute;
    z-index: 2;
    inset: 0;

    display: grid;
    place-items: center;

    color: rgba(255, 255, 255, 0.25);

    font-size: clamp(20px, 2vw, 30px);
    font-weight: 300;
    letter-spacing: 0.18em;
}


/* ========================================================================== 
   CONTENT
   ========================================================================== */

.ninosepo-post-card__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    min-height: 276px;
    padding: clamp(22px, 1.8vw, 30px);

    background: var(--post-card-black);
}


.ninosepo-post-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 20px;

    color: var(--post-card-muted);

    font-size: 9px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}


.ninosepo-post-card__category {
    color: var(--post-card-white);
}


.ninosepo-post-card__meta-separator {
    width: 26px;
    height: 1px;

    background: rgba(255, 255, 255, 0.28);
}


.ninosepo-post-card__title {
    display: -webkit-box;

    min-height: 2.06em;
    margin: 0;

    overflow: hidden;

    color: var(--post-card-white) !important;

    font-family: inherit;
    font-size: clamp(26px, 1.9vw, 38px);
    font-weight: 300;
    line-height: 1.03;
    letter-spacing: -0.04em;

    overflow-wrap: anywhere;
    text-wrap: balance;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


.ninosepo-post-card__excerpt {
    display: -webkit-box;

    min-height: 3.3em;
    max-width: 48ch;
    margin: 16px 0 0;

    overflow: hidden;

    color: rgba(255, 255, 255, 0.68) !important;

    font-family: inherit;
    font-size: 12px;
    line-height: 1.65;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


.ninosepo-post-card__action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin-top: auto;
    padding-top: 24px;

    color: var(--post-card-muted);

    font-size: 9px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}


.ninosepo-post-card__arrow {
    color: var(--post-card-white);

    font-size: 16px;

    transition:
        transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}


/* ========================================================================== 
   INTERACTION
   ========================================================================== */

.ninosepo-post-card:hover {
    border-color: rgba(191, 163, 106, 0.62);
}


.ninosepo-post-card:hover .ninosepo-post-card__image--backdrop {
    filter:
        blur(16px)
        brightness(0.64)
        saturate(1.18);

    opacity: 0.92;
    transform: scale(1.13);
}


.ninosepo-post-card:hover
.ninosepo-post-card__image:not(.ninosepo-post-card__image--backdrop) {
    filter:
        drop-shadow(0 22px 42px rgba(0, 0, 0, 0.34));

    transform: scale(1.018);
}


.ninosepo-post-card:hover .ninosepo-post-card__arrow {
    transform: translateX(5px);
}


.ninosepo-post-card__link:focus-visible {
    outline: 1px solid var(--post-card-accent);
    outline-offset: -5px;
}


.ninosepo-post-card--no-excerpt .ninosepo-post-card__action {
    padding-top: 36px;
}


/* ========================================================================== 
   MOBILE
   ========================================================================== */

@media (max-width: 767px) {

    .ninosepo-post-card__media {
        aspect-ratio: 4 / 5;
    }


    .ninosepo-post-card__image--backdrop {
        inset: -8%;

        width: 116% !important;
        height: 116% !important;

        filter:
            blur(16px)
            brightness(0.58)
            saturate(1.08);
    }


    .ninosepo-post-card__media-inner-frame {
        inset: 6px;
    }


    .ninosepo-post-card__media::after {
        height: 42px;
    }


    .ninosepo-post-card__content {
        min-height: 230px;
        padding: 24px 22px;
    }


    .ninosepo-post-card__title {
        min-height: 0;
        font-size: clamp(32px, 10vw, 48px);
    }


    .ninosepo-post-card__excerpt {
        min-height: 0;
    }
}


/* ========================================================================== 
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .ninosepo-post-card,
    .ninosepo-post-card__image,
    .ninosepo-post-card__image--backdrop,
    .ninosepo-post-card__arrow {
        transition: none !important;
    }
}
