/* ==================================================
CONTAINER
================================================== */

.home-main{
    padding:30px 0 60px;
}

.container{
    width:min(1380px,94%);
    margin:auto;
}

/* ==================================================
SECTIONS
================================================== */

section{
    margin-bottom:55px;
}

section h2{
    font-size:30px;
    line-height:1.2;
    margin-bottom:28px;
    font-weight:800;
    color:#111;
}

/* ==================================================
GRID SYSTEM
================================================== */

.grid-3,
.grid-4{
    display:grid;
    gap:26px;
}

.grid-3{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

.grid-4{
    grid-template-columns:repeat(4,minmax(0,1fr));
}

/* ==================================================
CARDS
================================================== */

.grid-3 article,
.grid-4 article,
.category-card{
    background:#fff;
    border-radius:20px;
    overflow:hidden;
    border:1px solid #ececec;
    transition:.25s ease;
    min-width:0;
}

.grid-3 article:hover,
.grid-4 article:hover,
.category-card:hover{
    transform:translateY(-4px);
    box-shadow:0 15px 40px rgba(0,0,0,.08);
}

/* ==================================================
LINKS
================================================== */

.grid-3 article a,
.grid-4 article a,
.category-card a{
    display:flex;
    flex-direction:column;
    height:100%;
    text-decoration:none;
}

/* ==================================================
IMAGENS
================================================== */

.grid-3 img,
.grid-4 img,
.category-thumb img{
    width:100%;
    aspect-ratio:16/9;
    object-fit:cover;
    display:block;
}

/* ==================================================
CONTENT
================================================== */

.category-content,
.grid-3 article a,
.grid-4 article a{
    min-width:0;
}

.grid-3 h3,
.grid-4 h3,
.category-card h3{
    font-size:20px;
    line-height:1.4;
    font-weight:800;
    color:#111;
    margin:0;
    overflow-wrap:break-word;
}

/* ==================================================
POST CATEGORY
================================================== */

.post-category{
    display:inline-block;
    margin-bottom:12px;
    font-size:12px;
    font-weight:700;
    letter-spacing:.6px;
    text-transform:uppercase;
    color:#d10000;
}

/* ==================================================
CATEGORY CONTENT
================================================== */

.category-content{
    padding:22px;
}

/* ==================================================
EXCERPT
================================================== */

.excerpt{
    margin-top:14px;
    font-size:15px;
    line-height:1.7;
    color:#666;
}

/* ==================================================
HERO
================================================== */

.hero-wrapper{
    display:grid;
    grid-template-columns:1.5fr 1fr;
    gap:24px;
}

.hero-main{
    position:relative;
}

.hero-main-image{
    position:relative;
    border-radius:26px;
    overflow:hidden;
    min-height:620px;
}

.hero-main-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.hero-overlay{
    position:absolute;
    inset:0;
    background:linear-gradient(
        to top,
        rgba(0,0,0,.82),
        rgba(0,0,0,.15),
        transparent
    );
}

.hero-main-content{
    position:absolute;
    left:34px;
    right:34px;
    bottom:34px;
    z-index:5;
}

.hero-main-content .hero-category{
    display:inline-block;
    margin-bottom:16px;
    padding:7px 14px;
    background:#d10000;
    border-radius:999px;
    color:#fff;
    font-size:12px;
    font-weight:700;
    text-transform:uppercase;
}

.hero-title{
    color:#fff;
    font-size:44px;
    line-height:1.1;
    font-weight:900;
    margin:0;
}

/* ==================================================
HERO SIDE
================================================== */

.hero-side{
    display:flex;
    flex-direction:column;
    gap:24px;
}

.hero-side-item{
    flex:1;
}

.hero-side-item a{
    display:flex;
    flex-direction:column;
    height:100%;
    text-decoration:none;
    background:#fff;
    border-radius:22px;
    overflow:hidden;
    border:1px solid #ececec;
}

.hero-side-thumb img{
    width:100%;
    aspect-ratio:16/9;
    object-fit:cover;
    display:block;
}

.hero-side-content{
    padding:20px;
}

.hero-side-content h2{
    font-size:22px;
    line-height:1.35;
    margin:0;
    color:#111;
    font-weight:800;
}

.hero-side-content .hero-category{
    display:inline-block;
    margin-bottom:12px;
    color:#d10000;
    font-size:12px;
    font-weight:700;
    text-transform:uppercase;
}

/* ==================================================
POPULAR
================================================== */

.popular-list{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.popular-item a{
    display:flex;
    gap:18px;
    align-items:center;
    text-decoration:none;
}

.popular-thumb{
    position:relative;
    width:120px;
    flex-shrink:0;
}

.popular-thumb img{
    width:120px;
    height:120px;
    object-fit:cover;
    border-radius:18px;
}

.rank-badge{
    position:absolute;
    top:8px;
    left:8px;
    width:32px;
    height:32px;
    border-radius:50%;
    background:#d10000;
    color:#fff;
    font-weight:800;
    display:flex;
    align-items:center;
    justify-content:center;
}

.popular-content h3{
    margin:0;
    font-size:22px;
    line-height:1.4;
    color:#111;
}

/* ==================================================
RESPONSIVO
================================================== */

@media(max-width:1200px){

    .grid-4{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .hero-title{
        font-size:38px;
    }

}

@media(max-width:992px){

    .hero-wrapper{
        grid-template-columns:1fr;
    }

    .hero-main-image{
        min-height:520px;
    }

    .grid-3{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

}

@media(max-width:768px){

    .home-main{
        padding-top:18px;
    }

    section{
        margin-bottom:42px;
    }

    section h2{
        font-size:24px;
        margin-bottom:20px;
    }

    .grid-3,
    .grid-4{
        grid-template-columns:1fr;
        gap:18px;
    }

    .hero-wrapper{
        gap:18px;
    }

    .hero-main-image{
        min-height:420px;
        border-radius:22px;
    }

    .hero-main-content{
        left:20px;
        right:20px;
        bottom:20px;
    }

    .hero-title{
        font-size:28px;
        line-height:1.18;
    }

    .hero-side{
        gap:18px;
    }

    .hero-side-content{
        padding:18px;
    }

    .hero-side-content h2{
        font-size:20px;
    }

    .grid-3 h3,
    .grid-4 h3,
    .category-card h3{
        font-size:21px;
        line-height:1.35;
    }

    .category-content{
        padding:18px;
    }

    .popular-item a{
        align-items:flex-start;
    }

    .popular-thumb{
        width:95px;
    }

    .popular-thumb img{
        width:95px;
        height:95px;
    }

    .popular-content h3{
        font-size:18px;
    }

}

@media(max-width:480px){

    .container{
        width:92%;
    }

    .hero-main-image{
        min-height:360px;
    }

    .hero-title{
        font-size:24px;
    }

    .grid-3 h3,
    .grid-4 h3,
    .category-card h3{
        font-size:19px;
    }

}
/* ==================================================
CORREÇÃO DEFINITIVA DOS CARDS
================================================== */

/* CARD BASE */

.grid-3 article,
.grid-4 article,
.category-card{
    overflow:hidden;
}

/* LINK */

.grid-3 article > a,
.grid-4 article > a,
.category-card > a{
    display:block;
    text-decoration:none;
    color:inherit;
}

/* THUMB */

.grid-3 article img,
.grid-4 article img,
.category-thumb img{
    width:100%;
    aspect-ratio:16/9;
    object-fit:cover;
    display:block;
}

/* CONTEÚDO */

.grid-3 article h3,
.grid-4 article h3,
.category-card h3{
    font-size:22px;
    line-height:1.35;
    font-weight:800;
    margin:0;
    color:#111;
}

/* CATEGORY */

.post-category{
    display:inline-block;
    margin-bottom:12px;
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.7px;
    color:#d10000;
}

/* ESPAÇAMENTO */

.grid-3 article .post-category,
.grid-4 article .post-category,
.grid-3 article h3,
.grid-4 article h3{
    padding-left:20px;
    padding-right:20px;
}

.grid-3 article .post-category,
.grid-4 article .post-category{
    padding-top:18px;
}

/* FINAL DO CARD */

.grid-3 article h3,
.grid-4 article h3{
    padding-bottom:22px;
}

/* ==================================================
MOBILE
================================================== */

@media(max-width:768px){

    /* 1 CARD POR LINHA */

    .grid-3,
    .grid-4{
        grid-template-columns:1fr !important;
        gap:18px;
    }

    /* CARDS */

    .grid-3 article,
    .grid-4 article,
    .category-card{
        border-radius:18px;
    }

    /* TITULOS */

    .grid-3 article h3,
    .grid-4 article h3,
    .category-card h3{
        font-size:22px;
        line-height:1.35;
    }

    /* IMAGENS */

    .grid-3 article img,
    .grid-4 article img,
    .category-thumb img{
        aspect-ratio:16/9;
    }

}

/* ==================================================
DESKTOP
================================================== */

@media(min-width:769px){

    .grid-4{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

    .grid-3{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

}
/* ==================================================
MOBILE FIX DEFINITIVO
================================================== */

@media screen and (max-width:768px){

    /* CONTAINER */

    .container{
        width:94% !important;
        padding:0 !important;
    }

    /* HERO */

    .hero-wrapper{
        display:flex !important;
        flex-direction:column !important;
        gap:18px !important;
    }

    .hero-main{
        width:100% !important;
    }

    .hero-main-image{
        min-height:340px !important;
        border-radius:20px !important;
        overflow:hidden !important;
        position:relative !important;
    }

    .hero-main-image img{
        width:100% !important;
        height:100% !important;
        object-fit:cover !important;
    }

    .hero-main-content{
        position:absolute !important;
        left:18px !important;
        right:18px !important;
        bottom:18px !important;
        z-index:10 !important;
    }

    .hero-title{
        font-size:26px !important;
        line-height:1.2 !important;
        color:#fff !important;
    }

    /* HERO SIDE */

    .hero-side{
        display:flex !important;
        flex-direction:column !important;
        gap:18px !important;
    }

    .hero-side-item{
        width:100% !important;
    }

    .hero-side-item a{
        display:flex !important;
        flex-direction:column !important;
        border-radius:18px !important;
        overflow:hidden !important;
    }

    .hero-side-thumb img{
        width:100% !important;
        aspect-ratio:16/9 !important;
        object-fit:cover !important;
        display:block !important;
    }

    .hero-side-content{
        padding:16px !important;
    }

    .hero-side-content h2{
        font-size:20px !important;
        line-height:1.35 !important;
        margin:0 !important;
    }

    /* TODOS OS GRIDS */

    .grid-3,
    .grid-4{
        display:grid !important;
        grid-template-columns:1fr !important;
        gap:18px !important;
    }

    /* TODOS OS CARDS */

    .grid-3 article,
    .grid-4 article,
    .category-card{
        width:100% !important;
        border-radius:18px !important;
        overflow:hidden !important;
    }

    .grid-3 article > a,
    .grid-4 article > a,
    .category-card > a{
        display:flex !important;
        flex-direction:column !important;
    }

    /* IMAGENS */

    .grid-3 article img,
    .grid-4 article img,
    .category-thumb img{
        width:100% !important;
        aspect-ratio:16/9 !important;
        object-fit:cover !important;
        display:block !important;
    }

    /* CATEGORIA */

    .post-category{
        display:block !important;
        padding:16px 16px 10px !important;
        font-size:11px !important;
        line-height:1.2 !important;
    }

    /* TÍTULOS */

    .grid-3 article h3,
    .grid-4 article h3,
    .category-card h3{
        font-size:22px !important;
        line-height:1.35 !important;
        padding:0 16px 18px !important;
        margin:0 !important;
    }

    /* SECTION TITLES */

    section h2{
        font-size:24px !important;
        line-height:1.2 !important;
        margin-bottom:18px !important;
    }

}
/* ==================================================
CORREÇÃO TÍTULOS DAS SECTIONS
================================================== */

.trending-now h2,
.recommended h2,
.category-block h2,
.latest h2,
.most-read h2{

    display:flex;

    align-items:center;

    gap:10px;

    font-size:34px;

    line-height:1.1;

    font-weight:800;

    color:#111;

    margin-bottom:28px;
}

/* impede emoji/imagem gigante */

.trending-now h2 img,
.recommended h2 img,
.category-block h2 img,
.latest h2 img,
.most-read h2 img,

.trending-now h2 svg,
.recommended h2 svg,
.category-block h2 svg,
.latest h2 svg,
.most-read h2 svg{

    width:32px !important;

    height:32px !important;

    max-width:32px !important;

    object-fit:contain;

    flex-shrink:0;
}

/* mobile */

@media(max-width:768px){

    .trending-now h2,
    .recommended h2,
    .category-block h2,
    .latest h2,
    .most-read h2{

        font-size:24px;

        margin-bottom:20px;
    }

    .trending-now h2 img,
    .recommended h2 img,
    .category-block h2 img,
    .latest h2 img,
    .most-read h2 img,

    .trending-now h2 svg,
    .recommended h2 svg,
    .category-block h2 svg,
    .latest h2 svg,
    .most-read h2 svg{

        width:24px !important;

        height:24px !important;

        max-width:24px !important;
    }

}
/* ==================================================
HOME — AJUSTE DE CATEGORIAS E TÍTULOS
================================================== */

/* conteúdo do card */

.category-content{

    padding-top:4px;
}

/* categorias centralizadas */

.post-category,
.category-content .post-category{

    display:flex;

    justify-content:center;

    align-items:center;

    text-align:center;

    width:100%;

    margin-top:0;

    margin-bottom:8px;

    color:#d10000;

    font-size:11px;

    font-weight:700;

    text-transform:uppercase;

    letter-spacing:.6px;
}

/* títulos alinhados à esquerda */

.grid-3 article h3,
.grid-4 article h3,
.category-card h3,
.recommended article h3,
.trending-now article h3,
.category-block article h3{

    margin-top:0;

    color:#111;

    font-size:18px;

    line-height:1.35;

    font-weight:700;

    text-align:left;
}

/* mobile */

@media(max-width:768px){

    .category-content{

        padding-top:8px;
    }

    .post-category,
    .category-content .post-category{

        margin-top:4px;

        margin-bottom:6px;

        font-size:10px;
    }

    .grid-3 article h3,
    .grid-4 article h3,
    .category-card h3,
    .recommended article h3,
    .trending-now article h3,
    .category-block article h3{

        font-size:18px;

        line-height:1.32;
    }

}
/* ==================================================
APROXIMAR CATEGORIAS DAS IMAGENS
================================================== */

.category-content{

    padding-top:0 !important;

    margin-top:-2px !important;
}

.post-category,
.category-content .post-category{

    margin-top:0 !important;

    margin-bottom:6px !important;
}

/* remove espaços internos do link/card */

.category-card a,
.grid-3 article a,
.grid-4 article a{

    display:flex;

    flex-direction:column;

    gap:0;
}

/* MOBILE */

@media(max-width:768px){

    .category-content{

        padding-top:0 !important;

        margin-top:-6px !important;
    }

    .post-category,
    .category-content .post-category{

        margin-top:0 !important;

        margin-bottom:4px !important;

        font-size:10px;
    }

}
/* ==================================================
MOBILE — CORREÇÃO ESPAÇAMENTO DOS CARDS
================================================== */

@media(max-width:768px){

    .grid-3 article,
    .grid-4 article,
    .category-card,
    .recommended article,
    .trending-now article,
    .category-block article{

        padding:0 !important;

        margin:0 !important;
    }

    .grid-3 article a,
    .grid-4 article a,
    .category-card a{

        display:flex !important;

        flex-direction:column !important;

        gap:0 !important;
    }

    .category-thumb{

        margin-bottom:0 !important;
    }

    .category-content{

        padding-top:0 !important;

        margin-top:-10px !important;
    }

    .post-category,
    .category-content .post-category{

        margin-top:0 !important;

        margin-bottom:4px !important;

        line-height:1 !important;
    }

    .grid-3 article h3,
    .grid-4 article h3,
    .category-card h3{

        margin-top:0 !important;
    }

}