:root {
    --title-font: "Chakra Petch", system-ui, sans-serif;
    --text-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --subtitle-font: "Rajdhani", system-ui, sans-serif;
    --red-color: #cc0000;
    --text-color: #94a3b8;
    --white-color: #fff;
    --grey-color: #96999d;
    --border-radius: 8px;
    --padding-top: 60px;
    --padding-bottom: 60px;
    --border-grey: 1px solid #FFFFFF1A;
    --redbg-hover: #bf0000;
    --red-gradient: linear-gradient(to right, var(--red-color) 0%, rgba(255, 0, 59, 0.6) 100%);
    --dark-bg: #0a0d12;
}

*,*::before, *::after{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body{
    background-color: var(--dark-bg);
}

/* MAIN - HERO TITLE */

.main_container{
    max-width: 1400px;
    width: 100%;
    margin: auto;
    display: flex;
    flex-direction: column;
    /* FIX: padding horizontal para no pegar a los bordes */
    padding: 120px 16px 0;
}

.main_title{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.main_title div{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    /* FIX: evita que se achique demasiado */
    flex-shrink: 0;
}

.main_title div img{
    max-width: 100px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.65));
    z-index: 0;
}

.main_title div h3{
    color: var(--white-color);
    font-size: 36px;
    font-family: var(--title-font);
    font-style: italic;
    line-height: 0.8;
    margin-top: -10px;
    z-index: 100;
    white-space: nowrap;
}

