/* =============================================================
   ADM Education – Archive Page Styles
   /astra-child/css/archive.css
   ============================================================= */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,400;0,500;1,400&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
.adm-archive-wrap {
    --accent:       #4F46E5;
    --accent-light: color-mix(in srgb, var(--accent) 12%, white);
    --text:         #111827;
    --text-2:       #4B5563;
    --text-3:       #9CA3AF;
    --border:       #E5E7EB;
    --surface:      #F9FAFB;
    --white:        #ffffff;
    --radius:       12px;
    --radius-lg:    20px;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:    0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:    0 12px 40px rgba(0,0,0,.14);

    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    line-height: 1.6;
}

/* ── Utility ──────────────────────────────────────────────── */
.adm-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

.adm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 8px;
    font-family: 'Sora', sans-serif;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s, opacity .15s;
}
.adm-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.adm-btn--accent { background: var(--accent); color: var(--white); }
.adm-btn--white  { background: var(--white);  color: var(--accent); }

/* ── Hero ─────────────────────────────────────────────────── */
.adm-hero {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--accent) 90%, #1e1b4b) 0%,
        color-mix(in srgb, var(--accent) 70%, #0f172a) 100%);
    padding: 64px 24px 80px;
    overflow: hidden;
    position: relative;
}
.adm-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.adm-hero__inner {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Breadcrumb */
.adm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    color: rgba(255,255,255,.65);
    margin-bottom: 18px;
}
.adm-breadcrumb a { color: rgba(255,255,255,.65); text-decoration: none; }
.adm-breadcrumb a:hover { color: white; }
.adm-breadcrumb__sep { opacity: .5; }

/* Badge */
.adm-hero__badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: white;
    font-size: .75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,.2);
    margin-bottom: 18px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Title */
.adm-hero__title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    margin: 0 0 20px;
    letter-spacing: -.02em;
}
.adm-hero__title em {
    font-style: normal;
    background: linear-gradient(90deg, #fde68a, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Desc */
.adm-hero__desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,.8);
    max-width: 520px;
    margin: 0 0 28px;
}

/* Meta */
.adm-hero__meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.adm-hero__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.75);
    font-size: .875rem;
}

/* Visual / Path illustration */
.adm-hero__visual {
    position: relative;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.adm-hero__visual-path {
    position: relative;
    width: 100%;
    height: 100%;
}
.adm-path-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.adm-path-dot {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    animation: adm-float 3s ease-in-out infinite;
}
.adm-path-dot--1 { bottom: 20%;  left: 20%;  background: #6366f1; animation-delay: 0s; }
.adm-path-dot--2 { bottom: 45%;  left: 50%;  background: #10b981; animation-delay: .4s; }
.adm-path-dot--3 { top: 35%;    left: 28%;  background: #f59e0b; animation-delay: .8s; }
.adm-path-dot--flag { top: 10%;  right: 20%; background: #22c55e; animation-delay: 1.2s; width: 48px; height: 48px; }

@keyframes adm-float {
    0%, 100% { transform: translateY(0);    }
    50%       { transform: translateY(-8px); }
}

/* ── Why Box ──────────────────────────────────────────────── */
.adm-why { padding: 32px 24px; }
.adm-why__box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    box-shadow: var(--shadow-sm);
}
.adm-why__icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
    background: var(--accent-light);
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.adm-why__box strong { font-family: 'Sora', sans-serif; font-size: 1rem; }
.adm-why__box p { margin: 4px 0 0; color: var(--text-2); font-size: .9rem; }

/* ── Layout ───────────────────────────────────────────────── */
.adm-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding-top: 0;
    padding-bottom: 64px;
    align-items: start;
}

/* ── Section heading ──────────────────────────────────────── */
.adm-section-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text);
}
.adm-section-sub {
    color: var(--text-2);
    font-size: .9rem;
    margin: 0 0 28px;
}

/* ── Post Cards ───────────────────────────────────────────── */
.adm-posts-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 2px solid var(--border);
    margin-left: 20px;
    margin-bottom: 40px;
}

.adm-post-card {
    position: relative;
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 20px;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 20px 20px 24px;
    margin: 0 0 16px -2px;
    transition: box-shadow .2s, transform .2s, border-color .2s;
    text-decoration: none;
    color: inherit;
}
.adm-post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
    border-color: var(--accent);
}

/* Step badge */
.adm-post-card__step {
    position: absolute;
    left: -22px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px white, 0 0 0 5px var(--border);
    z-index: 2;
}

