/* =========================================================================
   Școala Gimnazială Nițchidorf — template copil Cassiopeia (Joomla 6)
   Paleta vine din clădirea școlii: crem/galben, roșu, cărămiziu + bleumarinul din sigla veche.
   ========================================================================= */

:root {
  --snd-navy: #1f3a5f;
  --snd-navy-deep: #142843;
  --snd-red: #b8322a;
  --snd-red-deep: #93261f;
  --snd-terracotta: #c8643b;
  --snd-sun: #f2c14e;
  --snd-cream: #fbf5e6;
  --snd-cream-deep: #f3e7c8;

  --snd-ink: #1c2430;
  --snd-muted: #5b6575;
  --snd-border: #e3ddd0;
  --snd-surface: #ffffff;
  --snd-bg: #faf8f3;
  --snd-hover: #f7f2e6;
  --snd-primary: var(--snd-navy);
  --snd-primary-soft: #e8eef6;

  --snd-radius: 14px;
  --snd-radius-sm: 9px;
  --snd-shadow: 0 1px 2px rgb(28 36 48 / 6%), 0 8px 24px rgb(28 36 48 / 6%);
  --snd-shadow-lg: 0 2px 4px rgb(28 36 48 / 6%), 0 18px 40px rgb(28 36 48 / 12%);
  --snd-container: 1200px;
  --snd-gutter: clamp(16px, 4vw, 32px);

  --snd-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --snd-font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Cambria, Georgia, serif;

  /* Variabilele Cassiopeia / Bootstrap aliniate la paletă */
  --cassiopeia-color-primary: var(--snd-navy);
  --cassiopeia-color-link: #1d4f91;
  --cassiopeia-color-hover: var(--snd-red);
  --cassiopeia-font-family-body: var(--snd-font-body);
  --cassiopeia-font-family-headings: var(--snd-font-head);
  --link-color: #1d4f91;
  --link-color-rgb: 29, 79, 145;
  --link-hover-color: var(--snd-red-deep);
  --link-hover-color-rgb: 147, 38, 31;
  --body-bg: var(--snd-bg);
  --body-color: var(--snd-ink);
  --btn-primary-bg: var(--snd-navy);
  --primary: var(--snd-navy);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body.snd {
  margin: 0;
  background: var(--snd-bg);
  color: var(--snd-ink);
  font-family: var(--snd-font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.snd h1, .snd h2, .snd h3, .snd h4 {
  font-family: var(--snd-font-head);
  color: var(--snd-navy-deep);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.005em;
}

.snd a { color: var(--link-color); text-underline-offset: .18em; text-decoration-thickness: 1px; }
.snd a:hover { color: var(--link-hover-color); }
/* Focus: bleumarin (contrast ≥ 3:1 pe fundal deschis) cu halou galben; pe zonele închise rămâne galben */
.snd :focus-visible { outline: 3px solid var(--snd-navy); outline-offset: 2px; box-shadow: 0 0 0 5px var(--snd-sun); border-radius: 4px; }
.snd-topbar :focus-visible, .snd-hero :focus-visible, .snd-footer :focus-visible { outline-color: var(--snd-sun); box-shadow: none; }

.snd-container {
  width: 100%;
  max-width: var(--snd-container);
  margin-inline: auto;
  padding-inline: var(--snd-gutter);
  box-sizing: border-box;
}

.snd-visually-hidden, .snd .visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important;
}

.snd-skip {
  position: absolute; left: 1rem; top: -100px; z-index: 1000;
  padding: .6rem 1rem; border-radius: 0 0 8px 8px;
  background: var(--snd-sun); color: var(--snd-ink); font-weight: 700; text-decoration: none;
}
.snd-skip:focus { top: 0; }

/* ---------- Bara de sus ---------- */
.snd-topbar {
  background: var(--snd-navy-deep);
  color: #dfe7f2;
  font-size: .875rem;
}
.snd-topbar__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 2.5rem;
}
.snd-topbar a, .snd-topbar button { color: #dfe7f2; text-decoration: none; }
.snd-topbar a:hover, .snd-topbar button:hover { color: #fff; text-decoration: underline; }
.snd-topbar__contact { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.snd-topbar__contact .fa-solid, .snd-topbar__login .fa-solid, .snd-topbar__user .fa-solid { margin-right: .4rem; color: var(--snd-sun); }
.snd-topbar__right { display: flex; align-items: center; gap: 1rem; }
.snd-topbar__social { font-size: 1.05rem; }
.snd-topbar__logout { display: flex; align-items: center; gap: .6rem; margin: 0; }
.snd-topbar__logout button {
  border: 1px solid rgb(255 255 255 / 30%); background: transparent; border-radius: 6px;
  padding: .05rem .55rem; font: inherit; cursor: pointer;
}

/* ---------- Antet ---------- */
.snd-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 96%);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--snd-border);
  box-shadow: 0 1px 0 rgb(255 255 255 / 60%) inset;
}
.snd-header::after {
  content: ""; display: block; height: 4px;
  background: linear-gradient(90deg, var(--snd-red) 0 33%, var(--snd-sun) 33% 66%, var(--snd-navy) 66%);
}
.snd-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: 5.25rem;
}
.snd-brand {
  display: flex; align-items: center; gap: .85rem;
  color: var(--snd-navy-deep) !important; text-decoration: none !important;
  min-width: 0;
}
.snd-brand__crest { width: 40px; height: auto; flex: 0 0 auto; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 15%)); }
.snd-brand__text { display: grid; line-height: 1.15; }
.snd-brand__name {
  font-family: var(--snd-font-head); font-weight: 700;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem); letter-spacing: -.01em;
}
.snd-brand__tagline { color: var(--snd-muted); font-size: .85rem; margin-top: .15rem; }

