/* GENERALES */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@100;300;400;500;600;700;800;900&display=swap');


:root {
    /* Colores */
    --darkBlue: #172021;
    --blue: #2c3e40;
    --lightBlue: #377373;
    --lightGrey: #cecece;
    --white: #ffff;
    /* Fuente */
    --fontName: Raleway;

}

html {
    box-sizing: border-box;
  }
  *, *:before, *:after {
    box-sizing: inherit;
  }

body {
    max-width: 100%;
    color: var(--lightGrey);
}

section {
    margin-top: 40px;
}

img {
    max-width: 100%;
}

h1,h2,h3,h4,p, a {
    font-family: Raleway, Arial, Helvetica, sans-serif;
}

h2, h3 {
    font-weight: 700;
}


h1 {
    font-weight: 400;
}

h3 {
    font-size: 1.87rem;
    margin-bottom: 20px;
}

a {
    text-decoration: none;
}

/* Header */

.korppiHeader {
    background-color: var(--blue);
    max-width: 100%;
}

.topHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;

}

.shape {
    background-image: url(../img/Shape.svg);
    background-size: contain;
    background-repeat: no-repeat;
    min-height: 250px;
}

.logo {
    max-width: 60%;
    margin-left: 70px;
    margin-top: 20px;
    
}

.searchLogo {
    max-width: 40px;
    /* margin: 0 75px 83px 0; */
}

.headerBottom {
    margin: 0 auto;
    display: flex;
}

.headerBottom h1, .headerBottom h2, .headerBottom p {
    color: var(--white);
}

.headerBottom h2 {
    font-size: 3.75rem;
}

.headerBottom h1 {
    font-size: 1.87rem;
    margin-bottom: 20px;
}

.text {
    max-width: 40%;
}

.text p {
    font-size: 0.87rem;
}

.mercadoLibre {
    max-width: 30%;
    margin-top: 80px;
    /* margin-bottom: 60px; */
}

.headerBottom .bookCover {
    max-width: 50%;
    position: relative;
    bottom: 80px;
    /*Shadow*/
    -webkit-box-shadow: 10px 10px 22px 0px rgba(0,0,0,0.41);
    -moz-box-shadow: 10px 10px 22px 0px rgba(0,0,0,0.41);
    box-shadow: 10px 10px 22px 0px rgba(0,0,0,0.41);
}

