/* ==== ECF Override | Prussian Teal -teema ==== */

/* Värit ja muuttujat */
:root{
  --ecf-bg: #00384d;       /* Tausta ja valikot */
  --ecf-card: #ffffff;     /* Korttien tausta */
  --ecf-text: #ffffff;     /* Teksti tummalla */
  --ecf-muted: #cbd5e1;    /* Haaleampi teksti */
  --ecf-accent: #aee0e6;   /* Linkit/hover-korostus */
  --ecf-border: #1f2937;   /* Rajaus tummalla */
  --ecf-radius: 14px;
  --ecf-shadow: 0 2px 14px rgba(0,0,0,.06);
}

/* 1) Koko sivun tausta */
html,
body.site,
#papperet,
.body {
  background-color: var(--ecf-bg) !important;
  color: var(--ecf-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Linkit */
a{
  color: var(--ecf-accent);
  text-decoration: none;
}
a:hover,
a:focus{
  color: #ffffff;
  text-decoration: underline;
}

/* 2) Valikot ja navigaatio */
#toppmenybox,
#toppmeny,
.navigation,
.navbar-inner,
#BurgerKing,
#hamburgermenyn{
  background-color: var(--ecf-bg) !important;
  color: var(--ecf-text) !important;
}
#toppmeny a,
#hamburgermenyn a,
.navigation a{
  color: var(--ecf-text) !important;
}
#toppmeny a:hover,
#hamburgermenyn a:hover,
.navigation a:hover{
  background-color: rgba(255,255,255,0.10) !important;
  color: var(--ecf-accent) !important;
}

/* Hampurilaispainike */
#hamburgaren{
  background: var(--ecf-bg);
  border-radius: var(--ecf-radius);
  padding: .40rem .70rem;
}
#hamburgaren img{
  filter: brightness(0) invert(1);
}

/* 3) Okran poisto */
.custom > div[style*="#d68614"],
.custom > div[style*="#F3B55E"],
.custom > div[style*="background-color:#d68614"],
.custom > div[style*="background-color:#F3B55E"],
.custom > div[style*="background-color: #d68614"],
.custom > div[style*="background-color: #F3B55E"]{
  background: var(--ecf-card) !important;
}

/* 4) Artikkelikortit */
.blog-featured .item,
.blog-featured .leading-0,
.item-page{
  background: var(--ecf-card);
  border: 1px solid var(--ecf-border);
  border-radius: var(--ecf-radius);
  padding: 16px;
  box-shadow: var(--ecf-shadow);
  color: #000;
}
.blog-featured img,
.item-page img{
  border-radius: 12px;
}

/* Metatiedot, tagit */
.article-info{
  font-size: .9rem;
  color: var(--ecf-muted);
}
.tags.inline .label{
  background: var(--ecf-accent);
  color: #00384d;
  border-radius: 999px;
  padding: .25rem .60rem;
  border: 1px solid var(--ecf-accent);
  font-weight: 600;
}

/* 5) Sivutus */
.pagination-list a{
  border: 1px solid var(--ecf-border);
  border-radius: 10px;
  padding: .45rem .70rem;
  display: inline-block;
  background: var(--ecf-card);
  color: #000;
}
.pagination-list .active a,
.pagination-list a:hover{
  background: var(--ecf-accent);
  color: var(--ecf-bg);
}

/* 6) Bootstrap 2 -layout säilytys */
.blog-featured,
.blog-featured .items-leading,
.blog-featured .items-row{
  display: block !important;
  grid-template-columns: none !important;
}
.blog-featured .items-row:after,
.blog-featured .items-leading:after{
  content:"";
  display:table;
  clear:both;
}
.blog-featured .items-row [class^="span"],
.blog-featured .items-row [class*=" span"]{
  float:left;
}