.main_title div span{
    background: var(--red-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main_title h1{
    color: var(--white-color);
    font-size: 96px;
    font-family: var(--title-font);
    font-style: italic;
    line-height: 0.9;
    /* FIX: en lugar de max-width fijo, flex para que escale */
    flex: 1 1 auto;
    min-width: 0;
}

.main_title h1 span{
    background: var(--red-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main_title h2{
    color: var(--text-color);
    font-family: var(--text-font);
    font-size: 22px;
    font-weight: 300;
    line-height: 1.5;
}

/* SECOND SECTION / LAST POST */

.second_wrapper{
    padding-top: var(--padding-top);
    padding-bottom: var(--padding-bottom);
    background-color: #0a0d12;
}

.second_container{
    border-radius: 16px;
    border: var(--border-grey);
    max-width: 1400px;
    width: 90%;
    margin: auto;
}

.last_post{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    background-color: #000;
    border-radius: 16px;
    height: 500px;
    overflow: hidden;
}

/* FIX: flex en lugar de max-width fijo */
.last_post_img{
    flex: 1 1 55%;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.last_post_img img{
    width: 100%;
    height: 100%;
    border-radius: 16px 0 0 16px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.last_post_img:hover img {
  transform: scale(1.1);
}

/* FIX: flex en lugar de max-width fijo */
.last_post_info{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 45%;
    min-width: 0;
    padding: 32px 28px;
    height: 100%;
    justify-content: space-around;
}

.last_post_banners{
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.banner_1{
    display: flex;
    gap: 6px;
    background-color: var(--red-color);
    padding: 4px 12px;
    border-radius: var(--border-radius);   
    align-items: center;
    justify-content: center;
    width: auto;
}

.banner_1 svg{
    width: 12px;
    height: 12px;
}

.banner_1 p{
    font-family: var(--title-font);
    color: var(--white-color);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.6px;
}

.banner_2{
    border-left: var(--border-grey);
    padding-left: 16px;
}

.banner_2 p{
    font-family: var(--subtitle-font);
    color: var(--grey-color);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
}

.last_post_textbox{
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
}

.last_post_textbox h2{
    font-size: 38px;
    line-height: 1.1;
    font-family: var(--title-font);
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        #f2f2f2 40%,
        #96999d 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    margin-bottom: 16px;
}

.last_post_textbox h3{
    color: var(--text-color);
    font-family: var(--text-font);
    font-weight: 300;
    font-size: 18px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.last_post_author{
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.author, .date{
    display: flex;
    gap: 8px;
    align-items: center;
}

.author p, .date p{
    font-family: var(--subtitle-font);
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.4;
    font-weight: 500;
}

.author svg, .date svg{
    width: 16px;
    height: 16px;
}

.post_button{
  display: flex;
}

.post_button a{
    --skew: -14deg;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 56px;
    width: auto;
    padding: 0 28px;
    background: var(--white-color);
    color: #000;
    text-decoration: none;
    letter-spacing: .06em;
    text-transform: uppercase;
    transform: skewX(var(--skew));
    border-radius: 2px;
    box-shadow: 0 12px 24px rgba(0,0,0,.35);
    transition: all .25s ease;
    font-family: var(--title-font);
    font-size: 20px;
    font-weight: 700;
}

.post_button a p,
.post_button a svg{
    transform: skewX(14deg);
}

.post_button a p{
    margin: 0;
    font-size: 15px;
    white-space: nowrap;
}

.post_button a svg{
    width: 20px;
    height: 20px;
}

.post_button a:hover{
    filter: brightness(1.08);
    transform: skewX(var(--skew)) translateY(-1px);
}

/* THIRD SECTION - LAST OPINIONS */

.third_wrapper{
    padding-bottom: var(--padding-bottom);
    background-color: #0a0d12;
    padding-top: var(--padding-top);
}

.third_container{
    max-width: 1400px;
    width: 90%;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.third_title{
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    /* FIX: margin-bottom en el wrapper, no en el h2 */
    margin-bottom: 48px;
}

.third_title h2{
    font-family: var(--title-font);
    font-weight: 700;
    font-style: italic;
    color: var(--white-color);
    font-size: 48px;
    line-height: 1;
    /* FIX: eliminado margin-bottom del h2, movido al .third_title */
    margin-bottom: 0;
}

.third_title h2 span{
    background: linear-gradient(to right, var(--red-color) 0%, rgba(255, 0, 59, 0.6) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.third_title button{
    background-color: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.third_title button a{
    text-decoration: none;
    color: var(--white-color);
    font-family: var(--title-font);
    letter-spacing: 0.7px;
    line-height: 1.4;
    font-size: 16px;
    font-weight: 700;
    transition: .5s all ease;
}

.third_title button a:hover{
    color: var(--red-color);
}

/* FIX: grid en lugar de flex para las opinion cards — 3 columnas en desktop */
.lastopinions_container{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    margin-bottom: 36px;
    gap: 20px;
}

.last_opinion{
    width: 100%;
    height: auto;
    overflow: hidden;
    cursor: pointer;
    border: var(--border-grey);
    border-radius: var(--border-radius);
    transition: border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.last_opinion:hover{
    border-color: var(--redbg-hover);
}

.last_opinion img{
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    /* FIX: sin border duplicado ni max-width innecesario */
    display: block;
}

.last_opinion_text{
    font-family: var(--text-font);
    color: var(--text-color);
    font-size: 14px;
    padding: 0 16px 16px;
    margin-bottom: 0;
    line-height: 1.5;
    border-bottom: var(--border-grey);
    /* FIX: flex-grow para que el texto empuje el footer de la card hacia abajo */
    flex-grow: 1;
}

.last_opinion div{
    display: flex;
    align-items: center;
    margin-bottom: 0;
    gap: 8px;
    padding: 12px 16px;
}

.last_opinion div h4{
    font-family: var(--title-font);
    color: var(--text-color);
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
}

.last_opinion div svg{
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.last_opinion h3{
    font-family: var(--title-font);
    color: var(--white-color);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    transition: color .3s ease;
    padding: 16px 16px 12px;
}

.last_opinion:hover h3 {
    color: var(--red-color);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* --- TABLET (≤ 1024px) --- */
@media (max-width: 1024px) {
    .main_container {
        padding-top: 100px;
    }

    .main_title h1 {
        font-size: 64px;
        line-height: 1;
    }
    .main_title div h3 {
        font-size: 24px;
    }
    .main_title div img {
        max-width: 80px;
    }

    .second_container,
    .third_container {
        width: 90%;
    }

    /* Last post apilado en tablet */
    .last_post {
        height: auto;
        flex-direction: column;
    }
    .last_post_img {
        flex: none;
        width: 100%;
    }
    .last_post_img img {
        border-radius: 16px 16px 0 0;
        height: 100%;
    }
    .last_post_info {
        flex: none;
        width: 100%;
        padding: 28px 24px;
    }

    /* Opinions: 2 columnas en tablet */
    .lastopinions_container {
        grid-template-columns: repeat(2, 1fr);
    }

    .third_title h2 {
        font-size: 36px;
    }
    .third_wrapper {
        padding-top: var(--padding-top);
    }
}

/* --- MOBILE (≤ 768px) --- */
@media (max-width: 768px) {
    :root {
        --padding-top: 40px;
        --padding-bottom: 40px;
    }


    /* Hero: ocultar foto/nombre del autor, solo mostrar el título */
    .main_title {
        justify-content: flex-start;
    }
    .main_title div {
        display: none;
    }
    .main_title h1 {
        font-size: 48px;
        line-height: 1.1;
        flex: none;
        width: 100%;
    }

    /* Last post */

    .last_post_textbox h2 {
        font-size: 28px;
    }
    .last_post_textbox h3 {
        font-size: 16px;
    }
    .last_post_info {
        padding: 24px 20px;
    }

    /* Opinions: 1 columna en mobile */
    .lastopinions_container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .third_title {
        margin-bottom: 32px;
        gap: 12px;
    }
    .third_title h2 {
        font-size: 30px;
    }
    .third_title button a {
        font-size: 14px;
    }

    .last_opinion img {
        height: 180px;
    }
    .last_opinion h3 {
        font-size: 18px;
    }
}

/* --- MÓVILES PEQUEÑOS (≤ 480px) --- */
@media (max-width: 480px) {
    .main_title h1 {
        font-size: 38px;
    }
    .last_post_textbox h2 {
        font-size: 24px;
    }
    .last_post_textbox h3 {
        font-size: 15px;
    }
    .third_title h2 {
        font-size: 26px;
    }
    .last_opinion img {
        height: 160px;
    }
    .post_button a{
        padding: 0 10px;
    }
}