/**
 * General layout.
 * ------------------------------------------------------------------------
 * Display mobile navigation.
 */
/*
@media screen and (max-width: 1036px) {
	.item.gallery-image-thumb:nth-child(2n) {
	    margin-right: 0;
	}
}

@media screen and (min-width: 1045px) and (max-width: 1297px) {
	.item.gallery-image-thumb:nth-child(3n) {
	    margin-right: 0;
	}
}

@media screen and (min-width: 1306px) and (max-width: 1555px) {
	.item.gallery-image-thumb:nth-child(4n) {
	    margin-right: 0;
	}
}

@media screen and (min-width: 1564px) and (max-width: 1813px) {
	.item.gallery-image-thumb:nth-child(5n) {
	    margin-right: 0;
	}
}

@media screen and (min-width: 1822px) {
	.item.gallery-image-thumb:nth-child(6n) {
	    margin-right: 0;
	}
}
*/
@media screen and (min-width: 1778px) {
	#masthead {
	    left: 50% !important;
	    margin-left: -889px !important;
	}

	#page {
	    margin: 0 auto;
	    max-width: 1778px;
	    position: relative;
	}

	#thumbnails { margin-right: -37px; }

	.footer-inner { position:relative; margin: 0 auto; max-width: 1778px; }
	body {overflow-y: scroll !important;}
}

@media screen and (max-width: 855px) {
	p {
	    display: block !important;
	    margin: 0 0 20px !important;
	    max-width: 620px !important;
	    width: 100% !important;
	}
}

@media screen and (min-width: 1024px) and (max-width: 1025px) {
	.gallery-image-thumb { margin-right: 14px !important; }

    .bottom-line,
    .bottom-line:before,
    .bottom-line:after { background: transparent none !important;}

    #masthead { width: 170px; }
    .wrapper { margin-left: 210px; }
    footer { margin-left: -210px; }

    .footer-right { margin-left: 210px; }
}

@media screen and (min-width: 768px) and (max-width: 770px) {
	.gallery-image-thumb { margin-right: 17px !important; }
}

