.single-post .entry-content p {
  text-align: justify;
}

@media (max-width: 768px) {
  .single-post .entry-content p {
    text-align: left;
  }
}

/* Tyylitä vain artikkelin ensimmäisen kappaleen ensimmäinen kirjain */
.single-post .entry-content > p:first-of-type:first-letter {
    font-size: 4em;
    font-weight: bold;
    float: left;
    line-height: 0.8;
    margin-right: 0.1em;
    color: #1A4C93;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Responsiivisuus: mobiilissa hieman pienempi kirjain */
@media (max-width: 768px) {
    .single-post .entry-content > p:first-of-type:first-letter {
        font-size: 3em;
        line-height: 0.9;
    }
}

/* Hover-efekti */
.single-post .entry-content > p:first-of-type:first-letter:hover {
    color: #163d71;
    transform: scale(1.1);
    transition: transform 0.2s, color 0.2s;
}


.overlay-ad-slot {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 6px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  z-index: 5;
  max-width: 15%;       /* Desktop, suhteessa kuvaan */
  min-width: 120px;     /* Ei kutistu alle 120px */
  min-height: 60px;     /* Vähintään 60px korkea */
  width: auto;
  height: auto;
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
}

@media (max-width: 600px) {
  .overlay-ad-slot {
    top: 6px;
    right: 6px;
    padding: 3px 4px;
    font-size: 11px;
    max-width: 90%;       /* Mobiilissa lähes koko leveys, jos tarpeen */
    min-width: 120px;     /* Varmistaa 120px leveys */
    min-height: 60px;     /* Vähintään 60px korkeus */
  }
}

.entry-meta .coffee-link a {
  color: inherit;
  text-decoration: none;
}
.entry-meta .coffee-link a:hover {
  text-decoration: underline;
}



/* ---- Widget-kontti ja otsikko ---- */
.mr-widget {
  font-family: inherit;
  background: transparent;
  padding: 0;
}

/* 🔹 Otsikko: sininen tausta, valkoinen teksti */
.mr-widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  padding: 0.6rem 0.75rem;
  background-color: #1A4C93;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ---- Välilehtien tyyli ---- */
.mr-tabs { }
.mr-tab-nav {
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  border-bottom: 2px solid #eee;
}
.mr-tab-btn {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  font-weight: 600;
  color: #666;
  transition: all 0.18s ease;
}
.mr-tab-btn.active {
  color: var(--global-palette-highlight, #0057b7);
  border-bottom: 3px solid var(--global-palette-highlight, #0057b7);
}
.mr-tab-content { display: none; }
.mr-tab-content.active { display: block; }

/* ---- Lista, kuvallinen tyyli ---- */
.mr-list { list-style: none; margin: 0; padding: 0; }

.mr-item {
  position: relative;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e5e5;
}

.mr-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.mr-image-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #f6f6f6;
}

.mr-thumb {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mr-link:hover .mr-thumb {
  transform: scale(1.03);
}

.mr-title {
  display: block;
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  transition: color 0.18s ease;
}

.mr-link:hover .mr-title {
  color: var(--global-palette-highlight, #0057b7);
}

/* ---- Numerointi kuvan kulmassa ---- */
.mr-rank {
  position: absolute;
  top: 10px;
  left: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  width: 1.8rem;
  height: 1.8rem;
  line-height: 1.8rem;
  text-align: center;
  color: #fff;
  background: #1A4C93;
  border-radius: 50%;
  z-index: 2;
}

.mr-item:hover .mr-rank {
  background: #0f3466;
}

/* ---- Mobiili ---- */
@media (max-width: 768px) {
  .mr-title { font-size: 0.95rem; }
  .mr-rank {
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    font-size: 0.8rem;
  }
}



/* ---- VS Premium -palkki ---- */
.mr-vspromo-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  background-color: #1A4C93;
  color: #ffffff;
  padding: 0.6rem 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-family: inherit;
  z-index: 9999; /* varmistetaan että näkyy headerin yläpuolella */
  position: relative;
}

/* Kategoria */
.mr-vspromo-label {
  background-color: rgba(255,255,255,0.15);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  white-space: nowrap;
  margin-right: 0.75rem;
}

/* Otsikko */
.mr-vspromo-title {
  font-size: 1rem;
  margin: 0;
  line-height: 1.2;
  margin-right: 0.75rem;
}
.mr-vspromo-title a {
  color: #ffffff;
  text-decoration: none;
}
.mr-vspromo-title a:hover {
  text-decoration: underline;
}

/* Lue lisää -nappi */
.mr-vspromo-btn {
  background-color: #ffffff;
  color: #1A4C93;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}
.mr-vspromo-btn:hover {
  background-color: #f0f0f0;
}

/* --- Mobiilioptimointi --- */
@media (max-width: 768px) {
  .mr-vspromo-line {
    padding: 0.5rem 0.75rem;
  }
  .mr-vspromo-label {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    margin-right: 0.5rem;
  }
  .mr-vspromo-title {
    font-size: 0.85rem;
    line-height: 1.1;
    margin-right: 0.5rem;
  }
  /* 🔹 Piilota "Lue lisää" mobiilissa */
  .mr-vspromo-btn {
    display: none;
  }
}

/* Hyvin pienet näytöt */
@media (max-width: 480px) {
  .mr-vspromo-title {
    font-size: 0.8rem;
  }
}



/* Piilota kaikki sisältö 3D Flipbook -sivuilla */
body.single-3d-flip-book * {
  display: none !important;
}

/* Näytä vain oma viesti */
body.single-3d-flip-book::before {
  content: "Sinulla ei ole oikeuksia tälle sivulle.";
  display: block;
  text-align: center;
  padding: 150px 20px;
  font-size: 1.2rem;
  color: #444;
  font-weight: 500;
}





/* Yleinen laatikko */
.subscription-box {
    width: 100%;
    max-width: 100%;
    padding: 15px 20px;
    margin: 10px 0;
    color: white;
    font-size: 16px;
    font-weight: 500;
    border-radius: 10px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Guest / ilmainen käyttäjä */
.guest-box {
    background: linear-gradient(135deg, #1A4C93, #3A69B5);
}

/* Maksava / Paid View - subscriber */
.paid-box {
    background: linear-gradient(135deg, #FFD700, #FFC107); /* kultainen gradient */
    color: #1A1A1A; /* tumma teksti paremman kontrastin vuoksi */
}

/* Kirjautumattomat */
.guest-loggedout {
    background: linear-gradient(135deg, #1A4C93, #3A69B5);
}

/* Poistetaan kirjautumis- ja uloskirjautumisnapit statusbokseista */
.subscription-box .login-button,
.subscription-box .logout-button {
    display: none !important;
}

/* Logout / login napit – jätetään tyylit talteen jos käytät muualla */
.logout-button,
.login-button {
    background-color: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
}

.logout-button:hover,
.login-button:hover {
    background-color: white;
    color: #1A4C93;
}

/* Responsiivisuus mobiilissa */
@media (max-width: 768px) {
    .subscription-box {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .subscription-box .logout-button,
    .subscription-box .login-button {
        width: 100%;
        padding: 10px 0;
    }
}









/* Vain artikkelit */
body.single .wp-block-premium-content-container .wp-block-premium-content-subscriber-view {
  position: relative;
  padding-top: 2.5rem; /* tilaa labelille */
  overflow: visible;
}

/* Kehys subscriber viewiin */
body.single .wp-block-premium-content-container .wp-block-premium-content-subscriber-view::before {
  content: "";
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  border: 2px solid #1A4C93;
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
}

/* Tekstin taustalaatikko yläreunassa oikealla */
body.single .wp-block-premium-content-container .wp-block-premium-content-subscriber-view::after {
  content: "Katselet VS Premium sisältöä";
  position: absolute;
  top: -1.2rem;
  right: 0;
  background-color: #1A4C93;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  white-space: nowrap;
  border-radius: 2px;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 0 2px #1A4C93 inset;
}

/* Teksti näkyy kaikilla näytöillä */





.grecaptcha-badge {
  visibility: hidden;
}
