/*
Theme Name: Urbanophil 2024
Theme URI: https://urbanophil.net
Author: Ulrike Uhlig
Author URI: https://curlybracket.net
Version: 2.5
*/

@charset "UTF-8";

:root {
  --light: #fff;
  --dark: #000;
  --extra: rgba(0, 0, 245, 0.92);
  --grid: 20%;
  --gridm: 8%;
  --gridx: 2%;
  --mobilegrid: 34%;
  --title: 2.9em;
  --titleh: 1.15em;
  --vspace: 5vw;
  --hspace: 3vh;
}

::selection {
    background: #000;
    color: #fff;
}

/********************************
 * Fonts
 * *****************************/

@font-face {
    font-family: "LabGrotesqueRegular";
    src: url("fonts/LabGrotesque-Regular.woff"),
        url("fonts/LabGrotesque-Regular.woff2");
}

@font-face {
    font-family: "LabGrotesqueBold";
    src: url("fonts/LabGrotesque-Bold.woff"),
        url("fonts/LabGrotesque-Bold.woff2");
}

body {
    font-family: "LabGrotesqueRegular", Helvetica, Arial, sans-serif;
    shape-rendering: geometricPrecision;
    text-rendering: optimizeLegibility;
}

.section-teaser, .post-title, .item-title,
h1, h2, h3, h4, h5, b, strong, input[type="submit"] {
    font-family: "LabGrotesqueBold", Helvetica, Arial, sans-serif;
    font-weight: normal;
}

/********************************
 * Resets etc
 * ******************************/

* {
    margin: 0;
    padding: 0;
}

body {
    text-align: left;
    background-color: var(--light);
    color: var(--dark);

    font-size: 100%;
    line-height: 137%;

    -webkit-font-smoothing: antialiased;
    -moz-font-smoothing: antialiased;
    -ms-font-smoothing: antialiased;
    -o-font-smoothing: antialiased;
    font-smoothing: antialiased;
    overflow-x: hidden;

    scroll-behavior: smooth;
}

