/*
Theme Name: ExplainMeTech Child
Theme URI: https://explainmetech.com/
Description: Custom child theme for ExplainMeTech archive pages.
Author: ExplainMeTech
Template: astra
Version: 1.0.0
*/

/* =========================================================
   BASE
========================================================= */

.emt-archive,
.emt-archive * {
    box-sizing: border-box;
}

.emt-archive {
    --emt-blue: #2563eb;
    --emt-blue-dark: #1d4ed8;
    --emt-text: #0f172a;
    --emt-muted: #64748b;
    --emt-soft: #94a3b8;
    --emt-border: #e7edf4;
    --emt-page: #f7f9fc;
    --emt-white: #ffffff;

    width: 100%;
    max-width: 100%;
    margin: 0;

    background: var(--emt-page);
    color: var(--emt-text);
}

.emt-container {
    width: min(1400px, calc(100% - 80px));
    margin-inline: auto;
}

/* =========================================================
   HERO
========================================================= */

.emt-archive-hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 48px;
    background:
        radial-gradient(circle at 78% 5%, rgba(37, 99, 235, .08), transparent 27%),
        radial-gradient(circle at 96% 100%, rgba(37, 99, 235, .06), transparent 18%),
        #fff;
    border-bottom: 1px solid #edf1f6;
}

.emt-archive-hero::after {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    right: -110px;
    bottom: -165px;
    border-radius: 50%;
    background: rgba(37, 99, 235, .045);
    pointer-events: none;
}

.emt-breadcrumb {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.emt-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.emt-breadcrumb a:hover {
    color: var(--emt-blue);
}

.emt-breadcrumb span {
    color: #aeb8c5;
}

.emt-breadcrumb .emt-current {
    color: var(--emt-blue);
    font-weight: 600;
}

.emt-archive-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 0 14px;
    color: var(--emt-text);
    font-size: clamp(40px, 4.3vw, 60px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -2px;
}

.emt-description {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0;
    color: var(--emt-muted);
    font-size: 17px;
    line-height: 1.75;
}

/* =========================================================
   CONTENT
========================================================= */

.emt-content {
    padding: 52px 0 90px;
}

.emt-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 42px;
    align-items: start;
}

.emt-heading-row {
    margin: 0 0 22px;
}

.emt-heading-row h2 {
    margin: 0;
    color: var(--emt-text);
    font-size: 28px;
    line-height: 1.25;
    font-weight: 750;
    letter-spacing: -.6px;
}

/* =========================================================
   ARTICLE CARD
========================================================= */

.emt-card {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 26px;
    margin: 0 0 20px;
    padding: 14px;
    background: var(--emt-white);
    border: 1px solid var(--emt-border);
    border-radius: 16px;
    box-shadow: 0 7px 24px rgba(15, 23, 42, .045);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.emt-card:hover {
    transform: translateY(-2px);
    border-color: #d5dfeb;
    box-shadow: 0 15px 34px rgba(15, 23, 42, .08);
}

.emt-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 11px;
    background: #eef3f8;
}

.emt-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.emt-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.emt-card:hover .emt-card-image img {
    transform: scale(1.04);
}

.emt-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff, #e0edff);
    color: var(--emt-blue);
    font-size: 15px;
    font-weight: 750;
}

.emt-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 4px 8px 4px 0;
}

.emt-category {
    align-self: flex-start;
    margin-bottom: 9px;
    color: var(--emt-blue);
    font-size: 11px;
    line-height: 1.3;
    font-weight: 750;
    letter-spacing: .65px;
    text-transform: uppercase;
    text-decoration: none;
}

.emt-category:hover {
    color: var(--emt-blue-dark);
}

.emt-card-title {
    margin: 0 0 9px;
    font-size: 23px;
    line-height: 1.28;
    font-weight: 750;
    letter-spacing: -.35px;
}

.emt-card-title a {
    color: var(--emt-text);
    text-decoration: none;
}

.emt-card-title a:hover {
    color: var(--emt-blue);
}

.emt-excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 14px;
    color: var(--emt-muted);
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.emt-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    color: var(--emt-soft);
    font-size: 12.5px;
}

.emt-meta span:nth-child(2) {
    color: #cbd5e1;
}

/* =========================================================
   SIDEBAR
========================================================= */

.emt-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 30px;
}

