:root {
  --orange: #ff7a00;
  --orange-dark: #e46600;

  --gray-player: #D3D7EB;   /* same color as player background */
  --gray-hover: #C5CAE0;    /* slightly darker for hover */

  --text-main: #4b0082;

  /* Radio-shell unified surface */
  --ui-surface: #D3D7EB;
  --ui-surface-2: #C5CAE0;
  --ui-card: rgba(255,255,255,.38);
  --ui-stroke: rgba(0,0,0,.10);
  --ui-shadow: 0 8px 22px rgba(0,0,0,.10);
  --ui-radius: 16px;

  --border-color: #ffffff; /* legacy (no longer used for station grid borders) */
}

/* =========================
   GLOBAL
   ========================= */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #222;
}

a { color: var(--text-main); }

.center {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: #f3f4f8; /* very light gray */
}

/* =========================
   TOP HEADER
   ========================= */
.site-header{
  background:#fff;
  border-bottom:1px solid rgba(0,0,0,.08);

  max-width:1200px;
  margin:0 auto;
  padding:5px 10px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;

  flex-wrap: nowrap; /* critical: prevent wrap */
}

.logo img{
  height:38px;
  width:auto;
  display:block;
}

.menu-bar{
  display:flex;
  align-items:center;
  gap:18px;

  margin-left:auto;
  flex-wrap: nowrap;
}

.menutitle{
  text-decoration:none;
  font-size:16px;
  font-weight:600;
  color:#333;
  padding:4px 0;
  white-space:nowrap;

  flex: 0 0 auto;
}

.menutitle:hover{ color:#ff7a00; }

@media (max-width:900px){
  .site-header{
    padding:8px 10px;
    gap:12px;
  }

  .logo img{ height:24px; }
  .menu-bar{ gap:12px; }
  .menutitle{ font-size:12px; }
}

/* =========================
   TOP AD
   ========================= */
.ad-full{
  width: 100%;
  padding: 0;
  margin: 0;
  background: transparent;
}

.ad-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 3px 0;
  box-sizing: border-box;
}

.ad-top-wrap{
  width: 100%;
  min-height: 90px;
  padding: 0;
  margin: 0;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-top-unit{
  display: block !important;
  width: 100% !important;
  min-height: 90px;
}

/* =========================
   FOOTER AD
   ========================= */
.footer-ad-wrap{
  width: 100%;
  margin: 16px 0 8px;
}

.footer-ad-inner{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 10px;
  box-sizing: border-box;
}

.footer-ad-inner .adsbygoogle{
  display: block !important;
  width: 100% !important;
}
@media (max-width: 700px){
  .footer-ad-wrap{
    padding: 12px 0 6px;
  }

  .footer-ad-inner{
    padding: 0 6px;
  }
}


/* Mobile */
@media (max-width: 700px){
  .ad-full{
    padding: 4px 0 6px;
  }

  .ad-inner{
    padding: 0 6px;
  }

  .ad-top-wrap{
    min-height: 60px;        /* mobilajā mazāks */
    padding: 4px 0;
    border-radius: 8px;
  }

  .ad-top-unit{
    min-height: 60px;
  }
}

/* =========================================================
   ADSENSE — paslēpt tukšas reklāmu zonas
   ========================================================= */

/* Pats neizpildītais AdSense elements */
ins.adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}

/* Augšējā reklāma */
.ad-full:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
  display: none !important;
}

/* Apakšējā reklāma */
.footer-ad-wrap:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
  display: none !important;
}

/* =========================
   PLAYER
   ========================= */
.player-section {
  background: var(--gray-player);
}

.player-inner { width: 100%; }

.mrp-wrapper { margin-left: 0; }

.player-section embed,
.player-section object,
.player-section iframe { max-width: 100%; }

/* =========================
   NOW PLAYING
   ========================= */
.nowplaying{
  background:#D3D7EB;
  padding: 6px 10px 10px;
  font-size: 14px;
  color:#333;
  min-height: 22px;
}

.nowplaying-history .np-time{
  color:#555;
  font-weight:700;
}

/* compact bar under player */
.np-wrap{ 
  background:#D3D7EB;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
 }


.np-bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;

  width:100%;
  box-sizing:border-box;

  padding:6px 10px;
  margin:0;

  background:#D3D7EB;
  color:#222;

  font-family: Arial, Helvetica, sans-serif;
  font-size:18px;
  line-height:1.2;
}