a:not(.section-more),
.post-content > p > a {
    text-decoration: none;
    color: var(--dark);
    position: relative;
    background-image: linear-gradient(180deg,transparent 88%,#000 0);
    background-repeat: no-repeat;
    background-position: 0 0;
    background-size: 0 100%;
    text-decoration: none;
    transition: background-size .5s ease;
}

a:hover,
.post-content > p > a,
.item:hover .item-title a,
.post:hover .post-title a,
.menu .current-menu-item a,
.menu .current_page_parent a,
.menu .current-page-ancestor a,
.author .author-thumbnail a.shortlink {
     color: var(--dark);
     background-size: 100% 100%;
}

.page-template-default .post a,
.single .post a {
    background-size: 100% 100%;
    transition: 0.3s ease-in;
}

.author .author-thumbnail a.shortlink,
.post-content > p > a {
    transition: none;
}

.post-content > p > a:hover,
.page-template-default .post a:hover,
.single .post a:hover,
.author .author-thumbnail a.shortlink:hover {
    background-size: 110% 110%;
    background-image: linear-gradient(180deg, transparent 0%,#000 0);
    color: #fff;
}

.single .thumbnail-large,
.page-template-default .thumbnail-large {
    grid-column-start: 1;
    grid-column-end: 3;
}

img {
    max-width: 100%;
    height: auto;
}

figcaption.wp-element-caption,
figcaption.wp-element-caption a {
    color: rgb(118,118,124);
}

/*******************************
  FORMS
*******************************/

.screen-reader-text {
    display: none;
}

input:focus {
    outline: none;
}

input[type="submit"],
input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="tel"],
input[type="search"],
.wpcf7-select,
textarea {
    color: var(--dark);
    padding: 5px;
    border: none;
    border-bottom: 2px solid var(--dark);
    background: var(--light);
    vertical-align: middle;
    box-sizing: border-box;
    max-width: 100%;
    margin: auto auto 0;
    font-size: 1em;
    font-family: inherit;
}

input[type="number"] {
    border-bottom: none;
}

input[type="submit"],
.submit {
    cursor: pointer;
    background: var(--light);
    color: var(--dark);
    border: 2px solid var(--dark);
    transition: all 0.2s ease-in-out;
    padding: 7px 20px 5px;
}

input[type="submit"]:hover,
.submit:hover {
    background: var(--dark);
    color: var(--light);
}

.wpcf7-form {
    margin-top: 3em;
}

.wpcf7-select {
    width: 100%;
    box-sizing: border-box;
}


.search-form-container {
    display: none;
}

form.search-form {
    display: grid !important;
    grid-template-columns: 2fr 1fr;
    grid-row-gap: 0;
    width: 16px;
}

form.search-form .search-field {
    width: 150px;
}

form.search-form span {
    position: relative;
}

form.search-form input.search-submit {
    position: absolute;
    text-indent: -50000px;
    opacity: 0;
    border-top: none;
}

form.search-form input.search-submit:hover {
    opacity: 0.5;
    background: var(--hilight);
}

form.search-form span i {
    padding: 6px 20px 4px;
    box-sizing: border-box;
    margin-left: 0;
    display: block;
}

/*************************************
  Menus
*************************************/

.menu {
    list-style: none;
    font-family: "LabGrotesqueBold";
}

.menu-primary {
    background: var(--extra);
    position: fixed;
    height: 100%;
    width: 100%;
    right: -100%;
    padding: 3em 7vw;
    top: 0;
    box-sizing: border-box;
    transition: right 1s ease-in-out;
    display: flex;
    align-items: center;
}

.menu-primary a {
    text-decoration: none;
    color: var(--light);
    font-size: 1.8em;
    line-height: var(--titleh);
    display: block;
    background-image: none;
}

.menu-primary a:hover,
.menu-primary .current-menu-item a,
.menu-primary .current-page-ancestor a {
    color: var(--dark);
}

.menu a {
    text-decoration: none;
}

.menu-secondary {
    margin-bottom: 2em;
}

.menu-secondary li {
    margin-bottom: .5em;
}

/*************************************
  Hamburger menu
*************************************/

.mobile-menu-toggle {
    z-index: 11;
    position: relative;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.toggler {
    z-index: 13;
    position: fixed;
    right: var(--hspace);
    top: var(--hspace);
    width: 28px;
    height: 30px;
}

.mobile-menu-toggle input {
    z-index: 14;
    display: block;
    cursor: pointer;
    opacity: 0;
}

.mobile-menu-toggle span {
    display: block;
    position: absolute;
    width: 100%;
    height: 4px;
    background: var(--dark);
    transform-origin: 4px 0px;
    transition: transform 0.7s cubic-bezier(0.78,0.2,0.05,1.0),
                background 0.7s cubic-bezier(0.78,0.2,0.05,1.0),
                opacity 0.55s ease;
}

.mobile-menu-toggle span:first-child {
    transform-origin: 0% 0%;
}

.mobile-menu-toggle .toggler span:nth-child(2) {
    margin-top: 8px;
}

.mobile-menu-toggle .toggler span:last-child {
    transform-origin: 0% 100%;
    margin-top: 16px;
}

/* activation */
.mobile-menu-toggle input:checked ~ .toggler span {
    opacity: 1;
    transform: rotate(45deg) translate(-10px, -10px);
}
.mobile-menu-toggle input:checked ~ .toggler span:nth-last-child(2) {
    transform: rotate(-45deg) translate(-10px, 8px);
}
.mobile-menu-toggle input:checked ~ .toggler span:nth-last-child(3) {
    opacity: 0;
    transform: rotate(0deg) scale(0.2, 0.2);
}

/* main menu animation */
.mobile-menu-toggle input:checked ~ .menu-primary {
    right: 0;
}
/*************************************
  Common Layout all levels
*************************************/

blockquote {
    padding-left: 1em;
    border-left: 2px solid;
}

.wp-block-image .alignleft {
    float: none !important;
    margin-right: 0 !important;
}

.wp-block-image .alignright {
    float: none !important;
    margin-left: 0 !important;
}

.section {
    margin-bottom: 4vw;
}

/*************************************
 * Homepage
 * ***********************************/

h3.read-more {
    padding-top: 1em;
}

.home .section {
    margin-top: 2em;
    margin-bottom: 0;
}

#section-home {
    margin: 0;
}

#section-home video {
    position: absolute;
    width: 100vw;
    height: 56.25vw;
    top: 0;
    left: 0;
    z-index: 1;
    object-fit: cover;
}

#section-home a.section-scroll {
    position: absolute;
    top: 50vw;
    left: 50%;
    z-index: 10;
}

#header {
    padding: calc(var(--vspace) / 2) var(--hspace);
}

.grid {
    padding: 0 var(--hspace);
}

/*
.blog > #main,
.single > #main,
.page-template-default > #main*/

#main {
    margin-top: 6em;
}

.home .section:first-child {
    margin-top: 0;
}

.site-title {
    position: fixed;
    z-index: 20;
    top: var(--hspace);
    left: calc(var(--hspace) - 3px);
}

