@import url('https://fonts.googleapis.com/css?family=Italianno');
@import url('https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700&subset=latin-ext');

/* Extra small devices (phones, 600px and down) */
@media only screen /*and (max-width: 600px)*/ {
    body {
        background-image: url("img/background.png"), url("img/wood.jpg");
        background-size: 100% auto, auto;
        background-repeat: repeat-y, repeat;
        background-position-x: center;
        background-color: #efe2b8;
        margin:0 auto;
        width: 88%;
        -webkit-text-size-adjust:100%;
        -moz-text-size-adjust:100%;
        -ms-text-size-adjust:100%;
    }

    header {
        margin: 30px 0;
    }

    h1 {
        font-family: 'Italianno', 'Lucida Calligraphy', 'Brush Script MT', 'Brush Script Std', 'URW Chancery L', cursive;
        font-size: 2.5em;
        font-weight: normal;
        text-align: center;
        margin: 0;
    }

    h2 {
        font-family: 'Italianno', 'Lucida Calligraphy', 'Brush Script MT', 'Brush Script Std', 'URW Chancery L', cursive;
        font-size: 2em;
        font-weight: normal;
        text-align: center;
        margin: 0;
        color: #000060
    }

    main {
        font-family: 'Libre Baskerville', serif;
        font-size: .9em;
    }

    img {
        max-width: 150px;
        min-width: 150px;
        display: block;
        margin: 3em auto 0;
        padding: 0;
        border-radius: 30px;
        box-shadow: 6px 6px 8px rgba(0,0,0,.5);
    }

    article {
        max-width: max-content;
        margin: 0em auto;
    }

    h3 {
        font-weight: bold;
        margin: 1.5em 0 0;
    }
    
    h4 {
        font-weight: normal;
        font-style: italic;
        margin: 0;
    }
    
    p {
        font-size: 1em;
        margin: 10px 0;
        padding: 0;
        line-height: 1.3em;
    }

    h5{
        font-size: 1em;
        font-weight: bold;
        line-height: 1em;
        padding: 0.7em 5em 0;
        margin: 0;
        width: max-content;
    }

    footer {
        text-align: left;
        text-indent: 8em;
        font-style: italic;
    }
    
    #poema_de_los_dones h3 {
        display: none;
    }

    #poema_de_los_dones p::first-letter {
        font-size: 200%;
    }

    #en_el_abismo #dedicatoria {
        text-align: right;
        margin: 1em 0 0 0;
    }

    #en_el_abismo p{
        text-indent: 1.2em;
    }
    
    #mancha_de_tinta p{
        text-indent:1em;
    }
    
    #el_brujo_postergado p {
        text-align: justify;
        text-indent: 1.5em;
        line-height: 1.4em;
    }

    #la_noche_boca_arriba p {
        text-align: justify;
        text-indent: 2.5em;
        line-height: 1.4em;
    }

    #la_noche_boca_arriba #intro {
        font-weight: normal;
        font-style: italic;
        text-align: right;
        font-size: .85em;
        margin: 1em 0 1em 0;
    }

    #contador {
        max-width: 120px;
        min-width: 120px;
        display: inline-block;
        margin: 1em;
        padding: 0;
        border-radius: 5px;
        box-shadow: 0px 0px 0px #000;
    }

    body > footer {
        font-family: 'Libre Baskerville', serif;
        text-align: center;
        font-weight: bold;
        font-style: normal;
        font-size: .8em;
        margin: 50px 0 25px 0;    
        text-indent: 0;
    }
}

