/* =========================
   BASIC RESET & TEKST
   ========================= */
* {
  box-sizing: border-box;
}

/* täiskõrgus + taust */
html,
body {
  height: 100%;
}

html {
  /* ära lase mobiilibrauseril teksti “pisendada” */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 20px;   /* 1rem = 20px desktopis */
}

/* =========================
   MUUTUJAD (värvid/taustad + layout)
   ========================= */
:root {
  /* Külgpaneelide eristused (navigeerimise abivärvid) */
  --left-panel-color:  #fcee5a; /* vasak paneel + vasaku paneeli nupp */
  --right-panel-color: #e6fc81; /* parem paneel + parema paneeli nupp */

  /* Tekstialade taust (koodiakna-laadne, silmasõbralik) */
  --content-bg: #f5f5f5;

  /* Lehe üldtaust */
  --page-bg: #e1e7fc;

  /* “Kaardi”/paneeli raam ja pinnad */
  --panel-border: #d9dde4;
  --panel-header-bg: #fafbfc;

  /* Tekst */
  --text-main: #2a2f45;     /* sinakashall */
  --text-muted: #5a5f73;

  /* Ülaribade/layouti arvud (desktop joondus keskpaneeliga) */
  --layout-pad: 4px;   /* sinise ala õhk servades (desktopis) */
  --layout-gap: 10px;   /* vahe vasak/kesk/parem veeru vahel (desktopis) */
  --left-w: 210px;      /* peab klappima .panel-left laiusega */
  --right-w: 230px;     /* peab klappima .panel-right laiusega */
}

/* =========================
   PÕHIKEHA
   ========================= */
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  font-size: 1rem;
  line-height: 1.6;

  background-color: var(--page-bg);
  color: var(--text-main);

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: underline;
}
a:hover {
  text-decoration-thickness: 2px;
}

.no-scroll {
  overflow: hidden;
}

/*###########################################
  TOPBAR + BANNER (ÜKS AINUS TÕEALLIKAS)
  - sinine taust
  - valge “kaart” nagu foorumi teemaploki nupp
  - desktopis kaart = keskpaneeli laius
  - kitsal ekraanil kaart = täislaius
###########################################*/

/* sinine taust + sticky */
.topbar{
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--page-bg);
  border-bottom: 1px solid var(--panel-border);
}

.bannerbar{
  position: sticky;
  top: 52px; /* kui topbar kõrgus muutub, saab hiljem täpsustada */
  z-index: 25;
  background: var(--page-bg);
  border-bottom: 1px solid var(--panel-border);
}

/* valged kaardid */
.topbar-card,
.banner-card{
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
  
}

.topbar-card{
  margin-top: 14px; /* või 16px */
}



.topbar-wrap{ /* või mis sul topbari ümber on */
  padding-top: 10px;
}


/* topbar-card sees paigutus */
.topbar-card{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

/* NB: see on link/tekst, mitte “pilt-logo” */
.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.topbar-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* kasutaja kast */
.userbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: var(--panel-header-bg);
}

.user-avatar {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: #ffffff;
  font-weight: 700;
}

.user-name {
  font-size: 1rem;
  color: #2a2d38;
}

/* kui kasutaja on eraldi paremal (sinises alas) */
.topbar-user{
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* banneri sisu */
.bannerbar-inner{
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 0; /* kaart annab paddingu */
}

.banner-label{
  font-weight: 600;
  color: #3a3f50;
  font-size: 1rem;
}

.banner-text{
  color: var(--text-muted);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

/* ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

/* Päise ümbris: võimaldab tausta topbar + bannerbar alla */
.header-wrap{
  position: relative;
  padding: 14px 0 10px; /* natuke “õhku” pildi ja paneelide ümber */
}

/* Taustapilt ON/OFF: hoia see klass, et oleks lihtne võrrelda */
.header-wrap.has-header-bg{
  background-image: url("img/artdecowinter.png");
  background-repeat: repeat-x;
  background-position: top center;
  background-size: auto 180px; /* muuda vastavalt pildi kõrgusele */
}

/* Õrn loor, et tekst ja valged kaardid oleksid alati loetavad */
.header-wrap.has-header-bg::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.35),
    rgba(255,255,255,0.75)
  );
  pointer-events: none;
}

/* Tõsta päris sisu loori peale */
.header-wrap > *{
  position: relative;
  z-index: 1;
}


/* ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤


/* =========================
   DESKTOP (>=1201px)
   ========================= */