/* ---------- Meniul principal ---------- */
.snd-nav { display: flex; }
.snd-menu { display: flex; align-items: center; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.snd-menu__item { position: relative; }
.snd-menu__link, .snd-menu__toggle {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .6rem .8rem; border: 0; border-radius: 10px;
  background: transparent; color: var(--snd-ink) !important;
  font: 600 .975rem/1.2 var(--snd-font-body);
  text-decoration: none !important; cursor: pointer; white-space: nowrap;
}
.snd-menu__link:hover, .snd-menu__toggle:hover,
.snd-menu__item.has-children:hover > .snd-menu__toggle,
.snd-menu__toggle[aria-expanded="true"] { background: var(--snd-hover); color: var(--snd-navy) !important; }
.snd-menu__item.is-active > .snd-menu__toggle,
.snd-menu__link[aria-current="page"] { color: var(--snd-red) !important; }
.snd-menu__item.is-active > .snd-menu__toggle::after,
.snd-menu__link[aria-current="page"]::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .2rem; height: 2px;
  border-radius: 2px; background: var(--snd-red);
}
.snd-menu__chev {
  width: .45rem; height: .45rem; margin-left: .1rem; margin-top: -.2rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .2s ease; opacity: .7;
}
.snd-menu__toggle[aria-expanded="true"] .snd-menu__chev { transform: rotate(-135deg); margin-top: .2rem; }

.snd-menu__sub {
  position: absolute; top: calc(100% + .35rem); left: 0; z-index: 60;
  min-width: 18rem; max-width: 26rem; margin: 0; padding: .5rem; list-style: none;
  background: var(--snd-surface); border: 1px solid var(--snd-border); border-radius: var(--snd-radius);
  box-shadow: var(--snd-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.snd-menu__item:nth-last-child(-n+2) > .snd-menu__sub { left: auto; right: 0; }
.snd-menu__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -.5rem; height: .5rem; }
.snd-menu__item.has-children:hover > .snd-menu__sub,
.snd-menu__item.has-children:focus-within > .snd-menu__sub,
.snd-menu__item.is-open > .snd-menu__sub { opacity: 1; visibility: visible; transform: none; }
/* Cu JavaScript activ: submeniul se deschide la clic / Enter (aria-expanded corect), iar Escape îl închide și la hover */
.snd-js .snd-menu__item.has-children:focus-within:not(.is-open) > .snd-menu__sub,
.snd-js .snd-menu__item.has-children.is-dismissed:not(.is-open) > .snd-menu__sub { opacity: 0; visibility: hidden; transform: translateY(6px); }
.snd-menu__subitem a {
  display: block; padding: .55rem .75rem; border-radius: 8px;
  color: var(--snd-ink) !important; text-decoration: none !important; line-height: 1.35; font-size: .95rem;
}
.snd-menu__subitem a:hover { background: var(--snd-hover); color: var(--snd-navy) !important; }
.snd-menu__subitem.is-current a { background: var(--snd-cream); color: var(--snd-red-deep) !important; font-weight: 600; }
.snd-menu__subhead {
  display: block; padding: .6rem .75rem .25rem; font-size: .75rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--snd-muted); font-weight: 700;
}

