
*
{
    box-sizing: border-box;
}

html, body
{
    height: 100%;
    background-color: #0c92f2;
    background-image: linear-gradient(to bottom, #2cb2ff 0%, #0c92f2 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #333;
    font-family: 'Catamaran', sans-serif;
}

body
{
    overflow-y: scroll; /* force scroll bar so the page doesn't jump around */
}

#header
{
    padding: 0;
    margin: 0;
    width: 100%;
    height: 250px;
    background-color: #fff;
    background-image: url(''), url(''), url('/img/diafriki18_banner_web.png'), radial-gradient(circle, #fff 0%, #bbd1cd 100%);
    background-repeat: no-repeat, repeat-x, no-repeat, no-repeat;
    background-position: 49.1% 72%, bottom center, center center, center center;
    background-size: auto 75px, auto 75px, auto 270px, auto auto;

    box-shadow: 0px 1px 3px rgba( 0, 0, 0, 0.7 );
}

#header .dropdown
{
    display: none;
}

#menu
{
    display: block;
    width: 100%;
    height: 40px;
    background-color: #333;
    background-image: linear-gradient(to bottom, #434343 0%, #333 100%);
    color: #fff;
    box-shadow: 0px 0px 4px #000;
    text-align: center;
    cursor: default;
    overflow-y: hidden;
}

#menu a
{
    color: inherit;
    text-decoration: none;
}

#menu li
{
    height: 40px;
    display: inline-block;
    line-height: 40px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 16px;
    vertical-align: top;
    
    transition: 0.3s;
    overflow: hidden;
}

#menu li.active
{
    background-color: #31a0ff;
    background-image: linear-gradient(to bottom, #51c0ff 0%, #31a0ff 100%);
}

#menu li:hover
{
    background-color: #eee;
    background-image: linear-gradient(to bottom, white 0%, #e8e8e8 100%);
    color: #333;
    cursor: pointer;
    font-size: 20px;
    padding-top: 1px;
}

a.back
{
    width: 60px;
    height: 40px;
    left: 0;
    top: 0;

    background-image: url('/img/back.svg?2');
    background-size: auto 40px;
    background-repeat: no-repeat;
    display: inline-block;
}

.container
{
    width: 900px;
    margin: auto;
    padding-top: 24px;
    padding-left: 24px;
    position: relative;
    padding-bottom: 20px;
}

.post
{
    border-radius: 4px;
    padding: 10px;
    background-color: #0b6399;
    box-shadow: 0px 1px 3px rgba( 0, 0, 0, 0.7 );
    background-image: url('/img/milenaria_bw.svg?2'), linear-gradient(to bottom, white 0%, #ddd 100%);
    background-position: center, left top;
    background-size: 350px, 100% 100%;
    background-repeat: no-repeat;

    line-height: 1.3em;
    color: black;
}

.post img
{
    max-width: 100%;
}

.post h1
{
    line-height: 1em;
    margin: -10px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #333;
    background-image: linear-gradient(to bottom, #434343 0%, #333 100%);
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

#content
{
    min-height: calc(100% - 250px - 40px - 100px);
    position: relative;

    background-image: url('/img/diafriki18_bg.jpg');
    background-size: 230px;
    background-color: #8258FA;
}

#footer
{
    background-color: #333;
    background-image: linear-gradient(to bottom, #333 0%, #222 100%);
    height: 100px;
    color: #999;
    font-size: 12px;
}

#footer	a
{
    color: #999;
    text-decoration: none;
    font-size: 20px;
    padding-right: 1em;
}


h1, h2, h3
{
    font-family: Dimbo, 'DimboWeb', sans-serif;
    margin-bottom: 0.1em;
}

h1
{
    color: #ffecbd;
    font-size: 48px;
    text-align: center;
}

a
{
    text-decoration: none;
}

b
{
    font-weight: bold;
}

i
{
    font-style: italic;
}

h2
{
    font-size: 24px;
    line-height: 30px;
}

p
{
    margin-bottom: 0.5em;
    line-height: 1.3em;
}

strong
{
    font-weight: bold;
    color: #d11e33;
}

.partner
{
    vertical-align: top;
    display: inline-block;
    width: 30%;
    background-color: white;
    color: #333;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    margin-right: 10px;
    height: 355px;
    background-image: linear-gradient(to bottom, white 0%, #ddd 100%);
    text-shadow: 0px 1px 0px white;
    box-shadow: 0px 1px 3px rgba( 0, 0, 0, 0.7 );
}

.partner.edit
{
    width: 100%;
}

.partner .name
{
    font-size: 20px;
    text-align: center;
    display: block;
    padding: 5px;
}

.partner .description
{
    line-height: 1.2em;
    display: block;
    text-align: justify;
}

.partner img
{
    display: block;
    margin: auto;
    width: 200px;
}

.admin a
{
    color: #888;
    text-decoration: none;
}

.admin
{
    position: absolute;
    right: 0;
    bottom: 0;
    opacity: 0.4;
}

.loginform
{
    background-color: #fff;
    border-radius: 3px;
    border: 1px solid #bdbdbd;
    padding: 5px;
    color: #333;
    width: 300px;
    margin: auto;
    padding-left: 25px;
    padding-right: 25px;
    padding-top: 15px;
    border-bottom: none;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}

div.postsep
{
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    border-bottom: 1px dashed #bbb;
}

input[type="text"], input[type="password"], input[type="submit"]
{
    border: 1px solid #aaa;
    background: white;
    border-radius: 2px;
    padding: 4px;
    display: block;
    width: 100%;
    margin-bottom: 15px;
    color: #333;
}

form
{
    margin-top: 8px;
}

input[type="submit"]
{
    font-weight: bold;
    width: auto;
    padding: 7px;
    margin: 0;
    display: inline-block;
}

.success
{
	border-radius: 3px;
	width: 100%;
	display: inline-block;
	background-color: #72ec5a;
	border: 1px solid #166f09;
	padding: 5px;
}


.buttons
{
    background-color: #eee;
    border: 1px solid #bdbdbd;
    border-top: 1px solid #ddd;
    width: 300px;
    margin: auto;
    padding-left: 25px;
    padding-right: 25px;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    padding-bottom: 5px;
    padding-top: 5px;
    height: 46px;
}

.buttons input[type="submit"]
{
    float: right;
    margin-top: 1px;
}

/* error text. should never be visible because errors should never happen */
pre
{
    white-space: inherit;
    word-wrap: break-word;
    font-family: monospace;
    line-height: 1.5em;
}


/* tablet/smallpc layout */

@media only screen and (max-width: 970px)
{
    #header
    {
        /* usual size is 250px */
        background-size: auto 30px, auto 30px, auto 90px, auto auto;
        height: 80px;
    }

    #menu
    {
        top: 80px;
    }

    .container
    {
        width: 100%;
        padding: 20px;
    }
    
    #content
    {
        min-height: calc(100% - 80px - 40px - 100px);
    }

    #menu li
    {
        font-size: 13px;
    }
}

/* phone layout */
/* kicks in when the menu bar doesn't fit on screen anymore */

@media only screen and (max-width: 830px)
{
    #content > .container
    {
        margin-top: 0px;
    }
    
    #menu
    {
       	padding-top: 80px;
        box-sizing: content-box;
    }                   	            

    #header
    {
        z-index: 20;
        background-color: #fee5af;
        background-image: url('/img/diafriki18_banner_movil.png'), radial-gradient(circle, #fff 0%, #bbd1cd 100%);
        background-size: auto 80px, auto auto;
        margin-bottom: 0;
        cursor: default;
        
        position: fixed;
        top: 0;
    }
    
    #header .dropdown
    {
        position: absolute;
        top: 30px;
        right: 32px;
        width: 20px;
        height: 20px;
        display: block;
        background-size: 20px;
        background-repeat: no-repeat;
        background-image: url('/img/dropdown-opaque.svg?3');
        transition: 0.3s;
        
        -webkit-transform: translateZ(0); /* mobile browsers are cancerous */
        cursor: default;
    }
    
    #menu.expanded
    {
        max-height: 400px; /* 10 entries * 40px */
    }
    
    #header.expanded .dropdown
    {
        transform: rotate(180deg);
        transform-origin: center 10px;
    }

    .partner
    {
        width: 100%;
        margin-right: 0;
        height: auto;
    }

    .partner img
    {
        width: 80%;
    }

    #menu
    {
        transition: 0.3s;
        max-height: 0;
        height: auto;
        overflow: hidden;
    }
    
    #menu a.back
    {
        position: fixed;
        z-index: 20;
        width: 80px;
        height: 54px;
        background-size: auto 54px;
        top: 13px;
        left: 5px;
    }

    #menu li
    {
        display: block;
        text-align: left;
        font-size: 16px !important;
    }
    
    #content
    {
        min-height: calc(100% - 100px); /* http://caniuse.com/#feat=calc */
    }
    
    .event
    {
        padding-left: 20px;
        min-height: 260px;
	padding-right: 20px;
    }
    
    .event .name
    {
        text-align: center;
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
    }

    .poster
    {
	width: 100%;
	height: initial;
        max-height: initial;
	position: relative;
        left: 0;
	right: 0;
        top: 0;
        border-radius: 0;
	margin-bottom: 6px;

        box-shadow: 0px 1px 3px rgba( 0, 0, 0, 0.4 );
    }

    h1
    {
        font-size: 40px;
    }

    .admin
    {
        right: 2em;
        bottom: 2em;
    }
}
