/* =========================================================================
   COLEGIUL SILVIC "BUCOVINA" — Temă modernă & accesibilă
   Template: shaper_educon (Helix3) | File: css/custom.css
   Paletă inspirată din silvicultură: verde pădure, mușchi, lemn cald, cer.
   Conformitate: WCAG 2.1 AA (contrast, focus vizibil, motion-safe, dimensiuni).
   ========================================================================= */

/* ---------- 1. Variabile (paletă silvică) ---------- */
:root {
  /* Forestry palette */
  --silv-forest-900: #14301f;   /* pădure adâncă (text headings) */
  --silv-forest-800: #1f4530;
  --silv-forest-700: #2d5a3d;   /* primar */
  --silv-forest-600: #3a7150;
  --silv-forest-500: #4f8b65;   /* hover */
  --silv-moss-400:   #7aa884;   /* mușchi */
  --silv-moss-200:   #c8dcc9;
  --silv-leaf-100:   #e8f1e6;   /* fond secundar */
  --silv-cream:      #faf8f3;   /* fond pagină */
  --silv-paper:      #ffffff;
  --silv-bark-700:   #5a3e26;   /* scoarță / lemn */
  --silv-bark-500:   #8b5e3c;
  --silv-amber-500:  #c8893f;   /* accent cald */
  --silv-amber-300:  #e8b572;
  --silv-sky-500:    #4a90b8;   /* link/info */

  --silv-text:       #1a2820;
  --silv-text-soft:  #3a4a40;
  --silv-muted:      #6b7a70;
  --silv-border:     #d8e0d4;
  --silv-shadow:     0 4px 14px rgba(20, 48, 31, 0.10);
  --silv-shadow-lg:  0 12px 32px rgba(20, 48, 31, 0.16);

  --silv-radius:     10px;
  --silv-radius-lg:  16px;
  --silv-tr:         200ms cubic-bezier(.2,.7,.3,1);

  --silv-font-body:  "Inter", "Segoe UI", "Open Sans", system-ui, -apple-system, sans-serif;
  --silv-font-head:  "Merriweather", "Georgia", "Cambria", serif;
}

/* ---------- 2. Reset accesibil & tipografie ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body, .body-innerwrapper, #sp-main-body {
  font-family: var(--silv-font-body) !important;
  color: var(--silv-text) !important;
  background: var(--silv-cream) !important;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.sppb-addon-title, .article-header h1, .article-header h2,
.sp-page-title h2, .sp-module-title {
  font-family: var(--silv-font-head) !important;
  color: var(--silv-forest-900) !important;
  letter-spacing: -0.01em;
  line-height: 1.25;
  font-weight: 700;
}

h1, .sp-page-title h2 { font-size: clamp(1.75rem, 2.4vw + 1rem, 2.75rem); }
h2 { font-size: clamp(1.5rem, 1.4vw + 1rem, 2.1rem); }
h3 { font-size: clamp(1.25rem, .8vw + 1rem, 1.6rem); }

p { color: var(--silv-text); }
strong, b { color: var(--silv-forest-900); }

/* ---------- 3. Focus vizibil (a11y) ---------- */
:focus { outline: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible,
.sppb-btn:focus-visible {
  outline: 3px solid var(--silv-amber-500) !important;
  outline-offset: 3px !important;
  border-radius: 4px;
  box-shadow: 0 0 0 5px rgba(200,137,63,.25) !important;
}

/* Skip-link injectat dinamic poate folosi clasa .skip-link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--silv-forest-700); color: #fff;
  padding: .75rem 1.25rem; z-index: 9999; border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; outline: 3px solid var(--silv-amber-500); }

/* ---------- 4. Linkuri ---------- */
a { color: var(--silv-forest-700); transition: color var(--silv-tr); }
a:hover, a:focus { color: var(--silv-amber-500); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 5. Header & top bar ---------- */
#sp-top-bar, .sp-top-bar {
  background: linear-gradient(135deg, var(--silv-forest-900) 0%, var(--silv-forest-700) 100%) !important;
  color: #e8f1e6 !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 8px 0;
  font-size: 14px;
}
#sp-top-bar a, .sp-top-bar a { color: #f0f6ee !important; }
#sp-top-bar a:hover { color: var(--silv-amber-300) !important; }

#sp-header, .sp-header {
  background: var(--silv-paper) !important;
  box-shadow: var(--silv-shadow);
  border-bottom: 3px solid var(--silv-forest-700);
  transition: box-shadow var(--silv-tr);
}
#sp-header.header-sticky, .sp-header.header-sticky {
  background: rgba(255,255,255,.97) !important;
  backdrop-filter: saturate(140%) blur(8px);
  box-shadow: var(--silv-shadow-lg);
}