@media screen and (max-width: 767px) {
    
    #content {
        overflow: hidden;
    }


    /**
     * Show mobile navigation.
     */
	#masthead {
	    display: block;
	    padding: 20px;
	    position: static;
	    width: auto;
	}

	.site-title > a > img {
	    margin-top: 6px;
	}

	.right-column { width: auto !important;}
	.bottom-line,
	.top-line {
		display: none !important;
	}

	hgroup {
	    height: 21px;
	    margin-left: -75px;
	    padding-left: 50%;
	    width: 150px;
	}

	.copyrights {
	    display: none;
	}

	.wrapper {
	    margin: 20px 15px 0 !important;
		width: auto !important;
	}

	/**
	 * Alternative navigation for mobile devices.
	 */
	#site-navigation {
		position: absolute;
		background: #DDDDDD;
		display: block;
		font-family: 'AvantGardeMdITCTT';
		height: 100%;
		top: 0;
		left: 0;
		z-index: 2000;
    	margin-top: 0 !important;
		width: auto;
	}

	#site-navigation .btn-open {
		display: block;
		width: 50px;
		background: #DDDDDD;
		position: absolute;
		top: 18px;
		color: #000000;
		text-align: center;
		text-decoration: none;
		text-transform: uppercase;
		font-size: 13px;
		padding: 10px 0;
		right: 0;
		-moz-transition: right 0.7s;
		-webkit-transition: right 0.7s;
		-o-transition: right 0.7s;
		transition: right 0.7s;
	}

	#site-navigation li a {
		display: block;
		color: #777777;
		font-size: 13px;
		padding: 10px 25px 10px 20px;
		border-bottom: 2px solid #F1F1F1;
		text-decoration: none;
	}

	#site-navigation > div > ul > li:last-child a { border-bottom: 0px solid #FFFFFF !important; }

	#site-navigation ul li a:hover,
	#site-navigation ul li.current-menu-item:not(.current-menu-ancestor) > a,
	#site-navigation li.current-menu-item a {
		color: #000000;
		background-color: #DDDDDD !important;
		font-weight: 400 !important;
	}
	#site-navigation ul li {margin:0 0 0 0 !important;}
	#site-navigation ul li ul.sub-menu {padding:0 0 0 0 !important;}
	#site-navigation ul li ul.sub-menu li a {
		padding: 5px 30px 5px 30px;
	}

	#site-navigation ul li ul.sub-menu ul li a {
		padding: 5px 40px 5px 50px;
		font-size: 11px;
	}

	#site-navigation li a:hover {
		background: #000000;
		position: relative;
		font-weight: 400 !important;
	}


    #site-navigation .btn-open {
        right: -50px;
		display: block;
    }

    .site-navigation {
        display: none !important;
    }

	.slides {
		width: 100% !important;
		/*display: inline;*/
	}

	.flexslider .item {
	    /*display: block !important;
	    float: none !important;
	    margin: 0 0 15px !important;
	    width: auto !important;*/
	}

	.flexslider .item.clone {
		display: none !important;
	}

	#story {
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}

	.story-before {
	    display: none !important;
	}

	footer {
	    bottom: auto !important;
	    left: auto !important;
	    position: relative !important;
	    right: auto !important;
		margin: 0 0 0 0 !important;
	}

	.footer-right {
	    bottom: auto !important;
	    float: left !important;
	    left: auto !important;
	    position: relative !important;
		width: 100%;
		margin: 0 0 0 0 !important;
	}

	.single-gallery .share-wrapper {
		left: auto !important;
	}

    /*#story-toggle,*/
	#fullscreen-toggle,
	#caption-toggle,
	#prev-slide-toggle,
	#slider-counter,
	#next-slide-toggle {
	    display: none !important;
	}

	.copyrights {
	    float: right;
	    margin-right: 15px;
	    position: relative;
		right: auto;
	}

	.contact-template .content p,
	.article-content .content p,
	.gallery-info .content p {
	    margin: 0 0 20px !important;
		display: block !important;
		width: 100%;
	}

	.contact-template,
	.article-content {
		margin: 0 0 0 0 !important;
		padding: 0 0 0 0 !important;
	}

	article.single-news {
	    height: auto !important;
	    margin-bottom: 40px !important;
	    position: static;
	}

	.news-thumbnail {
	    height: 120px;
	    width: 100%;
	}

	article.single-news .content {
	    height: auto !important;
	    margin-top: 10px;
	    position: static;
	}

   /* .single-editorial .mobile-info,
    .single-gallery .mobile-info { display: block; }*/

    #slider .flex-direction-nav { width: 100% !important; height: 50px !important; top: 50% !important; margin-top: -50px !important; z-index: 999; }
    #slider .flex-direction-nav .flex-next,
    #slider .flex-direction-nav .flex-prev { width: 100px; height: 100px; opacity: 1 !important; -moz-opacity: 1 !important; -khtml-opacity: 1 !important; top: 0; left: 0; background: transparent; }
    #slider .flex-direction-nav .flex-next { left: auto; right: 0; }

    #thumbnails .gallery-image-thumb { margin: 0 auto 21px; vertical-align: top; }
    #thumbnails { margin-bottom: -21px; }

    .flex-direction-nav li.first-child,
    .flex-direction-nav li.last-child { position: static; width: auto; height: auto; display: block; left: auto; right: auto; top: auto; }

    .footer-right .gallery-footer .spacer { display: none !important; }

    #download-pdf,
    #download-resume { margin-right: 0; }

    .share-wrapper { width: 70px; margin: 0 0 0 15px; }

    .page-template-page-publications-php #colophon { top: -25px; }

    .item.caption-active figcaption { 
        display: none !important;
    }

    .gallery-thumbnails {
        padding-bottom: 5px !important;
    }
}



/**
 * General iPhone layout.
 * ------------------------------------------------------------------------
 * Turn horizontal layout into vertical.
 * Disable unnecessary elements.
 */