@media (min-width: 1201px){
  .topbar,
  .bannerbar{
    display: grid;
    grid-template-columns: var(--left-w) 1fr var(--right-w);
    gap: var(--layout-gap);
    padding: var(--layout-pad);
    align-items: center;
  }

  /* kaart keskele */
  .topbar-card{ grid-column: 2; }
  .banner-card{ grid-column: 2; }

  /* kasutaja sinise ala paremas servas */
  .topbar-user{ grid-column: 3; justify-self: end; }
}

/* =========================
   TAHVEL/TELEFON (<=1200px)
   ========================= */
@media (max-width: 1200px){
  .topbar,
  .bannerbar{
    padding: 10px;
  }

  .topbar-card,
  .banner-card{
    width: 100%;
  }

  /* banner mobiilis: läheb scrollides eest ära (nagu sul varem oli) */
  .bannerbar{
    position: static;
    top: auto;
  }
}

/* =========================
   PÕHI-LAYOUT (3 paneeli)
   ========================= */
.layout {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  padding: 10px;
  gap: 10px;
  align-items: stretch;
}

/* Paneelid */
.panel {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Külgpaneelide taustad */
.panel-left  {
  background-color: var(--left-panel-color);
}
.panel-right {
  background-color: var(--right-panel-color);
}

/* Paneeli sisu taust koodiakna-hallil */
.panel-body,
.content-card,
.note {
  background-color: var(--content-bg);
}

/* Paneeli header */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border-bottom: 1px solid #e5e8ee;
  background: var(--panel-header-bg);
}

.panel-title {
  font-weight: 700;
  font-size: 1.05rem;
}

/* Paneeli keha – keritav */
.panel-body {
  padding: 12px;
  font-size: 1rem;

  flex: 1 1 auto;
  overflow-y: auto;
}

/* Laiused desktopis */
.panel-left {
  flex: 0 0 210px;
}

.panel-center {
  flex: 1 1 auto;
  min-width: 0;
}

.panel-right {
  flex: 0 0 230px;
}

/* =========================
   MENÜÜD
   ========================= */
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu li + li {
  margin-top: 4px;
}

/* Baas-link */
.menu a {
  display: block;

  font-size: 1rem;
  padding: 14px 14px;
  min-height: 44px;

  border-radius: 12px;
  border: 1px solid #e5e8ee;
  background: #ffffff;
  text-decoration: none;
}

.menu a:hover {
  background: #f3f5f8;
}

/* Vasak menüü – pole täppe mitte üheski vaates */
#leftPanel .menu,
#leftPanel .menu li,
#leftPanel .submenu,
#leftPanel .submenu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Kasutaja nupp paremas menüüs: käitu nagu tavaline menüülink */
.userbox.userbox--menu{
  display: flex;              /* mitte inline-flex */
  width: 100%;
  text-decoration: none;      /* menüülinkidel on underline maha võetud */
  color: inherit;
  background: #ffffff;        /* sama mis .menu a */
  border: 1px solid #e5e8ee;  /* sama mis .menu a */
  border-radius: 12px;        /* sama mis .menu a */
  padding: 14px 14px;         /* sama mis .menu a */
  min-height: 44px;           /* sama mis .menu a */
  align-items: center;
  gap: 8px;
}

/* hover nagu teistel */
.userbox.userbox--menu:hover{
  background: #f3f5f8;
}


/* Hover toonid külgpaneelidele */
.panel-left .menu a:hover {
  background: rgba(252, 238, 90, 0.35);
}
.panel-right .menu a:hover {
  background: rgba(230, 252, 129, 0.35);
}

/* Keskpaneeli tekst */
.panel-center .panel-body p {
  margin-top: 0;
}

/* Sisukaardid keskosas */
.content-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e5e8ee;
  border-radius: 12px;
}

.content-card h2 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
}

/* Märkuse kast paremal */
.note {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed #c9cfda;
  border-radius: 12px;
  font-size: 1rem;
}

.note-title {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 1rem;
}

/* =========================
   KESKPANEELI MOBIILINUPUD
   ========================= */
.center-controls {
  display: none;
  width: 100%;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e8ee;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 6;
}

/* Nupud */
.ctrl-btn {
  appearance: none;
  border: 1px solid var(--panel-border);
  background: var(--panel-header-bg);
  border-radius: 12px;

  font-size: 1rem;
  padding: 12px 14px;
  min-height: 44px;

  font-weight: 700;
  cursor: pointer;
}
.ctrl-btn:hover {
  background: #f3f5f8;
}

/* Värviline eristus nuppudele (seos paneeliga) */
#openLeft {
  background-color: var(--left-panel-color);
  border-color: #d6c94a;
}
#openRight {
  background-color: var(--right-panel-color);
  border-color: #cce06f;
}