.logo, .sp-logo { padding: 8px 0; }
.logo img, .sp-logo img { max-height: 70px; width: auto; }

/* ---------- 6. Meniu principal (Helix Megamenu) ---------- */
#sp-menu .sp-megamenu-parent,
.sp-megamenu-parent {
  display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0;
}
.sp-megamenu-parent > li > a,
.sp-megamenu-parent > li > .menu-separator {
  font-family: var(--silv-font-body) !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  text-transform: none !important;
  letter-spacing: .01em;
  color: var(--silv-forest-900) !important;
  padding: 14px 16px !important;
  border-radius: var(--silv-radius);
  transition: background var(--silv-tr), color var(--silv-tr);
  position: relative;
}
.sp-megamenu-parent > li:hover > a,
.sp-megamenu-parent > li.active > a,
.sp-megamenu-parent > li.current > a,
.sp-megamenu-parent > li > a:focus-visible {
  background: var(--silv-leaf-100) !important;
  color: var(--silv-forest-700) !important;
}
.sp-megamenu-parent > li.active > a::after,
.sp-megamenu-parent > li.current > a::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 6px;
  height: 3px; background: var(--silv-amber-500); border-radius: 2px;
}

/* Dropdown / submeniu */
.sp-megamenu-parent .sp-dropdown,
.sp-megamenu-parent .sp-dropdown-inner {
  background: var(--silv-paper) !important;
  border: 1px solid var(--silv-border) !important;
  border-top: 3px solid var(--silv-forest-700) !important;
  border-radius: 0 0 var(--silv-radius-lg) var(--silv-radius-lg) !important;
  box-shadow: var(--silv-shadow-lg) !important;
  padding: 8px !important;
}
.sp-megamenu-parent .sp-dropdown-items > li > a,
.sp-megamenu-parent .sp-dropdown li a {
  color: var(--silv-text) !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: background var(--silv-tr), color var(--silv-tr), padding-left var(--silv-tr);
}
.sp-megamenu-parent .sp-dropdown-items > li > a:hover,
.sp-megamenu-parent .sp-dropdown li a:hover,
.sp-megamenu-parent .sp-dropdown li.active > a {
  background: var(--silv-leaf-100) !important;
  color: var(--silv-forest-700) !important;
  padding-left: 18px !important;
}

/* Meniu mobil (off-canvas) */
.offcanvas-menu, .sp-mobile-menu, #offcanvas-toggler {
  --silv-mobile-bg: var(--silv-forest-900);
}
.offcanvas-menu .offcanvas-inner { background: var(--silv-forest-900) !important; color: #e8f1e6; }
.offcanvas-menu a { color: #e8f1e6 !important; padding: 12px 18px !important; }
.offcanvas-menu a:hover, .offcanvas-menu .active > a {
  background: rgba(255,255,255,.08) !important; color: var(--silv-amber-300) !important;
}
#offcanvas-toggler i, .burger-icon { color: var(--silv-forest-700) !important; font-size: 26px; }

/* ---------- 7. Hero / slider ---------- */
.n2-ss-slider, #sp-position-3, #sp-slider {
  position: relative;
}
.n2-ss-slider::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,48,31,0) 60%, rgba(20,48,31,.35) 100%);
  pointer-events: none;
}

