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


    /* PROJECTS ARCHIVE */
    .thumb-view#projects_front .project_thumbnail {
        grid-column: span 6!important;
    }

    .list-view#projects_front .project_info_area {
        display: none;
    }

    .list-view#projects_front .project_thumbnail .info_area .area:first-of-type {
        flex: 2;
    }

}





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

    :root {
        --fontsizeuniversal: 16px;

            --maxheightmenu: 160px;
                --fontsizexl: 2.8rem;
		
		
		--0un: 10px;
    --1un: 20px;
    --2un: 40px;
    --3un: 80px;


    }

.mobile {
    display: unset;
}

.nomobile {
    display: none;
}

/* HEADER */
nav#main_menu ul {
    display: none;
}

header.active {
    height: 100vh;
     background-color: var(--red)!important;
    background: var(--red)!important;
}

	#logomenu a#logo {
	    position: static!important;
	
	}
	
body.home header:not(.logoshrink) #logomenu a#logo {
    position: static;
    left: var(--1un);
    top: var(--1un);
    width: calc(100vw - var(--1un) * 2);
    background-image: url(/assets/logos/Logo_Emma_red.svg);
}
	
header.shrink {
    background: none;
    top: calc(var(--menuheight) * -1 - var(--1un) * 2);
}
	
	body.home > header:not(.active) {
    max-height: calc(var(--maxheightmenu) + var(--1un) * 2);
}

body > header:not(.active) {
    max-height: calc(var(--minheightmenu) + var(--1un) * 2);
}

body > header.shrink:not(.active), body.single-post > header:not(.active) {
    max-height: calc(var(--minheightmenu) + var(--1un) * 2);
}


header.shrink.scrollback.active {
    max-height: 100vh;
   
}

nav#menu_mobile {
    display: flex;
}

	
	
body:not(.home) header {
    background: var(--bgcolorsingle);
}
	
	body.single-post header:not(.shrink) {
		    background: none;
	}


header.active {
    --menuheight: var(--maxheightmenu)!important;
}

header.active #logomenu a#logo {
    background-image: url(/assets/logos/Logo_Emma_white.svg);
}

body:has(header.active) {
    overflow: hidden;
}

body.home header:not(.shrink) #logomenu a#menu_toggle {
    display: none;
}

#logomenu a#menu_toggle { 
    display: block;
}




/* HOME - INTRO */
#home_text_intro p {
    grid-column: 1 / -1;
}
	
	body.home header:not(.shrink) {
	display: block;
}

.home_gallery .nav_menu_gallery, .home_gallery .lang_switch {
    position: absolute;
	top: unset!important;
    bottom: 0;
    width: 100%;
    z-index: 8;
    display: flex;
    justify-content: space-between;
    padding: var(--1un);
    box-sizing: border-box;
    text-transform: uppercase;
    transition: opacity .5s ease;
	    animation-delay: none;
}

.home_gallery .lang_switch {
    bottom: unset;
    top: 0;
    flex-direction: column;
    align-items: flex-end;
}
	
	.home_gallery .logo_gallery {
 display: none;
	}


/* HOME - PROJECTS */
#projects_highlight_intro .project_thumbnail, #projects_highlight_intro .project_thumbnail:nth-child(4) {
grid-column: span 9;
}

#projects_highlight_intro .project_thumbnail:nth-child(5) {
grid-column: 4 / -1;
}

#projects_highlight_intro .project_thumbnail:nth-child(2) {
    grid-column: 4 / -1;
}

#projects_highlight_intro .project_thumbnail:nth-child(6) {
        grid-column: 1 / 11;
}

.project_thumbnail .info_area .area:not(:first-child) {
    display: none;
}

.project_thumbnail .info_area .area {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

#projects_highlight_intro .project_thumbnail:nth-child(3) figure {
    aspect-ratio: auto;
}