.snd-navtoggle {
  display: none; align-items: center; gap: .55rem;
  padding: .55rem .8rem; border: 1px solid var(--snd-border); border-radius: 10px;
  background: var(--snd-surface); color: var(--snd-navy-deep); font: 600 .95rem var(--snd-font-body); cursor: pointer;
}
.snd-navtoggle__bars, .snd-navtoggle__bars::before, .snd-navtoggle__bars::after {
  display: block; width: 1.15rem; height: 2px; border-radius: 2px; background: currentColor; position: relative;
  transition: transform .2s ease, background-color .2s ease;
}
.snd-navtoggle__bars::before, .snd-navtoggle__bars::after { content: ""; position: absolute; left: 0; }
.snd-navtoggle__bars::before { top: -6px; }
.snd-navtoggle__bars::after { top: 6px; }
.snd-navtoggle[aria-expanded="true"] .snd-navtoggle__bars { background: transparent; }
.snd-navtoggle[aria-expanded="true"] .snd-navtoggle__bars::before { transform: translateY(6px) rotate(45deg); }
.snd-navtoggle[aria-expanded="true"] .snd-navtoggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero (prima pagină) ---------- */
.snd-hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: #fff;
  background: var(--snd-navy-deep) var(--snd-hero-image) center 40% / cover no-repeat;
}
.snd-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(20 40 67 / 92%) 0%, rgb(20 40 67 / 72%) 42%, rgb(20 40 67 / 15%) 75%, rgb(20 40 67 / 0%) 100%),
    linear-gradient(0deg, rgb(20 40 67 / 55%) 0%, rgb(20 40 67 / 0%) 45%);
}
.snd-hero__inner {
  min-height: clamp(26rem, 62vh, 36rem);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding-block: 4rem;
}
.snd-hero__eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  margin: 0 0 1rem; padding: .35rem .8rem; border-radius: 999px;
  background: rgb(242 193 78 / 18%); border: 1px solid rgb(242 193 78 / 45%);
  color: #ffe7a8; font-weight: 600; font-size: .9rem; letter-spacing: .02em;
}
.snd-hero__eyebrow::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--snd-sun); }
.snd .snd-hero__title {
  max-width: 18ch; margin: 0;
  color: #fff; font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.05; letter-spacing: -.02em;
  text-shadow: 0 2px 18px rgb(0 0 0 / 25%);
}
.snd-hero__text { max-width: 38rem; margin: 1.1rem 0 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #e8eef6; }
.snd-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 0; }

.snd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .7rem 1.35rem; border-radius: 999px;
  font-weight: 700; text-decoration: none !important; line-height: 1.1;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.snd-btn:hover { transform: translateY(-1px); }
