/*
Theme Name: Avoimet maatilat Uusimaa
Theme URI: 
Author: Aatos Media
Author URI: 
Description: 
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 5.7
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: avoimet-maatilat-uusimaa
Tags: 
*/

.wp-site-blocks {
display: flex;
flex-direction: column;
min-height: 100vh;
}

main {
flex: 1
}

@keyframes slideInLeft {
    0% {
        transform: translate3d(-10%, 0, 0);
        visibility: visible;
        opacity: 0;
    }
}


blockquote {
    padding: 4em 0 2em 3em;
    font-style: italic;
    margin: 0;
}

blockquote:before {
    display: block;
    position: relative;
    top: .6rem;
    color: var(--wp--preset--color--hyvinvaaleanharmaa);
    content: '”';
    font-size: 9em;
    line-height: 0rem;
    padding-top: 0;
    font-style: normal;
    z-index: -1;
}

.h1-styling h2, .h1-styling {
    font-family: var(--wp--preset--font-family--arvo);
    font-size: var(--wp--preset--font-size--x-large) !important;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 4%;
    line-height: 1.25;
    text-transform: uppercase;
}

.wp-block-button__link {
    transition: all .5s;
}

.wp-block-button__link:hover {
background-color: #009540;
}

.aliotsikko {
    color: var(--wp--preset--color--violetti);
}

.align-top {
    align-items: flex-start;
}

.margin-top-16 {
    margin-top: 16px !important;
}

.cmplz-show-banner {
    cursor: pointer;
    text-decoration: underline;
}

.wp-block-image :where(figcaption) {
    margin-bottom: 1em;
    font-size: 14px;
    margin-top: .1em;
}

/* Team-card */

.wp-block-uagb-team {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.089);
    border-radius: 16px;
    padding: 16px 8px 0 8px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* tapahtumakortit */

.card-tapahtuma {
    border-radius: 16px;
}

.card-tapahtuma-tiedot {
    display: flex;
    flex-direction: column;
}

.filtteri legend, .filtteri .search-filter-label {
font-weight: bold;
text-transform: uppercase;
}

.current-menu-item span {
    color: var(--wp--preset--color--vihrea);
}

/* tapahtumainfo */

.tapahtumainfo-container {
    background: #f9f9f9;
    padding: 32px;
    border-radius: 16px;
    margin: 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    background-image: url(/wp-content/themes/avoimet-maatilat-uusimaa/assets/pattern-poytaliina.png);
    background-repeat: repeat-x;
    background-size: 24px;
    background-position: bottom;
}

.tapahtuma-col-logo {
    flex: 1; 
    padding: 32px;
}

.tapahtuma-col-logo img {
    max-width: 100%;
    height: auto;
}

.tapahtuma-col-content {
    flex: 2;
    min-width: 300px;
}

.tapahtuma-col-content .otsikko {
    color: var(--wp--preset--color--violetti);
    font-weight: bold;
    margin-top: 0;
    margin-bottom: var(--wp--preset--spacing--small);
}




/* Cards */

.wp-block-post-featured-image {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
}

.card-container h3 a:hover {
    text-decoration: underline;
}


/* hero-kuva */
.slogan-banner {
    position: relative;
    width: 100%;
    height: 530px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fixed-smooth-banner {
    position: relative;
    width: 100%;
    height: 530px;
    overflow: hidden; 
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111; 
}

.fixed-smooth-bg {
    position: absolute;
    top: -10%; 
    left: 0;
    width: 100%;
    height: 120%; 
    background-image: url('/wp-content/themes/avoimet-maatilat-uusimaa/assets/Avoimet-maatilat-Uusimaa-hero.jpg');
    background-size: cover;
    background-position: center;
    will-change: transform; 
    z-index: 1;
}

/* Käytetään kiinteää taustaa vain tietokoneilla. Puhelimilla se poistetaan, */
/* koska mobiiliselaimen muuttuva osoiterivi saa kuvan muuten hyppimään. */
@media (min-width: 768px) {
    .fixed-smooth-bg {
        background-attachment: fixed; 
    }
}

.banner-text {
    position: relative;
    z-index: 2;
    color: #ffffff;
    font-weight: bold;
    font-size: 48px;
    text-align: center;
    letter-spacing: 5%;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.75); 
    padding: 0 20px;
}


/* Read more nuolella */

.wp-block-read-more {
    margin-left: 0 !important;
    margin-right: 0 !important;
}


.wp-block-read-more, .arrow-link {
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--wp--preset--color--vihrea); 
}

.arrow-link a {
    text-decoration: none;
}