/* ---------- 8. Butoane ---------- */
.btn, .sppb-btn, button.btn, input[type="submit"], a.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--silv-font-body) !important;
  font-weight: 600 !important;
  padding: 12px 24px !important;
  border-radius: var(--silv-radius) !important;
  border: 2px solid transparent !important;
  transition: all var(--silv-tr) !important;
  text-decoration: none !important;
  letter-spacing: .01em;
  min-height: 44px;
  cursor: pointer;
}
.btn-primary, .sppb-btn-primary,
.sppb-btn-default, button.btn-primary {
  background: var(--silv-forest-700) !important;
  color: #fff !important;
  border-color: var(--silv-forest-700) !important;
  box-shadow: 0 2px 6px rgba(45,90,61,.3);
}
.btn-primary:hover, .sppb-btn-primary:hover, .sppb-btn-default:hover,
.btn-primary:focus-visible {
  background: var(--silv-forest-800) !important;
  border-color: var(--silv-forest-800) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(45,90,61,.35);
}
.btn-secondary, .sppb-btn-secondary {
  background: var(--silv-amber-500) !important;
  color: #fff !important;
  border-color: var(--silv-amber-500) !important;
}
.btn-secondary:hover, .sppb-btn-secondary:hover {
  background: var(--silv-bark-700) !important; border-color: var(--silv-bark-700) !important;
}
.btn-outline, .sppb-btn-outline-primary {
  background: transparent !important;
  color: var(--silv-forest-700) !important;
  border-color: var(--silv-forest-700) !important;
}
.btn-outline:hover { background: var(--silv-forest-700) !important; color: #fff !important; }

/* ---------- 9. Carduri & module ---------- */
.sp-module, .module, .sppb-addon-box,
.items-leading > div, .items-row .item,
.blog .item, .blog-featured .item {
  background: var(--silv-paper);
  border: 1px solid var(--silv-border);
  border-radius: var(--silv-radius-lg);
  padding: 0 !important;            /* paddingul îl punem pe conținut */
  margin-bottom: 24px;
  box-shadow: var(--silv-shadow);
  transition: transform var(--silv-tr), box-shadow var(--silv-tr), border-color var(--silv-tr);
  overflow: hidden;                 /* taie titlul la border-radius */
  isolation: isolate;
}
.sp-module:hover, .blog .item:hover, .items-row .item:hover {
  transform: translateY(-3px);
  box-shadow: var(--silv-shadow-lg);
  border-color: var(--silv-moss-400);
}

/* Conținutul modulului primește padding-ul */
.sp-module > .sp-module-content,
.sp-module > .mod-content,
.module > .mod-content,
.moduletable > .mod-content,
.items-leading > div > .item,
.blog .item > div,
.blog-featured .item > div {
  padding: 20px 24px;
}
/* Padding mai mic pe sidebar ca să încapă URL-uri lungi */
#sp-right .sp-module > .sp-module-content,
#sp-right .sp-module > .mod-content,
#sp-left  .sp-module > .sp-module-content,
#sp-left  .sp-module > .mod-content {
  padding: 14px 16px;
}

/* ---------- Layout: lățește sidebar-ul din zona de conținut ---------- */
@media (min-width: 992px) {
  #sp-component.col-lg-10 { flex: 0 0 75%; max-width: 75%; }
  #sp-right.col-lg-2     { flex: 0 0 25%; max-width: 25%; }
}

/* Header modul = bară plină, lipită de marginea cardului */
.sp-module > .sp-module-title,
.sp-module > h3.sp-module-title,
.module > .module-title,
.moduletable > h3,
.sp-module-title, .module-title {
  display: flex !important;
  align-items: center;
  gap: .55rem;
  margin: 0 !important;
  padding: 12px 20px !important;
  background: linear-gradient(135deg, var(--silv-forest-700), var(--silv-forest-600)) !important;
  color: #fff !important;
  border-radius: 0 !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: .03em;
  text-transform: uppercase;
  width: 100%;
  box-sizing: border-box;
  border: 0 !important;
  font-family: var(--silv-font-body) !important;
}
.sp-module > .sp-module-title::before,
.module > .module-title::before,
.moduletable > h3::before,
.sp-module-title::before, .module-title::before {
  content: '\f1bb'; /* fa-tree */
  font-family: 'Font Awesome 5 Free', 'FontAwesome';
  font-weight: 900;
  color: var(--silv-amber-300);
  font-size: .9em;
  flex-shrink: 0;
}