/* Sulgemisnupp paneelides (mobiil) */
.panel-close {
  appearance: none;
  border: 1px solid var(--panel-border);
  background: #ffffff;
  border-radius: 12px;

  width: 44px;
  height: 44px;
  font-size: 22px;

  line-height: 1;
  cursor: pointer;
}
.panel-close:hover {
  background: #f3f5f8;
}

/* Backdrop */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0,0,0,0.35);
}

/* =========================
   SERVARIBAD (mobiil/tahvel)
   ========================= */
.edge-handle {
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  width: 14px;
  z-index: 35;
  opacity: 0.9;
}

/* vasak ja parem toon tulevad muutujatest */
.edge-left  {
  left: 0;
  background: var(--left-panel-color);
}
.edge-right {
  right: 0;
  background: var(--right-panel-color);
}

/* =========================
   RESPONSIVE: KITSAD EKRAANID
   ========================= */
@media (max-width: 1200px) {
  /* 3-paneeli layout → üks veerg */
  .layout {
    display: block;
    padding: 10px;
  }

  #centerPanel .panel-body {
    padding-left: 26px;
    padding-right: 26px;
  }

  /* Mobiilinupud – vasak ja parem äär */
  .center-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 8px;
  }

  .center-controls .ctrl-btn {
    flex: 0 0 auto;
    display: inline-flex;
  }

  /* Paneelid muutuvad sahtliteks */
  .panel-left,
  .panel-right {
    position: fixed;
    top: 0;
    bottom: 0;
    width: min(88vw, 360px);
    max-width: 360px;
    z-index: 50;
    border-radius: 0;
    overflow: auto;
    transform: translateX(-110%);
    transition: transform 0.18s ease-out;
  }

  .panel-right {
    right: 0;
    left: auto;
    transform: translateX(110%);
  }
  .panel-left {
    left: 0;
  }

  .panel-left.is-open,
  .panel-right.is-open {
    transform: translateX(0);
  }

  /* Sahtli header jääb sees nähtavaks */
  .panel-left .panel-header,
  .panel-right .panel-header {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  /* Keskpaneel on tavalises voos */
  .panel-center {
    min-height: 60vh;
  }

  .mobile-only {
    display: inline-flex;
  }

  /* Eakate režiim: suurem font kitsal ekraanil */
  html {
    font-size: 22px;
  }
  body {
    font-size: 1rem;
    line-height: 1.7;
  }

  .menu a,
  .ctrl-btn {
    min-height: 52px;
  }

  /* Servaribad nähtavale */
  .edge-handle {
    display: block;
  }

  /* Kui sahtel on lahti, ribasid pole vaja */
  body.no-scroll .edge-handle {
    display: none;
  }
}

/* Telefon: veel suurem ja lihtsam */
@media (max-width: 520px) {
  html {
    font-size: 24px;  /* 1rem = 24px */
  }

  .layout {
    padding: 8px;
    gap: 8px;
  }

  .topbar-subtitle {
    display: none;
  }

  .center-controls {
    top: 0;
    z-index: 6;
    padding: 10px 10px;
  }

  .ctrl-btn {
    min-height: 56px;
  }

  .panel-close {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
}

/* Lai ekraan: peida mobile-only elemendid */
@media (min-width: 1201px) {
  .mobile-only {
    display: none;
  }
}

/* Tahvlid / väiksemad sülearvutid */
@media (min-width: 1201px) and (max-width: 1400px) {
  html {
    font-size: 30px;
  }
}

/* veel mingid väiksemad tahvlid */
@media (min-width: 700px) and (max-width: 1024px) {
  html {
    font-size: 30px;
  }
}

/* =========================
   VASAK MENÜÜ – KOMPAKTSEM DESKTOPIS
   ========================= */
@media (min-width: 1201px) {

  /* väike vahe ridade vahel */
  #leftPanel .menu > li {
    margin: 4px 0;
  }

  /* peamenüü lingid – veidi väiksema paddingu ja kirjaga */
  #leftPanel .menu > li > a {
    padding: 10px 12px;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  /* alam-menüü (Raadio/Uudised) – natuke kitsamad ja nihkes */
  #leftPanel .submenu {
    margin-top: 4px;
    padding-left: 18px;
  }

  #leftPanel .submenu > li > a {
    padding: 6px 12px;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  /* parem paneel sama joone peale (et vasak/parem ei oleks erinevad) */
  #rightPanel .menu > li > a {
    padding: 10px 12px;
    font-size: 0.95rem;
    white-space: nowrap;
  }
}

