/* 
 * Styles for Softinator Recent Scholarly Articles 
 * Custom card matching Journalspress Figma Design
 */

/* Container */
.softinator-recent-articles-heading {
    margin-bottom: 32px;
}

.softinator-recent-articles-kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: #737373;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.softinator-recent-articles-heading h3 {
    margin: 0;
    font-family: "Iowan Old Style", "Palatino Linotype", serif;
    font-size: clamp(1.8rem, 2.5vw, 2.6rem);
    font-weight: 700;
    color: #171717;
    line-height: 1.1;
    transition: color 0.3s ease;
}

.dark-scheme .softinator-recent-articles-heading h3 {
    color: #ffffff;
}

.dark-scheme .softinator-recent-articles-kicker {
    color: rgba(255, 255, 255, 0.7);
}

.softinator-article-card {
    position: relative;
    background-color: #1a1a1a;
    color: #ffffff;
    border-radius: 0px !important;
    overflow: hidden;
    height: 480px;
    display: flex;
    flex-direction: column;
    padding: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Background image stays faint on inactive cards and becomes clear on hover. */
.softinator-article-card .softinator-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.92;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 1;
}

.softinator-article-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--softinator-card-overlay, rgba(17, 16, 19, 0.82));
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.softinator-theme-light {
    --softinator-card-overlay: rgba(238, 238, 238, 0.78);
}

.softinator-theme-dark {
    --softinator-card-overlay: rgba(17, 16, 19, 0.86);
}

/* On card hover, show image clearly and remove overlay. */
.softinator-article-card:hover .softinator-bg-image,
.softinator-active-card .softinator-bg-image {
    opacity: 1;
    transform: scale(1.05);
}

.softinator-article-card:hover::after,
.softinator-active-card::after {
    opacity: 0;
}

/* Inner content */
.softinator-card-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Themes text coloration */
.softinator-theme-dark {
    color: #ffffff;
}

.softinator-theme-light {
    color: #1a1a1a;
}

/* Light Theme Defaults */
.softinator-theme-light .softinator-author-name {
    color: #1a1a1a;
}

.softinator-theme-light .softinator-category-holder a {
    color: #333333;
}

.softinator-theme-dark .softinator-category-holder a {
    color: #ffffff;
}

.softinator-theme-dark .softinator-article-title a {
    color: #ffffff;
}

.softinator-theme-light .softinator-article-title a {
    color: #1a1a1a;
}

