/* AltaBrio blog: Articles index, archive, single article */
.abp-section { padding-top: 1rem; }

/* grid */
.abp-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem !important; padding: 0 !important; list-style: none; }
.abp-grid > li { margin: 0 !important; }
@media (max-width: 980px) { .abp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .abp-grid { grid-template-columns: 1fr; } }

/* card */
.abp-card { height: 100%; display: flex; flex-direction: column; border: 1px solid var(--ev-line); border-radius: 20px; overflow: hidden; background: linear-gradient(165deg, rgba(22, 27, 39, .9), rgba(17, 21, 31, .75)); transition: transform .3s cubic-bezier(.2, .7, .2, 1), border-color .3s, box-shadow .3s; }
.abp-card:hover { transform: translateY(-5px); border-color: rgba(63, 189, 240, .5); box-shadow: 0 30px 60px -34px rgba(63, 189, 240, .6); }
.abp-card__img { margin: 0 !important; overflow: hidden; background: #0b0e16; }
.abp-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.abp-card:hover .abp-card__img img { transform: scale(1.06); }
.abp-card__body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.abp-card__body > * { margin: 0 !important; }
.abp-card__cat a, .abp-article-cat a { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ev-primary) !important; text-decoration: none; }
.abp-card__title { font-size: 1.2rem !important; line-height: 1.3; letter-spacing: -.01em; }
.abp-card__title a { color: var(--ev-fg) !important; text-decoration: none; }
.abp-card__title a:hover { color: var(--ev-primary-soft) !important; }
.abp-card__excerpt { color: var(--ev-muted); font-size: .95rem; flex: 1; }
.abp-card__excerpt p { margin: 0; }
.abp-card__excerpt .wp-block-post-excerpt__more-link { display: none; }
.abp-card__date { color: var(--ev-faint); font-size: .8rem; margin-top: .4rem !important; }

/* featured first card on the index */
/* related block: plain grid */
.abp-related .abp-grid > li:first-child { grid-column: auto; }
.abp-related .abp-grid > li:first-child .abp-card { flex-direction: column; }
.abp-related .abp-grid > li:first-child .abp-card__body { padding: 1.25rem 1.4rem 1.5rem; justify-content: flex-start; }
.abp-related .abp-grid > li:first-child .abp-card__img img { min-height: 0; }
.abp-related .abp-grid > li:first-child .abp-card__title { font-size: 1.2rem !important; }

/* pagination */
.abp-pagination { margin-top: 2.5rem; gap: .5rem; }
.abp-pagination a, .abp-pagination .page-numbers { padding: .55rem .95rem; border: 1px solid var(--ev-line); border-radius: 999px; color: var(--ev-fg) !important; text-decoration: none; font-weight: 600; font-size: .9rem; }
.abp-pagination .page-numbers.current { background: var(--ev-primary); color: #04121c !important; border-color: transparent; }
.abp-pagination a:hover { border-color: var(--ev-primary); }

/* single article */
.abp-article-hero { position: relative; isolation: isolate; text-align: center; margin-top: -84px !important; padding: calc(84px + clamp(2rem, 5vw, 3.5rem)) 1.25rem clamp(1.5rem, 3vw, 2.5rem); }
.abp-article-hero .hx-bg { position: absolute; inset: 0; z-index: -1; max-width: none !important; margin: 0 !important; overflow: hidden; }
.abp-article-head { max-width: 52rem; margin-inline: auto; display: grid; gap: .9rem; justify-items: center; }
.abp-article-head > * { margin: 0 !important; }
.abp-article-title { font-size: clamp(2rem, 4.8vw, 3.4rem) !important; line-height: 1.1; max-width: 22ch; }
.abp-article-lead { color: #c9cfdc; font-size: 1.15rem; max-width: 40rem; }
.abp-article-lead .wp-block-post-excerpt__more-link { display: none; }
.abp-meta { align-items: center; gap: 1rem !important; color: var(--ev-muted); font-size: .9rem; }
.abp-meta .wp-block-post-author { align-items: center; display: flex; gap: .6rem; }
.abp-meta .wp-block-post-author__avatar img { border-radius: 50%; }
.abp-meta .wp-block-post-author__name { color: var(--ev-fg); font-weight: 600; }
.abp-article-img { margin: 0 auto 2.5rem !important; max-width: 1100px; border-radius: 22px; overflow: hidden; border: 1px solid var(--ev-line); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9); }
.abp-article-img img { width: 100%; height: 100%; object-fit: cover; }
.abp-article { padding-bottom: 3rem; font-size: 1.13rem; line-height: 1.8; }
.abp-article h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 2.5rem; }
.abp-article h3 { font-size: 1.3rem; margin-top: 2rem; }
.abp-article p, .abp-article li { color: #cfd5e3; }
.abp-article a { color: var(--ev-primary-soft); text-decoration: underline; text-underline-offset: 3px; }
.abp-article ul, .abp-article ol { padding-left: 1.3rem; display: grid; gap: .5rem; }
.abp-article blockquote { margin: 2rem 0; padding: 1.2rem 1.5rem; border-left: 3px solid var(--ev-primary); background: rgba(63, 189, 240, .08); border-radius: 0 14px 14px 0; color: var(--ev-fg); font-size: 1.15rem; }
.abp-article img { border-radius: 16px; }
.abp-article figure { margin: 2rem 0; }
.abp-article figcaption { color: var(--ev-faint); font-size: .85rem; text-align: center; margin-top: .6rem; }
.abp-article-foot { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--ev-line); display: grid; gap: 1.5rem; }
.abp-tags a { display: inline-block; margin: .15rem .2rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--ev-line); color: var(--ev-muted); text-decoration: none; font-size: .85rem; }
.abp-nav a { color: var(--ev-fg); text-decoration: none; font-weight: 600; }
.abp-nav a:hover { color: var(--ev-primary-soft); }

