/*
    Base definitions
*/
*, *:before, *:after {
    box-sizing: border-box;
}
body {
    margin: 0;
    padding: 0;
    background: #fff;
}
h1, h2, h3 {
    margin: 0;
    font-family: 'Cairo', sans-serif;
    line-height: 1.0;
    color: #000;
}
h3 {
    font-size: 22px;
}
p {
    font-family: 'Crimson Text', serif;
    font-size: 20px;
    color: #000;
}
a {
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/*
    JonnyRam Red
*/
header h1, .works .category,
a, .works p a {
    color: #900;
}
/*
    Header
*/
header {
    max-width: 1200px;
    margin: 20px auto;
}
header .txt {
    margin: 0 5%;
    border-bottom: 1px solid #ccc;
    padding-bottom: 20px;
}
header h1, h2 {
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
}
header h2 {
    color: #666;
}

/*
    Works list
*/
.container {
    max-width: 1200px;
    margin: 20px auto;
}
.works {
    margin: 0 5%;
}
.works .txt {
    margin-top: 15px;
}
.works a {
    color: #000;
}
.works h2 {
    margin: 15px 0 10px 0;
    clear: both;
    font-size: 20px;
    font-weight: 700;
    color: #000;
}
.works .category {
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform:uppercase;
}
.works p {
    font-size: 16px;
}
.item {
    display: block;
    margin-top: 20px;
    margin-bottom: 20px;
    float: left;
    width: 47.5%;
}
.item:nth-of-type(odd) {
    margin-right: 5%;
}
.item .gfx {
    width: 100%;
    height: 150px;
    background-color: #ccc;
    overflow: hidden;
}
.item .gfx img {
    min-width: 100%;
    height: 100%;
    width: auto;
}
.item a span:after {
    content: " >";
    font-size: 0.9em;
}
.item .private {
    font-style: italic;
    color: #999;
}

/*
    Case Studies
*/
.casestudy {
    margin: 0 5%;
}
.casestudy h3 {
    font-size: 36px;
    font-weight: 600;
}
.casestudy p {
    padding-right: 33%;
}
p.date {
    font-size: 16px;
    font-style: italic;
    color: #666;
}
p.intro {
    font-weight: 700;
    line-height: 1.5;
}
.screens .item {
    float:left;
    width: 21.25%;
    margin-right: 5%;
    background-color: #ccc;
    padding: 10px;
}
.screens .item:nth-of-type(4) {
    margin-right: 0;
}

/*
    Mobile
*/

@media (max-width: 599px) {
    .item {
        margin-top: 20px;
        margin-bottom: 40px;
        float: none;
        width: 100%;
    }
    .item:nth-of-type(odd) {
        margin-right: 0;
    }
    .casestudy p {
        padding-right: 0%;
    }
    .screens .item {
        width: 45%;
        margin-right: 10%;
    }
    .screens .item:nth-of-type(even) {
        margin-right: 0;
    }
    
}

/*
    MODAL
    See: http://demo.chobits.ch/css3/modal/center.html
*/
#screen1 {
    display: none;
    position: fixed;
    transform: translate(0,0);
    width: auto; left: 0; right: 0;
    height: auto; top: 0; bottom: 0;
    z-index: 990; /* display above everything else */
    background: transparent; /* no background, just fill space */
    padding: 20px; /* create padding for inner window - page under modal window will be still visible */
}

.ramphone {
    -webkit-box-align: center;
    -moz-box-align: center;
    box-align: center;
    -ms-flex-align: center;
    flex-align: center;
    -webkit-align-items: center;
    -webkit-align-content: center;
    align-items: center;
    align-content: center;
    -webkit-box-pack: center;
    moz-box-pack: center;
    box-pack: center;
    -ms-flex-pack: center;
    flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}

#screen1:target {     /* when URL contains hash of this element... */
    display: block; /* ... then make it visible (fallback for IE9 and older) */
    display: -webkit-box !important; /* iOS6+, Safari 3.1+ */
    display: -moz-box !important; /* Firefox 4 - 19 */
    display: box !important; /* (Opera 12 - 14) */
    display: -ms-flexbox !important; /* IE10 */
    display: flexbox !important; /* (?) */
    display: -webkit-flex !important; /* iOS7.1+, Safari 6+ */
    display: flex !important; /* (Firefox 22+, Chrome 21+, IE11, Opera 15+) */
}

.ramphone .shade {
    /* shade creates semi-transparent background for modal window to block clicks on page below */
    display: block;
    position: absolute;
    width: auto; left: 0; right: 0;
    height: auto; top: 0; bottom: 0;
    box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box;
    z-index: 995; /* display between modal container and modal window */
    opacity: 0.5;
    background: #222222;
}

.ramphone .inner {
    /* inner window in the actual modal window with backround, border, etc. */
    box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box;
    aaawidth: 100%;
    aaawidth: 348px;
    height: 100%;       /* allow to fit content (if smaller)... */
    aaamax-height: 100%;   /* ... but make sure it does not overflow browser window */
    max-height: 600px;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative; /* allows to use z-index to display over shade but still remain non-absolute layout */
    z-index: 999;

    /* definition of modal window layout */
    background: #222222;
    border: 2px solid #222222;
    border-radius: 16px; /* some nice (modern) round corners */
    padding: 16px 8px;       /* make sure inner elements does not overflow round corners */
    /* Note:
     *  Scrollbar over round corners may not look good in some browsers
     *  so if you expect the content to be long, you better not use them.
     */
}

.ramphone .header, .ramphone .content, .ramphone .footer {
    width: 316px;
    max-width: calc(100% - 16px);
}

.ramphone .header { /* allows to position close button to the right */
    position: relative;
    aaaposition: absolute;
    color: #fff;
    top: -16px;
    height: 30px;
    max-width: 100%;
}

.ramphone .content {
    position: absolute;
    top: 30px;
    bottom: 30px;
    overflow-y: auto;
}

.ramphone .content img {
    width: 100%;
    height: auto;
}

.ramphone .footer { /* allows to position close button to the right */
    position: absolute;
    font-family: 'Cairo',sans-serif;
    text-transform: none;
    aaatext-align: center;
    color: #fff;
    height: 30px;
    bottom: 0;
}

.ramphone .footer div { 
    text-align: center;
}

.ramphone a.close {  /* display close link in top right corner */
    position: absolute;
    top: 2px;
    right: 8px;
    font-family: 'Cairo',sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