@media screen and (max-width: 480px) {

    .horizontal-page #header {
        position: static;
        padding: 0 0 15px 0;
    }

    /**
     * Footer
     */
    .horizontal-page #footer {
        position: absolute;
        bottom: auto;
    }

    .horizontal-page #footer-push {
        display: block;
    }

    #footer {
        text-align: center;
    }

    #footer .footer-inner {
        padding: 60px 20px 20px;
        position: relative;
    }

    #footer .footer-inner:before {
        content: ' ';
        position: absolute;
        width: 20px;
        margin: 32px 0 0 -10px;
        border-top: 2px solid #111;
        height: 1px;
        left: 50%;
        top: 0;
    }

    #sharrre-footer {
        float: none;
        display: inline-block;
        margin: 0 0 10px;
        height: 21px;
    }

    #sharrre-footer[style] {
        display: inline-block !important;
    }

    #footer .social-networks {
        float: none;
        display: block;
        text-align: center
    }

    #footer .social-networks .icon-social {
        float: none;
        display: inline-block;
        margin: 0 5px;
    }

    #footer .footer-links {
        float: none;
    }

    #footer .footer-navigation {
        float: none;
        text-align: center;
        margin: 0;
        padding: 10px 0;
    }

    #footer .footer-navigation li {
        margin: 0 5px;
        display: inline-block;
        float: none;
    }

    #footer .footer-links .credits {
        float: none;
        font-size: 11px;
        padding: 5px 0;
        color: #ccc;
        margin: 0;
    }

    .footer-links .credits:before,
    .footer-navigation li:before {
        display: none;
    }


    /**
     * Hide footer in Full Page Slider, Page With Background and 404.
     */
    .page-template-template-full-page-slider-php #page-wrapper,
    .page-template-template-full-page-slider-php #main,
    .page-template-template-contacts-php #page-wrapper,
    .page-template-template-contacts-php #main,
    .page-template-template-background-php #page-wrapper,
    .page-template-template-background-php #main,
    body.error404 #main,
    body.error404 #page-wrapper {
        margin: 0;
    }

    .page-template-template-full-page-slider-php #footer,
    .page-template-template-full-page-slider-php #footer-push,
    .page-template-template-contacts-php #footer,
    .page-template-template-contacts-php #footer-push,
    .page-template-template-background-php #footer,
    .page-template-template-background-php #footer-push,
    body.error404 #footer,
    body.error404 #footer-push {
        display: none;
    }


    /**
     * Page: Full Page Slider
     */
    .page-template-template-full-page-slider-php #main {
        overflow: hidden;
    }

    .slider .slide .info {
        padding: 0 30px;
        width: 100%;
        background: rgba(255, 255, 255, 0.6);
        box-sizing: border-box;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        -o-box-sizing: border-box;
        -ms-box-sizing: border-box;
    }

    .slider .slide .info .viewport {
        padding: 20px 0;
    }

    .slider .slide .info.white {
        background: rgba(0, 0, 0, 0.6);
    }

    .slider .slide .info[style] {
        left: 0 !important;
    }

    .slide .style-default .slide-title {
        font-size: 30px;
    }

    .slider .slide .info .description {
        line-height: 21px;
    }

    .slider-navigation {
        display: none !important;
    }


    /**
     * Page: Portfolio
     */
    .project .hover-box .excerpt,
    .project .hover-box .decoration {
        display: none;
    }

    .project .hover-box h2 {
        padding-bottom: 10px;
    }

    .project .hover-box h2 {
        font-size: 18px;
        line-height: 21px;
    }

    .project .hover-box .subtitle {
        font-size: 13px;
    }

    .portfolio-navigation .other-projects a {
        width: 48%;
        margin: 0 4% 4% 0;
    }

    .portfolio-navigation .other-projects a:nth-child(2n+1) {
        margin-right: 0;
    }

    .portfolio-navigation .other-projects .item-3 {
        clear: left;
    }


    /**
     * Page: Grid Portfolio.
     */
    .portfolio-grid .grid-project,
    .portfolio-grid .grid-project[style] {
        height: 150px !important;
        padding: 0 15px 15px 0;
    }


    /**
     * Page: 404
     */
    .site .error404 {
        background: rgba(255, 255, 255, 0.9);
        padding: 10px;
    }

    .site .error404 h1 {
        font-size: 21px;
    }

    .site .error404 .entry-content p {
        font-size: 13px;
        line-height: 21px;
    }


    /**
     * Page: Contacts
     */
    .page-contacts .site-content .page[style],
    .page-contacts .site-content .page {
        top: 0 !important;
        width: auto;
        height: 100%;
    }

    .map-active #map {
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        z-index: 1000;
    }

    .map-active #mobilenav .btn-open {
        right: 0;
    }

    #map {
        visibility: hidden;
    }

    .map-active #map {
        visibility: visible;
    }

    .reveal-modal {
        width: 100%;
        margin: 0;
        left: 0;
        box-sizing: border-box;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        -ms-box-sizing: border-box;
        -o-box-sizing: border-box;
    }

    .wpcf7-form .wpcf7-form-control-wrap input[type="text"] {
        width: 100%;
    }


    /**
     * Page: Blog.
     */
    .post-image .cover h1 {
        font-size: 21px;
    }

    .post-image .cover p {
        font-size: 11px;
        margin: 0;
    }

    /**
     * Page: Vertical Blog
     */
    .vertical-blog .site-with-sidebar .site-content {
        padding-bottom: 0;
    }

    .vertical-blog .navigation-paging .wrap-page-numbers {
        position: static;
        margin: 35px 0 0 0;
        width: auto;
        text-align: left;
    }

    .vertical-blog .post-with-media .entry-date {
        top: 25px;
    }


    /**
     * Content.
     */
    .entry-content .standfirst {
        font-size: 16px;
    }

    .aside-content {
        float: none;
        width: 100%;
        margin: 0 0 15px;
        padding: 10px;
        border: 1px solid #eaeaea;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        -o-box-sizing: border-box;
        -ms-box-sizing: border-box;
        box-sizing: border-box;
        font-size: 14px;
        line-height: 21px;
    }

    .site-content table td,
    .site-content table th {
        font-size: 13px;
        line-height: 18px;
        padding: 5px;
    }

    .site-content thead th,
    .site-content thead td {
        font-size: 11px;
    }

    /* Remove grid columns. */
    .row-fluid [class*="span"] {
        float: none;
        width: 100%;
        margin: 0;
    }

    .tabs .tabs-menu li a b {
        display: inline;
    }

    .tabs .tabs-menu li a span {
        display: none;
    }

    /* Remove columns from service list */
    .service .service-content {
        font-size: 16px;
    }

    .service .service-content {
        width: 240px;
        margin-left: auto;
        margin-right: auto;
    }

    .service .service-name {
        font-size: 30px;
    }

    .page-title, .entry-title {
        font-size: 30px;
        text-indent: 0;
    }

    .alignright,
    .alignleft {
        margin: 0;
        float: none;
        display: block;
        width: 100%;
    }

    #respond label {
        position: static;
        width: auto;
    }

    #respond p input {
        float: none;
        margin: 0;
    }

    #respond p input[type="text"] {
        width: 100% !important;
    }

    .page-contacts .contact-details {
        border-left: 0 none;
    }

}