.project_thumbnail:not(:hover) .info_area {
    opacity: 1;
    /*
    position: static;
    background: none;
    padding: 0;
    margin-top: var(--0un);
    */
}

/*
.project_thumbnail:not(:hover) .info_area * {
    color: var(--black);
}
    */
	
	
	


/* HOME - NEWS */
#news_intro {
    padding: 0;
    gap: var(--1un);
}

#news_intro p {
    max-width: none;
}

#news_intro li:not(:hover) {
    opacity: 1;
}

#news_intro li * {
    color: var(--red)!important;
}

#news_intro .news_wrapper_scroll:not(:hover) .button {
    opacity: 1;
    --buttoncolor: var(--black);
    border-color: var(--black);
}

.news_wrapper_scroll, .news_wrapper h2 {
    padding: 0 var(--1un);
}

#news_intro .news_wrapper, .news_wrapper_scroll, #news_intro figure {
        grid-column: 1 / -1;
        mask-image: none;
        max-height: none;
}

#news_intro #load_more_news {
align-self: center;
}
	
	#news_intro li:not(:last-of-type):after {
	background-color: var(--red);
	}


/* FOOTER */
footer {
    padding-top: 0;
}

ul.footer_comp li:first-child {
    display: none;
}

ul.footer_comp li:nth-child(2) {
    text-align: left;
}

ul.footer_comp li * {
    font-size: var(--fontsizexs);
}



/* PROJECTS PAGE */
	
	body:not(.home) main {
    margin-top: calc(var(--minheightmenu) + var(--1un) * 4);
}

#projects_front {
    gap: var(--1un);
}

#projects_front .project_thumbnail, .thumb-view#projects_front .project_thumbnail {
    grid-column: 1 / -1!important;
}

#projects_front .project_thumbnail figure {
    aspect-ratio: 4 / 3;
    height: auto;
}

body.page-template-page-projects .page_title {
font-size: 0rem;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

main header h1 {
    width: 100%;
        flex: auto;
}

.list-view#projects_front .project_thumbnail .info_area .area a > h3 {
    flex: 1;
}

.list-view#projects_front .project_thumbnail .info_area .project_info_location {
    text-align: right;
}



/** SINGLE PROJECT PAGE **/

.single-post main header h1, .single-post main nav h1 {
    display: none;
}

.single-post main header {
    height: 70vh;
    background-size: cover!important;
    background-position: center!important;
}

.single-post main nav {
    flex-direction: column;
}

.single-post main nav ul {
    gap: var(--gutter);
    width: 100%;
}

.single-post main nav ul li {
    flex: 1;
}

.single-post main nav ul li:nth-child(2) {
text-align: center;
}

.single-post main nav ul li:last-child {
    text-align: right;
}

#project_presentation .intro_text, #project_presentation .intro_img {
    grid-column: 1 / -1;
}


.wrapper_overlay {
    --widthoverlay: 100vw;
}

.wrapper_overlay .content_overlay .content_overlay_header {
    flex-direction: column;
        gap: 1rem;
}

.wrapper_overlay .content_overlay .content_overlay_header .intro_text {
    text-align: left;
}

#related_projects {
        display: flex;
        flex-direction: column;
        padding: var(--1un);
        gap: var(--1un);
        padding-bottom: 0;
}

	/*
#project_presentation {
    gap: var(--gutter);
}
	*/

.module_onecolumn_shrink {
    grid-column: 1 / -1;
}

.module_tree_column figure, .module_two_column figure {
    width: 100%!important;
}

.module {
    flex-direction: column;
}
	
	.module_tree_column figure,
