/* AgricultureNovel Infinite Scroll v2.0.0 */

/* ── Sentinel & status ── */
#an-is-sentinel {
    height: 1px;
    width: 100%;
    clear: both;
    pointer-events: none;
}

#an-is-status {
    text-align: center;
    padding: 1rem;
    clear: both;
}

.an-is-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    padding: 12px 20px;
}

.an-is-status--error { color: #dc2626; }
.an-is-status--done  { font-style: italic; }

/* ── Spinner ── */
.an-is-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-top-color: #16a34a;
    border-radius: 50%;
    -webkit-animation: an-is-spin .75s linear infinite;
            animation: an-is-spin .75s linear infinite;
    vertical-align: middle;
    flex-shrink: 0;
}

@-webkit-keyframes an-is-spin { to { -webkit-transform: rotate(360deg); } }
@keyframes        an-is-spin { to {         transform: rotate(360deg); } }

/* ── Entrance animation ── */
.an-is-card.an-is-entering {
    opacity: 0;
    -webkit-transform: translateY(16px);
            transform: translateY(16px);
}

.an-is-card {
    -webkit-transition: opacity .35s ease, -webkit-transform .35s ease;
            transition: opacity .35s ease, transform .35s ease;
    opacity: 1;
    -webkit-transform: translateY(0);
            transform: translateY(0);
}

/* ── Shared image styles ── */
.an-is-img-wrap {
    overflow: hidden;
}

.an-is-img {
    width: 100%;
    height: 100%;
    display: block;
    -o-object-fit: cover;
       object-fit: cover;
    -webkit-transition: -webkit-transform .4s ease;
            transition: transform .4s ease;
}

.an-is-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.an-is-cat {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #16a34a;
    margin-bottom: 6px;
}

.an-is-meta {
    font-size: 12px;
    color: #9ca3af;
    margin: 6px 0 0;
}

.an-is-dot {
    color: #d1d5db;
    margin: 0 3px;
}

/* ════════════════════════════════
   MAGAZINE STYLE (default)
════════════════════════════════ */
.an-is-card--magazine {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.an-is-card--magazine:hover .an-is-img {
    -webkit-transform: scale(1.04);
            transform: scale(1.04);
}

.an-is-card--magazine .an-is-img-wrap {
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    position: relative;
}

.an-is-card--magazine .an-is-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.an-is-card--magazine .an-is-body {
    padding: 14px 16px 18px;
}

.an-is-card--magazine .an-is-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: #111827;
}

/* ════════════════════════════════
   OVERLAY STYLE
════════════════════════════════ */
.an-is-card--overlay {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.an-is-card--overlay .an-is-link {
    position: relative;
}

.an-is-card--overlay:hover .an-is-img {
    -webkit-transform: scale(1.05);
            transform: scale(1.05);
}

.an-is-card--overlay .an-is-img-wrap {
    width: 100%;
    padding-bottom: 75%; /* 4:3 */
    height: 0;
    position: relative;
}

.an-is-card--overlay .an-is-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.an-is-card--overlay .an-is-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 40px 16px 16px;
    background: -webkit-linear-gradient(top, transparent, rgba(0,0,0,.80));
    background:         linear-gradient(to bottom, transparent, rgba(0,0,0,.80));
}

.an-is-card--overlay .an-is-cat   { color: #86efac; }
.an-is-card--overlay .an-is-title { font-size: 16px; font-weight: 700; line-height: 1.35; margin: 0; color: #ffffff; }
.an-is-card--overlay .an-is-meta  { color: rgba(255,255,255,.6); }
.an-is-card--overlay .an-is-dot   { color: rgba(255,255,255,.35); }

/* ════════════════════════════════
   SIDE STYLE
════════════════════════════════ */
.an-is-card--side {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.an-is-card--side .an-is-link {
    display: -webkit-box;
    display: -webkit-flex;
    display:         flex;
}

.an-is-card--side:hover .an-is-img {
    -webkit-transform: scale(1.05);
            transform: scale(1.05);
}

.an-is-card--side .an-is-img-wrap {
    width: 40%;
    -webkit-flex-shrink: 0;
            flex-shrink: 0;
    min-height: 120px;
    position: relative;
}

.an-is-card--side .an-is-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.an-is-card--side .an-is-body {
    padding: 12px 14px;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
            flex: 1;
    display: -webkit-box;
    display: -webkit-flex;
    display:         flex;
    -webkit-box-orient: vertical;
    -webkit-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
            justify-content: center;
}

.an-is-card--side .an-is-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: #111827;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
    .an-is-card--magazine,
    .an-is-card--side {
        background: #1f2937;
        box-shadow: 0 1px 6px rgba(0,0,0,.3);
    }
    .an-is-card--magazine .an-is-title,
    .an-is-card--side .an-is-title {
        color: #f3f4f6;
    }
    .an-is-status { color: #9ca3af; }
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .an-is-card--side .an-is-img-wrap { width: 35%; min-height: 100px; }
    .an-is-card--side .an-is-title    { font-size: 13px; -webkit-line-clamp: 2; }
}