.site-title a {
    background: url(images/urbanophil-logo.svg) top left no-repeat;
    background-size: contain;
    width: calc(var(--grid));
    color: transparent;
    overflow: hidden;
    display: inline-block;
    width: 250px;
    height: 30px;
    float: left;
    margin-top: -4px;
}

#footer {
    background: inherit;
    padding-bottom: 0;
    padding-top: 3em;
}

.navigation {
    overflow: hidden;
    padding-top: var(--vspace);
}

.navigation .previous {
   float: left;
}

.navigation .next {
   float: right;
}

.navigation li {
    display: inline;
    margin-right: 0.9em;
}
/*************************************
  Level 2: Textual information
*************************************/

.section-teaser {
    margin-top: .8em;
    margin-bottom: 1.2em;
    font-size: 1.5em;
    line-height: var(--titleh);
    display: inline-block;
}

.blog > #main .section-teaser {
    margin-bottom: 2.5em;
}

a.section-more {
    display: inline-block;
    text-decoration: none;
    transform: rotate(-90deg) translate(22px, 0px);
    border: 2px solid var(--dark);
    transition: .4s all ease-in-out;
}

a.section-more {
    width: 32px;
    height: 32px;
}

body:not(.home) a.section-more {
    margin-top: 5em;
}

a.section-more:before {
    transition: .4s all ease-in-out;
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    left: 0;
    right: 0;
    top: -5px;
    bottom: 0;
    margin-left: auto;
    margin-right: auto;
    margin-top: auto;
    margin-bottom: auto;
    position: absolute;
    box-sizing: border-box;
    border-right: 2px solid  var(--dark);
    border-bottom: 2px solid var(--dark);
    transform: rotateZ(45deg);
}

a.section-more span {
    opacity: 0;
    visibility: hidden;
}

a.section-more:hover {
    background-color: var(--dark);
}

a.section-more:hover:before {
    border-color: var(--light);
}

a.section-scroll {
    transform: rotate(0);
}

figcaption {
    font-size: 0.9em;
}

/*************************************
  Level 2: Item grids
*************************************/

.item {
    margin-bottom: 3em;
}

.item:hover,
.item:has(.item-title a):hover {
    cursor: pointer;
}

.home .item {
    margin-bottom: 2em;
}

.item .item-title {
    font-size: 1em;
    margin-bottom: 1em;
}

.item .item-thumbnail {
    margin-bottom: 1em;
}
/*
.post .thumbnail img,
.item .item-thumbnail img,
.item.related .item-thumbnail {
    transition: all .3s ease-out;
}

.post:hover .thumbnail img,
.item.related:hover .item-thumbnail,
.item:hover .item-thumbnail img,
.post-list .post:hover .thumbnail img,
.item:hover .thumb-as-background {
    filter: opacity(0.8);
}
*/
/*************************************
  Level 2: Blog post list
*************************************/

.post-list .post {
    border-bottom: 2px solid var(--dark);
    padding: 3em 0 2em;
}

.post-list .post:first-child {
    padding-top: 0;
}

.post-list .post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-list .post .thumbnail a {
    background-image: none;
}

.post-list .post .post-content {
    overflow: hidden;
}

.post-list .post .post-title {
    margin-top: 1em;
    margin-bottom: 1em;
    line-height: 1.3em;
}

.post-list .post:has(.post-title):hover {
    cursor: pointer;
}

/*************************************
  Level 3: Single Posts & Pages
*************************************/

.author .post .post-title,
.page-template-default .post .post-title,
.single .post .post-title {
    font-size: 1.8em;
    line-height: var(--titleh);
}

.author .post-content, .page .post-content,
.single .post-content, .page .post-content {
    margin-top: 2em;
}

.post-content div.wp-caption {
    width: auto !important;
}

.post-content p,
.post-content ul,
.post-content ol,
.post-content blockquote,
.post-content .wp-block-image {
     margin-bottom: 2em;
}

.post-content ul:not(.blocks-gallery-grid),
.post-content ol {
    margin-left: 1.2em;
}