.emt-box {
    padding: 22px;
    background: #fff;
    border: 1px solid var(--emt-border);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .035);
}

.emt-box h3 {
    margin: 0 0 17px;
    color: var(--emt-text);
    font-size: 18px;
    line-height: 1.3;
    font-weight: 750;
}

.emt-search {
    display: flex;
    width: 100%;
}

.emt-search input {
    min-width: 0;
    width: 100%;
    height: 45px;
    padding: 0 12px;
    border: 1px solid #dfe6ee;
    border-right: 0;
    border-radius: 8px 0 0 8px;
    background: #fff;
    color: var(--emt-text);
    outline: none;
    font-family: inherit;
    font-size: 13px;
}

.emt-search input:focus {
    border-color: var(--emt-blue);
}

.emt-search button {
    flex: 0 0 46px;
    width: 46px;
    height: 45px;
    padding: 0;
    border: 0;
    border-radius: 0 8px 8px 0;
    background: var(--emt-blue);
    color: #fff;
    cursor: pointer;
}

.emt-search button:hover {
    background: var(--emt-blue-dark);
}

.emt-category-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.emt-category-list li {
    margin: 0;
    border-bottom: 1px solid #eef2f6;
}

.emt-category-list li:last-child {
    border-bottom: 0;
}

.emt-category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
    color: #475569;
    font-size: 13.5px;
    text-decoration: none;
}

.emt-category-list a:hover {
    color: var(--emt-blue);
}

.emt-category-list span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 23px;
    padding: 0 7px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
}

.emt-latest {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 11px;
    margin-bottom: 17px;
}

.emt-latest:last-child {
    margin-bottom: 0;
}

.emt-latest-image {
    width: 68px;
    height: 60px;
    overflow: hidden;
    border-radius: 8px;
    background: #eef2f7;
}

.emt-latest-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.emt-latest a {
    display: block;
    color: var(--emt-text);
    font-size: 12.5px;
    line-height: 1.4;
    font-weight: 650;
    text-decoration: none;
}

.emt-latest a:hover {
    color: var(--emt-blue);
}

.emt-latest small {
    display: block;
    margin-top: 5px;
    color: #9aa5b3;
    font-size: 10.5px;
}

/* =========================================================
   PAGINATION / EMPTY
========================================================= */

.emt-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 34px;
}

.emt-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    text-decoration: none;
}

.emt-pagination .page-numbers:hover {
    border-color: #b9d0f5;
    background: #eff6ff;
    color: var(--emt-blue);
}

.emt-pagination .page-numbers.current {
    border-color: var(--emt-blue);
    background: var(--emt-blue);
    color: #fff;
}

.emt-no-posts {
    padding: 55px 30px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--emt-border);
    border-radius: 14px;
}

.emt-no-posts h2 {
    margin: 0 0 8px;
    font-size: 25px;
}

.emt-no-posts p {
    margin: 0;
    color: var(--emt-muted);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1050px) {
    .emt-container {
        width: calc(100% - 50px);
    }

    .emt-layout {
        grid-template-columns: minmax(0, 1fr) 290px;
        gap: 28px;
    }

    .emt-card {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 20px;
    }

    .emt-card-image {
        height: 175px;
    }
}

@media (max-width: 760px) {
    .emt-container {
        width: calc(100% - 30px);
    }

    .emt-archive-hero {
        padding: 38px 0 42px;
    }

    .emt-archive-hero h1 {
        font-size: 38px;
        letter-spacing: -1px;
    }

    .emt-description {
        font-size: 15px;
        line-height: 1.7;
    }

    .emt-content {
        padding: 38px 0 60px;
    }

    .emt-layout {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .emt-sidebar {
        position: static;
    }

    .emt-card {
        grid-template-columns: 1fr;
        gap: 17px;
        padding: 12px;
    }

    .emt-card-image {
        height: 220px;
    }

    .emt-card-content {
        padding: 2px 5px 7px;
    }

    .emt-card-title {
        font-size: 21px;
    }
}

@media (max-width: 480px) {
    .emt-archive-hero h1 {
        font-size: 33px;
    }

    .emt-heading-row h2 {
        font-size: 23px;
    }

    .emt-card-image {
        height: 190px;
    }

    .emt-card-title {
        font-size: 19px;
    }

    .emt-box {
        padding: 20px;
    }
}
