/**
 Theme Name: Michael Ligabue
 Theme URI: https://www.atrox.ch
 Version: 1.0
 Description: 
 Template: wps
 Author: Michael Ligabue
 Text Domain: cdt
*/

/* Fonts */

body {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.6;
    scroll-behavior: smooth;
    background-color: var(--black-color);
    color: var(--grey-3-color);
}

.main-wrapper>.post-header>.post-title,
.archive-title {
    padding-top: 60px;
    margin-bottom: 60px;
    width: 100%;
}

.main-wrapper>.post-header>.post-title span.cdt-post-title-init-char,
.archive-title span.cdt-post-title-init-char {
    position: absolute;
    font-size: 185px;
    line-height: 1;
    font-weight: 900;
    top: 0;
    color: rgba(255, 255, 255, 0.08);
    z-index: -1;
}

.main-wrapper>.post-header>.post-title h1,
.archive-title h1 {
    font-size: 75px;
    font-weight: 300;
    color: var(--primary-color);
    line-height: 1.2;
    padding-left: 81px;
    margin: 0;
}

h2 {
    font-size: 39px;
    font-weight: 700;
    line-height: 1.2;
    margin: 90px 0 30px;
    color: var(--grey-2-color);
}

h3 {
    font-size: 20px;
    font-weight: 900;
    line-height: 1.2;
    margin: 60px 0 30px;
    color: var(--grey-2-color);
}

.post-edit-link {
    display: none;
}

p {
    margin: 30px 0;
}

.entry-content a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.3s ease-in-out;
}

.entry-content a:hover {
    opacity: 0.6;
}

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

/* Main container */
.cdt-main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.cdt-main-wrapper>main {
    flex: 1;
    padding-top: 200px;
    width: 810px;
    max-width: 100%;
    margin: 0 auto;
}

/* Site header */
.site-header {
    display: flex;
    position: fixed;
    top: 0;
    left: calc(50% - 620px);
    justify-content: space-between;
    align-items: center;
    height: 200px;
    width: 1240px;
    max-width: 100%;
    margin: 0 auto;
    transition: height 0.3s ease-in-out;
    z-index: 100;
}

.site-header-fixed .site-header {
    height: 80px;
}

.site-header:before {
    display: block;
    position: absolute;
    content: "";
    top: 0;
    left: calc(50% - 50vw);
    height: 100%;
    width: 100vw;
    background-color: var(--black-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
}

.site-header .logo>a {
    display: block;
    height: 80px;
    color: var(--grey-1-color);
    text-decoration: none;
    transition: height 0.3s ease-in-out;
}

.site-header-fixed .site-header .logo>a {
    height: 40px;
}

.site-header .logo a>h3 {
    margin: 0;
    font-size: 39px;
    font-weight: 600;
}

/* Nav */
.site-header .menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 30px;
}

.site-header .menu>.menu-item>a {
    color: var(--grey-3-color);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    transition: color 0.3s ease-in-out;
}

.site-header .menu>.menu-item.current-menu-item>a,
.site-header .menu>.menu-item.current-menu-ancestor>a,
.site-header .menu>.menu-item.current-post-ancestor>a,
.site-header .menu>.menu-item>a:hover {
    color: var(--primary-color);
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 14px;
    margin: 30px 0;
    width: 100%;
}

.breadcrumbs a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

/* Single template */
.single-post .post-header {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0 30px;
}

.post-date {
    font-size: 14px;
}

.post-date a,
.post-categories a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.post-date a:hover,
.post-categories a:hover {
    color: var(--primary-color);
}

.post-categories {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    gap: 10px;
}

.post-header .block-template-wrapper {
    margin: 0;
    display: flex;
    height: calc(100vh - 200px);
    min-height: max-content;
    flex-direction: column;
}

.main-wrapper>.post-header>.post-thumbnail {
    left: calc(50% - 620px);
    width: 1240px;
}

/* Archive  */
.main-wrapper.post-list {
    display: flex;
    width: 1240px;
    left: calc(50% - 620px);
    flex-wrap: wrap;
    gap: 30px;
}

.archive-header,
.archive-footer,
.pagination {
    width: 100%;
}