/* Heading interior (ex: "LEGĂTURI UTILE" în WEBLINKS) — mai mic, aliniat */
.sp-module .mod-content > h1:first-child,
.sp-module .mod-content > h2:first-child,
.sp-module .mod-content > h3:first-child,
.sp-module .mod-content > h4:first-child {
  font-size: 1.1rem !important;
  margin-top: 0 !important;
  margin-bottom: .75rem !important;
  text-transform: none;
  letter-spacing: 0;
  word-break: normal;
}

/* ---------- 10. Articole ---------- */
.article-info, .article-meta {
  color: var(--silv-muted) !important;
  font-size: .9rem;
  display: flex; flex-wrap: wrap; gap: 1rem;
  padding: 8px 0; border-bottom: 1px dashed var(--silv-border); margin-bottom: 1.25rem;
}
.article-info dd, .article-info time { color: var(--silv-muted); }
.article-info i { color: var(--silv-forest-500); margin-right: 4px; }

.item-page, .blog .item, .article {
  background: var(--silv-paper);
  border-radius: var(--silv-radius-lg);
  padding: clamp(20px, 3vw, 40px);
  box-shadow: var(--silv-shadow);
}

.item-image img, .article-image img,
.blog .item img, .item-page img {
  border-radius: var(--silv-radius);
  max-width: 100%; height: auto;
}
figure { margin: 1.5rem 0; }
figure img { border-radius: var(--silv-radius); box-shadow: var(--silv-shadow); }

blockquote {
  border-left: 5px solid var(--silv-amber-500);
  background: var(--silv-leaf-100);
  padding: 16px 22px;
  border-radius: 0 var(--silv-radius) var(--silv-radius) 0;
  margin: 1.5rem 0;
  color: var(--silv-forest-900);
  font-style: italic;
}

ul li, ol li { margin-bottom: .35rem; }
ul.fa-ul li::marker { color: var(--silv-forest-500); }

/* "Read more" link */
.readmore a, a.readmore, .item-readmore a {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .75rem;
  padding: 8px 16px;
  background: var(--silv-leaf-100);
  color: var(--silv-forest-700) !important;
  border-radius: var(--silv-radius);
  font-weight: 600;
  text-decoration: none !important;
  transition: all var(--silv-tr);
}
.readmore a::after, a.readmore::after { content: '→'; transition: transform var(--silv-tr); }
.readmore a:hover, a.readmore:hover {
  background: var(--silv-forest-700); color: #fff !important;
}
.readmore a:hover::after { transform: translateX(4px); }

/* ---------- 11. Categorie / blog list ---------- */
.category-list table, .categories-list table { width: 100%; border-collapse: collapse; }
.category-list th, .categories-list th {
  background: var(--silv-forest-700); color: #fff;
  padding: 12px; text-align: left;
}
.category-list td, .categories-list td {
  padding: 10px 12px; border-bottom: 1px solid var(--silv-border);
}
.category-list tr:hover, .categories-list tr:hover { background: var(--silv-leaf-100); }