.softinator-theme-light .softinator-arrow-btn {
    background-color: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

/* Force text to white on hover across all themes because the background image is dark */
.softinator-article-card:hover .softinator-author-name,
.softinator-article-card:hover .softinator-category-holder a,
.softinator-article-card:hover .softinator-article-title a,
.softinator-article-card:hover .softinator-arrow-btn,
.softinator-article-card:hover .softinator-avatar,
.softinator-active-card .softinator-author-name,
.softinator-active-card .softinator-category-holder a,
.softinator-active-card .softinator-article-title a,
.softinator-active-card .softinator-arrow-btn,
.softinator-active-card .softinator-avatar {
    color: #ffffff;
}

.softinator-article-card:hover .softinator-arrow-btn,
.softinator-active-card .softinator-arrow-btn {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Author Row */
.softinator-author-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.softinator-avatar {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.softinator-author-name {
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
    flex-direction: column;
    display: flex;
}

.softinator-author-name b {
    font-weight: 700;
}

/* Category */
.softinator-category-holder {
    margin-bottom: auto;
}

.softinator-category-holder a {
    font-size: 14px;
    text-decoration: none;
    font-weight: 400;
    opacity: 0.8;
    transition: color 0.3s ease;
}

/* Title / Excerpt */
.softinator-article-title {
    margin-bottom: 0;
}

.softinator-article-title a {
    font-size: 16px;
    font-family: 'PlayfairDisplay-Bold';
    line-height: 1.6;
    text-decoration: none;
    display: block;
    font-weight: 400;
    transition: color 0.3s ease;
}

/* Arrow Button */
.softinator-arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-top: 20px;
    backdrop-filter: blur(5px);
}

/* Stretched link to make the entire box clickable */
.softinator-arrow-btn::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .softinator-article-card {
        height: 420px;
        padding: 24px;
    }
}

@media (max-width: 767px) {
    .softinator-recent-articles-heading {
        margin-bottom: 28px;
    }

    .softinator-article-card {
        height: auto;
        min-height: 360px;
        padding: 24px;
        margin-bottom: 24px;
    }

    .softinator-author-meta {
        margin-bottom: 20px;
        gap: 12px;
    }

    .softinator-avatar {
        width: 36px;
        height: 36px;
    }

    .softinator-avatar svg {
        width: 36px;
        height: 36px;
    }

    .softinator-author-name {
        font-size: 14px;
    }

    .softinator-article-title a {
        font-size: 15px;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .softinator-recent-articles-heading h3 {
        font-size: 1.6rem;
    }

    .softinator-article-card {
        padding: 20px;
        min-height: 320px;
    }

    .softinator-arrow-btn {
        width: 40px;
        height: 40px;
        margin-top: 15px;
    }
}

/* ─── Slick Carousel Slider Styles ─── */
/* Prevent FOUC (Flash of Unstyled Content) before Slick initializes */
.softinator-articles-slider:not(.slick-initialized) {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    gap: 30px !important;
}

.softinator-articles-slider:not(.slick-initialized) > * {
    flex: 0 0 calc(33.333% - 20px) !important;
    max-width: calc(33.333% - 20px) !important;
}

@media (max-width: 1023px) {
    .softinator-articles-slider:not(.slick-initialized) > * {
        flex: 0 0 calc(50% - 15px) !important;
        max-width: calc(50% - 15px) !important;
    }
}

@media (max-width: 767px) {
    .softinator-articles-slider:not(.slick-initialized) {
        gap: 0 !important;
    }
    .softinator-articles-slider:not(.slick-initialized) > * {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

.softinator-articles-slider.slick-initialized {
    display: block !important;
}

.softinator-articles-slider .slick-track {
    display: flex !important;
}

.softinator-articles-slider .slick-slide {
    height: auto !important;
    display: flex !important;
    justify-content: center;
    outline: none;
}

.softinator-slider-slide {
    width: 100%;
    outline: none;
}

/* Custom Navigation Arrows */
.softinator-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
    padding: 0;
}

.softinator-slider-arrow:hover {
    background-color: #111013 !important;
    border-color: #111013 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-50%) scale(1.08);
}

.softinator-prev-arrow {
    left: -27px;
}

.softinator-next-arrow {
    right: -27px;
}

/* Explicit SVG stroke visibility for Slider Arrows */
.softinator-articles-slider .softinator-slider-arrow svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    fill: none !important;
    transition: stroke 0.3s ease;
}

.softinator-articles-slider .softinator-slider-arrow svg path {
    stroke: #111013 !important;
    stroke-width: 2.5px !important;
    transition: stroke 0.3s ease;
}

.softinator-articles-slider .softinator-slider-arrow:hover svg path {
    stroke: #ffffff !important;
}

/* Custom Dots Pagination - Hidden */
.softinator-articles-slider .slick-dots {
    display: none !important;
}

/* Dark Scheme Styles */
.dark-scheme .softinator-slider-arrow {
    background-color: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

.dark-scheme .softinator-slider-arrow:hover {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15) !important;
}

/* Dark Scheme Override for SVG stroke */
.dark-scheme .softinator-articles-slider .softinator-slider-arrow svg path {
    stroke: #ffffff !important;
}

.dark-scheme .softinator-articles-slider .softinator-slider-arrow:hover svg path {
    stroke: #111013 !important;
}

/* Responsive Positioning Adjustments */
@media (max-width: 1400px) {
    .softinator-prev-arrow {
        left: 10px;
    }
    .softinator-next-arrow {
        right: 10px;
    }
}

@media (max-width: 767px) {
    .softinator-articles-slider {
        margin: 0 -15px;
    }
    .softinator-slider-arrow {
        display: none !important; /* Hide arrows on touch screens */
    }
}