/* =========================
   FOORUM – AVALIIK
   ========================= */
.foorum-wrapper {
  padding: 12px 14px;
}

.foorum-title {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.foorum-intro {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.teemaplokkide-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* nupp sarnane .menu a stiiliga, aga keskpaneeli jaoks */
.teemaplokk-nupp {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: #ffffff;
  text-decoration: none;
  font-size: 1rem;
}

.teemaplokk-nupp:hover {
  background: #f3f5f8;
}

.teemaplokk-nimi {
  font-weight: 600;
}

/* =========================
   FOORUM – TEEMADE NIMEKIRI
   ========================= */
.foorum-back {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.foorum-back a {
  text-decoration: underline;
}

.teemade-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* =========================
   FOORUM – ÜKS TEEMA
   ========================= */
.teema-postitused {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* =========================
   FOORUM – Postituskaardid
   ========================= */
.postitus {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  transition: background-color 0.2s;
}

/* Hover – ainult hiirega (mobiilis ei sega) */
@media (hover: hover) {
  .postitus:hover {
    background-color: #f3f5f8;
  }
}

.postitus-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.postitus-sisu {
  font-size: 1rem;
  line-height: 1.55;
  /*white-space: pre-wrap;*/
  white-space: normal;
  text-indent: 2ch;
}

/* =========================
   FOORUM – vastuse vorm
   ========================= */
.foorum-hr {
  border: 0;
  border-top: 1px solid var(--panel-border);
  margin: 16px 0;
}

.foorum-vastus {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vastus-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.foorum-vastus textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  resize: vertical;
}

.vastus-nupp {
  align-self: flex-start;
  padding: 8px 16px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--right-panel-color);
  cursor: pointer;
}

.vastus-nupp:hover {
  background: #f3f5f8;
}

/* =========================
   Foorum: teemaploki päis + "Uus teema" nupp
   ========================= */
.teemaplokk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

/* "Alusta uut teemat" nupp – vaikimisi (tahvel/telefon) 1/2 keskpaneeli laiust */
.foorum-uus-teema-nupp {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  padding: 10px 12px;
  border-radius: 12px;

  background: #a3b3ee;
  border: 1px solid #8f9eda;

  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;

  width: 50%;
  max-width: 50%;
  text-align: center;

  margin-left: auto;
}

.foorum-uus-teema-nupp:hover {
  background: #b4c1f3;
}



/* Lauaarvuti vaade – nupp umbes 1/4 keskpaneeli laiusest */
@media (min-width: 1201px) {
  .foorum-uus-teema-nupp {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

/* Keskpaneeli postituste list */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.post-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;

  border-radius: 12px;
  border: 1px solid #e5e8ee;
  background: #ffffff;
  padding: 12px;
  text-decoration: none;
  color: inherit;
}

.post-card:hover {
  background: #f3f5f8;
}

.post-thumb {
  width: 110px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e8ee;
  background: #fff;
}

.post-title {
  font-weight: 700;
  margin: 0 0 6px 0;
}

.post-excerpt {
  margin: 0;
  color: #505566;
}

/* KAHEKIHILINE POSTITAMINE FOORUMIS */

/* =========================
   Foorum: postituste vastamine (2 taset)
   ========================= */

.postitus-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.postitus-vasta {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 8px 12px;
  border-radius: 12px;

  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;

  border: 1px solid #cfd5e3;
  background: #ffffff;
}

.postitus-vasta:hover {
  background: #f3f5f8;
}

/* alamvastuste konteiner */
.postitus-children {
  margin-top: 8px;
}

/* Alamvastus: veidi paremale + tumedam taust */
.postitus-child {
  margin-left: 6%;
  background: #e9ebf2;          /* tumedam kui tavaline */
  border-left: 4px solid #c8ccda;
}

/* telefonis väiksem taane (ruumi on vähem) */
@media (max-width: 520px) {
  .postitus-child {
    margin-left: 12px;
  }
}

/* väike “Vastus teemale / postitusele” rida vormi kohal */
.vastus-hint {
  font-size: 0.95rem;
  font-weight: 700;
  color: #3a3f50;
  margin: 0 0 8px 0;
}


.reply-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.vastus-nupp-secondary {
  background: #ffffff;
}

.inline-reply-host {
  margin-top: 10px;
}


/* =========================
   ARTIKLID – portaalistiilis voog
   ========================= */
.article-feed {
  display: grid;
  gap: 12px;
  margin-top: 12px;

  grid-template-columns: 1fr;
  justify-items: center;
}

@media (min-width: 900px) {
  .article-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
  }
}

@media (min-width: 1200px) {
  .article-feed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.article-card {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 8px;

  border-radius: 12px;
  border: 1px solid #e5e8ee;
  background: #ffffff;
  padding: 12px;

  text-decoration: none;
  color: inherit;
  min-width: 0;

  width: 100%;
  max-width: 520px;
}

@media (min-width: 900px) {
  .article-card {
    max-width: none;
  }
}

.article-card:hover {
  background: #f3f5f8;
}

.article-title,
.article-excerpt {
  overflow-wrap: anywhere;
}

.article-thumb {
  width: 100%;
  height: auto;
  display: block;

  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e5e8ee;
  background: #fff;
}

@media (max-width: 900px) {
  .article-thumb {
    max-height: 220px;
  }
}

@media (max-width: 520px) {
  .article-thumb {
    max-height: 180px;
  }
}

.article-title {
  font-weight: 700;
  margin: 0;
}

.article-excerpt {
  margin: 0;
  color: var(--text-muted);
}

/* Kui viewTitle on tühi, ära näita ribapealkirja */
#viewTitle:empty {
  display: none;
}

/* --- FIX: keskpaneeli sisu ei tohi tekitada horisontaalset overflow'd --- */
#centerPanel,
#centerPanel .panel-body,
#centerPanel .panel-body * {
  max-width: 100%;
}

#centerPanel .panel-body {
  overflow-x: hidden;
}

/* --- FIX: article feed/kaart ei tohi olla laiem kui konteiner --- */
.article-feed {
  width: 100%;
  max-width: 100%;
  justify-items: stretch;
}

.article-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.article-thumb {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Artikli sisu "tulp" keskele */
#centerPanel #postView {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 18px;
}

#centerPanel #postView,
#centerPanel #postView .post-content {
  text-align: left;
}