@supports (display: grid) {

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {

}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {

    h1 {
        font-size: 5em;
    }

    h2 {
        font-size: 4em;
    }

    main {
        display:grid;
        grid-template-columns: 1fr 1fr;
        font-size: .9em;
        align-items: start;
    }

    article {
        max-width: none;
        margin: 0em;
    }

    img {
        display: block;
        margin: 6em 2em 0;
    }

    #diecisiete_haiku {
        max-width: max-content;
        margin: 0em auto;
    }

    #poema_de_los_dones {
        grid-column: 1 / span 2;
        min-width: 600px;
        margin: 0 auto;
    }

    #poema_de_los_dones img {
        display: block;
        float: left;
        margin: 1em 3em 1em 1em;
    }

    #poema_de_los_dones p {
        padding: 3em 0 0 0;
    }

    #diecisiete_haiku {
        grid-column: 2 / 3;
        grid-row: 2 / span 3;
    }

    #el_divino_amor {
        grid-column: 1 / 2;
        grid-row: 2 / span 1;
    }
    
    #el_silencio {
        grid-column: 1 / 2;
        grid-row: 3 / span 1;
    }

    #soneto {
        grid-column: 1 / 2;
        grid-row: 4 / span 1;
    }
    
    #mancha_de_tinta {
        grid-column: 2 / 3;
        grid-row: 5 / span 1;
    }

    #en_el_abismo {
        grid-column: 1 / 2;
        grid-row: 5 / span 1;
    }

    #el_brujo_postergado {
        grid-column: 1 / span 2;
    }
    
    #la_noche_boca_arriba{
        grid-column: 1 / span 2;
    }
    
    #la_noche_boca_arriba > img {
        padding: 0;
        margin: 0 6em 0 auto;
    }
    #en_el_abismo #dedicatoria {
        text-align: left;
        text-indent: 10em;
        margin: 1em 0 0 0;
    }
    
    #diecisiete_haiku h5{
        font-size: 1em;
        font-weight: bold;
        line-height: 1em;
        padding: 0.7em 0.3em 0;
        margin: 0;
    }

    #contador {
        max-width: 150px;
        min-width: 150px;
    }
}

@media only screen and (min-width: 800px) {
    main {
        font-size: 1em;
    }
} 

@media only screen and (min-width: 900px) {
    main {
        font-size: 1.1em;
    }
} 

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    h1 {
        font-size: 6em;
    }

    h2 {
        font-size: 5em;
    }

    main {
        display:grid;
        grid-template-columns: 1fr 1fr 1fr;
        font-size: .8em;
    }

    img {
        margin: 4em 2em 0;
    }

    #diecisiete_haiku {
        max-width: none;
        margin: 0em;
    }

    #poema_de_los_dones {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }
    
    #el_divino_amor {
        grid-column: 3 / 4;
        grid-row: 1 / 3;
    }
    
    #en_el_abismo {
        grid-column: 1 / 2;
        grid-row: 2 / 7;
    }
    
    #mancha_de_tinta {
        grid-column: 2 / 3;
        grid-row: 2 / 6;
    }
    
    #el_silencio {
        grid-column: 3/ 4;
        grid-row: 3 / 4;
    }
    
    #soneto {
        grid-column: 3/ 4;
        grid-row: 4 / 5;
    }
    
    #el_brujo_postergado {
        grid-column: 3 / 4;
        grid-row: 5 / 6;
        margin: 0 0 0 -50px;
    }
    
    #la_noche_boca_arriba{
        grid-column: 2 / 4;
        grid-row: 6 / 8;
        margin: -50px 0 0 0;
    }
    
    #diecisiete_haiku {
        grid-column: 1 / 2;
        grid-row: 7 / 8;
    }

    #la_noche_boca_arriba > img {
        padding: 0;
        margin: 0 0 0 60%;
    }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1080px) {

    main {
        font-size: .9em;
    }
} 
@media only screen and (min-width: 1200px) {

    h1 {
        font-size: 7em;
    }

    h2 {
        font-size: 5em;
    }

    body {
        background-size: 1200px auto, auto;
        width: 1056px; /* 1200 * .88 */
    }

    main {
        font-size: 1em;
    }

    img {
        max-width: 200px;
        min-width: 200px;
        margin: 3em 2em 0;
    }
} 
}