/* =========================================================
   The Open Page - Categories
   ========================================================= */

.top-cat-home,
.top-category-page{
    --top-green:#0f4b3d;
    --top-accent:#006c55;
    --top-paper:#f7f4ed;
    --top-muted:#666;
    --top-border:#e5e0d7;
    --top-orange:#e9a72d;
    color:#202020;
}

.top-cat-home *,
.top-category-page *{
    box-sizing:border-box;
}


/* =========================================================
   HOMEPAGE 12 CATEGORY GRID
   ========================================================= */

.top-cat-home{
    padding:72px 20px;
}

.top-cat-wrap,
.top-category-container{
    width:100%;
    max-width:1180px;
    margin:0 auto;
}

.top-cat-home-head{
    max-width:760px;
    margin:0 auto 38px;
    text-align:center;
}

.top-cat-home-head > span,
.top-category-eyebrow{
    display:block;
    margin-bottom:9px;
    color:var(--top-accent);
    font-size:12px;
    line-height:1;
    font-weight:800;
    letter-spacing:1.5px;
    text-transform:uppercase;
}

.top-cat-home-head h2{
    margin:0 0 12px;
    font-size:40px;
    line-height:1.15;
    color:#202020;
}

.top-cat-home-head p{
    margin:0;
    color:var(--top-muted);
    font-size:16px;
    line-height:1.7;
}

.top-cat-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:20px;
}

.top-cat-tile{
    position:relative;
    min-height:290px;
    overflow:hidden;
    display:flex;
    align-items:flex-end;
    border-radius:7px;
    background:#ddd;
    box-shadow:0 10px 28px rgba(0,0,0,.06);
    text-decoration:none !important;
    transition:transform .25s ease,box-shadow .25s ease;
}

.top-cat-tile:hover{
    transform:translateY(-5px);
    box-shadow:0 18px 38px rgba(0,0,0,.12);
}

.top-cat-tile-image,
.top-cat-tile-fallback{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
}

.top-cat-tile-image{
    display:block;
    object-fit:cover;
    transition:transform .35s ease;
}

.top-cat-tile:hover .top-cat-tile-image{
    transform:scale(1.05);
}

.top-cat-tile-fallback{
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:78px;
}