.np-now{ flex:1; min-width:0; display:flex; align-items:center; gap:6px; }
.np-label{ font-weight:700; color:#333; white-space:nowrap; }

.np-text{
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:520px;
}

.np-prev{
  margin-left:auto;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:0 !important;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}

.np-prev:hover{ background:rgba(0,0,0,0.06); border-radius:6px; }
.np-caret{ opacity:0.8; }

.np-dropdown{
  background:#D3D7EB;
  padding:0 10px 8px;
  margin:0;
}

.np-list{
  list-style:none !important;
  margin:6px 0 0;
  padding:0;
  border-top:1px solid rgba(0,0,0,0.15);
}

.np-list li{
  display:flex;
  align-items:center;
  gap:10px;
  padding:5px 0;
  border-bottom:1px solid rgba(0,0,0,0.08);
  white-space:nowrap;
  overflow:hidden;
}

.np-time{
  flex:0 0 auto;
  font-weight:700;
  color:#555;
  white-space:nowrap;
}

.np-song{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}

.np-more{
  margin-top:0px;
  padding-top:8px;
  border-top:none;
}

.np-more-link{
  display:inline-block;
  color:#808080;
  text-decoration:none;
  font-size:14px;
  font-weight:600;
}

.np-more-link:hover{
  color:#444;
  text-decoration: none;
}

@media (max-width:700px){
  .np-bar{
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .np-now,
  .np-prev{ width: 100%; }

  .np-prev{
    margin-left: 0;
    padding: 0 !important;
  }

  .np-text{ max-width: 100%; }
}

/* nowplaying history links */
#npList li{display:flex;align-items:center;gap:8px}
  #npList .np-time{min-width:52px;color:#777;font-size:12px}
  #npList .np-song{flex:1 1 auto;min-width:0}
  #npList .np-actions{display:inline-flex;gap:8px;flex:0 0 auto;opacity:.9}
  #npList .np-link{display:inline-flex;width:16px;height:16px;align-items:center;justify-content:center;color:#444;text-decoration:none}
  #npList .np-link:hover{color:#000}
  #npList .np-link svg{width:16px;height:16px;display:block;fill:currentColor}

/* =========================
   RADIO SHELL (unified block)
   ========================= */
.radio-shell{
  max-width:1200px;
  margin: 10px auto;
  padding: 12px;
  background: var(--ui-surface);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
}

@media (max-width:900px){
  .radio-shell{ margin: 8px 5px; padding: 10px; }
}

.radio-shell--station {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .radio-shell--station {
    margin-top: 8px;
  }
}
/* =========================
   STATION CONTENT (CLEAN)
   ========================= */
.stc-card{
  max-width:1200px;
  margin:5px auto;
  padding:15px;
  border:1px solid rgba(0,0,0,.15);
  border-radius:16px;
  background:rgba(0,0,0,.04);
}

.stc-card a{ text-decoration:none; }

.stc-top{ display:flex; gap:14px; align-items:flex-start; }
.stc-logo{
  width:72px; height:72px; border-radius:16px;
  object-fit:cover; background:#fff;
  border:1px solid rgba(0,0,0,.15);
  flex:0 0 auto;
}
.stc-main{ min-width:0; flex:1 1 auto; }

.stc-aboutline{ line-height:1.45; }
.stc-aboutline .stc-title{
  display:inline;
  font-size:22px;
  font-weight:700;
  line-height:1.1;
  margin-right:12px;
}
.stc-aboutline .stc-textblock{
  display:inline;
  font-size:15px;
  color:rgba(0,0,0,.78);
}

.stc-dots{ opacity:.6; }
.stc-more{ display:none; }
.stc-textblock.is-open .stc-more{ display:inline; }
.stc-textblock.is-open .stc-dots{ display:none; }

/* One description: show its extra preview segment only on desktop or expansion. */
@media (min-width:901px){
  .stc-about .stc-preview-extra{ display:inline !important; }
  .stc-about.stc-preview-complete .stc-dots,
  .stc-about.stc-preview-complete .stc-toggle{ display:none; }
}

.stc-toggle{
  border:none;
  background:none;
  padding:0;
  margin-left:6px;
  color:rgb(170,164,164);
  font-weight:500;
  font-style:italic;
  cursor:pointer;
  white-space:nowrap;
  font-size:inherit;
  line-height:inherit;
  display:inline-block;
  min-width:60px;
  text-align:left;
}

.stc-bottom{ margin-top:18px; }

.stc-row{
  display:flex;
  gap:18px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:nowrap;
  min-width:0;
}

.stc-links{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  min-width:0;
  flex:1 1 auto;
}

.stc-ico,
.stc-phone-ico{
  width:28px;
  height:28px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#000;
  border:0;
  color:rgba(255,255,255,.92);
  text-decoration:none;
}
.stc-ico:hover,
.stc-phone-ico:hover{ filter:brightness(1.08); }
.stc-ico:active,
.stc-phone-ico:active{ transform:translateY(1px); }

.stc-svg{
  width:21px;
  height:21px;
  display:block;
  fill:currentColor;
}
.stc-svg *{ fill:currentColor; }

.stc-phone{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:600;
  white-space:nowrap;
}
.stc-phone-txt{ color:#111; }

.stc-fm-inline{
  display:flex;
  gap:10px;
  align-items:baseline;
  min-width:280px;
  max-width:48%;
  flex:0 0 auto;
  margin-left:auto;
  justify-content:flex-end;
}
.stc-fm-label{ font-weight:600; white-space:nowrap; }

.stc-fm-text.stc-textblock{
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
  font-size:15px;
}
.stc-fm-text .stc-head{
  flex:1 1 auto;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.stc-fm-text .stc-dots,
.stc-fm-text .stc-toggle{
  flex:0 0 auto;
  white-space:nowrap;
}

.stc-fm-text.is-open{ display:block; }
.stc-fm-text.is-open .stc-head{
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  display:inline;
}

.stc-only-mobile{ display:none !important; }
.stc-only-desktop{ display:inline !important; }

@media (max-width:900px){
  .stc-card{ margin:5px; padding:12px; }
  .stc-top{ gap:12px; }
  .stc-logo{ width:58px; height:58px; border-radius:14px; }

  .stc-aboutline{ line-height:1.35; }
  .stc-aboutline .stc-title{
    display:inline !important;
    font-size:16px;
    margin-right:10px;
  }
  .stc-aboutline .stc-textblock{ font-size:13px; }

  .stc-bottom{ margin-top:14px; }

  .stc-row{
    gap:12px;
    flex-wrap:wrap;
    align-items:flex-start;
  }

  .stc-ico, .stc-phone-ico{ width:22px; height:22px; }
  .stc-svg{ width:14px; height:14px; }

  .stc-phone{ font-size:14px; gap:8px; }

  .stc-fm-inline{
    width:100%;
    max-width:100%;
    min-width:0;
    margin-left:0;
    justify-content:flex-start;
    margin-top:8px;
  }

  .stc-fm-text.stc-textblock{ display:block; }
  .stc-fm-text .stc-head{
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
  }

  .stc-fm-label{ font-size:12px; }
  .stc-fm-text.stc-textblock{ font-size:12px; }
  .stc-toggle{ font-size:12px; min-width:56px; }
}

/* MUST BE LAST for desktop/mobile about switching */
.stc-card .stc-aboutline .stc-only-mobile{ display:none !important; }
.stc-card .stc-aboutline .stc-only-desktop{ display:inline !important; }

@media (max-width:900px){
  .stc-card .stc-aboutline .stc-only-desktop{ display:none !important; }
  .stc-card .stc-aboutline .stc-only-mobile{ display:inline !important; }
}

/* =========================
   RADIO-SHELL OVERRIDES (make stc/filter/list merge)
   ========================= */
.radio-shell .stc-card{
  max-width:none;
  margin:0;
  padding:12px 12px 10px;
  background:transparent;
  border:0;
  border-radius:0;
}

.radio-shell .stc-top{
  padding:4px 2px 10px;
  border-bottom:1px solid var(--ui-stroke);
}

.radio-shell .stc-aboutline .stc-textblock{
  color: rgba(0,0,0,.72);
}

.radio-shell .stc-bottom{ margin-top:10px; }
.radio-shell .stc-row{ gap:14px; }

/* =========================
   FILTER BAR (chips)
   ========================= */
.station-filter{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: var(--gray-player);
  border-radius:10px;
}

.filter-btn{
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  color: #222;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}

.filter-btn.is-active{
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.filter-btn:hover{ border-color: rgba(0,0,0,0.35); }

@media (max-width: 700px){
  .station-filter .filter-btn{
    font-size: 12px;
    padding: 6px 8px;
    line-height: 1;
  }
}
@media (max-width: 480px){
  .station-filter .filter-btn{
    font-size: 11px;
    padding: 5px 7px;
  }
}

/* Expandable filter variant: one row collapsed, all filters on expand */
.station-filter--scroll{
  display:flex;
  align-items:flex-start;
  gap:10px;
  flex-wrap:nowrap;
  width:100%;
}

.filter-scroll-wrap{
  position:relative;
  flex:1 1 0;
  min-width:0;
  overflow:hidden;
  background:#D3D7EB;
}

.filter-scroll{
  --filter-row-height: 38px;
  --filter-expanded-height: 220px;

  display: flex;
  align-items: center;
  align-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;

  min-width: 0;
  width: 100%;

  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  max-height: var(--filter-row-height);

  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;

  transition:
    max-height .28s cubic-bezier(.22, .61, .36, 1);

  -ms-overflow-style: none;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar{
  display: none;
}

/*
 * Atvērtā stāvoklī filtri pārlec vairākās rindās.
 * is-collapsing saglabā rindas aizvēršanās animācijas laikā.
 */
.station-filter--scroll.is-expanded .filter-scroll,
.station-filter--scroll.is-collapsing .filter-scroll,
.station-filter--scroll.is-measuring .filter-scroll{
  flex-wrap: wrap;
  white-space: normal;
  overflow-x: hidden;
  overflow-y: hidden;
}

.station-filter--scroll.is-expanded .filter-scroll{
  max-height: var(--filter-expanded-height);
}

/*
 * JS īslaicīgi ieslēdz šo klasi,
 * lai izmērītu visu filtru faktisko augstumu.
 */
.station-filter--scroll.is-measuring .filter-scroll{
  max-height: none !important;
  transition: none !important;
}

.filter-arrows{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1px;
  white-space: nowrap;
}

/* Vecā kreisā ritināšanas bultiņa vairs nav vajadzīga */
.filter-arrow.left{
  display: none !important;
}

/* Jaunā atvēršanas/aizvēršanas poga */
.filter-arrow.filter-expand-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 32px;
  height: 32px;
  padding: 0;

  border: 0;
  border-radius: 10px;

  background: rgba(255, 255, 255, .28);
  color: rgba(0, 0, 0, .58);

  font-size: 0;
  line-height: 0;

  cursor: pointer;
  opacity: 1;
  box-shadow: none;

  transition:
    background .18s ease,
    color .18s ease,
    transform .18s ease;
}

.filter-arrow.filter-expand-toggle:hover{
  background: rgba(255, 255, 255, .60);
  color: var(--orange);
}

.filter-arrow.filter-expand-toggle:active{
  transform: scale(.94);
}

.filter-arrow.filter-expand-toggle:focus-visible{
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* CSS bultiņa */
.filter-arrow.filter-expand-toggle::before{
  content: "";
  display: block;

  width: 7px;
  height: 7px;

  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;

  transform:
    translateY(-2px)
    rotate(45deg);

  transition:
    transform .28s cubic-bezier(.22, .61, .36, 1);
}

/* Atvērts stāvoklis */
.station-filter--scroll.is-expanded
.filter-arrow.filter-expand-toggle{
  background: rgba(255, 122, 0, .12);
  color: var(--orange);
}

.station-filter--scroll.is-expanded
.filter-arrow.filter-expand-toggle::before{
  transform:
    translateY(2px)
    rotate(225deg);
}

.filter-arrows.is-hidden{
  display: none;
}

/*
 * Viegli pelēks pārklājums parāda,
 * ka aiz vienas rindas malas vēl ir filtri.
 */
.filter-scroll-wrap::before,
.filter-scroll-wrap::after{
  content: "";
  position: absolute;
  z-index: 2;

  top: 0;
  bottom: 0;
  width: 38px;

  pointer-events: none;
  opacity: 0;

  transition: opacity .16s ease;
}

.filter-scroll-wrap::before{
  left: 0;

  background: linear-gradient(
    to left,
    rgba(211, 215, 235, 0),
    rgba(211, 215, 235, 1)
  );
}

.filter-scroll-wrap::after{
  right: 0;

  background: linear-gradient(
    to right,
    rgba(211, 215, 235, 0),
    rgba(211, 215, 235, 1)
  );
}

.filter-scroll-wrap.has-overflow-left::before{
  opacity: 1;
}

.filter-scroll-wrap.has-overflow-right::after,
.filter-scroll-wrap.has-overflow::after{
  opacity: 1;
}

/* Atvērtā režīmā malu pārklājumi nav vajadzīgi */
.station-filter--scroll.is-expanded
.filter-scroll-wrap::before,
.station-filter--scroll.is-expanded
.filter-scroll-wrap::after{
  opacity: 0 !important;
}

@media (max-width: 700px){
  .station-filter--scroll{
    gap: 8px;
  }

  .filter-scroll{
    gap: 8px;
  }

  .filter-arrow.filter-expand-toggle{
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .filter-arrow.filter-expand-toggle::before{
    width: 7px;
    height: 7px;
  }
}

/* === Radio-shell: filter + list should merge (no separate cards) === */
.radio-shell .station-filter{
  margin-top:10px;
  padding: 0 4px;
  background: transparent;
  border-radius:0;
  border:0;
}

.radio-shell .station-filter--scroll{ padding:0; }

.radio-shell .filter-btn{
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,.58);
  backdrop-filter: blur(6px);
  padding: 7px 10px;
  font-size: 15px;
}

.radio-shell .filter-btn:hover{ border-color: rgba(0,0,0,0.28); }

.radio-shell .filter-btn.is-active{
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* =========================
   STATIONS LIST + GRID
   ========================= */
.station-list{
  background: var(--gray-player);
  margin: 0;
  padding: 0 0 10px 0;
}

.stations-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 2px solid var(--border-color);
  border-left: 2px solid var(--border-color);
}

/* station item (base layout) */
.station-item{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  transition: 0.15s ease;
  overflow: hidden;
  position: relative;
}

.station-item:active { transform: scale(0.98); }

/* icon */
.station-icon{
  width: 60px;
  height: 60px;
  margin-right: 10px;
  border-radius: 20%;
  object-fit: cover;
}

/* text */
.station-text{ min-width:0; }

.station-link{
  display:block;
  width:100%;
  text-decoration:none;
  color: var(--text-main);
}

.station-name{
  font-size: 18px;
  color: #000000;
  margin-bottom: 4px;

  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.station-meta-row{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}

.station-meta{
  font-size: 12px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Responsive */
@media (max-width: 900px){
  .stations-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .stations-grid{ grid-template-columns: 1fr; }
  .station-icon{ width: 40px; height: 40px; }
  .station-name{ font-size: 16px; }
  .station-meta{ font-size: 11px; }
  .station-item{ padding: 8px 10px; }
}

/* Favorite (heart) */
.fav-btn{
  position: absolute;
  right: 10px;
  top: 10px;
  border: none;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  line-height: 1;
}

.fav-heart{
  font-size: 18px;
  color: rgba(0,0,0,0.25);
  transition: transform 0.12s ease, color 0.12s ease, opacity 0.12s ease;
}

.fav-btn:hover .fav-heart{
  transform: scale(1.08);
  color: rgba(0,0,0,0.45);
}

.station-item.is-fav .fav-heart{
  color: #e53935;
  opacity: 1;
}

/* === Radio-shell: list/grid/cards become modern cards (no grid borders) === */
.radio-shell .station-list{
  background: transparent;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

.radio-shell .stations-grid{
  gap: 10px;
  border: 0;
  padding: 6px 2px 2px;
  margin-top: 6px;
}

.radio-shell .station-item{
  background: rgba(255,255,255,.55);
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transform: none;
}

.radio-shell .station-item:hover{
  background: rgba(255,255,255,.70);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

.radio-shell .station-item.active{
  background: rgba(255,255,255,.62);
  box-shadow: 0 0 0 2px var(--orange) inset;
  transform: none;
}

.radio-shell .station-item.active:hover{
  background: rgba(255,255,255,.62);
  box-shadow: 0 0 0 2px var(--orange) inset;
  transform: none;
}

.radio-shell .station-icon{ border-radius: 16px; }

.radio-shell .fav-btn{
  right: 8px;
  top: 8px;
}

.radio-shell .station-meta{ color: rgba(0,0,0,.62); }

.radio-shell .np-missing{
  opacity: .65;
  font-style: italic;
}

@media (max-width:900px){
  .radio-shell .stations-grid{ gap: 8px; }
  .radio-shell .station-item{ border-radius: 16px; }
}

/* =========================
   FOOTER
   ========================= */
.site-footer{
  margin-top: 2px;
  color: #e9edf6;
  background:
    radial-gradient(1200px 420px at 15% 20%, rgba(255,140,0,.20), rgba(0,0,0,0) 60%),
    radial-gradient(900px 360px at 85% 5%, rgba(120,140,255,.20), rgba(0,0,0,0) 55%),
    linear-gradient(180deg, #0b1020 0%, #070a14 100%);
  border-top: 1px solid rgba(255,255,255,.08);
}

.footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 18px 18px;
}

.footer-top{
  display: flex;
  align-items: center;
  padding: 6px 0 18px;
}

.footer-brand{
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
  font-weight: 800;
  font-size: 34px;
  letter-spacing: .2px;
  color: #e9edf6;
}

.footer-brand .brand-er{ color: #ff8c00; }

.footer-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 26px;
  padding: 6px 0 14px;
}

.footer-col{
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.footer-col h2{
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: .2px;
}

.footer-links{
  display: grid;
  gap: 10px;
}

.footer-links a{
  color: rgba(233,237,246,.88);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.2;
}

.footer-links a:hover{
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-contact{
  display: grid;
  gap: 10px;
}

.contact-row{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(233,237,246,.9);
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.08);
}

.contact-row:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}

.icon{
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 14px;
}

.footer-bottom{
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.footer-copyright{
  text-align: left;
  color: rgba(233,237,246,.65);
  font-size: 14px;
}

.footer-brand{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.footer-logo{
  height: 46px;
  width: auto;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.25));
}

@media (max-width: 820px){
  .footer-logo{ height: 40px; }
  .footer-grid{
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .footer-brand{ font-size: 22px; }
  .footer-col h2{ font-size: 16px; }
}

/* Desktop: logo + ad banner in one row (safety) */
@media (min-width: 769px) {
  .site-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .ad-banner { text-align: right; }
}

.radio-shell .stc-top{
  border-bottom: 0;
  padding-bottom: 0;
}

.radio-shell .stc-bottom{
  border-bottom: 1px solid var(--ui-stroke);
  padding-bottom: 10px;
  margin-bottom: 10px;
}


/* ===== 1) Vairāk elpas starp stc-top un stc-bottom ===== */
.radio-shell .stc-top{
  padding-bottom: 16px;           /* palielina atstarpi zem apraksta */
  border-bottom: 0;               /* līnija vairs nav te */
}

.radio-shell .stc-bottom{
  margin-top: 14px;               /* atstarpe virs sociālajiem/FМ */
  padding-top: 6px;               /* neliels iekšējais gaiss */
  border-top: 0;                  /* ja kaut kur palicis */
  border-bottom: 1px solid rgba(0,0,0,.10);  /* separator zem kontaktiem */
  padding-bottom: 12px;
  margin-bottom: 12px;
}

/* (optional) lai logo+teksts kopā jūtas “vieglāk” */
.radio-shell .stc-row{ gap: 18px; }

/* ===== 2) Filtru rinda centrā un simetriska ===== */
.radio-shell .station-filter{
  display: flex;
  justify-content: center;        /* CENTRĒ visu grupu */
  align-items: center;
  flex-wrap: nowrap;              
  gap: 10px;

  margin-top: 10px;
  padding: 0 10px;                /* simetriska elpa pa malām */
}

/* lai “chip” izskatās vienādi un nesaspiežas */
.radio-shell .filter-btn{
  flex: 0 0 auto;
}

/* Mobile: mazliek ciešāk, bet joprojām centrēts */
@media (max-width:700px){
  .radio-shell .station-filter{
    gap: 8px;
  }
}

/* ===== Filtru rinda pa vidu starp separatoru un staciju blokiem ===== */

/* 1) Līnija (te pie tevis tā ir zem stc-bottom) – atstājam, bet bez liekas telpas */
.radio-shell .stc-bottom{
  border-bottom: 1px solid rgba(0,0,0,.10);
  padding-bottom: 10px;
  margin-bottom: 0;              /* svarīgi: lai telpu kontrolē filtri, ne stc-bottom */
}

/* 2) Filtri: vienāda atstarpe uz augšu un leju => vizuāli “pa vidu” */
.radio-shell .station-filter{
  margin-top: 14px;              /* attālums no līnijas */
  margin-bottom: 14px;           /* attālums līdz staciju kartēm */
  padding: 0 4px;                /* kā tev jau bija */
}

/* 3) Grid lai nesākas ar lieku paddingu (citādi "pa vidu" izjūk) */
.radio-shell .stations-grid{
  margin-top: 0;                 /* lai pirmais elements būtu pēc filtru margin-bottom */
  padding-top: 0;                /* ja bija, noņemam */
}

/* vienāds font-size abiem (Skan + Iepriekš) */
.np-bar{
  font-size: 17px; 
}

/* piespiež pogu mantot fontu no np-bar */
.np-bar .np-prev{
  font: inherit;        /* svarīgākais */
  font-size: inherit;   /* drošībai */
}

/* ja gribi 100% garantiju arī iekšējiem spaniem */
.np-bar .np-prev .np-label,
.np-bar .np-prev .np-text{
  font-size: inherit;
}

/* Menu */
.menu-bar{
  display:flex;
  align-items:center;
  gap:18px;
  margin-left:auto;
  flex-wrap:nowrap;
  position:relative;
  padding-bottom:4px;
}

.menutitle{
  position:relative;
  text-decoration:none;
  font-size:16px;
  font-weight:600;
  color:#333;
  padding:4px 0;
  white-space:nowrap;
  flex:0 0 auto;
  transition:color .2s ease;
}

.menutitle:hover{
  color:var(--orange);
}

.menutitle.active{
  color:var(--orange);
}

/* outer track that slides */
.menu-indicator{
  position:absolute;
  left:0;
  bottom:2px;
  width:0;
  height:3px;
  opacity:0;
  pointer-events:none;
  transform:translateX(0);
  transition:
    transform .34s cubic-bezier(.22,.61,.36,1),
    width .34s cubic-bezier(.22,.61,.36,1),
    opacity .22s ease;
}

/* inner bar for premium fade/stretch feel */
.menu-indicator-inner{
  display:block;
  width:100%;
  height:100%;
  background:var(--orange);
  border-radius:999px;
  transform:scaleX(.72);
  transform-origin:center;
  opacity:.72;
  transition:
    transform .26s cubic-bezier(.22,.61,.36,1),
    opacity .22s ease;
}

/* when visible and settled */
.menu-indicator.is-on .menu-indicator-inner{
  transform:scaleX(1);
  opacity:1;
}

/* mobile */
@media (max-width:900px){
  .menu-bar{
    gap:12px;
    padding-bottom:7px;
  }

  .menutitle{
    font-size:12px;
  }

  .menu-indicator{
    height:2px;
  }
}

/* =========================================================
   FAVORĪTU PĀRKĀRTOŠANA AR DRAG AND DROP
   ========================================================= */

/*
 * Rokturi pēc noklusējuma nerāda.
 * Tas parādīsies tikai Favorītu kategorijā.
 */
.favorite-drag-handle{
  display:none;

  position:absolute;
  z-index:4;

  left:8px;
  top:50%;

  width:30px;
  height:36px;
  padding:0;

  border:0;
  border-radius:9px;

  background:rgba(255,255,255,.48);
  color:rgba(0,0,0,.42);

  align-items:center;
  justify-content:center;

  transform:translateY(-50%);

  cursor:grab;

  /*
   * Ļoti svarīgi mobilajam:
   * pieskaroties rokturim, pārlūks neritina lapu,
   * bet ļauj vilkt staciju.
   */
  touch-action:none;
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;

  transition:
    background .15s ease,
    color .15s ease,
    transform .15s ease;
}

/*
 * Seši punktiņi roktura iekšpusē.
 * Atsevišķa bilde vai SVG nav vajadzīgs.
 */
.favorite-drag-handle::before{
  content:"";

  display:block;

  width:4px;
  height:4px;

  border-radius:50%;
  background:currentColor;

  box-shadow:
    0 -7px 0 currentColor,
    0  7px 0 currentColor,
    7px -7px 0 currentColor,
    7px  0   0 currentColor,
    7px  7px 0 currentColor;

  transform:translateX(-3.5px);
}

/*
 * Rokturis redzams tikai Favorītu skatā
 * un tikai stacijām, kurām ir is-fav klase.
 */
.stations-grid.is-favorites-mode
.station-item.is-fav
.favorite-drag-handle{
  display:inline-flex;
}

/*
 * Favorītu skatā kartītes kreisajā pusē
 * rezervē vietu vilkšanas rokturim.
 */
.stations-grid.is-favorites-mode
.station-item.is-fav{
  padding-left:48px;
}

.favorite-drag-handle:hover{
  background:rgba(255,255,255,.78);
  color:var(--orange);
}

.favorite-drag-handle:active{
  color:var(--orange);
  cursor:grabbing;
  transform:translateY(-50%) scale(.94);
}

.favorite-drag-handle:focus-visible{
  outline:2px solid var(--orange);
  outline-offset:2px;
}

/*
 * Kartīte, kura konkrētajā brīdī tiek vilkta.
 */
.station-item.is-dragging{
  z-index:20;
  opacity:.58;
  pointer-events:none;

  transform:scale(.98) !important;

  box-shadow:
    0 0 0 2px var(--orange) inset,
    0 10px 22px rgba(0,0,0,.15) !important;
}

/*
 * Neļauj vilkšanas laikā iezīmēt tekstus.
 */
body.is-reordering-favorites{
  cursor:grabbing;
  user-select:none;
  -webkit-user-select:none;
  overscroll-behavior-y:contain;
}

/*
 * Mobilajā rokturis ir nedaudz lielāks,
 * lai to būtu vieglāk satvert ar pirkstu.
 */
@media (max-width:600px){
  .favorite-drag-handle{
    left:7px;
    width:32px;
    height:38px;
  }

  .stations-grid.is-favorites-mode
  .station-item.is-fav{
    padding-left:48px;
  }
}
/* =========================================================
   FAVORĪTU KĀRTOŠANAS PASKAIDROJUMS
   ========================================================= */

.favorites-sort-hint{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;

  margin:0 2px 10px;
  padding:7px 10px;

  border-radius:10px;
  background:rgba(255,255,255,.28);

  color:rgba(0,0,0,.60);
  font-size:13px;
  line-height:1.3;
  text-align:center;
}

.favorites-sort-hint[hidden]{
  display:none !important;
}

/*
 * Tāda pati sešu punktiņu zīmīte
 * kā uz vilkšanas roktura.
 */
.favorite-drag-symbol{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  width:16px;
  height:22px;

  flex:0 0 16px;
  color:var(--orange);
}

.favorite-drag-symbol::before{
  content:"";

  display:block;
  width:4px;
  height:4px;

  border-radius:50%;
  background:currentColor;

  box-shadow:
    0 -7px 0 currentColor,
    0  7px 0 currentColor,
    7px -7px 0 currentColor,
    7px  0   0 currentColor,
    7px  7px 0 currentColor;

  transform:translateX(-3.5px);
}

@media (max-width:600px){
  .favorites-sort-hint{
    justify-content:flex-start;
    font-size:12px;
    margin-bottom:8px;
  }
}
/* SEO content: compact, single DOM at every viewport size. */
.stc-aboutline .stc-title{display:inline;margin:0;line-height:1.25}
.stc-fm-label{display:inline;font-size:13px;font-weight:600;margin:0;white-space:nowrap;flex-shrink:0}
.seo-home h1{font-size:22px;line-height:1.3;margin:0 0 8px}
.seo-home p,.seo-listen p{margin:0;line-height:1.5}
.seo-listen h2{font-size:17px;line-height:1.35;margin:0 0 8px}
.seo-listen nav{margin-top:14px}
.seo-related{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:0}
.seo-related li{margin:0}
.seo-related a,.seo-related a:visited{display:inline-flex;align-items:center;padding:6px 10px;border:1px solid var(--ui-stroke);border-radius:999px;background:var(--ui-card);color:#222;font-size:14px;line-height:1.2;text-decoration:none;transition:background .15s,border-color .15s,color .15s}
.seo-related a:hover{background:rgba(255,255,255,.72);border-color:var(--orange);color:var(--orange-dark)}
.seo-related a:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
.station-logo-link{display:flex;flex:none}
@media(max-width:700px){.seo-home h1{font-size:18px}.seo-home p,.seo-listen p{font-size:13px}.stc-fm-label{font-size:12px}}
.seo-section-title{font-size:22px;margin:14px 18px;line-height:1.3}

/* Shared GLOBAL/country search, including narrow screens. */
.station-search { max-width: 720px; margin: 12px auto; padding: 0 12px; box-sizing: border-box; width: 100%; }
.station-search label { display: block; margin-bottom: 6px; }
.station-search-controls { display: flex; gap: 8px; }
.station-search-controls input { flex: 1; min-width: 0; width: 100%; padding: 10px; font: inherit; }
.station-search-controls button { padding: 8px 12px; font: inherit; cursor: pointer; }
.station-search-controls button:disabled { opacity: .55; cursor: default; }
@media (max-width: 420px) { .station-search-controls { flex-wrap: wrap; } .station-search-controls input { flex-basis: 100%; } }
