/* Generales */
html {
  box-sizing: border-box;
}

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

a {
    color: inherit;
    text-decoration: underline;
}

html, body {
    width: 100%;
    height: 100%;
    background-image: url(../img/fondo.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #f9c744;
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    font-family: 'Open Sans', sans-serif;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
}

hr {
    border-top: 1px solid black;
    border-bottom: none;
}

/* Main */
main {
    width: 900px;
    margin: 10px;
    /*padding: 10px;*/
}
/* Header */
header {
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    header {
        margin-bottom: 20px;
    }
}

/* Datos del libro */
.datos {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
}

.datos__portada {
    flex-basis: 32%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.datos__explicacion { 
    flex-basis: 68%;
    padding-left: 30px;
}

.datos__explicacion h1 {
    font-size: 40px;
    font-weight: bold;
    line-height: 40px;
    margin: 0;
}

.datos__explicacion img {
    display: none;
}

.datos__explicacion h2 {
    font-size: 20px;
    line-height: 24px;
}

.datos__explicacion p {
    font-size: 16px;
    line-height: 20px;
}

@media (max-width: 768px) { 
    .datos__portada {
        display: none;
    }
    
    .datos__explicacion {
        flex-basis: 100%;
        padding-left: 0;
    }

    .datos__explicacion img {
        max-width: 70%;
        max-height: 350px;
        display: block;
        margin: 20px auto 10px auto;
        position: relative;
        left: -20px;
    }

    .datos__explicacion h1 {
        text-align: center;
    }
}

/* Indice */
.indice {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}
.indice h3 {
    margin: 0 20px 0 0;
    font-weight: bold;
    color: black;
    font-size: 19px;
}

.indice span {
    font-style: italic;
    border: 1px solid gray;
    padding: 5px;
    display: inline-block;
    margin: 5px;
    background-color: black;
    color: white;
}

@media (max-width: 768px) {
    .indice {
        flex-wrap: wrap;
        text-align: center;
    }
}

/* Opt-in */
.opt-in {
    background-color: #3D140A;
    border-radius: 5px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;


    display: block;
}

.opt-in__listo {
    text-align: center;
}

.opt-in__listo > a {
    display: inline-block;
    background-color: #f4aa26;
    color: #3D140A;
    text-decoration: none;
    padding: 20px 50px;
    margin: 10px auto;
    font-size: 24px;
    font-weight: bold;
    border-radius: 15px;
}

.opt-in__listo h4 {
    margin: 0;
    font-weight: bold;
    color: #FAE198;
    font-size: 29px;
}

.opt-in__capitulo {
    display: flex;
    flex-basis: 30%;
    justify-content: flex-start;
    align-items: flex-start;
    min-height: 160px;
    position: relative;
}

.opt-in__capitulo img:first-of-type {
    margin-right: 10px;
    max-height: 45%;
    width: auto;
}

.opt-in__capitulo h3 {
    margin: 0;
    font-size: 20px;
    color: white;
    width: 130px;
    line-height: 28px;
}

.opt-in__capitulo img:last-of-type {
    position: absolute;
    top: 120px;
    left: 120px;
    z-index: 0;
    opacity: .4;
}

.opt-in__formulario {
    flex-basis: 70%;
}

.opt-in__formulario h4 {
    margin: 0;
    font-weight: bold;
    color: #FAE198;
    font-size: 29px;
}

.opt-in__formulario h4 span {
    text-decoration: underline;
}

.opt-in__formulario p {
    color: #E7E7E7;
    margin: 10px 0 0 0;
}

@media (max-width: 768px) { 
    .opt-in__capitulo {
        flex-basis: 100%;
        order: 1;
        margin-top: 20px;
        justify-content: center;
    }

    .opt-in__formulario {
        flex-basis: 100%;
        order: 0;
    }

    .opt-in__formulario h4 {
        text-align: center;
        font-size: 32px;
    }

    .opt-in__formulario p {
        text-align: center;
    }

    .opt-in__capitulo {
        min-height: auto;
    }

    .opt-in__capitulo h3 {
        margin: 0;
        font-size: 25px;
        width: auto;
        line-height: normal;
        text-align: center;
    }

    .opt-in__capitulo img:first-of-type {
        margin-right: 10px;
        max-height: 50%;
        width: auto;
    }

    .opt-in__capitulo img:last-of-type {
        transform: rotate(-90deg);
        position: relative;
        width: 40%;
        left: auto;
        right: auto;
        top: auto;
        display: block;
    }
}

/* Footer */
footer {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
    justify-content: space-between;
}

.about {
    flex-basis: 35%;
    text-align: center;
    background-color: rgba(255, 255, 255, .7);
    padding: 15px 25px;
}

.about h5 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.about img {
    width: 45%;
    margin: 10px 0;
}

.about p {
    margin: 0;
    font-size: 14px;
    font-style: italic;
}

.widget-de-facebook {
    flex-basis: 63%;
    background-color: rgba(255, 255, 255, 1);
    text-align: center;
}

.about h6 {
    margin: 10px 0;
    font-size: 14px;
    font-weight: bold;
}

.about a {
    display: block;
    padding: 5px 10px;
    background-color: #F5A623;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 20px;
    color: black;
}

.faq {
    margin-top: 20px;
}

.faq h2 {
    text-align: center;
}

.faq dt {
    font-size: 18px;
    font-weight:bold;
}

.faq dd {
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .about {
        flex-basis: 100%;
    }

    .about img {
        max-width: 170px;
    }

    .widget-de-facebook {
        flex-basis: 100%;
        margin: 20px 0 0 0;
        height: 500px;
    }

    .faq dd {
        margin-left: 10px;
        margin-bottom: 25px;
    }
}

/* Gracias */
.gracias {
    text-align: center;
}

.gracias h1 {
    font-weight:bold;
}

/* ConvertKit */
#ck_firstNameField {
    display: none;
}
#ck_emailField {
    z-index: 10;
    position: relative;
}

.ck_form.ck_naked .ck_form_fields {
    padding: 0 !important;
}

.ck_form.ck_naked .ck_subscribe_button {
    width: 40% !important;
    background-color: #F5A623 !important;
    border-radius: 5px !important;
    color: black !important;
    font-weight:bold;
}

.ck_form.ck_naked input[type="email"] {
    width: 55% !important;
}

@media (max-width: 768px) {
    .ck_form.ck_naked .ck_subscribe_button {
        width: 100% !important;
        margin-top: 10px !important;
    }

    .ck_form.ck_naked input[type="email"] {
        width: 100% !important;
    }
}

/* Facebook page plugin */
.fb-like-box, .fb-like-box span, .fb-like-box.fb_iframe_widget span iframe {
    width: 100% !important;
}