/* 7) ETNtv-lohko taustavärillä (kaikki osat) */
[id*="etntv"],
[id*="ETNtv"],
.moduletable[id*="etntv"],
.moduletable[id*="ETNtv"],
.custom[id*="etntv"],
.custom[id*="ETNtv"]{
  background-color: var(--ecf-bg) !important;
  color: var(--ecf-text) !important;
}
[id*="etntv"] *,
[id*="ETNtv"] *{
  color: var(--ecf-text) !important;
}

/* ETNtv-otsikon tausta */
[id*="ETNtv"] .module-title,
[id*="ETNtv"] h3,
[id*="etntv"] .module-title,
[id*="etntv"] h3 {
  background-color: var(--ecf-bg) !important;
  color: var(--ecf-text) !important;
}

/* Poistetaan inline-valkoinen tausta moduuleista */
div.moduletable.custom[style*="background-color:#fff"],
div.moduletable.custom[style*="background-color: #fff"],
div.moduletable[style*="background-color:#fff"],
div.moduletable[style*="background-color: #fff"] {
  background-color: var(--ecf-bg) !important;
  color: var(--ecf-text) !important;
}

/* 8) Mobiili */
@media (max-width: 767px){
  #toppmeny a, #hamburgermenyn a{
    padding: .45rem .60rem;
    display: block;
  }
}

/* Nollaa Joomlan module chrome "well" -tausta */
.well,
.moduletable.well,
#aside .well,
#square .well,
#adcolumn-1 .well,
#adcolumn-2 .well {
  background-color: var(--ecf-bg) !important; /* Prussian Teal */
  border: none !important;
  box-shadow: none !important;
}

/* Jos otsikkolohko saa valkoisen taustan */
.well .module-title,
.well h3 {
  background-color: var(--ecf-bg) !important;
  color: var(--ecf-text) !important;
}

/* Varmista, ettei sisällä ole omia valkoisia taustoja */
.well *[style*="background-color:#fff"],
.well *[style*="background-color: #fff"]{
  background-color: transparent !important;
}

/* ETNtv-otsikkorivin (moduuli 311) tausta */
#mod-custom311,
#mod-custom311 .module-title,
#mod-custom311 h3 {
  background-color: #00384d !important;
  color: #ffffff !important;
}

/* Banner-ryhmien tausta -> Prussian Teal */
.bannergroup{
  background-color: #00384d !important;   /* Prussian Teal */
  border: none !important;
  box-shadow: none !important;
}

/* Jos samoissa sarakkeissa on muita 'bannergroup'-lohkoja, varmista kaikissa */
/* removed duplicate bannergroup color rule (covered by .bannergroup) */

/* Poista mahdolliset sisäiset valkoiset inline-taustat */
.bannergroup *[style*="background-color:#fff"],
.bannergroup *[style*="background-color: #fff"]{
  background-color: transparent !important;
}

/* Yläpalkki sama leveys kuin sisältö */
#toppmenybox {
  /* background-color removed; uses transparent later */
  margin: 0 auto;
  padding: 0;
}

/* Jos haluat sen visuaalisesti ilman ylimääräisiä rakoja */
#toppmenybox .moduletable {
  margin: 0;
  padding: 0;
}

/* 1) Ulompi palkki ei maalaa taustaa lainkaan */
#toppmenybox{
  background: transparent !important;
}

/* 2) Moduulin omat taustat pois (Protostar/Bootstrap2) */
#toppmenybox .navbar,
#toppmenybox .navbar-inner{
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* 3) Varsinainen tausta ja leveys sisäwrapperiin */
#toppmeny-inner{
  background-color: #00384d;          /* Prussian Teal */
  max-width: 1170px;                  /* säädä samaan kuin sivun sisältö */
  margin: 0 auto;                     /* keskitys */
  padding: 0 12px;                    /* samat sivuvälit kuin sisällössä */
  display: block;
}

/* Jos sivusi “content”-kontti on kapeampi (esim. 940px), käytä sitä: */
@media (min-width: 980px){
  /* vaihtoehto: 940px */
  /* #toppmeny-inner{ max-width: 940px; } */
}

