/* ============================================================
   EASI - Becul din header + tema intunecata
   Tema luminoasa = implicita. Tema intunecata se activeaza prin
   atributul data-theme="dark" pe <html> (pus de becul din header).
   Regula: nimic din tema dark nu schimba dimensiuni (padding, border,
   width), doar culori si efecte, ca layout-ul sa nu sara la comutare.
   ============================================================ */

/* ---------- Becul (discret: fara cerc, fara fundal) ---------- */
.easi-bulb{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; padding:0; margin-left:-6px;
  border:0; border-radius:50%; background:transparent;
  cursor:pointer; -webkit-tap-highlight-color:transparent;
}
.easi-bulb:focus{ outline:none; }
.easi-bulb:focus-visible{ outline:2px solid var(--blue); outline-offset:3px; }
.easi-bulb svg{ width:24px; height:24px; overflow:visible; display:block; transition:transform .3s ease; }
.easi-bulb:hover svg{ transform:translateY(-1px); }

/* Bec aprins (tema luminoasa): galben cald, temperat */
.easi-bulb__glow{ fill:#ffd65c; opacity:.18; transform-origin:12px 9px; transition:opacity .6s ease, transform .6s ease; }
.easi-bulb__rays{ stroke:#e9b23a; stroke-width:1.3; stroke-linecap:round; opacity:.85; transform-origin:12px 9px; transition:opacity .55s ease, transform .6s ease; }
.easi-bulb__glass{ fill:#ffe38a; stroke:#d4a32a; stroke-width:1.2; stroke-linejoin:round; transition:fill .6s ease, stroke .6s ease; }
.easi-bulb__filament{ fill:none; stroke:#b98222; stroke-width:1; stroke-linecap:round; stroke-linejoin:round; transition:stroke .6s ease; }
.easi-bulb__base{ fill:#9aa3b5; transition:fill .6s ease; }
.easi-bulb:hover .easi-bulb__glow{ opacity:.32; }

/* Bec stins (tema intunecata): doar conturul, gri */
html[data-theme="dark"] .easi-bulb__glow{ opacity:0; transform:scale(.55); }
html[data-theme="dark"] .easi-bulb__rays{ opacity:0; transform:scale(.6); }
html[data-theme="dark"] .easi-bulb__glass{ fill:transparent; stroke:#7f8ca6; }
html[data-theme="dark"] .easi-bulb__filament{ stroke:#56627c; }
html[data-theme="dark"] .easi-bulb__base{ fill:#6d7891; }
/* la hover pe dark: o urma de lumina calda, ca un indiciu ca se poate aprinde */
html[data-theme="dark"] .easi-bulb:hover .easi-bulb__glass{ stroke:#b4bfd4; }
html[data-theme="dark"] .easi-bulb:hover .easi-bulb__glow{ opacity:.1; transform:scale(.85); }

/* Mic "click" la comutare */
.easi-bulb.is-switching svg{ animation:easiBulbPop .38s ease; }
@keyframes easiBulbPop{ 0%{ transform:none; } 45%{ transform:scale(.86) rotate(-8deg); } 100%{ transform:none; } }

/* ---------- Tranzitia dintre teme ----------
   1) Browsere moderne: toata pagina se estompeaza lin (View Transitions),
      in ~0,75s, cu un ritm care incepe si se termina domol.
   2) Rezerva: culorile tuturor elementelor trec lin, doar pe durata comutarii. */
html.easi-vt::view-transition-old(root),
html.easi-vt::view-transition-new(root){
  animation-duration:.75s;
  animation-timing-function:cubic-bezier(.4,0,.2,1);
}
html.easi-theme-anim,
html.easi-theme-anim *,
html.easi-theme-anim *::before,
html.easi-theme-anim *::after{
  transition:background-color .7s cubic-bezier(.4,0,.2,1), color .7s cubic-bezier(.4,0,.2,1),
             border-color .7s cubic-bezier(.4,0,.2,1), box-shadow .7s cubic-bezier(.4,0,.2,1),
             fill .7s cubic-bezier(.4,0,.2,1), stroke .7s cubic-bezier(.4,0,.2,1),
             opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1) !important;
}

/* ---------- Paleta intunecata ---------- */
html[data-theme="dark"]{
  color-scheme:dark;
  --ink:      #e6ebf5;
  --body:     #b3bdd0;
  --muted:    #97a3ba;
  --bg:       #0d1424;
  --bg-alt:   #131c30;
  --line:     #243049;
  --card:     #141d31;
  --blue:     #7d98f0;
  --blue-600: #9db2f5;
  --blue-soft:rgba(125,152,240,.14);
  --shadow:   0 12px 34px rgba(0,0,0,.38);
  --shadow-sm:0 4px 14px rgba(0,0,0,.3);
}
html[data-theme="dark"] body{ background:var(--bg); }

/* Header + meniul tip sertar */
html[data-theme="dark"] .easi-header{ background:#0f1729; border-bottom-color:var(--line); }
html[data-theme="dark"] .easi-navdrawer{ background:#111a2d; box-shadow:-12px 0 44px rgba(0,0,0,.5); }
html[data-theme="dark"] .easi-navoverlay{ background:rgba(0,0,0,.6); }

/* ---------- Siglele: halou subtil de lumina in spate, fara chenar ----------
   Haloul e un strat absolut, in spatele siglei, deci nu ocupa loc:
   header-ul ramane exact la fel in ambele teme. Pe luminos e invizibil.
   Lumina e mutata spre exterior, ca sa se vada si in jurul siglelor
   rotunde care isi umplu toata zona (ex. ETTI). */
.easi-brand__mark,
.easi-header__logos a,
.easi-affil__logos a{ position:relative; isolation:isolate; }
.easi-brand__mark::before,
.easi-header__logos a::before,
.easi-affil__logos a::before{
  content:""; position:absolute; inset:-14px -12px; z-index:-1; border-radius:50%;
  background:radial-gradient(closest-side,
    rgba(255,255,255,.38) 0%,
    rgba(255,255,255,.30) 50%,
    rgba(255,255,255,.16) 68%,
    rgba(255,255,255,.05) 86%,
    rgba(255,255,255,0) 100%);
  opacity:0; transform:scale(.6);
  transition:opacity .7s ease, transform .7s ease;
  pointer-events:none;
}
/* Siglele de deasupra footer-ului sunt mai mari: haloul creste proportional */
.easi-affil__logos a::before{ inset:-20px -18px; }

/* TEST: halou OPRIT pe toate siglele. Pentru a-l reporni, sterge comentariul
   de pe regula de mai jos (cele 3 selectoare + opacity:1). */
/*
html[data-theme="dark"] .easi-brand__mark::before,
html[data-theme="dark"] .easi-header__logos a::before,
html[data-theme="dark"] .easi-affil__logos a::before{ opacity:1; transform:scale(1); }
*/

/* ---------- Caruselul de parteneri ----------
   Cardurile raman albe si pe dark: logo-urile pot veni in orice format
   (JPG cu fundal alb, PNG), iar cardul alb le arata corect pe toate. */
html[data-theme="dark"] .easi-marquee__card{ background:#fff; border-color:transparent; box-shadow:0 2px 14px rgba(0,0,0,.35); }

/* Butoane */
html[data-theme="dark"] .easi-btn--primary{ background:#3557d6; color:#fff; }
html[data-theme="dark"] .easi-btn--primary:hover{ background:#4467e2; color:#fff; }
html[data-theme="dark"] .easi-btn--light{ background:var(--card); color:var(--ink); border-color:var(--line); }
html[data-theme="dark"] .easi-btn--light:hover{ border-color:var(--blue); color:var(--blue); }

/* Suprafete care erau albe direct in cod */
html[data-theme="dark"] .easi-pubchip,
html[data-theme="dark"] .easi-tab,
html[data-theme="dark"] .easi-pg,
html[data-theme="dark"] .easi-prog,
html[data-theme="dark"] .easi-acc__item,
html[data-theme="dark"] .easi-news-grid .easi-news,
html[data-theme="dark"] .easi-pubsearch__input,
html[data-theme="dark"] .easi-pubsort,
html[data-theme="dark"] .easi-pubsel,
html[data-theme="dark"] .easi-contact__form input,
html[data-theme="dark"] .easi-contact__form textarea,
html[data-theme="dark"] .easi-cookie{ background:var(--card); color:var(--ink); border-color:var(--line); }
html[data-theme="dark"] .easi-acc__item.is-open{ border-color:var(--blue); }

/* Elemente active (filtre, tab-uri, paginare) */
html[data-theme="dark"] .easi-pubchip.is-active,
html[data-theme="dark"] .easi-tab.is-active,
html[data-theme="dark"] .easi-pg.is-active{ background:#3557d6; border-color:#3557d6; color:#fff; }
html[data-theme="dark"] .easi-news-more:hover{ background:#3557d6; border-color:#3557d6; color:#fff; }

/* Etichete inchise care s-ar pierde pe carduri inchise */
html[data-theme="dark"] .easi-apub__tip,
html[data-theme="dark"] .easi-prog__tag{ background:#2b3d69; }

/* Bara de afiliere de deasupra footer-ului */
html[data-theme="dark"] .easi-affil{ background:#0b1120; border-color:var(--line); }
html[data-theme="dark"] .easi-affil__txt{ color:var(--muted); }

/* Mesajele formularului de contact */
html[data-theme="dark"] .easi-note--ok{ background:rgba(46,160,90,.14); border-color:rgba(46,160,90,.4); color:#8fe0a9; }
html[data-theme="dark"] .easi-note--err{ background:rgba(220,60,60,.14); border-color:rgba(220,60,60,.4); color:#f3a3a3; }

/* Fara animatii pentru cine le-a dezactivat din sistem */
@media (prefers-reduced-motion: reduce){
  .easi-bulb, .easi-bulb *,
  .easi-brand__mark::before, .easi-header__logos a::before, .easi-affil__logos a::before{ transition:none !important; }
  .easi-bulb.is-switching svg{ animation:none; }
  ::view-transition-old(root), ::view-transition-new(root){ animation:none !important; }
}
