/* ==========================================================================
   Algeria Press — components.css
   Hero, cards, home sections, single article, comments, widgets
   ========================================================================== */

/* ==========================================================================
   1) Breadcrumb & page head
   ========================================================================== */
.ap-breadcrumb {
        padding: 18px 0 4px;
        font-size: 0.85rem;
}
.ap-breadcrumb ol {
        list-style: none;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
        margin: 0;
        padding: 0;
}
.ap-breadcrumb li {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: var(--ap-muted);
}
.ap-breadcrumb li + li::before {
        content: "";
        width: 7px;
        height: 7px;
        border-inline-start: 1.5px solid currentColor;
        border-top: 1.5px solid currentColor;
        transform: rotate(-45deg);
        opacity: 0.55;
        margin-inline: 4px 0;
}
.ap-breadcrumb a { color: var(--ap-muted); }
.ap-breadcrumb a:hover { color: var(--ap-green-strong); }
.ap-breadcrumb [aria-current="page"] span {
        color: var(--ap-ink);
        font-weight: 600;
}

.ap-pagehead {
        padding: 34px 0 10px;
}
.ap-pagehead__title {
        font-size: clamp(1.5rem, 2.2vw + 0.9rem, 2rem);
        margin-bottom: 6px;
        position: relative;
        padding-inline-start: 16px;
}
.ap-pagehead__title::before {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        top: 8px;
        bottom: 8px;
        width: 5px;
        border-radius: 5px;
        background: linear-gradient(var(--ap-green), var(--ap-red));
}
.ap-pagehead__desc {
        color: var(--ap-muted);
        max-width: 72ch;
        margin: 0 0 8px;
}

/* ==========================================================================
   2) Hero — featured slider + side list
   ========================================================================== */
.ap-hero {
        display: grid;
        grid-template-columns: 1.7fr 1fr;
        gap: 20px;
        padding-top: 22px;
}

.ap-slider { position: relative; }

.ap-slider__slides {
        position: relative;
        aspect-ratio: 16 / 9;
        border-radius: var(--ap-radius);
        overflow: hidden;
        box-shadow: var(--ap-shadow);
        background: var(--ap-green-ink);
}
.ap-slider__slide {
        position: absolute;
        inset: 0;
        opacity: 0;
        transition: opacity 700ms ease;
}
.ap-slider__slide.is-active { opacity: 1; z-index: 2; }

.ap-slide { height: 100%; }
.ap-slide__thumb {
        display: block;
        height: 100%;
}
.ap-slide__thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
}
.ap-slide__thumb .ap-card__ph,
.ap-slide__thumb .ap-card__ph svg {
        width: 100%;
        height: 100%;
}
.ap-slide__caption {
        position: absolute;
        inset-inline: 0;
        bottom: 0;
        padding: 56px 24px 20px;
        background: linear-gradient(to top, rgba(4, 18, 10, 0.92) 0%, rgba(4, 18, 10, 0.55) 55%, transparent 100%);
}
.ap-slide__caption .ap-card__chip { margin-bottom: 10px; }
.ap-slide__title {
        font-size: clamp(1.15rem, 1.4vw + 0.7rem, 1.7rem);
        line-height: 1.55;
        margin: 0;
        max-width: 40ch;
}
.ap-slide__title a { color: #fff; }
.ap-slide__title a:hover { color: var(--ap-gold); }
.ap-slide__meta {
        color: rgba(255, 255, 255, 0.82);
        font-size: 0.82rem;
        margin-top: 8px;
}

.ap-slider__dots {
        display: flex;
        gap: 8px;
        justify-content: center;
        margin-top: 12px;
}
.ap-slider__dot {
        width: 26px;
        height: 6px;
        border-radius: 6px;
        border: 0;
        background: var(--ap-line);
        cursor: pointer;
        padding: 0;
        transition: background var(--ap-transition), width var(--ap-transition);
}
.ap-slider__dot.is-active {
        background: var(--ap-red);
        width: 40px;
}

.ap-hero__side {
        display: flex;
        flex-direction: column;
        gap: 4px;
}
.ap-hero__side-title {
        font-size: 1rem;
        color: var(--ap-muted);
        margin: 0 0 6px;
        display: flex;
        align-items: center;
        gap: 8px;
}
.ap-hero__side-title::before {
        content: "";
        width: 4px;
        height: 18px;
        border-radius: 4px;
        background: var(--ap-red);
}
.ap-side-item {
        display: flex;
        gap: 12px;
        padding: 10px;
        border-radius: var(--ap-radius-sm);
        transition: background var(--ap-transition);
}
.ap-side-item:hover { background: var(--ap-surface); }
.ap-side-item__thumb {
        flex-shrink: 0;
        width: 108px;
        height: 76px;
        border-radius: var(--ap-radius-sm);
        overflow: hidden;
        background: var(--ap-green-ink);
}
.ap-side-item__thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
}
.ap-side-item__title {
        font-size: 0.95rem;
        line-height: 1.6;
        margin: 0 0 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
}
.ap-side-item__title a { color: var(--ap-ink); }
.ap-side-item__title a:hover { color: var(--ap-green-strong); }
.ap-side-item__meta {
        font-size: 0.78rem;
        color: var(--ap-muted);
}