.whiteShape {
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url(../img/WhiteShape.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom;
    max-width: 100%;
    object-fit: cover;
    /* margin-left: 50px; */
    margin-right: 10px;

}

.leftSide {
    margin: 0 0 40px 50px;
    margin-left: 50px;
    min-width: 45%;
}

/** SEARCH BAR TEST **/

form{
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    transition: all 1s;
    width: 50px;
    height: 50px;
    background: white;
    box-sizing: border-box;
    border-radius: 25px;
    border: 4px solid white;
    padding: 5px;
}

input{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;;
    height: 42.5px;
    line-height: 30px;
    outline: 0;
    border: 0;
    display: none;
    font-size: 1em;
    border-radius: 20px;
    padding: 0 20px;
}

.fa{
    box-sizing: border-box;
    padding: 10px;
    width: 42.5px;
    height: 42.5px;
    position: absolute;
    top: 0;
    right: 0;
    border-radius: 50%;
    color: var(--darkBlue);
    text-align: center;
    font-size: 1.2em;
    transition: all 1s;
}

form:hover,
form:valid{
    width: 200px;
    cursor: pointer;
}

form:hover input,
form:valid input{
    display: block;
}

form:hover .fa,
form:valid .fa{
    background: var(--darkBlue);
    color: var(--lightGrey);
}


.searchInput {
    margin-right: 40px;
}

.searchInput input {
    font-family: Raleway, "Helvetica Neue", Helvetica, Arial;
    font-weight: 700;
    color: var(--darkBlue);
}

.searchInput a {
  display: none;
  position: absolute;
  top: 70px;
  bottom:0;
  left: 0;
  right: 0;
  font-size: 20px;
  color: white;
  text-align: center; 
  width: 100%;
}

form:valid a {
  display: block;
}

@media screen and (max-width: 620px) {
.searchBox:hover > .searchInput {
    width: 150px;
    padding: 0 6px;
}
}

/** Books Catalog **/

.booksCatalog {
    max-width: 1200px;
    margin: 90px auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    justify-content: center;
    gap: 20px;
}

.book {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 16px 16px 16px;
    border-radius: 15px;
    border: var(--lightBlue) 5px solid;
    background-color: var(--white);
    transition: border-color 0.3s;
    margin: 0 20px;
}

.book:hover {
    border-color: var(--darkBlue);
}

.book img {
    width: 100%;
}

.book h3 {
    font-family: Raleway, "Helvetica Neue", Helvetica, Arial;
    text-align: center;
    color: var(--darkBlue);
    font-size: 25px;
}

/** BUTTONS 1 **/

button {
    max-width: 100%;
    --c:  var(--blue); /* the color*/   
    box-shadow: 0 0 0 .1em inset var(--c); 
    --_g: linear-gradient(var(--c) 0 0) no-repeat;
    background: 
      var(--_g) calc(var(--_p,0%) - 100%) 0%,
      var(--_g) calc(200% - var(--_p,0%)) 0%,
      var(--_g) calc(var(--_p,0%) - 100%) 100%,
      var(--_g) calc(200% - var(--_p,0%)) 100%;
    background-size: 50.5% calc(var(--_p,0%)/2 + .5%);
    outline-offset: .1em;
    transition: background-size .4s, background-position 0s .4s;
  }
  button:hover {
    --_p: 100%;
    color: var(--lightGrey);
    transition: background-position .4s, background-size 0s;
  }
  
  button {
    font-family: Raleway, sans-serif;
    border-radius: 300px;
    font-size: 2.3rem;
    cursor: pointer;
    padding: .1em .6em;
    font-weight: bold;  
    border: none;
    color: var(--blue);
  }


/** MOBILES AND OTHERS **/

@media (max-width: 880px){
    .booksCatalog {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 768px) {

    .searchLogo {
        margin: 0;
    }

    .headerBottom {
        max-width: 80%;
        position: static;
        bottom: 80px;
        /*Shadow*/
        /*-webkit-box-shadow: 10px 10px 22px 0px rgba(0,0,0,0.41);
        -moz-box-shadow: 10px 10px 22px 0px rgba(0,0,0,0.41);
        box-shadow: 10px 10px 22px 0px rgba(0,0,0,0.41); */
    }

    .leftSide {
        margin: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }


    .leftSide h2, h1 {
        text-align: center;
    }

    .whiteShape, .bookCover {
        content-visibility: hidden;
        visibility: hidden;
    }

    .text {
        visibility: hidden;
        max-width: 70%;
    }

    .headerBottom h2 {
        font-size: 2.75rem;
    }
    
    .headerBottom h1 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .booksCatalog {
        grid-template-columns: 1fr 1fr;
    }

    img.mercadoLibre {
        max-width: 50%;
        margin: 0 0 60px 0;
    }
}

@media (max-width: 548px) {
    .topHeader {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    img.mercadoLibre {
        max-width: 100%;
        margin: 0 0 60px 0;
    }

    .booksCatalog {
        grid-template-columns: 1fr;
    }

}

/* PAGINATION */

.pagination-wrapper {
    display: flex;
    justify-content: center;
    text-align: center;
    margin: 40px auto;
  }

.pagination {
    max-width: 50%;
	display: grid;
    grid-template-columns: 1fr 0.6fr 1fr;
    align-items: center;
    justify-content: center;
	height: 70px;
	margin-top: 70px;
	padding: 0 25px;
	border-radius: 35px;
	background-color: var(--lightGrey);
  }

  .previous {
    grid-column: 1 / 2;
    grid-row: 1 / 1;
  }

  .divide {
    margin: 0 auto;
    grid-column-start: 2;
    background-color: rgb(151, 149, 149);
    width: 2px;
    height: 100%;
  }

.previous a, .next-page a {
    font-weight: 700;
    color: var(--darkBlue);
    transition-duration: 0.3s;
}

.previous a:hover,
.next-page a:hover {
    background-color: transparent;
    color: var(--lightBlue);
}

/* FOOTER */

footer {
    display: flex;
    justify-content: end;
    background-color: #172021;
}

.text {
    display: flex;
    flex-direction: column;
    margin: 0 70px 10px 30px;
}

.text p {
    font-size: 1.2rem;
}

.shape2 {
    /*display: flex;
    justify-content: end;
    align-items: end;
    background-image: url(/img/Shape2.svg);
    background-repeat: no-repeat;
    background-size: contain;*/
    width: 120%;
    display: flex; 
    justify-content: end;
    align-items: end;
    background-image: url(../img/Shape2.png);
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center;
    object-fit: cover;
}

.shape2 a{
    max-width: 30%;
    max-height: 30%;
}

.shape2 img {
    position: relative;
    max-width: 40%;
    bottom: 10px;
}

.imgFooter {
    margin: 0 50px 20px 0;
    display: flex;
    flex-basis: 50% 10px;
    justify-content: center;
    align-items: end;
    max-width: 80%;
}

@media (max-width: 1150px) {
    .shape2 {
        background-image: none;
    }
}

@media (max-width: 768px) {
    footer {
        flex-direction: column;
    }

    .text {
        visibility: visible;
    }
}