.pagination ul, .pagination {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; justify-content: center; margin-top: 2rem;
}
.pagination a, .pagination span, .pagination li > * {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--silv-border); border-radius: var(--silv-radius);
  color: var(--silv-forest-700); text-decoration: none; font-weight: 600;
  transition: all var(--silv-tr);
}
.pagination a:hover { background: var(--silv-forest-700); color: #fff; border-color: var(--silv-forest-700); }
.pagination .active span, .pagination li.active > * {
  background: var(--silv-forest-700); color: #fff; border-color: var(--silv-forest-700);
}

/* ---------- 12. Tabele ---------- */
table:not([class]) {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  background: var(--silv-paper); border-radius: var(--silv-radius); overflow: hidden;
  box-shadow: var(--silv-shadow);
}
table:not([class]) th {
  background: var(--silv-forest-700); color: #fff; text-align: left; padding: 12px 16px;
}
table:not([class]) td { padding: 10px 16px; border-bottom: 1px solid var(--silv-border); }
table:not([class]) tr:nth-child(even) td { background: var(--silv-leaf-100); }

/* ---------- 13. Formulare ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"],
input[type="password"], input[type="url"], input[type="number"],
textarea, select {
  width: 100%; max-width: 100%;
  padding: 12px 14px;
  font: inherit; color: var(--silv-text);
  background: var(--silv-paper);
  border: 2px solid var(--silv-border);
  border-radius: var(--silv-radius);
  transition: border-color var(--silv-tr), box-shadow var(--silv-tr);
  min-height: 44px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  border-color: var(--silv-forest-500);
  box-shadow: 0 0 0 4px rgba(79,139,101,.18);
  outline: none;
}
label { font-weight: 600; color: var(--silv-forest-900); margin-bottom: 6px; display: inline-block; }

/* ---------- 14. Sidebar / right column ---------- */
#sp-right .sp-module, #sp-left .sp-module {
  font-size: 15px;
}
#sp-right ul, #sp-left ul { list-style: none; padding: 0; margin: 0; }
#sp-right ul li, #sp-left ul li {
  border-bottom: 1px solid var(--silv-border);
  padding: 8px 0;
  min-width: 0;
}
#sp-right ul li:last-child, #sp-left ul li:last-child { border-bottom: none; }
#sp-right ul li a, #sp-left ul li a {
  display: flex; align-items: center; gap: .45rem;
  color: var(--silv-text); text-decoration: none; font-weight: 500;
  padding: 4px 0;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: color var(--silv-tr);
}
#sp-right ul li a::before, #sp-left ul li a::before {
  content: '🌲';
  font-size: .85em;
  opacity: .7;
  flex-shrink: 0;
}
#sp-right ul li a:hover, #sp-left ul li a:hover {
  color: var(--silv-forest-700);
}

/* ---------- 15. Breadcrumbs ---------- */
.breadcrumb, .breadcrumb-wrapper, ul.breadcrumb {
  background: transparent !important;
  padding: 0 !important; margin: 0 0 1rem 0 !important;
  font-size: 14px; color: var(--silv-muted);
}
.breadcrumb li, .breadcrumb a { color: var(--silv-muted); }
.breadcrumb a:hover { color: var(--silv-forest-700); }
.breadcrumb .divider { color: var(--silv-moss-400); margin: 0 .5rem; }

/* ---------- 16. Page title ---------- */
#sp-title, .sp-page-title {
  background: linear-gradient(135deg, var(--silv-forest-800) 0%, var(--silv-forest-700) 60%, var(--silv-moss-400) 100%) !important;
  color: #fff !important;
  padding: 56px 0 !important;
  position: relative; overflow: hidden;
  border-bottom: 4px solid var(--silv-amber-500);
}
#sp-title::before, .sp-page-title::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.06) 0, transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.05) 0, transparent 35%);
  pointer-events: none;
}
#sp-title h1, #sp-title h2, .sp-page-title h1, .sp-page-title h2 {
  color: #fff !important;
  position: relative;
  margin: 0;
}
.sp-page-title .breadcrumb,
.sp-page-title .breadcrumb a,
.sp-page-title .breadcrumb li { color: rgba(255,255,255,.85) !important; }

/* ---------- 17. Footer ---------- */
#sp-footer, .sp-footer, #sp-bottom {
  background: var(--silv-forest-900) !important;
  color: #c8dcc9 !important;
}
#sp-bottom {
  padding: 48px 0 24px !important;
  background: linear-gradient(180deg, var(--silv-forest-900) 0%, #0d1f14 100%) !important;
}
#sp-bottom h1, #sp-bottom h2, #sp-bottom h3, #sp-bottom h4,
#sp-bottom .sp-module-title {
  color: #fff !important; background: transparent !important;
  border-bottom: 2px solid var(--silv-amber-500);
  padding: 0 0 8px 0 !important; margin: 0 0 16px 0 !important;
}
#sp-bottom a, #sp-footer a { color: #c8dcc9 !important; }
#sp-bottom a:hover, #sp-footer a:hover { color: var(--silv-amber-300) !important; }
#sp-footer {
  padding: 18px 0 !important;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 14px;
}