/* ==========================================================================
   3) Section heads
   ========================================================================== */
.ap-section { margin-block: 30px 8px; }
.ap-section__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        margin-bottom: 18px;
        flex-wrap: wrap;
}
.ap-section__title {
        font-size: clamp(1.2rem, 1.2vw + 0.8rem, 1.5rem);
        margin: 0;
        display: flex;
        align-items: center;
        gap: 12px;
}
.ap-section__title::before {
        content: "";
        width: 6px;
        height: 26px;
        border-radius: 6px;
        background: linear-gradient(var(--ap-green), var(--ap-red));
        flex-shrink: 0;
}
.ap-section__more {
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--ap-green-strong);
        display: inline-flex;
        align-items: center;
        gap: 6px;
}
.ap-section__more:hover { color: var(--ap-red); }

/* ==========================================================================
   4) Cards
   ========================================================================== */
.ap-card {
        background: var(--ap-surface);
        border-radius: var(--ap-radius);
        overflow: hidden;
        box-shadow: var(--ap-shadow-soft);
        border: 1px solid var(--ap-line);
        display: flex;
        flex-direction: column;
        transition: transform var(--ap-transition), box-shadow var(--ap-transition);
}
.ap-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--ap-shadow);
}

.ap-card__thumb {
        position: relative;
        display: block;
        aspect-ratio: 16 / 10;
        background: var(--ap-green-ink);
        overflow: hidden;
}
.ap-card__thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 500ms ease;
}
.ap-card:hover .ap-card__thumb img { transform: scale(1.05); }

.ap-card__ph {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background:
                radial-gradient(circle at 85% 15%, rgba(210, 16, 52, 0.4), transparent 45%),
                linear-gradient(135deg, #0b5c33 0%, #00331b 100%);
        color: rgba(255, 255, 255, 0.92);
        font-family: var(--ap-font-head);
        font-weight: 800;
        font-size: 2.2rem;
}

.ap-card__chip {
        position: absolute;
        top: 12px;
        inset-inline-start: 12px;
        z-index: 3;
        background: var(--ap-green);
        color: #fff;
        font-size: 0.74rem;
        font-weight: 700;
        font-family: var(--ap-font-head);
        padding: 3px 12px;
        border-radius: 999px;
        backdrop-filter: blur(4px);
}
.ap-card__chip:hover { background: var(--ap-red); color: #fff; }
.ap-card__chip--solid {
        position: static;
        display: inline-block;
}

.ap-card__body {
        padding: 14px 16px 16px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex: 1;
}
.ap-card__title {
        font-size: 1.02rem;
        line-height: 1.65;
        margin: 0;
}
.ap-card--lg .ap-card__title { font-size: 1.2rem; }
.ap-card__title a {
        color: var(--ap-ink);
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
}
.ap-card__title a:hover { color: var(--ap-green-strong); }

.ap-card__excerpt {
        font-size: 0.88rem;
        color: var(--ap-muted);
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
}

.ap-card__meta {
        display: flex;
        align-items: center;
        gap: 14px;
        font-size: 0.78rem;
        color: var(--ap-muted);
        margin-top: auto;
}
.ap-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.ap-card__meta svg { opacity: 0.8; }

/* Compact (side list / small grids) */
.ap-card--sm { flex-direction: row; align-items: stretch; }
.ap-card--sm .ap-card__thumb {
        width: 132px;
        aspect-ratio: 4 / 3;
        flex-shrink: 0;
}
.ap-card--sm .ap-card__body { padding: 10px 12px; }
.ap-card--sm .ap-card__title { font-size: 0.92rem; }

/* Wide horizontal card (category block lead) */
.ap-card--wide {
        flex-direction: row;
}
.ap-card--wide .ap-card__thumb {
        width: 46%;
        aspect-ratio: auto;
        min-height: 230px;
}
.ap-card--wide .ap-card__body {
        padding: 20px 22px;
        justify-content: center;
}
.ap-card--wide .ap-card__title { font-size: 1.25rem; }
.ap-card--wide .ap-card__excerpt { -webkit-line-clamp: 3; font-size: 0.95rem; }

/* Grids */
.ap-grid--cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
}

/* ==========================================================================
   5) Home layout & category blocks
   ========================================================================== */
.ap-home-layout,
.ap-list-layout {
        display: flex;
        gap: 28px;
        align-items: flex-start;
        padding-top: 10px;
}
.ap-home-layout .ap-main,
.ap-list-layout .ap-main { flex: 1; }

.ap-block { margin-block: 34px 6px; }
.ap-block__grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-top: 16px;
}
.ap-block__lead { grid-column: 1 / -1; }