.module_two_column figure,
.module_onecolumn_shrink figure {
    width: 100% !important;
}

	
	.module_two_column {
		grid-column: 1 / -3;
	}
	
	.module_tree_column {
    grid-column: 1 / -6;
}
	
	
	
	/** CORRECT POSITIONS SINGLE PROJECT **/
	
	.module.module_two_column, .module.module_tree_column {
		display: flex;
		grid-column: 1 / -1;
		gap: var(--gutter);
		flex-direction: row;
	}
	
	.module.module_two_column figure, .module.module_tree_column figure { 
		flex: 1;
		max-width: calc(50% - var(--gutter) / 2)!important;
	}
	
	.module.module_tree_column.right, .module.module_two_column.right {
    align-items: flex-end;
}
	
	.module.module_two_column.center, .module.module_tree_column.center {
    align-items: center;
}
	
	


/** SEARCH **/
body:has(.search_wrapper.active) > main, body:has(.search_wrapper.active) > footer {
    transform: none;
}


.search_wrapper {
    z-index: 9;
    background-color: none;
    transition: transform .5s ease;
}

body:has(header.active) .search_wrapper {
    background-color: transparent;
    z-index: 11;
}

body:has(header.shrink.active) .search_wrapper, body:has(header.shrink.active) .search_wrapper a#search_close {
    transform: none;
    transition: none;
    pointer-events: none;
    opacity: 0;
}

body:has(header.shrink.active) .search_wrapper.active #search_results {
    pointer-events: all;
}

body:has(header.shrink.active) .search_wrapper.active {
    opacity: 1;
}

body > header.active, body:has(.search_wrapper.active) > header #logomenu a#menu_toggle {
    pointer-events: all!important;
}

body:has(.search_wrapper.active) > header.shrink {
    background: var(--red) !important;
}



body:has(.search_wrapper.active) > header a:not(#logo) {
    opacity: 1;
    pointer-events: all;
}

.search_wrapper input {
width: calc(100% - var(--1un) * 2);
    left: var(--1un);
}

.search_wrapper.search_mode input {
    top: calc(var(--minheightmenu) + var(--1un) * 2 - 1px);
}

body:has(.search_wrapper.active) #logomenu {
    --menuheight: var(--minheightmenu);
}

#search_results {
    padding: 0 var(--1un);
    height: calc(100vh - var(--1un) * 2 - var(--minheightmenu) * 2);
}

#search_results li {
    grid-column: 1 / -1;
}

.search_wrapper.search_mode #search_results {
    top: calc(var(--minheightmenu) + var(--1un) * 2 + var(--minheightmenu))
}



/** ABOUT PAGE **/
#contact_about {
    row-gap: var(--1un);
}

#contact_about > * {
    grid-column: 1 / -1;
    order: 2;
}

#contact_about .getintouch {
        order: -111;

}

#contact_about div:has(+ .contact_field) {
    order: 0;
}

#contact_about .contact_field {
    order: -1!important;
}


.page-template-page-sobre .home_gallery img {
        --margingallery: var(--1un);
}
	
	#home_text_intro .p_wrapper, .page-template-page-sobre .home_gallery.mini_gallery {
		grid-column: 1 / -1;
	}
	
	.page-template-page-sobre .home_gallery.mini_gallery {
		margin-top: var(--2un);
		margin-bottom: var(--1un);
	}

body.page-template-page-sobre main {
    margin-top: calc(var(--maxheightmenu) + var(--1un) * 3);
}

.list_about .details {
    position: static;
    width: 100%;
    margin-top: var(--0un);
    margin-bottom: var(--0un);
    transform: none;
}

.list_about .details img {
    width: 20%;
    height: auto;
    aspect-ratio: 3 / 4;
}

.list_about .details p {
    flex: 2;
    transition: opacity .25s ease;
}


}






@media (hover: none) and (pointer: coarse) {

    /*
.list_about li:not(:has(.active)) .details {
    opacity: 0;
}

.list_about li:not(.active) .details img {
    max-height: 0;
    opacity: 0;
        transition: max-height .25s ease, opacity .25s ease;
}

.list_about li:not(.active) .details p {
    opacity: 0;
        transition: opacity .25s ease;
}

*/
}