.wp-block-read-more::after, .arrow-link::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="black" stroke-width="2.2"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="black" stroke-width="2.2"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"/></svg>');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: var(--wp--preset--color--vihrea);
    transition: transform 0.2s ease-in-out;
}

.wp-block-read-more:hover::after, .arrow-link:hover::after {
    transform: translateX(5px);
}


/* read more alas */

.wp-block-post-template .wp-block-post {
    display: flex !important;
    flex-direction: column !important;
}

.wp-block-post-template .wp-block-group.has-white-background-color {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    height: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.wp-block-post-template .wp-block-post-featured-image {
    width: 100% !important;
    margin-top: 0 !important;
}

.cards-box .wp-block-post-template .wp-block-post-featured-image img {
    width: 100% !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    object-fit: cover !important;
}


.wp-block-post-template .wp-block-group.is-layout-constrained {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    align-items: flex-start !important; 
    text-align: left !important;         
    
    /* Lisätään tekstille sivumarginaalit */
    padding-left: var(--wp--preset--spacing--medium) !important;
    padding-right: var(--wp--preset--spacing--medium) !important;
}

.wp-block-post-template .wp-block-post-title,
.wp-block-post-template .wp-block-post-date,
.wp-block-post-template .wp-block-post-excerpt {
    width: 100% !important;
    text-align: left !important;
}

.wp-block-post-template .wp-block-post-excerpt {
    flex-grow: 1 !important;
}

.wp-block-post-template .wp-block-read-more {
    margin-top: auto !important;
    padding-top: var(--wp--preset--spacing--small) !important;
    align-self: flex-start !important; /* Varmistaa, ettei painike veny koko kortin levyiseksi */
}


.text-small {
font-size: 14px;
}

p:has(> .artikkelin-paivamaarat) {
    border-top: 1px solid var(--wp--preset--color--hyvinvaaleanharmaa);
    color: var(--wp--preset--color--vaaleanharmaa);
    padding-top: var(--wp--preset--spacing--small);
    margin-block-start: 16px;
}
a:hover {
text-decoration: none;
}

.bubble-box {
background-image: url(/wp-content/themes/avoimet-maatilat-uusimaa/assets/bubble.png);
background-repeat: repeat-x;
background-size: 60px;
padding-bottom: var(--wp--preset--spacing--2-x-large);
padding-top: var(--wp--preset--spacing--2-x-large);
margin-top: var(--wp--preset--spacing--2-x-large);
}

footer.wp-block-template-part {
    margin-block-start: 0;

}

footer.wp-block-template-part > div:first-child {
    background-image: url(/wp-content/themes/avoimet-maatilat-uusimaa/assets/pattern-poytaliina.png);
    background-repeat: repeat-x;
    background-size: 24px;
}

/* Yritykset */

.yritys-logo {
    width: 320px;
    margin-bottom: 2em;
}


.bubble-box .section-title {
    margin-bottom: var(--wp--preset--spacing--large);
}
.yritys-contact-grid {
    display: grid; 
    gap: var(--wp--preset--spacing--medium);
}

.yritys-contact-grid .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
}

.yritys-contact-grid .icon {
    width: 24px;
    color: var(--wp--preset--color--vihrea);
}

.yritys-contact-grid h3 {
        margin-block-start: 0;
}

.some-linkit-container {
    display: flex;
    gap: var(--wp--preset--spacing--medium);
    flex-wrap: wrap;
    margin-top: var(--wp--preset--spacing--medium);
}

.some-linkit-container  .fab {
    font-size: 2em;
}

.custom-acf-gallery {
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;  
}

.custom-acf-gallery .gallery-item {
    overflow: hidden;
    border-radius: 16px;
}

.custom-acf-gallery .gallery-item img {
    width:100%;
    height:250px;
    object-fit:cover;
    transition: transform 0.3s ease-in-out;
    display: block;
}


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

.site-logo {
width: 96px;
}

.main-header-wrapper {
    padding-top: var(--wp--preset--spacing--small) !important;
    padding-bottom: var(--wp--preset--spacing--small) !important;
}

.wp-block-post-featured-image {

}

.wp-block-post-featured-image img {
border-radius: 0 !important;
}

.yritys-logo {
    width: 70%;
    margin-bottom: 2em;
}


h1, .h1-styling h2, .h1-styling, .section-title h2 {
    font-size: 32px !important;
}

.section-title .uagb-desc-text {
    font-size: 16px !important;   
}

h1,h2,h3 {
    hyphens: auto;
    word-break: break-word;
}

.banner-text {
    font-size: 36px;
}


.card-tapahtuma {
    border-radius: 0px;
}

.card-tapahtuma figure img {
    max-height: 240px;
}


}