#centerPanel #postView img {
  display: block;
  margin: 18px auto;
  max-width: 100%;
  height: auto;
}

#centerPanel #postView h2 {
  text-align: left;
  margin: 0 0 14px;
}


/* foorumi postituste kollaps */

.postitus-children.is-collapsed { display: none; }

/* ================================
   Foorumi nupud – ühtne välimus
================================ */

/* Baas: sama kuju mis "Vasta" nupul */
/* Sama stiil nii "Vasta" (a) kui "Näita vastuseid" (button) jaoks */
.postitus-vasta,
.postitus-toggle-children {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 8px 12px;
  border-radius: 12px;

  font-weight: 700;
  font-size: 0.9rem;

  border: 1px solid #cfd5e3;
  background: #ffffff;
  color: inherit;

  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;     /* a puhul */
  line-height: 1.2;

  /* button default-stiilide nullimine */
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}

/* Hover mõlemale */
.postitus-vasta:hover,
.postitus-toggle-children:hover {
  background: #f3f5f8;
}

/* Kui tahad, et "avatud" olek oleks lihtsalt veidi toonitud (valikuline) */
.postitus-toggle-children[aria-expanded="true"] {
  background: #f3f5f8;
}


/* Joondus postituse actionites */
.postitus-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;   /* telefonis reavahetus */
}

/* MOD nupud: paremas ülanurgas + roosa */
/* see on postituse peitmise nupp */
.postitus{
  position: relative;              /* annab ankrupunkti */
}

/* et meta-tekst ei läheks nupu alla */
.postitus-meta{
  padding-right: 90px;             /* vajadusel muuda 70–120px */
}

/*.mod-hide-btn{
  position: absolute;
  top: 12px;
  right: 14px;

  background: #fc7494;
  /*color: #fff;*/
/*  color: var(--text-main);   /* = #2a2f45 */
/*  border: 1px solid #e85f80;

  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;

  cursor: pointer;

  /* nullime browseri defaulti */
/*  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}


.mod-hide-btn:hover{
  filter: brightness(0.95);
}

/* 3) et meta-tekst ei jookseks nupu alla */
/*.postitus-meta{
  padding-right: 110px;  /* vajadusel natuke üles/alla */
/*}*/

.mod-hide-btn{
  position: absolute;
  top: 12px;
  right: 14px;

  width: 36px;
  height: 36px;
  padding: 0;

  display: grid;          /* kõige kindlam keskjoondus */
  place-items: center;

  background: #fc7494;
  border: 1px solid #e85f80;
  border-radius: 10px;

  /* peida päristekst, aga ära nihuta välja */
  font-size: 0;
  color: transparent;

  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/* X */
.mod-hide-btn::before{
  content: "×";
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  color: var(--text-main);
}