.archive-header>* {
    width: 810px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.main-wrapper.post-list>article {
    width: 390px;
    background-color: var(--grey-5-color);
}

.main-wrapper.post-list>article:nth-of-type(4n),
.main-wrapper.post-list>article:nth-of-type(4n - 3) {
    width: 810px;
}

.main-wrapper.post-list>article:nth-of-type(4n) .cdt-archive-thumbnail-small,
.main-wrapper.post-list>article:nth-of-type(4n-3) .cdt-archive-thumbnail-small,
.main-wrapper.post-list>article:nth-of-type(4n-1) .cdt-archive-thumbnail-large,
.main-wrapper.post-list>article:nth-of-type(4n-2) .cdt-archive-thumbnail-large {
    display: none;
}

.post-list .post-header {
    display: grid;
    grid-template-areas:
        "thumbnail thumbnail thumbnail"
        "meta . ."
        "title title title";
}

.post-list .post-header .cdt-archive-thumbnail {
    grid-area: thumbnail;
}

.post-list .post-header .post-title {
    grid-area: title;
    padding: 11px 20px 24px 40px;
}

.post-list .post-header .post-meta {
    display: flex;
    grid-area: meta;
    padding: 64px 20px 0 40px;
    gap: 30px;
}

.post-list .post-header .post-title a {
    text-decoration: none;
}

.post-list .post-header .post-title h2 {
    margin: 0;
    color: var(--primary-color);
}

.main-wrapper.post-list>article:nth-of-type(4n-1) h2,
.main-wrapper.post-list>article:nth-of-type(4n-2) h2 {
    font-size: 20px;
    padding-top: 10px;
}

.post-list .entry-content {
    padding: 0 40px;
}

.post-list .entry-content>p:first-child {
    margin-top: 0;
}

.post-list .entry-content>p:last-child {
    margin-bottom: 0;
}

.post-list .post-footer {
    padding: 40px 20px 37px 40px;
}

/* Blocks */
pre.wp-block-code {
    border-radius: 0;
    border: none;
    background-color: var(--grey-5-color);
    margin: 30px 0;
}

.alignwide {
    width: 1240px;
    left: calc(50% - 620px);
}

.wp-block-media-text {
    grid-template-columns: 390px 495px !important;
    gap: 135px;
    margin: 60px 0;
}

.wp-block-media-text .wp-block-media-text__content {
    padding: 0;
}

/* Site footer */
.site-footer {
    margin-top: 120px;
}

/* Glossary */
.cdt-glossary {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding: 30px 0;
}

.cdt-glossary-list {
    display: flex;
    align-items: stretch;
    gap: 30px;
    margin-left: -105px;
}

.cdt-glossary-entry:first-child h2 {
    margin-top: 40px;
}

.cdt-glossary-letter {
    flex: 0 0 auto;
    width: 75px;
    background-color: var(--grey-5-color);
}

.cdt-glossary-letter>span {
    display: block;
    position: sticky;
    top: 80px;
    width: 100%;
    padding: 30px 0;
    text-align: center;
    font-size: 75px;
    font-weight: 300;
    line-height: 1;
    text-transform: uppercase;
    color: var(--primary-color);
}

/* Tiles */
.cdt-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 1240px;
    left: calc(50% - 620px);
    margin: 60px 0;
}

.cdt-tile-img img {
    display: block;
    width: 100%;
}

.cdt-tile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 60px 30px 30px;
    background-color: var(--grey-5-color);
    text-align: center;
}

.cdt-tile-content h3 {
    font-size: 39px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 20px;
}

.cdt-tile-content p {
    margin: 0;
}

a.cdt-tile-link {
    margin-top: 20px;
}

/* Buttons */
.wp-block-button {
    display: flex;
    gap: 30px;
    margin: 30px 0;
}

.read-more>a,
a.cdt-tile-link,
a.wp-block-button__link,
.wp-block-button.is-style-outline>.wp-block-button__link,
.wp-block-button .wp-block-button__link.is-style-outline {
    display: inline-flex;
    align-items: center;
    padding: 0 40px;
    height: 50px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: padding 0.3s ease-in-out;
}

.read-more>a,
a.cdt-tile-link {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.read-more>a:hover,
a.cdt-tile-link:hover,
a.wp-block-button__link:hover,
.wp-block-button.is-style-outline>.wp-block-button__link:hover,
.wp-block-button .wp-block-button__link.is-style-outline:hover {
    padding: 0 30px 0 40px;
    opacity: 1;
}

.read-more>a:before,
a.cdt-tile-link:before,
a.wp-block-button__link:before {
    display: inline-flex;
    justify-content: center;
    content: "➔";
    margin-right: 10px;
    width: 30px;
    margin: 0 10px 0 -30px;
    transition: all 0.3s ease-in-out;
}

.read-more>a:not(:hover):before,
a.cdt-tile-link:not(:hover):before,
a.wp-block-button__link:not(:hover)::before {
    opacity: 0;
    margin: 0 10px 0 -40px;
}

/* Background hero */
/*.cdt-bg-hero {
    position: fixed;
    width: 100%;
    height: 200px;
    bottom: 0;
    z-index: -1;
}

.cdt-bg-hero canvas {
    width: 100%;
    height: 100%;
}*/

.cdt-bg-hero {
    display: grid;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 200;
    pointer-events: none;
    grid-template-columns: repeat(var(--cdt-bg-hero-cols), 1fr);
    grid-template-rows: repeat(var(--cdt-bg-hero-rows), 1fr);
    opacity: .3;
}

.cdt-bg-hero-tile {
    transition: background-color .3s ease-in-out;
}

.cdt-bg-hero-tile.cdt-bg-hero-tile-active {
    background-color: var(--grey-5-color);
    border: 1px solid var(--grey-4-color);
    transition: background-color .1s ease-in-out;
}