/* EVENT-sivu: piilota Julkaistu-pvm */
body.itemid-150 dl.article-info dd.published {
  display: none !important;
}

body.itemid-153 dl.article-info dd.published {
  display: none !important;
}

/* EVENT-sivu: piilota some-napit */
body.itemid-150 .button-container {
  display: none !important;
}

body.itemid-153 .button-container {
  display: none !important;
}

/* =====  Itemid 153: artikkelilistaukset kortteihin  ===== */
body.itemid-153 .blog .items-leading > div,
body.itemid-153 .blog-featured .items-leading > div,
body.itemid-153 .blog .items-row > div,
body.itemid-153 .blog-featured .items-row > div,
body.itemid-153 .category .items-row > div {
  background: #fff;
  border-radius: 14px;
  padding: 18px 18px 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
  margin: 18px 0;
}

/* Kuva kulmien mukaan */
body.itemid-153 .item-image img,
body.itemid-153 img.intro-img {
  border-radius: 10px;
  display: block;
}

/* Otsikko ja meta siistiksi */
body.itemid-153 .blog h2 a,
body.itemid-153 .category h2 a {
  text-decoration: none;
}
body.itemid-153 .article-info { 
  margin: 6px 0 10px;
}

/* Poista listauksen vaakaviivat */
body.itemid-153 hr,
body.itemid-153 .blog .items-row > div hr {
  display: none;
}

/* Yksittäinen artikkeli samalla korttityylillä (jos avataan Itemid 153:n kautta) */
body.itemid-153.view-article .item-page {
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
}

/* Itemid 153: ingressiteksti mustaksi korttityylissä */
body.itemid-153 .blog .items-leading > div,
body.itemid-153 .blog .items-row > div,
body.itemid-153 .category .items-row > div {
  color: #000;
}

body.itemid-153 .blog .items-leading > div p,
body.itemid-153 .blog .items-row > div p,
body.itemid-153 .category .items-row > div p {
  color: #000;
}

/* Piilotetaan Kirjoittanut-palkki, Sulautetut-tagi ja introkuva vain Itemid 153 */
body.itemid-153 .article-info,
body.itemid-153 .tags,
body.itemid-153 .img-intro {
  display: none !important;
}

/* Korvataan vanha tekninen artikkeli -leima uudella ja säädetään koko 50x50 px */
body.itemid-153 img[src*="ta-leima-www.jpg"] {
    content: url("https://etn.fi/images/a/25/5/ta-tpicon25.png");
    width: 50px;
    height: 50px;
}

/* ECF: poista artikkeliboksien väliviivat listanäkymässä */
.blog-featured .items-leading,
.blog-featured .items-row,
.blog-featured .items-row .item,
.blog-featured .leading-0,
.blog-featured .item {
  border: 0 !important;
  box-shadow: none !important;
}

/* Jos viiva on <hr> */
.blog-featured hr,
.blog-featured .item hr {
  display: none !important;
}

/* Jos viiva tehdään pseudo-elementeillä */
.blog-featured .items-row::before,
.blog-featured .items-row::after,
.blog-featured .item::before,
.blog-featured .item::after {
  content: none !important;
  border: 0 !important;
}

/* Protostar käyttää usein borderia peräkkäisten rivien välissä */
.blog-featured .items-row + .items-row {
  border-top: 0 !important;
}

/* Jos sivu lisää erottimia nimillä divider/separator */
.blog-featured .divider,
.blog-featured .separator {
  display: none !important;
}

/* (Tämä tasaa “viivan näköistä” rakoa: säädä makuun) */
.blog-featured .items-row,
.blog-featured .items-leading,
.blog-featured .item {
  margin-top: 0 !important;
  padding-top: 0 !important;
  margin-bottom: 18px; /* voit pienentää/isontaa */
}

/* Näkyy HTML:ssa boksien välissä — piilota jos tämä on “turha viiva/tyhjä rivi” */
.annonspekare {
  display: none !important;
}

.newsflash {
    color: #000000; /* Musta teksti */
}
