/*
Theme Name: CERN
Author: CERN Web Team
Author URI: https://home.cern
Description: The officially-distributed theme for WordPress sites at CERN.
Version: 3.14.0 
*/

@font-face {
    font-family: sourcesans-regular;
    src: url('public/fonts/source_sans/regular.woff2') format('woff2');
}

@font-face {
    font-family: sourcesans-semibold;
    src: url('public/fonts/source_sans/semibold.woff2') format('woff2');
}

@font-face {
    font-family: sourcesans-bold;
    src: url('public/fonts/source_sans/bold.woff2') format('woff2');
}

@font-face {
    font-family: sourcesans-light;
    src: url('public/fonts/source_sans/light.woff2') format('woff2');
}

@font-face {
    font-family: opensans-regular;
    src: url('public/fonts/open_sans/regular.woff2') format('woff2');
}

@font-face {
    font-family: opensans-semibold;
    src: url('public/fonts/open_sans/semibold.woff2') format('woff2');
}

@font-face {
    font-family: opensans-bold;
    src: url('public/fonts/open_sans/bold.woff2') format('woff2');
}

:root {
    --content-width: 1200px;
    --transition-duration: 150ms;
}

:root :where(.is-layout-constrained) > :first-child:not(:only-child) {
    margin-block-start: var(--wp--preset--spacing--30);
}

:root :where(.is-layout-constrained) > :last-child:not(:only-child) {
    margin-block-end: var(--wp--preset--spacing--30);
}

.wp-block-group > .wp-block-group > .entry-content > .alignfull {
    margin-right: calc(var(--wp--preset--spacing--20) * -1);
    margin-left: calc(var(--wp--preset--spacing--20) * -1);
}

.wp-block-template-part {
    margin-top: 0 !important;
}

.wp-block {
    box-sizing: border-box;
}

/* Mobile override */
@media (width <= 960px) {
    :root {
        --wp--style--global--content-size: 100vw !important;
        --wp--style--global--wide-size: 100vw !important;
        --content-width: 100vw !important;
    }

    html,
    body {
        overflow-x: hidden;
        height: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    #page {
        flex: 1 0 auto;
        display: flex;
        flex-direction: column;
    }

    main {
        padding: 1.35rem;
    }

    .container {
        max-width: 100% !important;
    }
}

.alignfull {
    border-radius: 0 !important;
}

/* stylelint-disable-next-line selector-class-pattern */
.wp-block-buttons.alignfull .wp-block-button__width-100 div {
    border-radius: 0 !important;
}

/* Remove the no-block title on post */
.wp-block-post-title {
    display: none;
}

.editor-post-title {
    display: none;
    visibility: hidden;
}

/* Display youtube embed on frontend as on editor */
/* stylelint-disable-next-line selector-class-pattern */
.wp-block-embed-youtube .wp-block-embed__wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    height: 0;
    overflow: hidden;

    iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* stylelint-disable selector-class-pattern */

.wp-block-button .wp-block-button__link {
    transition: all 0.1s ease-in-out;
}

.wp-block-button .wp-block-button__link:hover {
    opacity: 0.85;
    box-shadow: 0 0 5px rgb(0 0 0 / 20%); /* Subtle shadow on hover */
}

.wp-block-button .wp-block-button__link:active {
    transform: translateY(3px); /* Slight push down effect when clicked */
    opacity: 0.75;
}
/* stylelint-enable selector-class-pattern */

#header-container {
    margin-block-start: 0;
    margin: 0;
}