/* ==========================================================================
   6) Single article
   ========================================================================== */
.ap-single-layout {
        display: flex;
        gap: 32px;
        align-items: flex-start;
        padding-bottom: 20px;
}
.ap-single-layout .ap-main { flex: 1; min-width: 0; }

.ap-article {
        background: var(--ap-surface);
        border: 1px solid var(--ap-line);
        border-radius: var(--ap-radius);
        box-shadow: var(--ap-shadow-soft);
        padding: clamp(18px, 3vw, 36px);
        margin-top: 10px;
}

.ap-article__head {
        padding-bottom: 18px;
        margin-bottom: 22px;
        border-bottom: 1px solid var(--ap-line);
}
.ap-article__head .ap-card__chip--solid { margin-bottom: 12px; }
.ap-article__title {
        font-size: clamp(1.5rem, 2.6vw + 0.9rem, 2.3rem);
        line-height: 1.5;
        margin: 0 0 14px;
}

.ap-meta {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px 18px;
        font-size: 0.84rem;
        color: var(--ap-muted);
}
.ap-meta__item {
        display: inline-flex;
        align-items: center;
        gap: 7px;
}
.ap-meta__item a { color: var(--ap-muted); }
.ap-meta__item a:hover { color: var(--ap-green-strong); }
.ap-meta__author img { border-radius: 50%; }

.ap-article__thumb {
        margin: 0 0 24px;
}
.ap-article__thumb img {
        width: 100%;
        border-radius: var(--ap-radius-sm);
}
.ap-article__thumb figcaption {
        text-align: center;
        font-size: 0.82rem;
        color: var(--ap-muted);
        padding-top: 10px;
}

.ap-entry-content {
        font-size: 1.06rem;
        line-height: 2.05;
        color: var(--ap-ink-soft);
}
.ap-entry-content > * { margin-block: 0 1.15em; }
.ap-entry-content h2,
.ap-entry-content h3,
.ap-entry-content h4 {
        color: var(--ap-ink);
        margin-block: 1.6em 0.7em;
        line-height: 1.6;
}
.ap-entry-content h2 { font-size: 1.45rem; padding-inline-start: 12px; border-inline-start: 4px solid var(--ap-green); }
.ap-entry-content h3 { font-size: 1.2rem; }
.ap-entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.ap-entry-content img { border-radius: var(--ap-radius-sm); }
.ap-entry-content blockquote {
        margin: 1.6em 0;
        padding: 18px 24px;
        background: var(--ap-surface-2);
        border-inline-start: 4px solid var(--ap-red);
        border-radius: 0 var(--ap-radius-sm) var(--ap-radius-sm) 0;
        color: var(--ap-ink);
        font-size: 1.05rem;
}
.ap-entry-content blockquote p:last-child { margin-bottom: 0; }
.ap-entry-content ul,
.ap-entry-content ol { padding-inline-start: 1.5em; }
.ap-entry-content li { margin-bottom: 0.5em; }
.ap-entry-content table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.95rem;
}
.ap-entry-content th,
.ap-entry-content td {
        border: 1px solid var(--ap-line);
        padding: 10px 14px;
        text-align: start;
}
.ap-entry-content thead th { background: var(--ap-surface-2); font-family: var(--ap-font-head); }
.ap-entry-content pre,
.ap-entry-content code {
        font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
        font-size: 0.9rem;
        background: var(--ap-surface-2);
        border-radius: 8px;
}
.ap-entry-content pre {
        padding: 18px;
        overflow-x: auto;
        border: 1px solid var(--ap-line);
        direction: ltr;
        text-align: left;
}
.ap-entry-content code { padding: 2px 6px; }
.ap-entry-content pre code { padding: 0; background: transparent; }
.ap-entry-content .wp-block-image figcaption,
.ap-entry-content figcaption {
        text-align: center;
        font-size: 0.82rem;
        color: var(--ap-muted);
}