.top-cat-education .top-cat-tile-fallback{background:#39a9db;}
.top-cat-world .top-cat-tile-fallback{background:#f3cc98;}
.top-cat-sports .top-cat-tile-fallback{background:#bfe7eb;}
.top-cat-entertainment .top-cat-tile-fallback{background:#cbd700;}
.top-cat-technology .top-cat-tile-fallback{background:#df5205;}
.top-cat-life .top-cat-tile-fallback{background:#efc996;}
.top-cat-festivals .top-cat-tile-fallback{background:#514a70;}
.top-cat-creativity .top-cat-tile-fallback{background:#ea5156;}
.top-cat-health .top-cat-tile-fallback{background:#e3e3e3;}
.top-cat-personalities .top-cat-tile-fallback{background:#37a9d9;}
.top-cat-environment .top-cat-tile-fallback{background:#66bca7;}
.top-cat-general .top-cat-tile-fallback{background:#514b70;}

.top-cat-shade{
    position:absolute;
    inset:0;
    background:linear-gradient(
        to top,
        rgba(0,0,0,.72) 0%,
        rgba(0,0,0,.12) 62%,
        transparent 100%
    );
}

.top-cat-tile-content{
    position:relative;
    z-index:2;
    width:100%;
    padding:18px;
}

.top-cat-label{
    display:inline-block;
    margin-bottom:9px;
    padding:6px 10px;
    background:var(--top-orange);
    color:#fff;
    font-size:10px;
    font-weight:800;
    letter-spacing:.5px;
    text-transform:uppercase;
}

.top-cat-tile-content strong{
    display:block;
    color:#fff;
    font-size:23px;
    line-height:1.15;
}

.top-cat-tile-content small{
    display:block;
    margin-top:7px;
    color:rgba(255,255,255,.82);
    font-size:12px;
}


/* =========================================================
   CATEGORY HERO
   ========================================================= */

.top-category-page{
    background:transparent;
}

.top-category-hero{
    position:relative;
    min-height:300px;
    display:flex;
    align-items:center;
    padding:65px 20px;
    overflow:hidden;
    background:#efeae1;
    background-position:center;
    background-size:cover;
}

.top-category-hero-overlay{
    position:absolute;
    inset:0;
    background:transparent;
}

.top-category-hero.has-image .top-category-hero-overlay{
    background:linear-gradient(
        90deg,
        rgba(0,0,0,.72),
        rgba(0,0,0,.28)
    );
}

.top-category-hero .top-category-container{
    position:relative;
    z-index:2;
}

.top-category-hero.has-image .top-category-eyebrow{
    color:#d8f0e8;
}

.top-category-hero h1{
    max-width:760px;
    margin:0 0 14px;
    color:#202020;
    font-size:48px;
    line-height:1.1;
}

.top-category-hero.has-image h1{
    color:#fff;
}

.top-category-description{
    max-width:720px;
    margin:0;
    color:#5f5f5f;
    font-size:17px;
    line-height:1.7;
}

.top-category-description p{
    margin:0;
}

.top-category-hero.has-image .top-category-description{
    color:rgba(255,255,255,.88);
}


/* =========================================================
   BLOG LIST
   ========================================================= */

.top-category-content{
    padding:62px 20px 80px;
}

.top-category-post-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:26px;
}

.top-category-post-card{
    overflow:hidden;
    background:#fff;
    border:1px solid var(--top-border);
    border-radius:9px;
    box-shadow:0 9px 25px rgba(0,0,0,.045);
    transition:transform .22s ease,box-shadow .22s ease;
}

.top-category-post-card:hover{
    transform:translateY(-4px);
    box-shadow:0 16px 34px rgba(0,0,0,.08);
}

.top-category-post-image{
    display:block;
    width:100%;
    aspect-ratio:16 / 9;
    height:auto;
    overflow:hidden;
    background:#ece8df;
}

.top-category-post-image img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
    object-position:center center;
    transition:transform .3s ease;
}

.top-category-post-card:hover .top-category-post-image img{
    transform:scale(1.035);
}

.top-category-post-placeholder{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--top-green);
    font-size:22px;
    font-weight:800;
}

.top-category-post-body{
    padding:22px;
}

.top-category-post-meta{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin:0 0 10px;
    color:#7b7b7b;
    font-size:12px;
    line-height:1.4;
}

.top-category-post-body h2{
    margin:0 0 12px;
    font-size:21px;
    line-height:1.35;
}

.top-category-post-body h2 a{
    color:#202020 !important;
    text-decoration:none !important;
}

.top-category-post-body h2 a:hover{
    color:var(--top-accent) !important;
}

.top-category-post-excerpt{
    margin:0 0 17px;
    color:#666;
    font-size:14px;
    line-height:1.72;
}

.top-category-read{
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:var(--top-accent) !important;
    font-size:13px;
    font-weight:800;
    text-decoration:none !important;
}

.top-category-read:hover{
    gap:11px;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.top-category-pagination{
    margin-top:45px;
}

.top-category-pagination ul{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    justify-content:center;
    margin:0;
    padding:0;
    list-style:none;
}

.top-category-pagination a,
.top-category-pagination span{
    min-width:40px;
    min-height:40px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:8px 13px;
    border:1px solid var(--top-border);
    border-radius:4px;
    background:#fff;
    color:#333 !important;
    text-decoration:none !important;
    font-size:13px;
}

.top-category-pagination .current{
    border-color:var(--top-green);
    background:var(--top-green);
    color:#fff !important;
}

.top-category-empty{
    padding:50px 25px;
    border:1px solid var(--top-border);
    border-radius:8px;
    background:#fff;
    text-align:center;
}

.top-category-empty h2{
    margin:0 0 8px;
}

.top-category-empty p{
    margin:0;
    color:#666;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media(max-width:1024px){

    .top-cat-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

    .top-category-post-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:767px){

    .top-cat-home{
        padding:52px 16px;
    }

    .top-cat-home-head h2{
        font-size:32px;
    }

    .top-cat-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:14px;
    }

    .top-cat-tile{
        min-height:205px;
    }

    .top-cat-tile-content{
        padding:14px;
    }

    .top-cat-tile-content strong{
        font-size:18px;
    }

    .top-category-hero{
        min-height:240px;
        padding:48px 16px;
    }

    .top-category-hero h1{
        font-size:36px;
    }

    .top-category-description{
        font-size:15px;
    }

    .top-category-content{
        padding:45px 16px 60px;
    }

    .top-category-post-grid{
        grid-template-columns:1fr;
    }
}

@media(max-width:480px){

    .top-cat-grid{
        grid-template-columns:1fr;
    }

    .top-cat-tile{
        min-height:225px;
    }
}