/* ===== Articles hub v2: 5 per page = 1 wide card + 4 in two columns ===== */
.abp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .abp-grid { grid-template-columns: 1fr; } }
.abp-related .abp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .abp-related .abp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .abp-related .abp-grid { grid-template-columns: 1fr; } }

.abp-card__foot { margin-top: auto !important; padding-top: .9rem; align-items: center; gap: 1rem; border-top: 1px solid rgba(255, 255, 255, .06); }
.abp-card__more a { color: var(--ev-primary-soft) !important; font-weight: 600; font-size: .9rem; text-decoration: none; }
.abp-card__more a::after { content: " →"; transition: margin .2s; }
.abp-card:hover .abp-card__more a::after { margin-left: .25rem; }
.abp-card__excerpt { flex: 0; }

/* card without a featured image */
.abp-ph { display: grid; place-items: center; aspect-ratio: 16 / 10; background: radial-gradient(closest-side, rgba(63, 189, 240, .25), transparent), linear-gradient(135deg, #131a2b, #0b0e16); }
.abp-ph span { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 1.6rem; letter-spacing: -.02em; color: rgba(63, 189, 240, .55); }

/* search + chips */
.abp-tools { display: grid; gap: 1rem; margin-bottom: 2rem; justify-items: center; }
.abp-search { width: 100%; max-width: 640px; }
.abp-search .wp-block-search__inside-wrapper { border: 1px solid var(--ev-line) !important; border-radius: 999px; background: rgba(17, 21, 31, .75); padding: .25rem; }
.abp-search .wp-block-search__input { background: transparent; border: 0 !important; color: var(--ev-fg); padding: .7rem 1.1rem; font: inherit; outline: none; }
.abp-search .wp-block-search__button { border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--ev-primary-soft), var(--ev-primary)); color: #04121c; padding: .6rem 1.1rem; cursor: pointer; margin: 0; }
.abp-chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.abp-chip { padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--ev-line); color: var(--ev-muted) !important; font-weight: 600; font-size: .88rem; text-decoration: none !important; background: rgba(17, 21, 31, .6); transition: all .2s; }
.abp-chip:hover { color: var(--ev-fg) !important; border-color: var(--ev-line-strong); }
.abp-chip.is-on { background: linear-gradient(135deg, var(--ev-primary-soft), var(--ev-primary)); color: #04121c !important; border-color: transparent; }

.abp-chip { text-transform: none; }

/* ===== "Start here" row ===== */
.abp-start { margin-bottom: 3rem; }
.abp-start__head { text-align: center; margin-bottom: 1.5rem; }
.abp-start__head h2 { margin: .25rem 0 0 !important; font-size: clamp(1.5rem, 2.6vw, 2rem) !important; }
.abp-start__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1000px) { .abp-start__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .abp-start__grid { grid-template-columns: 1fr; } }
.abp-start__card { position: relative; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; text-decoration: none !important; color: var(--ev-fg) !important; border: 1px solid rgba(63, 189, 240, .35); background: linear-gradient(165deg, rgba(22, 27, 39, .95), rgba(17, 21, 31, .8)); box-shadow: 0 24px 50px -36px rgba(63, 189, 240, .8); transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; }
.abp-start__card:hover { transform: translateY(-5px); box-shadow: 0 34px 60px -32px rgba(63, 189, 240, .9); }
.abp-start__num { position: absolute; top: .7rem; left: .7rem; z-index: 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 .85rem var(--wp--preset--font-family--display); color: #04121c; background: linear-gradient(135deg, var(--ev-primary-soft), var(--ev-primary)); }
.abp-start__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0e16; }
.abp-start__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.abp-start__card:hover .abp-start__img img { transform: scale(1.06); }
.abp-start__body { display: flex; flex-direction: column; gap: .4rem; padding: 1rem 1.1rem 1.15rem; flex: 1; }
.abp-start__cat { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ev-primary); }
.abp-start__title { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 1.02rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.abp-start__go { margin-top: auto; padding-top: .5rem; color: var(--ev-primary-soft); font-weight: 600; font-size: .88rem; }
.abp-latest-h { text-align: center; margin: 0 0 1.5rem !important; font-size: clamp(1.4rem, 2.4vw, 1.8rem) !important; }
/* ===== Archive link + archive page ===== */
.abp-archive-box { margin: 2.5rem auto 0; max-width: 56rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding: 1.25rem 1.5rem; border: 1px solid var(--ev-line); border-radius: 18px; background: linear-gradient(160deg, rgba(22, 27, 39, .9), rgba(17, 21, 31, .7)); }
.abp-archive-box div { display: grid; gap: .2rem; }
.abp-archive-box b { font-family: var(--wp--preset--font-family--display); font-size: 1.1rem; }
.abp-archive-box span { color: var(--ev-muted); font-size: .95rem; }
.abp-archive-btn { padding: .7rem 1.2rem; border-radius: 999px; font-weight: 700; text-decoration: none !important; color: #04121c !important; background: linear-gradient(135deg, var(--ev-primary-soft), var(--ev-primary)); white-space: nowrap; }
.abp-years { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2rem; }
.abp-years small { opacity: .7; margin-left: .25rem; }
.abp-archive { max-width: 56rem; margin-inline: auto; }
.abp-archive__year { margin-bottom: 2.5rem; scroll-margin-top: calc(var(--ev-header-h) + 1rem); }
.abp-archive__year h2 { font-size: 1.6rem !important; margin: 0 0 .75rem !important; padding-bottom: .5rem; border-bottom: 1px solid var(--ev-line); }
.abp-archive__year h2 small { font-size: .85rem; font-weight: 500; color: var(--ev-faint); margin-left: .5rem; font-family: var(--wp--preset--font-family--sans); }
.abp-archive__year ul { list-style: none; padding: 0; margin: 0; display: grid; }
.abp-archive__year li { display: grid; grid-template-columns: 4.2rem 1fr auto; gap: .75rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.abp-archive__year time { color: var(--ev-faint); font-size: .85rem; }
.abp-archive__year li a { color: var(--ev-fg); text-decoration: none; font-weight: 500; line-height: 1.35; }
.abp-archive__year li a:hover { color: var(--ev-primary-soft); }
.abp-archive__year li span { color: var(--ev-primary); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 640px) { .abp-archive__year li { grid-template-columns: 3.6rem 1fr; } .abp-archive__year li span { display: none; } }
/* ===== Listing pages v3: 4 cards per row, 2 rows per page (8 per page) ===== */
.abp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem !important; }
@media (max-width: 1000px) { .abp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .abp-grid { grid-template-columns: 1fr; } }
.abp-card__body { padding: 1rem 1.1rem 1.1rem; gap: .45rem; }
.abp-card__title { font-size: 1.02rem !important; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.abp-card__excerpt { font-size: .88rem; line-height: 1.5; flex: 1; }
.abp-card__excerpt p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.abp-card__foot { padding-top: .75rem; }
.abp-card__date { font-size: .78rem; }
.abp-card__more a { font-size: .85rem; }
.abp-ph span { font-size: 1.3rem; }
/* ===== Article hero v2: full-bleed featured image behind the title ===== */
.abp-article-hero { position: relative; isolation: isolate; overflow: hidden; margin-top: -84px !important; padding: calc(84px + clamp(3rem, 8vw, 6rem)) 1.25rem clamp(2.5rem, 5vw, 4rem); min-height: clamp(380px, 52vh, 560px); display: flex !important; align-items: flex-end; justify-content: center; text-align: center; background: radial-gradient(1000px 420px at 50% 0%, rgba(63, 189, 240, .28), transparent 70%), #0b0e16; }
.abp-hero-bg { position: absolute !important; inset: 0; z-index: -2; margin: 0 !important; width: 100% !important; height: 100% !important; }
.abp-hero-bg img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.04); filter: saturate(1.05); }
.abp-article-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 14, 22, .62) 0%, rgba(11, 14, 22, .55) 30%, rgba(11, 14, 22, .86) 78%, #0b0e16 100%); }
.abp-article-head { position: relative; width: 100%; max-width: 52rem; margin-inline: auto; }
.abp-article-title, .abp-article-lead { text-shadow: 0 2px 30px rgba(7, 9, 15, .65); }
.abp-article-lead { color: #dbe1ee; }
.abp-meta { justify-content: center; }
/* ===== Start here: magazine mosaic (1 large + 1 wide + 2 small) ===== */
.abp-mosaic { display: grid; gap: .5rem; grid-template-columns: 1.55fr 1fr 1fr; grid-template-rows: repeat(2, minmax(210px, 1fr)); height: clamp(460px, 44vw, 560px); }
.abp-m { position: relative; display: block; overflow: hidden; border-radius: 14px; isolation: isolate; text-decoration: none !important; color: #fff !important; background: #0b0e16; }
.abp-m1 { grid-column: 1; grid-row: 1 / span 2; }
.abp-m2 { grid-column: 2 / span 2; grid-row: 1; }
.abp-m3 { grid-column: 2; grid-row: 2; }
.abp-m4 { grid-column: 3; grid-row: 2; }
.abp-mosaic--3 .abp-m3 { grid-column: 2 / span 2; }
.abp-mosaic--2 .abp-m2 { grid-row: 1 / span 2; }
.abp-m__img, .abp-m__img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.abp-m__img img { object-fit: cover; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.abp-m:hover .abp-m__img img { transform: scale(1.06); }
.abp-m::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(7, 9, 15, .05) 25%, rgba(7, 9, 15, .55) 62%, rgba(7, 9, 15, .92) 100%); transition: background .3s; }
.abp-m:hover::after { background: linear-gradient(180deg, rgba(7, 9, 15, .15) 20%, rgba(7, 9, 15, .65) 58%, rgba(7, 9, 15, .95) 100%); }
.abp-m__cat { position: absolute; top: 0; left: 0; z-index: 2; padding: .35rem .75rem; border-radius: 14px 0 12px 0; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #04121c; background: linear-gradient(135deg, var(--ev-primary-soft), var(--ev-primary)); }
.abp-m__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; gap: .5rem; padding: 1.1rem 1.25rem 1.2rem; }
.abp-m__title { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.28; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.abp-m1 .abp-m__title { font-size: clamp(1.4rem, 2.4vw, 2.05rem); line-height: 1.2; -webkit-line-clamp: 4; }
.abp-m1 .abp-m__body { padding: 1.6rem 1.7rem 1.7rem; }
.abp-m__meta { display: flex; align-items: center; gap: .55rem; font-size: .8rem; color: rgba(255, 255, 255, .72); }
.abp-m__meta b { color: #fff; font-weight: 600; }
.abp-m__meta i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
@media (max-width: 900px) {
	.abp-mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: auto; height: auto; }
	.abp-m, .abp-m1, .abp-m2, .abp-m3, .abp-m4, .abp-mosaic--3 .abp-m3 { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3; }
	.abp-m1 { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
	.abp-mosaic { grid-template-columns: 1fr; }
	.abp-m, .abp-m1 { grid-column: auto; aspect-ratio: 16 / 11; }
}