/* Thumbnail */
.adm-post-card__thumb {
    width: 88px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--accent-light);
    flex-shrink: 0;
}
.adm-post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.adm-post-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    opacity: .6;
}

/* Card body */
.adm-post-card__title {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.35;
}
.adm-post-card__title a {
    color: var(--text);
    text-decoration: none;
}
.adm-post-card__title a:hover { color: var(--accent); }

.adm-post-card__excerpt {
    color: var(--text-2);
    font-size: .85rem;
    margin: 0 0 10px;
    line-height: 1.5;
}

.adm-post-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--text-3);
}
.adm-post-card__meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* CTA link */
.adm-post-card__cta {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-family: 'Sora', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background .15s;
}
.adm-post-card__cta:hover { background: var(--accent-light); }

/* ── Pagination ───────────────────────────────────────────── */
.adm-pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.adm-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.adm-pagination .page-numbers:hover,
.adm-pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ── CTA Banner ───────────────────────────────────────────── */
.adm-cta-banner {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--accent) 90%, #1e1b4b),
        color-mix(in srgb, var(--accent) 60%, #1e1b4b));
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.adm-cta-banner__icon {
    font-size: 2rem;
    background: rgba(255,255,255,.15);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.adm-cta-banner__text { flex: 1; }
.adm-cta-banner__text strong {
    display: block;
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    color: white;
    margin-bottom: 4px;
}
.adm-cta-banner__text strong em { font-style: normal; color: #fde68a; }
.adm-cta-banner__text p { color: rgba(255,255,255,.75); font-size: .875rem; margin: 0; }

/* ── Sidebar ──────────────────────────────────────────────── */
.adm-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.adm-sidebar-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.adm-sidebar-card h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px;
}
.adm-sidebar-card p {
    color: var(--text-2);
    font-size: .875rem;
    margin: 0 0 16px;
}

/* Download card */
.adm-sidebar-card--download { border-top: 4px solid var(--accent); text-align: center; }
.adm-sidebar-card__img-placeholder {
    width: 80px;
    height: 80px;
    background: var(--accent-light);
    border-radius: 16px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

/* Popular list */
.adm-popular-list { list-style: none; margin: 0; padding: 0; }
.adm-popular-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.adm-popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.adm-popular-item__thumb {
    width: 52px;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface);
}
.adm-popular-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-popular-item__thumb-ph { width: 100%; height: 100%; background: var(--accent-light); }
.adm-popular-item__info a {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 2px;
    line-height: 1.35;
}
.adm-popular-item__info a:hover { color: var(--accent); }
.adm-popular-item__info span { font-size: .75rem; color: var(--text-3); }

/* Newsletter */
.adm-sidebar-card--newsletter { background: var(--accent-light); border-color: transparent; }
.adm-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.adm-newsletter-form input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .875rem;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    box-sizing: border-box;
}
.adm-newsletter-form input:focus { border-color: var(--accent); }
.adm-newsletter-form .adm-btn { width: 100%; justify-content: center; }
.adm-newsletter-form small { color: var(--text-3); font-size: .75rem; text-align: center; }

/* ── Animations on load ───────────────────────────────────── */
.adm-post-card {
    opacity: 0;
    transform: translateX(-16px);
    animation: adm-slide-in .4s forwards;
}
@keyframes adm-slide-in {
    to { opacity: 1; transform: translateX(0); }
}
.adm-post-card:nth-child(1)  { animation-delay: .05s; }
.adm-post-card:nth-child(2)  { animation-delay: .10s; }
.adm-post-card:nth-child(3)  { animation-delay: .15s; }
.adm-post-card:nth-child(4)  { animation-delay: .20s; }
.adm-post-card:nth-child(5)  { animation-delay: .25s; }
.adm-post-card:nth-child(6)  { animation-delay: .30s; }
.adm-post-card:nth-child(7)  { animation-delay: .35s; }
.adm-post-card:nth-child(8)  { animation-delay: .40s; }

/* ── No posts ─────────────────────────────────────────────── */
.adm-no-posts { color: var(--text-2); font-size: .9rem; padding: 16px 0; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .adm-hero__inner { grid-template-columns: 1fr; }
    .adm-hero__visual { display: none; }
    .adm-layout { grid-template-columns: 1fr; }
    .adm-sidebar { position: static; }
    .adm-post-card { grid-template-columns: 72px 1fr; }
    .adm-post-card__cta { display: none; }
    .adm-post-card__thumb { width: 72px; height: 58px; }
}

@media (max-width: 560px) {
    .adm-hero { padding: 40px 20px 56px; }
    .adm-hero__title { font-size: 1.75rem; }
    .adm-cta-banner { flex-direction: column; text-align: center; }
    .adm-post-card { grid-template-columns: 1fr; }
    .adm-post-card__thumb { width: 100%; height: 160px; border-radius: 10px 10px 0 0; }
    .adm-post-card { padding: 0 0 16px; }
    .adm-post-card__body { padding: 0 16px; }
    .adm-post-card__step { left: 50%; transform: translateX(-50%) translateY(0); top: -18px; }
}

/* ═══════════════════════════════════════════════════════════
   FULL WIDTH FIX
   Forces the archive wrap to break out of Astra's content box
   ════════════════════════════════════════════════════════ */
.adm-full-width {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    max-width: 100vw;
    box-sizing: border-box;
}

/* Astra content area containers that may constrain width */
.ast-page-builder-template .site-content,
.ast-page-builder-template .entry-content,
.site-content .ast-container,
.entry-content .adm-archive-wrap {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
}

/* ═══════════════════════════════════════════════════════════
   SUB-CATEGORY CARD GRID (parent /learn/ page)
   ════════════════════════════════════════════════════════ */
.adm-subcats-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 2px solid var(--border);
    margin-left: 20px;
    margin-bottom: 40px;
}