.post-content h1,
.post-content h2 {
    line-height: 1.3em;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5 {
    margin-top: 2em;
    margin-bottom: 1em;
}

.post-content h4 {
    font-size: 1.1em;
}

.post-content h5 {
    font-size: 1em;
}

.post .post-meta {
    margin-top: 1em;
}

.single .post .post-meta {
    margin-bottom: 3em;
}

.author .post .post-content {
    overflow: hidden;
}

.author .post .post-content,
.author .post .post-meta {
    padding-right: 1em;
    box-sizing: border-box;
}

.author .author-thumbnail {
    margin-bottom: 1em;
    padding-top: 9px;
}

.author .author-thumbnail img {
    width: 100%;
}

.author .author-thumbnail .subtitle {
    margin: 1em 0;
    font-size: 1em;
}

.author .author-thumbnail .shortlink {
}

.author .back {
    grid-column-start: 3;
}

.simple-list {
    margin-left: 0 !important;
}

.simple-list li {
    list-style: none;
    margin-bottom: 0.5em;
}

.related-title {
    margin-top: 3em;
}

.wp-block-separator {
    padding-bottom: 1em;
    margin-top: -1em;
    display: block;
    border-top: none !important;
    border-width: 2px !important;
}

/************************************
 * Level 2: Display of images
 * *********************************/

.page-template-default #main > .thumbnail {
    margin-bottom: 2em;
}

body:not(.safari) .section-content .wp-block-image,
body:not(.safari) .item .item-thumbnail,
body:not(.safari) .post-list .post .thumbnail {
    overflow: hidden; /* zoom inside */
}

/*************************************
  Specific layouts
*************************************/

.section-slides {
    margin-bottom: 3em;
}

.section-slides .wp-block-eedee-block-gutenslider {
    margin-bottom: 1em;
}

/************************************
 * Media queries
 * *********************************/
@media all and (max-width: 480px) {
    .section-slides {
        position: relative;
    }

    .section-slides > .wp-block-image:first-child {
        width: 48%;
        float: left;
    }

    .section-slides > .wp-block-image:last-child {
        width: 48%;
        position: absolute;
        top: 0;
        right: 0;
    }

    .section-slides > .wp-block-eedee-block-gutenslider {
        clear: both;
    }
}
@media all and (min-width: 320px) and (max-width: 860px) {
    .menu-secondary {
        margin-bottom: 0;
    }
    .grid {
        grid-column-gap: calc(var(--gridx));
    }

    .navigation,
    .section,
    .section-teaser,
    .post-list {
        grid-column-start: 1;
        grid-column-end: 3;
    }

    .section-title {
        color: rgb(118, 118, 124);
        margin-top: 3em;
    }

    .home .item {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-column-gap: var(--gridx);
        border-bottom: 2px solid;
        margin-bottom: 1em;
        padding-top: 0.5em;
    }

    .item:has(+ .section),
    .item:has(+ .read-more),
    .item:has(+ span) {
        border: none !important;
    }

    .home .item-0 {
        margin-top: 1em;
    }

    .home .read-more {
        padding-top: 0;
    }

    .home .item .item-thumbnail {
        order: 1;
    }
    .home .item:nth-child(odd) .item-thumbnail {
        order: -1;
    }

    .home .item .item-teaser {
        display: none;
    }

    .post-list .post {
        border: none;
        padding: 1em 0 3em;
    }

    .post-list .post .post-title {
        margin-top: 0;
    }

    .related-title {
        margin-bottom: 1.5em;
    }

    #section-home a.section-scroll {
        display: none;
    }

    #footer {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-column-gap: var(--gridx);
        padding-top: 3em;
        padding-bottom: 3em;
    }
/*
    #footer div:last-child {
        grid-column-start: 2;
    }
 */
    .section-slides {
        position: relative;
    }

    .section-slides > .wp-block-image:first-child {
        width: 48%;
        float: left;
    }

    .section-slides > .wp-block-image:last-child {
        width: 48%;
        position: absolute;
        top: 0;
        right: 0;
    }

    .section-slides > .wp-block-eedee-block-gutenslider {
        clear: both;
    }
}

@media all and (min-width: 635px) and (max-width: 860px) {
    .thumb-as-background {
        height: 200px;
    }
}