/* ---------- 18. Galerii (sigplus) ---------- */
.sigplus-gallery img,
.sigplus-gallery a {
  border-radius: var(--silv-radius) !important;
  transition: transform var(--silv-tr), box-shadow var(--silv-tr);
}
.sigplus-gallery a:hover img {
  transform: scale(1.03);
  box-shadow: var(--silv-shadow-lg);
}

/* ---------- 19. Module specifice (telverde, anunturi, weblinks) ---------- */
.weblinks .mod-list a {
  display: flex; align-items: center; gap: .5rem;
  padding: 8px 12px; margin: 4px 0;
  background: var(--silv-leaf-100);
  border-left: 3px solid var(--silv-forest-500);
  border-radius: 0 var(--silv-radius) var(--silv-radius) 0;
  text-decoration: none; color: var(--silv-text);
  transition: all var(--silv-tr);
}
.weblinks .mod-list a:hover {
  background: var(--silv-forest-700); color: #fff;
  border-left-color: var(--silv-amber-500);
  transform: translateX(2px);
}

/* ---------- 20. Accesibilitate plugin (djaccessibility) ---------- */
#dj-accessibility, .dj-accessibility-toggle {
  z-index: 9990;
}
.dj-accessibility-toggle {
  background: var(--silv-forest-700) !important;
  color: #fff !important;
  box-shadow: var(--silv-shadow-lg);
  border-radius: 50% !important;
  width: 56px !important; height: 56px !important;
}
.dj-accessibility-toggle:hover { background: var(--silv-amber-500) !important; }

/* ---------- 21. Dimensiuni text accesibile (a11y) ---------- */
@media (max-width: 768px) {
  body { font-size: 16px; }
  h1, .sp-page-title h2 { font-size: 1.75rem; }
  .sp-megamenu-parent > li > a { padding: 12px 14px !important; }
  .item-page, .blog .item { padding: 18px; }
}

/* High-contrast & forced-colors (Windows / NVDA) */
@media (forced-colors: active) {
  .btn, .sppb-btn { border: 2px solid CanvasText !important; }
  a:focus-visible { outline: 3px solid Highlight !important; }
}

/* Print friendly */
@media print {
  #sp-header, #sp-top-bar, #sp-bottom, #sp-footer,
  .sp-module, .breadcrumb, .pagination, #dj-accessibility { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000 !important; text-decoration: underline; }
}

/* ---------- 22. Animații subtile la încărcare (motion-safe) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .sp-module, .blog .item, .item-page {
    animation: silvFadeIn .5s ease-out both;
  }
  @keyframes silvFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- 23. Imagini responsive globale ----------
   IMPORTANT: SmartSlider3 (.n2-ss-*) și galeriile sigplus au reguli proprii;
   le excludem complet de la regulile globale ca să nu se deformeze.
*/
img { max-width: 100%; }
/* Exclude tot conținutul SmartSlider3 — lăsăm regulile lui originale */
.n2-ss-slider img,
.n2-ss-slider .n2-ow,
[class*="n2-ss-"] img {
  max-width: none;
  height: auto;
}
.item-page img:not([style*="height"]),
.article img:not([style*="height"]),
.sp-module .mod-content img:not([class*="n2-"]),
.blog .item img:not([class*="n2-"]):not([style*="height"]) { height: auto; }

