/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ============================================================
   1. MUUTTUJAT (Helpottaa värien hallintaa kerralla)
   ============================================================ */
:root {
    --primary-blue: #007bff;
    --hover-blue: #00d4ff;
    --success-green: #27ae60;
    --badge-green: #10b981;
    --dark-bg: #111111;
    --gold: #ffcc00;
}

/* ============================================================
   2. KASINOLAATIKKO (Casino Row)
   ============================================================ */
.casino-row {
    position: relative !important;
    z-index: 1 !important;
    background: var(--dark-bg);
    border: 2px solid #0056b3 !important; /* Kiinteä tummansininen reuna */
    border-radius: 20px !important;
    margin-bottom: 20px !important; 
    padding: 22px !important;
    overflow: hidden !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
    transform: none !important; /* Estetään laatikon omat liikkeet */
    transition: box-shadow 0.2s ease-in-out !important;
    -webkit-tap-highlight-color: transparent;
}

/* Luodaan laatikon sisälle musta taustakalvo välähdyksien estämiseksi */
.casino-row::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: #000000 !important;
    z-index: -1 !important;
    opacity: 0;
    transition: opacity 0.25s ease-in-out !important;
    pointer-events: none !important;
}

/* Taustan tummennus ja hohde, kun hiiri on napin päällä (Hover) - REUNAN VÄRI EI MUUTU */
@media (hover: hover) {
    .casino-row:has(.wp-block-button__link:hover)::before {
        opacity: 1 !important; /* Tausta muuttuu mustaksi */
    }
    
    .casino-row:has(.wp-block-button__link:hover) {
        border-color: #0056b3 !important; /* Pysyy tiukasti tummansinisenä */
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 86, 179, 0.35) !important; /* Sinertävä hohde pohjautuu tummaan siniseen */
    }
}

/* Kun nappia painetaan (Active) - REUNAN VÄRI EI MUUTU */
.casino-row:has(.wp-block-button__link:active) {
    border-color: #0056b3 !important; /* Pysyy tiukasti tummansinisenä */
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 86, 179, 0.35) !important;
}
.casino-row:has(.wp-block-button__link:active)::before {
    opacity: 1 !important;
}

/* Tekstit ja lista */
.casino-row h3 {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 1.4rem !important;
    margin: 0 0 10px 0 !important;
    text-align: left !important;
}

.casino-row ul {
    margin: 15px 0 !important;
    padding: 0 0 0 10px !important; 
    list-style: none !important;
    text-align: left !important;
}

.casino-row li {
    position: relative;
    padding-left: 32px !important;
    margin-bottom: 10px !important;
    color: #ffffff !important;
    font-size: 0.95rem;
    list-style: none !important;
    display: block !important;
    text-align: left !important;
}

/* Vihreä check-merkki */
.casino-row li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    background: var(--success-green);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
}

/* ============================================================
   3. PAINIKKEET (Buttons) - PREMIUM 3D VERSIO ALASPÄIN
   ============================================================ */
.casino-row .wp-block-button__link {
    position: relative !important;
    display: inline-block !important;
    vertical-align: top !important;
    background: linear-gradient(180deg, #1a8eff 0%, var(--primary-blue) 40%, #004499 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 13px 32px 15px 32px !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important; /* Valoraita yläreunassa */
    border-radius: 12px !important;
    
    /* Erittäin paksu 10px 3D-valepalkki pohjassa */
    box-shadow: 0px 10px 0px #002255, 0px 10px 20px rgba(0, 0, 0, 0.6) !important;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.6);
    
    transform: translateY(0) !important;
    margin-bottom: 10px !important; /* Kiinteä väli estää alapuolisen tekstin tärinän */
    transition: filter 0.1s ease-in-out, transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out !important;
}

/* Hover-efekti tietokoneella: Nappi painuu puolitiehen (5px) alaspäin */
@media (hover: hover) {
    .casino-row .wp-block-button__link:hover {
        background: linear-gradient(180deg, #3399ff 0%, #007aff 40%, #0052cc 100%) !important;
        transform: translateY(5px) !important;
        box-shadow: 0px 5px 0px #002255, 0px 5px 10px rgba(0, 0, 0, 0.6) !important;
        filter: none !important;
    }
}

/* Aktiivinen tila: Klikattaessa nappi painuu aivan pohjaan asti (10px alaspäin) */
.casino-row .wp-block-button__link:active {
    transform: translateY(10px) !important;
    box-shadow: 0px 0px 0px #002255, 0px 0px 4px rgba(0, 0, 0, 0.8) !important;
}

/* Mobiili-optimointi laatikolle ja napille */
@media (max-width: 781px) {
    .casino-row { 
        padding: 15px 15px !important; 
    }
    
    .casino-row ul {
        padding: 0 0 0 5px !important;
    }
    
    .casino-row li {
        padding-left: 28px !important;
        font-size: 0.9rem;
    }
    
    .casino-row li::before {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .casino-row .wp-block-button__link {
        width: 100%;
        text-align: center;
        margin-bottom: 10px !important;
    }
    
    /* Estetään mobiilissa hover-efektin jumiutuminen */
    .casino-row .wp-block-button__link:hover {
        transform: none !important;
        box-shadow: 0px 10px 0px #002255, 0px 10px 20px rgba(0, 0, 0, 0.6) !important;
    }
    /* Mobiiliklikkaus vetää napin suoraan täysin pohjaan */
    .casino-row .wp-block-button__link:active {
        transform: translateY(10px) !important;
        box-shadow: 0px 0px 0px #002255, 0px 0px 4px rgba(0, 0, 0, 0.8) !important;
    }
}

/* ============================================================
   4. HEADER & NAVIGAATIO
   ============================================================ */
header#header.ct-header {
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header#header.ct-header::after {
    content: "";
    position: absolute;
    bottom: -1px; 
    left: 10%; 
    right: 10%; 
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--gold), transparent);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.6);
    pointer-events: none;
}

