/* Featured Events Layout */
.universal-featured-events {
    display: flex;
    gap: 0;
    margin: 20px 0;
    background: #f10102;
    border-radius: 0;
    overflow: hidden;
    min-height: 75vh;
}

.universal-featured-main {
    flex: 0 0 66.666%; /* 2/3 leveydestä */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.universal-featured-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.universal-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.universal-featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.universal-featured-content {
    position: relative;
    z-index: 3;
    color: white;
    padding: 30px;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.universal-featured-title {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
}

.universal-featured-title a {
    color: white;
    text-decoration: none;
}

.universal-featured-date {
    font-size: 1.2em;
    margin-bottom: 20px;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.universal-featured-readmore-link {
    text-decoration: none;
}

.universal-featured-readmore {
    display: inline-block;
    background: white;
    color: black;
    padding: 12px 24px;
    font-weight: normal;
    font-family: 'Cubano', Arial, sans-serif;
    border: 2px solid black;
    border-radius: 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 4px 4px 0px #f10102;
    font-size: 22px;
    letter-spacing: 1px;
}

.universal-featured-readmore:hover {
    background: black;
    color: white;
    border: 2px solid #cd8417;
    box-shadow: 4px 4px 0px #cd8417;
    transform: none;
}

.universal-featured-sidebar {
    flex: 0 0 33.333%; /* 1/3 leveydestä */
    padding: 30px;
    background: rgba(220, 38, 38, 0.95);
    color: white;
    display: flex;
    flex-direction: column;
}

.universal-featured-sidebar-title {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0 25px 0;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
    color: white;
}

.universal-featured-sidebar-item {
    margin-bottom: 30px;
    padding-bottom: 0;
    border-bottom: none;
}

.universal-featured-sidebar-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    margin-bottom: 0px;
    box-shadow: 8px 8px 0px black;
    border: 1px solid black; /* LISÄTTY: 2px musta reunaviiva */
    transition: transform 0.2s ease; /* LISÄTTY: hover-efekti */
}

.universal-featured-sidebar-image-link:hover .universal-featured-sidebar-image {
    transform: translateY(-2px); /* LISÄTTY: hienovarainen hover-efekti */
}

.universal-featured-sidebar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
        /* LISÄTTY: Kuvanlaadun parantaminen */
    image-rendering: -webkit-optimize-contrast; /* Safari */
    image-rendering: crisp-edges; /* Chrome/Firefox */
    image-rendering: pixelated; /* Fallback */
    image-rendering: auto; /* Uusimmat selaimet */

    /* Estä kuvan blur-efekti skaalauksen yhteydessä */
    -ms-interpolation-mode: bicubic; /* IE */
    image-rendering: high-quality; /* Older browsers */
}

.universal-featured-sidebar-placeholder {
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 8px 8px 0px black;
    border: 1px solid black; /* LISÄTTY: 2px musta reunaviiva */
}
.placeholder-content {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em;
    text-align: center;
}

.universal-featured-sidebar-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.universal-featured-sidebar-date {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    margin: 0;
    line-height: 0.9;
}

.universal-featured-sidebar-event-title {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0 0 2px 0;
    text-transform: uppercase;
    line-height: 1.1;
}

.universal-featured-sidebar-image-link {
    display: block;
    text-decoration: none;
    margin-bottom: 8px; /* MUUTETTU: 10px → 8px */
}

.universal-featured-sidebar-event-title a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.universal-featured-sidebar-event-title a:hover {
    color: #cd8417;
}

/* Responsiivisuus mobiilille */
@media (max-width: 768px) {
    /* Featured Events mobiili layout */
    .universal-featured-events {
        flex-direction: column;
        gap: 0;
        min-height: 60vh;
    }
    
    .universal-featured-main {
        flex: none;
        min-height: 40vh;
    }
    
    .universal-featured-content {
        margin: 10px;
        padding: 20px;
    }
    
    .universal-featured-title {
        font-size: 1.8em;
    }
    
    .universal-featured-sidebar {
        flex: none;
        padding: 20px;
    }
    
    .universal-featured-sidebar-title {
        font-size: 1.3em;
	text-align: center;
    }
    
    .universal-featured-sidebar-event-meta {
        flex-direction: column;
        gap: 5px;
    }
   
        .universal-featured-sidebar-item {
        margin-bottom: 25px;
    }

    .universal-featured-sidebar-image {
        margin-bottom: 8px;
    }

    .universal-featured-sidebar-event-title {
        font-size: 1.3em;
        margin-bottom: 3px;
	padding-top: 2%;
    }

    .universal-featured-sidebar-date {
        min-width: auto;
        font-size: 0.85em;
    }

    .universal-featured-sidebar-image-link {
        margin-bottom: 6px; /* MUUTETTU: 8px → 6px */
    }
}

@media (max-width: 480px) {
    .universal-featured-content {
        padding: 15px;
        margin: 5px;
    }
    
    .universal-featured-title {
        font-size: 1.5em;
    }
    
    .universal-featured-sidebar {
        padding: 15px;
    }

}

/* Events Columns Layout */
.universal-events-columns {
    display: flex;
    flex-direction: row;
    gap: 0;
    margin: 20px 0;
    background: #f10102;
    border-radius: 0;
    overflow: hidden;
    min-height: 50vh;
    width: 100%;
}

.universal-events-column {
    flex: 1;
    flex-basis: 50%;
    padding: 30px;
    color: white;
    box-sizing: border-box;
}

.universal-events-upcoming {
    background: rgba(241, 1, 2, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.universal-events-past {
    background: rgba(241, 1, 2, 0.9);
}

.universal-events-column-title {
    font-size: 1.8em;
    font-weight: bold;
    margin: 0 0 30px 0;
    text-transform: uppercase;
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 15px;
    line-height: 2.4;
}

.universal-events-month-group {
    margin-bottom: 30px;
}

.universal-events-month-title {
    font-size: 1.4em;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: white;
    text-transform: uppercase;

}
.universal-events-month-title h3 {
	padding-top: 4%;
}
.universal-events-item {
    margin-bottom: 12px;
    line-height: 2.4;
    font-size: 1em;
}

.universal-events-date {
    color: white;
    font-weight: 500;
}

.universal-events-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.universal-events-link:hover {
    color: #cd8417;
}

.universal-events-empty {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin: 20px 0;
}

/* Responsiivisuus mobiilille */
@media (max-width: 768px) {
    .universal-events-columns {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        min-height: auto;
    }
    
    .universal-events-column {
        width: 100% !important;
        flex: 0 0 auto !important;
        padding: 20px;
        float: none !important;
        display: block !important;
    }
    
    .universal-events-upcoming {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        order: -1 !important; /* Tulevat ylemmäksi */
    }
    
    .universal-events-past {
        order: 1 !important; /* Menneet alemmaksi */
        border-left: none !important;
    }
    
    .universal-events-column-title {
        font-size: 1.5em;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .universal-events-month-title {
        font-size: 1.2em;
    }
    
    .universal-events-item {
        font-size: 0.9em;
        margin-bottom: 10px;
    }
}


/* Varmistetaan että desktop-näkymä toimii oikein */
@media (min-width: 769px) {
    .universal-events-columns {
        flex-direction: row;
        display: flex;
    }
    
    .universal-events-column {
        flex: 1;
        flex-basis: 50%;
    }
    
    .universal-events-upcoming {
        order: 1;
    }
    
    .universal-events-past {
        order: 2;
    }
}

@media (max-width: 480px) {
    .universal-events-column {
        padding: 15px;
    }

    .universal-events-column-title {
        font-size: 1.3em;
    }

    .universal-events-month-title {
        font-size: 1.1em;
    }

    .universal-events-item {
        font-size: 0.85em;
    }

/* ERITTÄIN VAHVA mobiilikorjaus - ohittaa kaikki muut tyylit */
@media screen and (max-width: 768px) {
    html body .et_pb_section .universal-events-columns,
    html body .universal-events-columns {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        min-height: auto !important;
        display: flex !important;
        width: 100% !important;
    }
    
    html body .et_pb_section .universal-events-column,
    html body .universal-events-column {
        width: 100% !important;
        flex: 0 0 auto !important;
        flex-basis: auto !important;
        padding: 20px !important;
        float: none !important;
        display: block !important;
        max-width: none !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    
    html body .et_pb_section .universal-events-upcoming,
    html body .universal-events-upcoming {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
        order: -1 !important;
        width: 100% !important;
    }
    
    html body .et_pb_section .universal-events-past,
    html body .universal-events-past {
        order: 1 !important;
        border-left: none !important;
        width: 100% !important;
    }
}

/* Varmista että desktop toimii */
@media screen and (min-width: 769px) {
    html body .universal-events-columns {
        flex-direction: row !important;
        display: flex !important;
    }
    
    html body .universal-events-column {
        flex: 1 !important;
        flex-basis: 50% !important;
        width: 50% !important;
    }
}

}


