*,*::before,*::after{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root{
    --fprincipal:'Nunito', sans-serif;
    --ftexto:'Poppins', sans-serif;
    --clr-principal:#7ED957;
    --clr-secundario:#DE3F3F;
    --clr-fondo:#0B4A15;
    --clr-fondo-secundario:rgb(46, 139, 86);
}

:not(.active)>a:focus{
    outline: 2px solid var(--clr-secundario);
    outline-offset: 6px;
}

body{
    font-family: var(--ftexto);
    overflow-x: hidden;
}
/*
=============
textos
=============
*/
h1{
    font-family: var(--fprincipal);
    font-weight: 800;
    font-size: clamp(2rem, 0.5rem + 5vw, 4rem);
    line-height: 1.25;
    color: #000;
}
h2{
    font-family: var(--fprincipal);
    font-weight: 800;
    font-size: clamp(1.75rem, 0.5rem + 4vw, 3rem);
    line-height: 1.25;
    color: var(--clr-principal);
}
h3{
    font-family: var(--fprincipal);
    font-weight: 800;
    font-size: clamp(1.5rem, 0.3rem + 3vw, 2.5rem);
    line-height: 1;
    margin-bottom: 0.5em;
}

p, label, :not(nav)>ul>li{  
    margin: 10px 0;
    font-size: clamp(0.85rem, 0.1rem + 1.25vw, 1.125rem);
    font-weight: 400;
    line-height: 1.5;
}

a{
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

/* 
=================
EDITAR POST
=================
*/


input{
    font-family: inherit !important;
    font-size: clamp(0.85rem, 0.1rem + 1.25vw, 1.125rem);
    backdrop-filter: opacity(1);
    display: block;
}
input + input{
    margin-top: 2rem;
}

textarea{
    padding: 5px;
    font-family: inherit;
    border-radius: 0;
    min-width: 100%;
    max-width: 100%;
    min-height: 800px;
}

/*
    ==================
    BOTON GUARDAR POST
    ==================
*/

.boton{
    background-color: var(--clr-secundario);
    color: #ffffff;
    font-family: var(--fprincipal);
    font-weight: 800;
    font-size: clamp(1rem , 0.7rem + 1vw  ,1.5rem);
    text-align: center;
    text-decoration: none;
    width: fit-content;
    margin: 10px 0;
    padding: 10px 15px;
    border: none;
    border-radius: 23px;
    cursor: pointer;
    transition: 0.3s background-color;
    z-index: 4;
}
.boton:hover{
    background-color: #fd8a8a;
}
.guardar-post{
    position:fixed;
    top: 116px;
    right:1rem;
    width: max-content;
    z-index: 50;
}

.ir-a-post{
    background-color: var(--clr-fondo-secundario);
    position:fixed;
    top: 176px;
    right:1rem;
    width: max-content;
    z-index: 50;
}
/*
=================
ESTRUCTURA POST
=================
*/



/*
============================
    SECCION INICIAL
============================
*/

main{
    margin-top: 100px;
    /*min-height: 100vh; */
    width: 100vw;
    overflow-x: hidden;
}

.index-blog{
    background: url(../imagenes/fondo_blog.svg);
    padding: 5% 10%;
    background-color: #d4ffc9;
    background-repeat:no-repeat !important;
    background-size: 100%;
    background-position: bottom center;
    position: relative;
    overflow: hidden;
}

.seccioninicial-blog:not(.index-blog){
    padding: 5% 10%;
    min-height:60vh;
    background-color: #fff;
    background-repeat:no-repeat !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    background-position: center !important;
    position: relative;
    overflow: hidden;
}

.seccioninicial-blog:not(.index-blog):before{
    content: '';
    background-color: rgba(0, 0, 0, 0.2);
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.seccioninicial-blog h1{
    color:#fff;
    border-radius: 0 100vw 100vw 0;
    background-color: hsla(146, 50%, 36%, 0.733);
    padding: clamp(1rem, 4vw ,2.5rem);
    width: max-content;
    max-width: 14ch;
    font-weight: 800;
    font-size: clamp(2rem, 0.5rem + 5vw, 4rem);
    line-height: 1;
    backdrop-filter: blur(2px);
    /* box-shadow: -8rem 0rem 0 0rem hsla(146, 50%, 36%, 0.733); */
    position: relative;
}
.seccioninicial-blog h1::before{
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    height: 100%;
    width: 100%;
    background-color: hsla(146, 50%, 36%, 0.733);
    backdrop-filter: blur(2px);
}

/*
======================
SECCION DEL CONTENIDO
======================
*/

.fecha, .autor{
    color: rgba(0, 0, 0, 0.7);
    position: relative;
    width: max-content;
}
.fecha{
    margin-bottom: 2rem;
}
.fecha::after{
    content: '';
    position: absolute;
    left: 0;
    right: -50%;
    top: 100%;
    height: 2px;
    background-color: rgba(0, 0, 0, 0.5);
}

.contenido{
    padding: 5% 10%;
}

.contenido-post p{
    max-width: 80ch;
}
.contenido-post p:first-child::first-letter{
    font-size: 1.5em;
}
.contenido-post img{
    width:100%;
    max-height: 500px;
    object-fit: cover;
}
.contenido-post a{
    color: var(--clr-secundario);
    transition: 0.3s color;
}
.contenido-post a:hover{
   color: #fd8a8a;
}

.contenido-post * + *{
    margin-top:1.5em;
}
.contenido-post iframe{
    width: 100%;
    height: calc( 9 * 80ch / 16);
}
@supports (aspect-ratio: 16/9){
    .contenido-post iframe{
        height: auto;
        aspect-ratio: 16/9;
    }
}


/*
===================
    OTROS POSTS
===================
*/

.posts{
    min-height: calc(75vh - 200px);
    background-color:#d0ffc3;
    padding: 5% 10%;
    display: flex;
    justify-content: center;
    flex-direction: column;
}
.posts h2{
    color: #fff;
    text-shadow: 0 0 8px #000;
}

.caja{
    background-color: var(--clr-fondo-secundario);
    margin-left: -15%;
    width: 130%;
    display: flex;
    align-items: center;
    padding: 2.5rem 15%;
    margin-bottom: 40px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.425);
    position: relative;
    overflow: hidden;
}
.titulo_fondo{
    font-family: var(--ftexto);
    color:#ffffff15;
    position: absolute;
    right: 10%;
    text-align: end;
    font-size: clamp(2.5rem, 6vw, 6rem);
    margin: auto;
    width: 12ch;
    line-height: 1;
    text-transform: uppercase;
    user-select: none;
}

.tarjeta-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1em;
}
.tarjeta{
    --padding: 1rem 1.5rem;
    background-color: #fff;
    display: grid;
    align-items: center;
    overflow: hidden;
}
.tarjeta-header.tarjeta-imagen{
    padding: 0;
    overflow: hidden;
    align-self: start;
}

.tarjeta-imagen  img{
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 200px;
    object-fit: cover;
    object-position: center;
}

.tarjeta-header{
    padding: var(--padding);
    padding-top: 1.5rem;
}
.tarjeta-body{
    padding: var(--padding);
    position: relative;
    max-height: 200px;
    overflow: hidden;
}
.tarjeta-body h3{
    font-size: 1.5rem;
}
.tarjeta-body div.texto-post{
    max-width: 90%;
}
.tarjeta-body:after{
    content: '';
    background: linear-gradient(rgba(255, 255, 255, 0), rgb(255, 255, 255) 75%);
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 20%;
} 
.tarjeta-footer{
    padding: var(--padding);
    padding-block: 1.5rem;
    align-self: end;
}

.sombra{
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.4);
}

:not(.tarjeta-footer)>.ver-post{
    display: block;
    margin: 2rem auto;
}
/*
===========================
      PIE DE PAGINA
===========================
*/


footer{
    color:#fff;
    background-color: var(--clr-fondo);
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}
footer p{
    text-align:center;
}

footer a{
    color: var(--clr-secundario);
    transition: 0.3s color;
}
footer a:hover{
    color: #fd8a8a;
}


@media(max-width:768px){
    /*
    =======================
        PAGINA PRINCIPAL
    =======================
    */

    header h1{
        display: none;
    }
}