/* ---------- 26. Slider (N2 SmartSlider) ----------
   IMPORTANT: NU modificăm dimensiunile imaginilor — SmartSlider3 le calculează
   dinamic prin JS (responsive sizing). Orice override pe img/.n2-ow le strică.
*/
.n2-ss-slider, .n2-ss-slider * { box-sizing: border-box; }
/* fără overlay întunecat */
#sp-position-3 .n2-ss-slider::after,
#sp-slider .n2-ss-slider::after { display: none; }

/* ---------- 27. Galerii sigplus — aspect-ratio uniform ---------- */
.sigplus-gallery,
.sigplus-gallery ul,
.sigplus-gallery div { box-sizing: border-box; }

.sigplus-gallery a.boxplus,
.sigplus-gallery li > a,
.sigplus-gallery .sigplus-image {
  display: block;
  overflow: hidden;
  border-radius: var(--silv-radius);
  background: var(--silv-leaf-100);
  aspect-ratio: 4 / 3;            /* uniform pentru toate thumbs */
  position: relative;
}
.sigplus-gallery a.boxplus img,
.sigplus-gallery li > a img,
.sigplus-gallery .sigplus-image img,
.sigplus-gallery img.sigplus-thumbnail {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;   /* taie în loc să întindă */
  object-position: center;
  display: block;
  transition: transform var(--silv-tr);
}
.sigplus-gallery a:hover img { transform: scale(1.05); }

/* Caption-uri sub poze: nu suprapuse */
.sigplus-gallery .captionplus,
.sigplus-gallery figcaption {
  position: static !important;
  background: transparent;
  color: var(--silv-text-soft);
  font-size: .85rem;
  padding: 6px 4px 0;
  text-align: center;
}

/* ---------- 28. Imagini din articole (item-image) ---------- */
.item-image, .article-image {
  display: block;
  border-radius: var(--silv-radius);
  overflow: hidden;
  background: var(--silv-leaf-100);
}
.item-image img, .article-image img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

/* ---------- 29. Module thumbnails / latest news ---------- */
.latestnews img, .mod-articles-category img, .newsflash img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--silv-radius);
  display: block;
}

/* ---------- 30. Vizibilitate culori — fix contrast ---------- */
/* Top-bar: forțăm text alb peste verde închis */
#sp-top-bar, #sp-top-bar *,
.sp-top-bar, .sp-top-bar * {
  color: #ffffff !important;
}
#sp-top-bar a, .sp-top-bar a { color: #ffffff !important; text-decoration: none; }
#sp-top-bar a:hover, .sp-top-bar a:hover { color: var(--silv-amber-300) !important; }
#sp-top-bar i, .sp-top-bar i { color: var(--silv-amber-300) !important; }

/* Page-title: text mereu alb peste gradient */
#sp-title, #sp-title *,
.sp-page-title, .sp-page-title * { color: #ffffff !important; }
.sp-page-title .breadcrumb a:hover { color: var(--silv-amber-300) !important; }

/* Footer / bottom: text deschis */
#sp-bottom, #sp-bottom *, #sp-footer, #sp-footer * { color: #c8dcc9; }
#sp-bottom h1, #sp-bottom h2, #sp-bottom h3, #sp-bottom h4,
#sp-bottom .sp-module-title { color: #ffffff !important; }
#sp-bottom a:hover, #sp-footer a:hover { color: var(--silv-amber-300) !important; }

/* Butoane primare: text alb mereu vizibil */
.btn-primary, .sppb-btn-primary, .btn-secondary, .sppb-btn-secondary {
  color: #ffffff !important;
}
.btn-primary *, .sppb-btn-primary * { color: inherit !important; }

/* Module title: forțăm text alb peste gradient verde */
.sp-module-title, .module-title, .moduletable > h3,
.moduletable .module-title { color: #ffffff !important; }
.sp-module-title *, .module-title * { color: inherit !important; }

/* Linkuri în zone întunecate (sidebar dark sau footer) — auto */

/* ---------- 31. Hero / slider container ---------- */
#sp-position-3, #sp-slider {
  overflow: hidden;
}
#sp-position-3 img { object-fit: cover; }

/* ---------- 24. Selecție text în culorile temei ---------- */
::selection { background: var(--silv-amber-300); color: var(--silv-forest-900); }

/* ---------- 25. Scrollbar (browsers WebKit) ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--silv-leaf-100); }
::-webkit-scrollbar-thumb { background: var(--silv-forest-500); border-radius: 6px; border: 2px solid var(--silv-leaf-100); }
::-webkit-scrollbar-thumb:hover { background: var(--silv-forest-700); }

/* ---------- 32. Slider custom (înlocuiește SmartSlider3) ---------- */
.silv-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 6;          /* păstrează proporția fără distorsiune */
  max-height: 520px;
  overflow: hidden;
  border-radius: var(--silv-radius-lg);
  box-shadow: var(--silv-shadow-lg);
  background: var(--silv-forest-900);
  isolation: isolate;
  outline: none;
}
.silv-slider:focus-visible {
  outline: 3px solid var(--silv-amber-500);
  outline-offset: 3px;
}
@media (max-width: 768px) { .silv-slider { aspect-ratio: 16 / 9; } }