.ap-article__footer {
        margin-top: 26px;
        padding-top: 20px;
        border-top: 1px solid var(--ap-line);
        display: flex;
        flex-direction: column;
        gap: 18px;
}

.ap-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ap-tags__label { font-weight: 700; font-family: var(--ap-font-head); color: var(--ap-ink); font-size: 0.9rem; }
.ap-tags a {
        display: inline-block;
        background: var(--ap-surface-2);
        border: 1px solid var(--ap-line);
        color: var(--ap-ink-soft);
        font-size: 0.8rem;
        padding: 4px 14px;
        border-radius: 999px;
}
.ap-tags a:hover {
        background: var(--ap-green);
        border-color: var(--ap-green);
        color: #fff;
}

.ap-link-pages {
        margin-top: 20px;
        font-family: var(--ap-font-head);
        font-weight: 700;
}

/* Share */
.ap-share {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
}
.ap-share__label {
        font-family: var(--ap-font-head);
        font-weight: 700;
        font-size: 0.9rem;
        color: var(--ap-ink);
        margin-inline-end: 4px;
}
.ap-share__btn {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        border: 0;
        cursor: pointer;
        transition: transform var(--ap-transition), filter var(--ap-transition);
}
.ap-share__btn:hover { transform: translateY(-3px); filter: brightness(1.1); }
.ap-share__btn--facebook { background: #1877f2; }
.ap-share__btn--x { background: #111; }
.ap-share__btn--whatsapp { background: #25d366; }
.ap-share__btn--telegram { background: #229ed9; }
.ap-share__btn--copy {
        background: var(--ap-ink-soft);
        position: relative;
}
.ap-share__btn--copy.is-copied { background: var(--ap-green); }
.ap-share__btn--copy.is-copied::after {
        content: attr(data-copied);
        position: absolute;
        bottom: calc(100% + 8px);
        inset-inline-start: 50%;
        transform: translateX(50%);
        background: var(--ap-ink);
        color: var(--ap-surface);
        font-size: 0.75rem;
        padding: 4px 10px;
        border-radius: 8px;
        white-space: nowrap;
}

/* Author box */
.ap-author {
        display: flex;
        gap: 18px;
        align-items: flex-start;
        background: var(--ap-surface);
        border: 1px solid var(--ap-line);
        border-radius: var(--ap-radius);
        padding: 22px;
        margin-top: 24px;
}
.ap-author__avatar img { border-radius: 50%; }
.ap-author__label {
        font-size: 0.78rem;
        color: var(--ap-muted);
        display: block;
        margin-bottom: 4px;
}
.ap-author__name {
        font-size: 1.15rem;
        margin: 0 0 6px;
}
.ap-author__bio {
        margin: 0;
        color: var(--ap-muted);
        font-size: 0.92rem;
}

/* Post navigation */
.post-navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        margin-top: 24px;
}
.post-navigation .nav-links {
        display: contents;
}
.post-navigation .nav-previous,
.post-navigation .nav-next {
        background: var(--ap-surface);
        border: 1px solid var(--ap-line);
        border-radius: var(--ap-radius-sm);
        padding: 16px 18px;
        transition: border-color var(--ap-transition), transform var(--ap-transition);
}
.post-navigation .nav-previous:hover,
.post-navigation .nav-next:hover {
        border-color: var(--ap-green);
        transform: translateY(-2px);
}
.post-navigation .nav-previous a,
.post-navigation .nav-next a {
        display: flex;
        flex-direction: column;
        gap: 6px;
}
.post-navigation .nav-next { text-align: start; }
.post-navigation .meta-nav {
        font-size: 0.78rem;
        color: var(--ap-muted);
        display: inline-flex;
        align-items: center;
        gap: 6px;
}
.post-navigation .post-title {
        font-family: var(--ap-font-head);
        font-weight: 700;
        color: var(--ap-ink);
        font-size: 0.95rem;
        line-height: 1.6;
}

/* Related */
.ap-related { margin-top: 30px; }

/* ==========================================================================
   7) Comments
   ========================================================================== */
.ap-comments {
        background: var(--ap-surface);
        border: 1px solid var(--ap-line);
        border-radius: var(--ap-radius);
        padding: clamp(18px, 3vw, 30px);
        margin-top: 24px;
}
.ap-comments__title {
        font-size: 1.25rem;
        margin-bottom: 20px;
}
.ap-comments .ap-comments__empty { color: var(--ap-muted); }

.ap-comment-list {
        list-style: none;
        margin: 0 0 24px;
        padding: 0;
}
.ap-comment-list .children {
        list-style: none;
        margin: 0;
        padding-inline-start: 46px;
        border-inline-start: 2px solid var(--ap-line);
}
.ap-comment-list .comment,
.ap-comment-list .pingback,
.ap-comment-list .trackback {
        padding: 16px 0;
        border-bottom: 1px solid var(--ap-line);
}
.ap-comment-list .comment:last-child { border-bottom: 0; }
.ap-comment-body { display: flex; gap: 14px; }
.ap-comment-body .avatar { border-radius: 50%; flex-shrink: 0; }
.ap-comment-meta {
        font-size: 0.85rem;
        color: var(--ap-muted);
        margin-bottom: 6px;
}
.ap-comment-meta .fn { font-family: var(--ap-font-head); font-weight: 700; font-size: 0.95rem; font-style: normal; }
.ap-comment-meta .fn a { color: var(--ap-ink); }
.ap-comment-meta .says { display: none; }
.ap-comment-content { font-size: 0.95rem; color: var(--ap-ink-soft); overflow-wrap: anywhere; }
.ap-comment-content p:last-child { margin-bottom: 0; }
.ap-comment-reply { margin-top: 8px; }
.ap-comment-reply a,
.ap-comment-edit-link a {
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--ap-green-strong);
}
.ap-comment-awaiting-moderation {
        font-size: 0.85rem;
        color: var(--ap-red);
        margin-top: 6px;
}

/* Comment form */
.comment-form {
        display: grid;
        gap: 14px;
}
.comment-form p { margin: 0; }
.comment-form label {
        display: block;
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 6px;
        font-family: var(--ap-font-head);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
        width: 100%;
        border: 1px solid var(--ap-line);
        border-radius: var(--ap-radius-sm);
        background: var(--ap-surface-2);
        padding: 11px 14px;
        font-size: 0.95rem;
        transition: border-color var(--ap-transition), background var(--ap-transition);
}
.comment-form input:focus,
.comment-form textarea:focus {
        border-color: var(--ap-green);
        background: var(--ap-surface);
        outline: none;
}
.comment-form .submit {
        background: var(--ap-green);
        color: #fff;
        border: 0;
        border-radius: 10px;
        padding: 12px 30px;
        font-family: var(--ap-font-head);
        font-weight: 700;
        cursor: pointer;
        transition: background var(--ap-transition);
        justify-self: start;
}
.comment-form .submit:hover { background: var(--ap-green-strong); }
.comment-form__notes { font-size: 0.85rem; color: var(--ap-muted); }
.comment-form .logged-in-as { font-size: 0.88rem; color: var(--ap-muted); }

/* ==========================================================================
   8) Sidebar widgets
   ========================================================================== */
.ap-sidebar {
        width: 340px;
        flex-shrink: 0;
        position: sticky;
        top: 66px;
}
.ap-sidebar .widget {
        background: var(--ap-surface);
        border: 1px solid var(--ap-line);
        border-radius: var(--ap-radius);
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: var(--ap-shadow-soft);
}
.ap-sidebar .widget-title {
        font-size: 1.05rem;
        margin-bottom: 16px;
        padding-bottom: 12px;
        position: relative;
}
.ap-sidebar .widget-title::after {
        content: "";
        position: absolute;
        bottom: 0;
        inset-inline-start: 0;
        width: 44px;
        height: 3px;
        border-radius: 3px;
        background: var(--ap-red);
}

.ap-sidebar .widget ul {
        list-style: none;
        margin: 0;
        padding: 0;
}
.ap-sidebar .widget li {
        padding: 9px 0;
        border-bottom: 1px dashed var(--ap-line);
        font-size: 0.92rem;
}
.ap-sidebar .widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.ap-sidebar .widget a { color: var(--ap-ink-soft); }
.ap-sidebar .widget a:hover { color: var(--ap-green-strong); }

.ap-sidebar .widget_search .ap-search { max-width: none; }

/* Popular posts widget */
.ap-pop { list-style: none; margin: 0; padding: 0; counter-reset: ap-pop; }
.ap-pop__item {
        display: flex;
        gap: 12px;
        padding: 10px 0;
        border-bottom: 1px dashed var(--ap-line);
        counter-increment: ap-pop;
}
.ap-pop__item:last-child { border-bottom: 0; padding-bottom: 0; }
.ap-pop__thumb {
        flex-shrink: 0;
        width: 84px;
        height: 62px;
        border-radius: var(--ap-radius-sm);
        overflow: hidden;
        background: var(--ap-green-ink);
}
.ap-pop__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ap-pop__thumb .ap-card__ph { font-size: 1.4rem; }
.ap-pop__title {
        font-size: 0.9rem;
        line-height: 1.6;
        margin: 0 0 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
}
.ap-pop__title a { color: var(--ap-ink); }
.ap-pop__title a:hover { color: var(--ap-green-strong); }
.ap-pop__meta {
        font-size: 0.76rem;
        color: var(--ap-muted);
        display: flex;
        align-items: center;
        gap: 4px;
}

/* Sidebar ad */
.ap-ad--sidebar {
        background: var(--ap-surface);
        border: 1px dashed var(--ap-line);
        border-radius: var(--ap-radius);
        margin-bottom: 20px;
        overflow: hidden;
}

/* ==========================================================================
   9) 404 & empty states
   ========================================================================== */
.ap-error {
        text-align: center;
        padding: 60px 16px 30px;
}
.ap-error__code {
        font-family: var(--ap-font-head);
        font-weight: 800;
        font-size: clamp(4rem, 12vw, 7rem);
        line-height: 1;
        background: linear-gradient(135deg, var(--ap-green), var(--ap-red));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        margin-bottom: 10px;
}
.ap-error__title { font-size: 1.4rem; margin-bottom: 10px; }
.ap-error__text { color: var(--ap-muted); max-width: 52ch; margin-inline: auto; }
.ap-error .ap-search { margin: 24px auto 0; }

.ap-empty {
        background: var(--ap-surface);
        border: 1px dashed var(--ap-line);
        border-radius: var(--ap-radius);
        padding: 40px 24px;
        text-align: center;
        color: var(--ap-muted);
}
.ap-empty .ap-search { margin: 18px auto 0; }

/* ==========================================================================
   10) Responsive
   ========================================================================== */
@media (max-width: 1100px) {
        .ap-grid--cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
        .ap-hero { grid-template-columns: 1fr; }
        .ap-hero__side { border: 1px solid var(--ap-line); border-radius: var(--ap-radius); background: var(--ap-surface); padding: 10px; }
        .ap-home-layout,
        .ap-list-layout,
        .ap-single-layout { flex-direction: column; }
        .ap-sidebar {
                width: 100%;
                position: static;
        }
}

@media (max-width: 768px) {
        .ap-card--wide { flex-direction: column; }
        .ap-card--wide .ap-card__thumb { width: 100%; min-height: 0; aspect-ratio: 16 / 9; }
        .ap-block__grid { grid-template-columns: 1fr; }
        .ap-postnav { grid-template-columns: 1fr; }
        .ap-comment-list .children { padding-inline-start: 20px; }
}

@media (max-width: 640px) {
        .ap-grid--cards { grid-template-columns: 1fr; }
        .ap-slider__slides { aspect-ratio: 4 / 3; }
        .ap-card--sm { flex-direction: column; }
        .ap-card--sm .ap-card__thumb { width: 100%; aspect-ratio: 16 / 9; }
}