/* ============================================================
   5. PIKALINKIT (Horizontal Scroll)
   ============================================================ */
.scroll-x {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 15px;
    padding-bottom: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--hover-blue) rgba(255, 255, 255, 0.1);
    -webkit-overflow-scrolling: touch;
}

.scroll-x::-webkit-scrollbar { height: 6px; }
.scroll-x::-webkit-scrollbar-thumb {
    background: var(--hover-blue);
    border-radius: 10px;
}

.scroll-x a, .scroll-x .button { flex: 0 0 auto; width: 140px; }

/* VAIN MOBIILILEVEYS */
@media (max-width: 767px) {
    .scroll-x a, .scroll-x .button { 
        width: 170px; 
        min-width: 180px; 
    }
}

/* ============================================================
   6. BADGET (Custom Badges)
   ============================================================ */
.badge-row-container {
    position: absolute;
    top: 0; left: 0;
    z-index: 99;
    display: flex;
    pointer-events: none;
}

.custom-badge {
    color: #ffffff;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.2);
}

.badge-blue { background-color: var(--primary-blue); }
.badge-green { background-color: var(--badge-green); }

.custom-badge:last-child { border-bottom-right-radius: 15px; }
.custom-badge:not(:last-child) { border-bottom-right-radius: 0; margin-right: 0; }

/* ============================================================
   7. PIILOTA MURUPOLKU ETUSIVULTA
   ============================================================ */
.home .breadcrumbs, 
.home .ct-breadcrumbs, 
.home [class*="breadcrumbs"],
.home .rank-math-breadcrumb {
    display: none !important;
}

/* Piilottaa linkin, joka osoittaa nykyiselle sivulle sitemap-listassa */
.wp-block-pages-list__item__link[aria-current="page"] {
    display: none !important;
}

/* Jos listan pallo (bullet point) jää näkyviin */
.wp-block-pages-list__item:has(> [aria-current="page"]) {
    display: none !important;
}

/* Estää tekstin valitsemisen koko sivustolla */
body {
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none;      /* IE 10+ */
  user-select: none;          /* Chrome, Firefox, Edge */
}

/* ============================================================
   8. KASINOLISTAN NÄYTÄ LISÄÄ -NAPPI JA KATKAISU
   ============================================================ */
.nayta-lisaa-nappi {
    display: block;
    margin: 10px auto 40px auto;
    padding: 16px 50px;
    background: linear-gradient(135deg, #0082ff 0%, #0056cc 100%);
    color: #ffffff;
    border: 1px solid #3399ff;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(0, 115, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nayta-lisaa-nappi:hover {
    background: linear-gradient(135deg, #1a8eff 0%, #0066ff 100%);
    box-shadow: 0 6px 25px rgba(0, 115, 255, 0.55);
    transform: translateY(-2px);
}

.nayta-lisaa-nappi:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 115, 255, 0.4);
}

/* ============================================================
   9. LIVENÄ REAGOIVAN HAUN JA BADGE-KONFLIKTIN KORJAUS
   ============================================================ */
.wp-block-blocksy-advanced-search,
.clb-advanced-search {
    position: relative !important;
    z-index: 99999 !important;
    overflow: visible !important;
}

.wp-block-blocksy-advanced-search div[id^="ct-search-results-"],
.wp-block-blocksy-advanced-search .ct-search-results,
.clb-advanced-search div[id^="ct-search-results-"],
.clb-advanced-search .ct-search-results {
    position: absolute !important;
    z-index: 999999 !important;
    display: block !important;
    visibility: visible !important;
}

.katkaise-kasinolista,
.casino-row,
.badge-row-container,
.custom-badge {
    z-index: 1 !important;
}

.wp-block-group.katkaise-kasinolista {
    position: relative !important;
    z-index: 1 !important;
    overflow: visible !important;
}

/* ============================================================
   10. POST METAN PIILOTTAMINEN STAATTISELTA ETUSIVULTA
   ============================================================ */
.home .hero-section .entry-meta,
.home .post-meta {
    display: none !important;
}