.silv-slider-track {
  position: absolute; inset: 0;
}
.silv-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 800ms ease-in-out;
  pointer-events: none;
  z-index: 1;
}
.silv-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.silv-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
  max-width: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .silv-slide { transition: none; }
}

/* Săgeți */
.silv-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(20,48,31,.55);
  color: #fff;
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 50%;
  font-size: 18px; line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: background var(--silv-tr), border-color var(--silv-tr), transform var(--silv-tr);
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.silv-arrow:hover, .silv-arrow:focus-visible {
  background: var(--silv-amber-500);
  border-color: #fff;
}
.silv-prev { left: 14px; }
.silv-next { right: 14px; }

/* Pause */
.silv-pause {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px;
  background: rgba(20,48,31,.55);
  color: #fff;
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 50%;
  cursor: pointer; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  transition: background var(--silv-tr);
}
.silv-pause:hover, .silv-pause:focus-visible { background: var(--silv-amber-500); border-color: #fff; }

/* Dots */
.silv-dots {
  position: absolute; left: 0; right: 0; bottom: 14px;
  display: flex; gap: 8px; justify-content: center;
  z-index: 5;
}
.silv-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  border: 2px solid rgba(255,255,255,.7);
  cursor: pointer;
  padding: 0;
  transition: all var(--silv-tr);
}
.silv-dot.is-active {
  background: var(--silv-amber-500);
  border-color: #fff;
  width: 28px;
  border-radius: 6px;
}
.silv-dot:hover, .silv-dot:focus-visible { background: var(--silv-amber-300); }

/* ---------- 33. Imagini singulare în module sidebar (Tel Verde, Angajam etc.) ---------- */
/* Aceste module conțin DOAR o imagine — vrem să umple cardul fără spațiu gol */
#sp-right .sp-module .mod-content > p:only-child > img:only-child,
#sp-right .sp-module .mod-content > img:only-child,
#sp-right .sp-module .mod-content > a:only-child > img:only-child,
#sp-left .sp-module .mod-content > p:only-child > img:only-child,
#sp-left .sp-module .mod-content > img:only-child,
#sp-left .sp-module .mod-content > a:only-child > img:only-child {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
}
/* Elimină padding-ul cardului pentru aceste module-imagine */
#sp-right .sp-module:has(.mod-content > p:only-child > img:only-child) > .sp-module-content,
#sp-right .sp-module:has(.mod-content > img:only-child) > .sp-module-content,
#sp-right .sp-module:has(.mod-content > a:only-child > img:only-child) > .sp-module-content,
#sp-left  .sp-module:has(.mod-content > p:only-child > img:only-child) > .sp-module-content,
#sp-left  .sp-module:has(.mod-content > img:only-child) > .sp-module-content,
#sp-left  .sp-module:has(.mod-content > a:only-child > img:only-child) > .sp-module-content {
  padding: 0 !important;
}
/* Fallback (browsere fără :has) — paragraful fără margini */
#sp-right .sp-module .mod-content > p,
#sp-left  .sp-module .mod-content > p { margin: 0; }

/* End of file */