.adm-subcat-card {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 20px;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 22px 22px 28px;
    margin: 0 0 16px -2px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .2s, border-color .2s;
    border-left: 4px solid var(--subcat-color, var(--accent));
}
.adm-subcat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
    border-color: var(--subcat-color, var(--accent));
}

/* Step number badge */
.adm-subcat-card__step {
    position: absolute;
    left: -22px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--subcat-color, var(--accent));
    color: white;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px white, 0 0 0 5px var(--border);
    z-index: 2;
}

/* Icon circle */
.adm-subcat-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--subcat-color, var(--accent)) 12%, white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--subcat-color, var(--accent));
}
.adm-subcat-card__icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--subcat-color, var(--accent));
}

/* Body */
.adm-subcat-card__body h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text);
    line-height: 1.3;
}
.adm-subcat-card__body p {
    color: var(--text-2);
    font-size: .875rem;
    margin: 0 0 10px;
    line-height: 1.5;
}
.adm-subcat-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--text-3);
}
.adm-subcat-card__meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* CTA arrow */
.adm-subcat-card__cta {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-family: 'Sora', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    color: var(--subcat-color, var(--accent));
    padding: 8px 14px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--subcat-color, var(--accent)) 10%, white);
    transition: background .15s;
    flex-shrink: 0;
}
.adm-subcat-card:hover .adm-subcat-card__cta {
    background: color-mix(in srgb, var(--subcat-color, var(--accent)) 18%, white);
}

/* Animations */
.adm-subcat-card {
    opacity: 0;
    transform: translateX(-16px);
    animation: adm-slide-in .4s forwards;
}
.adm-subcat-card:nth-child(1)  { animation-delay: .04s; }
.adm-subcat-card:nth-child(2)  { animation-delay: .08s; }
.adm-subcat-card:nth-child(3)  { animation-delay: .12s; }
.adm-subcat-card:nth-child(4)  { animation-delay: .16s; }
.adm-subcat-card:nth-child(5)  { animation-delay: .20s; }
.adm-subcat-card:nth-child(6)  { animation-delay: .24s; }
.adm-subcat-card:nth-child(7)  { animation-delay: .28s; }
.adm-subcat-card:nth-child(8)  { animation-delay: .32s; }
.adm-subcat-card:nth-child(9)  { animation-delay: .36s; }
.adm-subcat-card:nth-child(10) { animation-delay: .40s; }
.adm-subcat-card:nth-child(11) { animation-delay: .44s; }
.adm-subcat-card:nth-child(12) { animation-delay: .48s; }

/* Responsive */
@media (max-width: 900px) {
    .adm-subcat-card { grid-template-columns: 54px 1fr; }
    .adm-subcat-card__cta { display: none; }
}
@media (max-width: 560px) {
    .adm-subcat-card { grid-template-columns: 1fr; padding: 20px 16px 20px 20px; }
    .adm-subcat-card__icon { width: 48px; height: 48px; border-radius: 12px; }
    .adm-subcat-card__icon svg { width: 22px; height: 22px; }
    .adm-subcat-card__step { top: 20px; transform: none; }
}