.snd-btn--sun { background: var(--snd-sun); color: var(--snd-navy-deep) !important; box-shadow: 0 6px 20px rgb(242 193 78 / 35%); }
.snd-btn--sun:hover { background: #f6cd68; }
.snd-btn--ghost { color: #fff !important; border: 2px solid rgb(255 255 255 / 70%); }
.snd-btn--ghost:hover { background: rgb(255 255 255 / 12%); border-color: #fff; }
.snd-btn--navy { background: var(--snd-navy); color: #fff !important; }
.snd-btn--navy:hover { background: var(--snd-navy-deep); }

/* ---------- Secțiuni prima pagină ---------- */
.snd-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.snd-section--home-a { padding-top: 0; margin-top: -3.25rem; position: relative; z-index: 2; }
.snd-section--home-b { background: var(--snd-cream); border-block: 1px solid var(--snd-cream-deep); }
.snd-section .snd-module + .snd-module { margin-top: 2.5rem; }
.snd-module__title {
  font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 1.25rem;
  display: flex; align-items: center; gap: .75rem;
}
.snd-section .snd-module__title::before {
  content: ""; width: 2.25rem; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--snd-red), var(--snd-terracotta));
}

/* Carduri acces rapid */
.snd-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr));
  gap: 1rem; margin: 0; padding: 0; list-style: none;
}
.snd-card__link {
  position: relative; display: grid; align-content: start; gap: .35rem; height: 100%;
  padding: 1.25rem 1.25rem 1.1rem; box-sizing: border-box;
  background: var(--snd-surface); border: 1px solid var(--snd-border); border-radius: var(--snd-radius);
  box-shadow: var(--snd-shadow); color: var(--snd-ink) !important; text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.snd-card__link:hover { transform: translateY(-3px); box-shadow: var(--snd-shadow-lg); border-color: var(--snd-cream-deep); }
.snd-card__icon {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-bottom: .4rem;
  border-radius: 12px; font-size: 1.2rem; color: var(--snd-red); background: #fbe9e6;
}
.snd-card:nth-child(3n+2) .snd-card__icon { color: var(--snd-navy); background: var(--snd-primary-soft); }
.snd-card:nth-child(3n+3) .snd-card__icon { color: #8a5a00; background: #fdf1d3; }
.snd-card__title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; color: var(--snd-navy-deep); }
.snd-card__text { color: var(--snd-muted); font-size: .92rem; line-height: 1.45; }
.snd-card__arrow { position: absolute; top: 1.35rem; right: 1.2rem; color: var(--snd-muted); font-size: .9rem; transition: transform .18s ease, color .18s ease; }
.snd-card__link:hover .snd-card__arrow { transform: translateX(3px); color: var(--snd-red); }

/* Bloc „Despre școală” (mod_custom cu clasa snd-about) */
.snd-about {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
.snd-about__media { position: relative; margin: 0; }
.snd-about__media img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 20px; box-shadow: var(--snd-shadow-lg);
}
.snd-about__media::after {
  content: ""; position: absolute; inset: auto -14px -14px auto; width: 45%; height: 45%; z-index: -1;
  border-radius: 20px; background: repeating-linear-gradient(45deg, var(--snd-sun) 0 6px, transparent 6px 14px); opacity: .55;
}
.snd-about h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0 0 1rem; }
.snd-about p { color: #364152; }
.snd-about__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.snd-about__facts li { padding: .9rem; border-radius: 12px; background: var(--snd-surface); border: 1px solid var(--snd-cream-deep); text-align: center; }
.snd-about__facts strong { display: block; font-family: var(--snd-font-head); font-size: 1.6rem; color: var(--snd-red); line-height: 1.1; }
.snd-about__facts span { font-size: .85rem; color: var(--snd-muted); line-height: 1.3; display: block; margin-top: .25rem; }
.snd-about__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.snd-btn--outline { border: 2px solid var(--snd-navy); color: var(--snd-navy) !important; }
.snd-btn--outline:hover { background: var(--snd-navy); color: #fff !important; }

/* Documente recente (mod_custom / modul jsmallfib recente) */
.snd-panorama {
  margin: 0; border-radius: 20px; overflow: hidden; box-shadow: var(--snd-shadow);
}
.snd-panorama img { display: block; width: 100%; height: auto; }
.snd-panorama figcaption { padding: .75rem 1rem; background: var(--snd-surface); color: var(--snd-muted); font-size: .9rem; }

/* ---------- Pagini interioare ---------- */
.snd-pagehead {
  background:
    radial-gradient(1200px 200px at 85% -40%, rgb(242 193 78 / 35%), transparent 60%),
    linear-gradient(180deg, var(--snd-cream) 0%, var(--snd-bg) 100%);
  border-bottom: 1px solid var(--snd-border);
  padding-block: .9rem;
}
.snd-pagehead .mod-breadcrumbs__wrapper, .snd-pagehead nav { margin: 0; }
.snd-pagehead .breadcrumb {
  margin: 0; padding: 0; background: transparent; font-size: .9rem;
  --breadcrumb-divider-color: var(--snd-muted);
}
.snd-pagehead .breadcrumb a { color: var(--snd-navy); font-weight: 600; text-decoration: none; }
.snd-pagehead .breadcrumb a:hover { text-decoration: underline; }
.snd-pagehead .breadcrumb .active { color: var(--snd-muted); }
.snd-pagehead .mod-breadcrumbs__here { color: var(--snd-muted); margin-right: .35rem; }

.snd-body { outline: none; }
.snd-layout {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem;
  padding-block: clamp(1.75rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4.5rem);
}
.has-sidebar .snd-layout { grid-template-columns: minmax(0, 1fr) 20rem; }
.snd-layout__main { min-width: 0; }

.snd-content > .com-content-article,
.snd-content > .item-page,
.snd-content > .contact,
.snd-content > .com-contact,
.snd-content > .com-users,
.snd-content > .login,
.snd-content > div:not(.alert) {
  background: var(--snd-surface);
  border: 1px solid var(--snd-border);
  border-radius: 18px;
  box-shadow: var(--snd-shadow);
  padding: clamp(1.25rem, 4vw, 2.75rem);
}
.snd-content .page-header { margin: 0 0 1.25rem; padding: 0; border: 0; }
.snd-content .page-header h1, .snd-content .page-header h2,
.snd-content .item-page > h1, .snd-content h1:first-child {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin: 0 0 .5rem; color: var(--snd-navy-deep);
}
.snd-content .page-header::after {
  content: ""; display: block; width: 3.5rem; height: 4px; margin-top: .9rem; border-radius: 4px;
  background: linear-gradient(90deg, var(--snd-red), var(--snd-terracotta));
}
/* Textul lung rămâne lizibil (~75 caractere pe rând); listele de documente și tabelele ocupă tot cardul */
.snd-content .com-content-article__body > p,
.snd-content .com-content-article__body > ul,
.snd-content .com-content-article__body > ol,
.snd-content .com-content-article__body > h2,
.snd-content .com-content-article__body > h3,
.snd-content .com-content-article__body > h4 { max-width: 75ch; }
.snd-content .com-content-article__body img { max-width: 100%; height: auto; border-radius: 10px; }
.snd-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.snd-content th, .snd-content td { border: 1px solid var(--snd-border); padding: .5rem .65rem; vertical-align: top; }
.snd-content th { background: var(--snd-cream); }
.snd-content .article-info, .snd-content .icons { font-size: .875rem; color: var(--snd-muted); }
.snd-content dl.article-info { margin: 0 0 1rem; }

/* Conținut vechi lipit din Word: fonturile/culorile inline se aliniază la template */
.snd-content [style*="font-family"] { font-family: inherit !important; }
.snd-content [style*="color: #333"], .snd-content [style*="color:#333"] { color: inherit !important; }
/* mărimi mici în px lipite din pagini web (12.16px, 13px…) -> mărimea normală a textului */
.snd-content .com-content-article__body [style*="font-size: 1"][style*="px"],
.snd-content .com-content-article__body [style*="font-size:1"][style*="px"] { font-size: inherit !important; }
.snd-content p:empty { display: none; }

/* Liste de articole (Istoric) */
.snd-content .com-content-category__table, .snd-content .category { width: 100%; }
.snd-content .list-title a { font-weight: 600; }

/* Formulare (contact, autentificare) */
.snd .form-control, .snd .form-select {
  border-radius: 10px; border-color: #cfd6e0; padding: .6rem .8rem; font-size: 1rem;
}
.snd .form-control:focus, .snd .form-select:focus { border-color: var(--snd-navy); box-shadow: 0 0 0 .2rem rgb(31 58 95 / 18%); }
.snd .btn { border-radius: 999px; padding: .55rem 1.2rem; font-weight: 600; }
.snd .btn-primary { background: var(--snd-navy); border-color: var(--snd-navy); }
.snd .btn-primary:hover, .snd .btn-primary:focus { background: var(--snd-navy-deep); border-color: var(--snd-navy-deep); }
.snd .btn-secondary { background: var(--snd-cream); border-color: var(--snd-cream-deep); color: var(--snd-navy-deep); }
.snd .btn-secondary:hover { background: var(--snd-cream-deep); color: var(--snd-navy-deep); }

/* Bara laterală */
.snd-layout__aside .snd-module {
  background: var(--snd-surface); border: 1px solid var(--snd-border); border-radius: 16px;
  padding: 1.25rem; box-shadow: var(--snd-shadow);
}
.snd-layout__aside .snd-module + .snd-module { margin-top: 1rem; }
.snd-layout__aside .snd-module__title { font-size: 1.2rem; margin: 0 0 .75rem; }
.snd-layout__aside ul { margin: 0; padding: 0; list-style: none; }
.snd-layout__aside li a { display: block; padding: .45rem .25rem; border-bottom: 1px solid var(--snd-border); text-decoration: none; }
.snd-layout__aside li:last-child a { border-bottom: 0; }

/* Mesaje sistem */
.snd joomla-alert, .snd .alert { border-radius: 12px; }

/* ---------- Subsol ---------- */
.snd-footer {
  margin-top: 0;
  background: var(--snd-navy-deep);
  color: #c9d4e3;
  font-size: .95rem;
}
.snd-footer::before {
  content: ""; display: block; height: 4px;
  background: linear-gradient(90deg, var(--snd-red) 0 33%, var(--snd-sun) 33% 66%, var(--snd-navy) 66%);
}
.snd-footer a { color: #fff; text-decoration-color: rgb(255 255 255 / 35%); }
.snd-footer a:hover { color: var(--snd-sun); }
.snd-footer__grid {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem 3rem; padding-block: 3rem 2.25rem;
}
.snd-footer__brand {
  display: flex; align-items: center; gap: .75rem; margin: 0 0 .9rem;
  font-family: var(--snd-font-head); font-size: 1.2rem; font-weight: 700; color: #fff;
}
.snd-footer__brand img { background: #fff; border-radius: 8px; padding: 4px 6px; width: 32px; height: auto; }
.snd-footer .snd-footer__title, .snd-footer .snd-module__title {
  color: #fff; font-family: var(--snd-font-body); font-size: .8rem; letter-spacing: .1em;
  text-transform: uppercase; margin: 0 0 1rem;
}
.snd-footer .snd-module__title::before { display: none; }
.snd-footer__contact { margin: 0; padding: 0; list-style: none; display: grid; gap: .7rem; }
.snd-footer__contact li { display: flex; gap: .7rem; align-items: flex-start; }
.snd-footer__contact .fa-solid, .snd-footer__contact .fa-brands { color: var(--snd-sun); margin-top: .3rem; width: 1rem; text-align: center; }
.snd-footer ul.mod-menu, .snd-footer .snd-footer__col > .snd-module ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; }
.snd-footer ul.mod-menu a { text-decoration: none; }
.snd-footer ul.mod-menu a:hover { text-decoration: underline; }
.snd-footer__bottom { border-top: 1px solid rgb(255 255 255 / 10%); font-size: .85rem; }
.snd-footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: 1rem; }
.snd-footer__bottom p { margin: 0; }
.snd-footer__links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; list-style: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .snd-menu__link, .snd-menu__toggle { padding-inline: .6rem; font-size: .93rem; }
}

@media (max-width: 991.98px) {
  .snd-navtoggle { display: inline-flex; }
  .snd-header__inner { flex-wrap: wrap; min-height: 4.5rem; }
  .snd-nav {
    display: none; flex-basis: 100%; order: 3;
    max-height: calc(100vh - 7rem); overflow: auto; padding-bottom: 1rem;
  }
  .snd-nav.is-open { display: block; }
  .snd-menu { flex-direction: column; align-items: stretch; gap: .15rem; }
  .snd-menu__link, .snd-menu__toggle { width: 100%; justify-content: space-between; padding: .8rem .75rem; font-size: 1rem; }
  .snd-menu__item.is-active > .snd-menu__toggle::after, .snd-menu__link[aria-current="page"]::after { display: none; }
  .snd-menu__sub {
    position: static; display: none; min-width: 0; max-width: none;
    margin: 0 0 .5rem; padding: .25rem .25rem .25rem .75rem;
    border: 0; border-left: 3px solid var(--snd-cream-deep); border-radius: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .snd-menu__item.has-children:hover > .snd-menu__sub,
  .snd-menu__item.has-children:focus-within > .snd-menu__sub { display: none; }
  .snd-menu__item.has-children.is-open > .snd-menu__sub { display: block; }
  .snd-menu__sub::before { display: none; }
  .has-sidebar .snd-layout { grid-template-columns: minmax(0, 1fr); }
  .snd-about { grid-template-columns: minmax(0, 1fr); }
  .snd-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .snd-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body.snd { font-size: 1rem; }
  .snd-topbar__contact li:nth-child(2) { display: none; }
  .snd-brand__crest { width: 32px; }
  .snd-brand__tagline { display: none; }
  .snd-navtoggle__label { display: none; }
  .snd-hero__inner { min-height: 24rem; padding-block: 3rem 5rem; }
  .snd-hero::before { background: linear-gradient(0deg, rgb(20 40 67 / 92%) 0%, rgb(20 40 67 / 70%) 55%, rgb(20 40 67 / 35%) 100%); }
  .snd-section--home-a { margin-top: -2.5rem; }
  .snd-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .65rem; }
  .snd-card__link { padding: 1rem .9rem; }
  .snd-card__text, .snd-card__arrow { display: none; }
  .snd-about__facts { grid-template-columns: minmax(0, 1fr); }
  .snd-footer__grid { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .snd-topbar, .snd-header, .snd-hero, .snd-footer, .snd-pagehead { display: none !important; }
  .snd-content > div { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
}

/* Pagina de eroare */
.snd-error__code {
  margin: 0; font-family: var(--snd-font-head); font-size: clamp(3.5rem, 10vw, 6rem); line-height: 1;
  font-weight: 700; color: var(--snd-cream-deep); -webkit-text-stroke: 2px var(--snd-red);
}
.error-page .snd-content h1 { margin-top: .5rem; }

/* Ancorele nu ajung sub antetul fix */
.snd [id] { scroll-margin-top: 6.5rem; }