@media all and (min-width: 861px) {

    .toggler {
        right: var(--hspace);
    }

    .site-title, .toggler {
        top: calc(var(--hspace)*2);
    }

    .menu-primary {
        top: 10vw;
        width: calc(50vw - 7vw - 4%);
        right: calc(-50vw + 7vw + 4%);
        height: 70vh;
        box-sizing: border-box;
    }

    .navigation {
        grid-column-start: 3;
        grid-column-end: 6;
    }
    .navigation#nav-single {
        grid-column-start: 2;
        grid-column-end: 6;
    }

    .grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        grid-column-gap: calc(var(--gridx));
    }

    .menu-primary a,
    .section-teaser {
        font-size: var(--title);
    }

    .section {
        grid-column-start: 2;
        grid-column-end: 6;
    }

    .section-title {
        margin-top: 8em;
    }

    .home #main, .page-template-page_level2 #main {
        margin-top: 0;
    }

    .page-template .section.post {
        grid-column-start: 3;
        grid-column-end: 5;
    }
    /*************************************
      Level 2+3: Textual information
    *************************************/
    .section-teaser {
        width: calc(3.8*var(--grid))
    }

    .section-content.post-content {
         grid-column-start: 3;
        grid-column-end: 5;
    }

    .section-slides {
        display: grid;
        grid-template-columns: 23% 48.8% 23%;
        grid-column-gap: calc(var(--gridx) + 6px);
    }

    .section-slides .wp-block-eedee-block-gutenslider {
        margin-bottom: 0;
    }
    /*************************************
      Level 2: Item grids
    *************************************/

    .home .item-0,
    .home .item-4,
    .home .item-8,
    .home .item-12 {
        grid-column-start: 2;
    }

    .page-template-page_authors .grid + .item,
    .item.author:nth-child(4n+2),
    .page-template-page_level2 .item:first-child,
    .page-template-page_level2 .item:nth-child(4n+1) {
        grid-column-start: 2;
    }

    .single .section + .item.related {
        grid-column-start: 3;
    }

    .item.related .section-more {
        margin-top: 25%;
        margin-left: 25%;
    }

    .thumb-as-background {
        height: 170px;
    }

    /*************************************
      Level 2: Blog post list
    *************************************/

    .post-list {
        grid-column-start: 2;
        grid-column-end: 6;
    }
    .post-list .post {
        display:  flex;
    }

    .post-list .post .post-title {
        margin-top: 0;
        font-size: 1.35em;
    }

    .post-list .post .thumbnail,
    .post-list .post .post-content {
        width: 50%;
        box-sizing: border-box;
    }

    .post-list .post:nth-child(even) {
        flex-direction: row-reverse;
    }

    .post-list .post:nth-child(odd) .thumbnail,
    .post-list .post:nth-child(even) .post-content {
          padding-right: calc(var(--gridx) / 2);
    }

    .post-list .post:nth-child(even) .thumbnail,
    .post-list .post:nth-child(odd) .post-content {
           padding-left: calc(var(--gridx) / 2);
    }

    .post-list .post:nth-child(even) .thumbnail {
        float: right;
        text-align: right;
    }

    .post-list .post:nth-child(odd) .thumbnail {
        float: left;
        text-align: left;
    }


    /***************************************
     * Level 3: Blog, Unterseiten
     * ************************************/

    .post .wp-block-eedee-block-gutenslider {
        width: 153%;
    }

    .single .thumbnail.extra-thumbnail {
        grid-column-start: 1;
        grid-column-end: 3;
        margin-top: 7px;
    }

    .single .thumbnail.extra-thumbnail img {
        width: 100%;
    }

    .page-template-default #main > .thumbnail {
        grid-column-start: 1;
        grid-column-end: 2;
    }

    .single .section,
    .author .section,
    .page-template-default .section {
        grid-column-start: 3;
        grid-column-end: 5;
    }

    .single .wp-block-image.size-large {
        width: 153%;
    }

    /*
    .single .post .post-content,
    .author .post .post-content,
    .page-template-default .section .post-content,
    .page-template-default .section .post-title {
        width: calc(2.62*(var(--grid) + var(--gridm)));
    }
    */
    .author .post .thumbnail {
        float: right;
        width: calc(var(--grid) + 2*var(--gridm));
    }

    .home #footer {
        padding-top: 10em;
    }
    #footer .menu {
        vertical-align: top;
    }
    #footer .menu:first-child {
        grid-column-start: 3;
    }
}

@media all and (min-width: 1920px) {
    body {
        margin-right: auto;
        margin-left: auto;
        margin-top: 0;
        font-size: 110%;
    }

    .menu-primary li {
        margin-bottom: 1.15em;
    }

}

@media print {
    #header, #footer {
        display: none;
    }

    .page .grid > .thumbnail {
        margin-bottom: 1em;
    }
}

/*
 * Specifics for Firefox browser
 * */

@-moz-document url-prefix() {
    .section-slides .wp-block-eedee-block-gutenslider,
    #gutenslider-ozaobo2bs {
        max-width: 500px;
    }
}

.blocks-gallery-item span.isc-source-text {
    opacity: 0 !important;
}
.blocks-gallery-item:last-child span.isc-source-text {
    opacity: .7 !important;
    left: 3px !important;
    bottom: 3px !important;
    top: auto !important;
}

sup {
    vertical-align: unset;
    margin-left: 0.3em;
}