@media screen and (max-width: 320px) {

    .other-projects {
        display: none;
    }

    .portfolio-navigation .prev-project {
        margin: 15px 0;
    }

    .portfolio-navigation .next-project {
        float: right;
        margin: 15px 0;
    }

    .portfolio-navigation .back-portfolio {
        float: none;
        width: auto;
        display: block;
        clear: both;
        text-align: center;
    }

}


@media screen and (max-height: 320px) {

    .slide .info .slide-subtitle,
    .slide .info .description,
    .slide .info .decoration {
        display: none;
    }
    .slide .info .slide-title {
        margin: 0;
    }

    .button-minimal.button-icon-right {
        float: right;
    }

}



/**
 * High pixel ratio devices.
 */
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 124.8dpi) {

    /**
     * Display high-resulution logo.
     */
    .logo {
        display: none;
    }

    .logo-no-retina,
    .logo-retina {
        display: inline-block;
    }

    .default-logo {
        background-image: url(../images/logo@2x.png);
        background-size: 100%;
    }

    #sharrre-project .icon,
    .btn-appreciate .icon {
        background-image: url(../images/share-icons@2x.png);
        background-size: 100%;
    }

    #sharrre-project .icon {
        background-position: 0 -28px;
    }

    .wrap-avatar .avatar-128 {
        display: inline-block;
        width: 64px;
        height: 64px;
    }

    .wrap-avatar .avatar-64 {
        display: none;
    }

    .horizontal-posts .entry-date,
    .sep {
        background-image: url(../images/slash@2x.png);
        background-size: auto 100%;
    }

}