/* =============================================================
   ACN Related Articles — Stylesheet
   Supports: vertical (list) | horizontal (grid) | carousel
   ============================================================= */

/* ── Section wrapper ── */
.acn-related-articles {
    margin-top: 40px;
    margin-bottom: 40px;
}

.acn-related-articles__heading {
    margin: 0 0 20px;
    font-size: 1.4rem;
    line-height: 1.3;
    /* accent color applied via inline style from plugin settings */
}

/* ── Shared thumbnail link ── */
.acn-related-articles__thumb-link {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    text-decoration: none;
    flex-shrink: 0;
}

/* ── Shared image ── */
.acn-related-articles__thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.acn-related-articles__thumb-link:hover .acn-related-articles__thumb {
    transform: scale(1.04);
}

.acn-related-articles__thumb--placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: #e5e5e5;
}

/* ── Shared content area ── */
.acn-related-articles__content {
    flex: 1;
    min-width: 0;
}

.acn-related-articles__title {
    margin: 0 0 4px;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
}

.acn-related-articles__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.acn-related-articles__title a:hover {
    text-decoration: underline;
    /* accent color applied via inline style */
}

.acn-related-articles__excerpt {
    margin: 4px 0 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #666;
}


/* =============================================================
   VERTICAL — stacked list (thumbnail left, content right)
   ============================================================= */

.acn-related-articles--vertical .acn-related-articles__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.acn-related-articles--vertical .acn-related-articles__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.acn-related-articles--vertical .acn-related-articles__thumb-link {
    flex: 0 0 90px;
    width: 90px;
    height: 90px;
}


/* =============================================================
   HORIZONTAL — responsive card grid (image top, text below)
   ============================================================= */

.acn-related-articles--horizontal .acn-related-articles__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.acn-related-articles--horizontal .acn-related-articles__item {
    display: flex;
    flex-direction: column;
}

.acn-related-articles--horizontal .acn-related-articles__thumb-link {
    width: 100%;
    height: 180px;
    margin-bottom: 10px;
    border-radius: 6px;
}

.acn-related-articles--horizontal .acn-related-articles__thumb {
    border-radius: 6px;
}


/* =============================================================
   CAROUSEL — Slick.js slider
   ============================================================= */

.acn-related-articles--carousel {
    position: relative;
    padding-inline: 44px; /* room for prev/next arrows */
    box-sizing: border-box;
}

/* Each slide is a card: image on top, content below */
.acn-related-articles--carousel .acn-related-articles__item {
    display: flex !important;   /* override Slick inline */
    flex-direction: column;
    padding-inline: 8px;
    box-sizing: border-box;
}

.acn-related-articles--carousel .acn-related-articles__thumb-link {
    width: 100%;
    height: 180px;
    margin-bottom: 10px;
    border-radius: 6px;
}

.acn-related-articles--carousel .acn-related-articles__thumb {
    border-radius: 6px;
}

/* ── Carousel arrow buttons ── */
.acn-related-articles--carousel .slick-prev,
.acn-related-articles--carousel .slick-next {
    position: absolute;
    top: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1;
    transition: box-shadow 0.2s ease, background 0.2s ease;
    font-size: 20px;
    line-height: 1;
    color: #444;
}

.acn-related-articles--carousel .slick-prev { left: 0; }
.acn-related-articles--carousel .slick-next { right: 0; }

.acn-related-articles--carousel .slick-prev:hover,
.acn-related-articles--carousel .slick-next:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Hide default Slick pseudo-element arrows (we use innerHTML) */
.acn-related-articles--carousel .slick-prev:before,
.acn-related-articles--carousel .slick-next:before {
    display: none;
}

/* ── Carousel dots ── */
.acn-related-articles--carousel .slick-dots {
    bottom: -28px;
}

.acn-related-articles--carousel .slick-dots li button:before {
    font-size: 10px;
    color: #bbb;
    opacity: 1;
}

/* active dot accent color overridden inline by plugin settings */


/* =============================================================
   Responsive
   ============================================================= */

@media (max-width: 767px) {
    .acn-related-articles--horizontal .acn-related-articles__list {
        grid-template-columns: repeat(2, 1fr);
    }

    .acn-related-articles--horizontal .acn-related-articles__thumb-link,
    .acn-related-articles--carousel .acn-related-articles__thumb-link {
        height: 140px;
    }
}

@media (max-width: 479px) {
    .acn-related-articles--vertical .acn-related-articles__thumb-link {
        flex-basis: 72px;
        width: 72px;
        height: 72px;
    }

    .acn-related-articles--horizontal .acn-related-articles__list {
        grid-template-columns: 1fr;
    }

    .acn-related-articles--carousel {
        padding-inline: 32px;
    }

    .acn-related-articles--carousel .acn-related-articles__thumb-link {
        height: 120px;
    }

    .acn-related-articles--carousel .slick-prev,
    .acn-related-articles--carousel .slick-next {
        width: 28px;
        height: 28px;
        top: 55px;
        font-size: 16px;
    }
}