/* ==========================================================================
   Colegiul Național „Ion Minulescu" Slatina — Design System
   Emerald · Light Grey · White | Playfair Display + Inter
   ========================================================================== */

:root {
  /* Culori */
  --emerald-950: #04291F;
  --emerald-900: #064E3B;
  --emerald-800: #065F46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10B981;
  --emerald-100: #D1FAE5;
  --emerald-50:  #ECFDF5;
  --grey-bg:     #F4F6F5;
  --grey-100:    #E8ECEA;
  --grey-200:    #D8DEDC;
  --surface:     #FFFFFF;
  --ink:         #16261F;
  --ink-soft:    #47554F;
  --gold:        #C9A227;
  --danger:      #B91C1C;
  --danger-bg:   #FEF2F2;
  --ok:          #047857;
  --ok-bg:       #ECFDF5;

  /* Tipografie */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  /* Ritm */
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(6, 78, 59, .07), 0 1px 2px rgba(6, 78, 59, .05);
  --shadow-md: 0 6px 18px rgba(6, 78, 59, .09), 0 2px 6px rgba(6, 78, 59, .05);
  --shadow-lg: 0 18px 44px rgba(6, 78, 59, .14);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur: 240ms;

  /* Straturi */
  --z-header: 100;
  --z-flash: 200;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--emerald-950);
  line-height: 1.18;
  margin: 0 0 .5em;
  font-weight: 600;
}

p { margin: 0 0 1em; }

a { color: var(--emerald-700); text-decoration: none; transition: color var(--dur) var(--ease-out); }
a:hover { color: var(--emerald-500); }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--emerald-900); color: #fff; padding: .6rem 1.2rem;
  border-radius: 0 0 8px 0; z-index: 999;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible {
  outline: 3px solid var(--emerald-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Butoane
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.7rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
  touch-action: manipulation;
  min-height: 44px;
}
.btn:active { transform: scale(.97); }

.btn-solid { background: var(--emerald-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-solid:hover { background: var(--emerald-600); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline { background: transparent; color: var(--emerald-800); border-color: var(--emerald-700); }
.btn-outline:hover { background: var(--emerald-50); color: var(--emerald-900); transform: translateY(-2px); }

.btn-light { background: #fff; color: var(--emerald-900); box-shadow: var(--shadow-sm); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--emerald-700); }

.btn-sm { padding: .45rem 1.1rem; font-size: .9rem; min-height: 38px; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #991B1B; color: #fff; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); border-bottom-color: var(--grey-100); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: .7rem 0;
}

.brand { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.brand-mark svg { transition: transform 400ms var(--ease-out); }
.brand:hover .brand-mark svg { transform: rotate(-6deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-size: 1.02rem; color: var(--emerald-950); letter-spacing: .01em; }
.brand-text span { font-size: .78rem; color: var(--ink-soft); }

.main-nav { display: flex; align-items: center; gap: 1.4rem; }
.main-nav > ul { display: flex; list-style: none; margin: 0; padding: 0; gap: .1rem; }
.main-nav > ul > li { position: relative; display: flex; align-items: center; }
.main-nav > ul > li > a {
  display: block; padding: .55rem .6rem; font-size: .92rem; font-weight: 500;
  color: var(--ink); border-radius: 8px; position: relative; white-space: nowrap;
}
.main-nav > ul > li > a::after {
  content: ''; position: absolute; left: .6rem; right: .6rem; bottom: .3rem;
  height: 2px; background: var(--emerald-600); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.main-nav > ul > li > a:hover { color: var(--emerald-800); }
.main-nav > ul > li > a:hover::after, .main-nav > ul > li > a.active::after { transform: scaleX(1); }
.main-nav > ul > li > a.active { color: var(--emerald-800); font-weight: 600; }

/* Submeniuri (dropdown) */
.sub-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 30px; padding: 0; margin-left: -4px;
  background: none; border: none; cursor: pointer; color: var(--ink-soft);
  border-radius: 6px; transition: transform var(--dur) var(--ease-out), color var(--dur);
}
.has-sub:hover .sub-toggle, .has-sub.open .sub-toggle { color: var(--emerald-700); }
.has-sub.open .sub-toggle svg, .has-sub:hover .sub-toggle svg { transform: rotate(180deg); }
.sub-toggle svg { transition: transform var(--dur) var(--ease-out); }

.sub-menu {
  list-style: none; margin: 0; padding: .5rem;
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--surface); border: 1px solid var(--grey-100);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s 220ms;
  z-index: 50;
}
.has-sub:hover .sub-menu,
.has-sub:focus-within .sub-menu,
.has-sub.open .sub-menu {
  opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
.sub-menu a {
  display: block; padding: .55rem .85rem; font-size: .92rem;
  color: var(--ink); border-radius: 8px; font-weight: 500;
  transition: background-color var(--dur), color var(--dur), padding-left var(--dur) var(--ease-out);
}
.sub-menu a:hover { background: var(--emerald-50); color: var(--emerald-900); padding-left: 1.05rem; }

.nav-side {
  display: flex; align-items: center; gap: .9rem;
  padding-left: 1rem; margin-left: .2rem; border-left: 1px solid var(--grey-100);
}
.lang-switch { font-size: .85rem; color: var(--grey-200); display: flex; gap: .3rem; align-items: center; }
.lang-switch a { color: var(--ink-soft); font-weight: 600; padding: .3rem .15rem; }
.lang-switch a.on { color: var(--emerald-700); border-bottom: 2px solid var(--emerald-600); }

.nav-auth { display: flex; align-items: center; gap: .55rem; white-space: nowrap; }
.nav-auth .btn { gap: .4rem; }
.nav-logout {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .86rem; font-weight: 600; color: var(--ink-soft);
  padding: .42rem .8rem; border-radius: 999px; border: 1.5px solid transparent;
  transition: color var(--dur), background-color var(--dur), border-color var(--dur);
}
.nav-logout:hover { color: var(--danger); background: var(--danger-bg); border-color: #FECACA; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; padding: 10px;
  background: none; border: none; cursor: pointer; border-radius: 10px;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--emerald-900); border-radius: 2px;
  transition: transform 300ms var(--ease-out), opacity 200ms;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Flash
   ========================================================================== */
.flash {
  position: sticky; top: 70px; z-index: var(--z-flash);
  width: min(680px, 92%); margin: .8rem auto -0.2rem;
  padding: .85rem 1.3rem; border-radius: var(--radius);
  font-weight: 500; box-shadow: var(--shadow-md);
  animation: flashIn 400ms var(--ease-out);
}
.flash-success { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--emerald-100); }
.flash-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #FECACA; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Hero (acasă)
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(16, 185, 129, .16), transparent 60%),
    radial-gradient(800px 480px at -10% 110%, rgba(6, 95, 70, .12), transparent 55%),
    linear-gradient(165deg, #FBFDFC 0%, var(--emerald-50) 100%);
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(4.5rem, 9vw, 7rem);
}
.hero-inner { max-width: 720px; }

.hero-kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .85rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--emerald-700); margin-bottom: 1.3rem;
}
.hero-kicker::before { content: ''; width: 34px; height: 2px; background: var(--gold); }

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.1rem);
  font-weight: 700; letter-spacing: -.01em; margin-bottom: 1.1rem;
}
.hero h1 em {
  font-style: italic; color: var(--emerald-700); position: relative; white-space: nowrap;
}
.hero h1 em::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: .06em; height: .28em;
  background: var(--emerald-100); z-index: -1; border-radius: 3px;
}

.hero-lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 58ch; margin-bottom: 2.2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero-motto {
  margin-top: 3rem; font-family: var(--font-display); font-style: italic;
  font-weight: 500; font-size: 1.06rem; color: var(--emerald-800);
}
.hero-motto::before { content: '— '; color: var(--gold); }

/* Ornament plutitor */
.hero-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 30%, rgba(16,185,129,.20), rgba(16,185,129,.04) 70%);
  animation: orbFloat 11s ease-in-out infinite alternate;
  will-change: transform;
}
.hero-orb.o1 { width: 320px; height: 320px; top: -70px; right: 6%; }
.hero-orb.o2 { width: 190px; height: 190px; bottom: -40px; right: 26%; animation-delay: -4s; animation-duration: 14s; }
@keyframes orbFloat { from { transform: translateY(-14px); } to { transform: translateY(16px); } }

/* Intrare hero în cascadă */
.hero .fade-item { opacity: 0; transform: translateY(22px); animation: fadeUp 700ms var(--ease-out) forwards; }
.hero .fade-item.d1 { animation-delay: 80ms; }
.hero .fade-item.d2 { animation-delay: 190ms; }
.hero .fade-item.d3 { animation-delay: 300ms; }
.hero .fade-item.d4 { animation-delay: 410ms; }
.hero .fade-item.d5 { animation-delay: 520ms; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* ==========================================================================
   Secțiuni
   ========================================================================== */
.section { padding: clamp(3.4rem, 7vw, 5.6rem) 0; }
.section-white { background: var(--surface); }
.section-tint { background: linear-gradient(180deg, var(--grey-bg), #FAFBFB); }

.section-head { max-width: 640px; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--emerald-600); margin-bottom: .55rem;
}
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

/* ==========================================================================
   Statistici
   ========================================================================== */
.stats-band {
  background: linear-gradient(135deg, var(--emerald-900) 0%, var(--emerald-800) 60%, var(--emerald-700) 100%);
  color: #fff; padding: clamp(2.8rem, 5vw, 4rem) 0;
  position: relative; overflow: hidden;
}
.stats-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(700px 300px at 90% 0%, rgba(255,255,255,.08), transparent 60%);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  position: relative; text-align: center;
}
.stat-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.2rem, 4.4vw, 3.3rem); color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat-num .plus { color: var(--emerald-100); }
.stat-label { color: var(--emerald-100); font-size: .95rem; margin-top: .2rem; }

/* ==========================================================================
   Carduri
   ========================================================================== */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }

.card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 2rem 1.8rem; box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-100);
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out), border-color 300ms var(--ease-out);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--emerald-100); }

.card-icon {
  width: 54px; height: 54px; border-radius: 16px;
  background: var(--emerald-50); color: var(--emerald-700);
  display: grid; place-items: center; margin-bottom: 1.2rem;
}
.card-icon svg { width: 27px; height: 27px; }
.card h3 { font-size: 1.28rem; margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: .97rem; margin: 0; }

.card-tag {
  display: inline-block; margin-top: 1.1rem; font-size: .78rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--emerald-700);
  background: var(--emerald-50); padding: .3rem .75rem; border-radius: 999px;
}

/* ==========================================================================
   Articole / știri
   ========================================================================== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }

.news-card {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--grey-100);
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.news-card-top {
  height: 7px;
  background: linear-gradient(90deg, var(--emerald-600), var(--emerald-500) 60%, var(--gold));
}
.news-card-body { padding: 1.6rem 1.6rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.news-meta { display: flex; align-items: center; gap: .7rem; font-size: .82rem; color: var(--ink-soft); margin-bottom: .7rem; }
.news-badge {
  font-weight: 600; color: var(--emerald-700); background: var(--emerald-50);
  padding: .18rem .65rem; border-radius: 999px; font-size: .76rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.news-card h3 { font-size: 1.14rem; line-height: 1.35; }
.news-card h3 a { color: var(--emerald-950); }
.news-card h3 a:hover { color: var(--emerald-700); }
.news-card p { color: var(--ink-soft); font-size: .93rem; flex: 1; }
.news-link {
  font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: .35rem;
  margin-top: .8rem;
}
.news-link svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease-out); }
.news-link:hover svg { transform: translateX(4px); }

/* Pagina articol */
.article-body { max-width: 720px; }
.article-body p { color: var(--ink); font-size: 1.05rem; }
.article-meta { color: var(--ink-soft); font-size: .92rem; margin-bottom: 2rem; }

/* ==========================================================================
   Bandă CTA
   ========================================================================== */
.cta-band {
  background:
    radial-gradient(900px 400px at 15% 120%, rgba(201, 162, 39, .16), transparent 55%),
    linear-gradient(135deg, var(--emerald-950), var(--emerald-800));
  border-radius: var(--radius-lg);
  color: #fff; text-align: center;
  padding: clamp(2.8rem, 6vw, 4.4rem) clamp(1.5rem, 5vw, 4rem);
  position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.cta-band p { color: var(--emerald-100); max-width: 54ch; margin: 0 auto 1.8rem; font-size: 1.06rem; }

/* ==========================================================================
   Pagini interioare
   ========================================================================== */
.page-hero {
  background:
    radial-gradient(800px 380px at 90% -20%, rgba(16, 185, 129, .14), transparent 60%),
    linear-gradient(160deg, #FBFDFC, var(--emerald-50));
  padding: clamp(3rem, 6.5vw, 5rem) 0;
  border-bottom: 1px solid var(--grey-100);
}
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin-bottom: .4rem; }
.page-hero p { color: var(--ink-soft); font-size: 1.1rem; margin: 0; max-width: 60ch; }

.prose { max-width: 720px; }
.prose p { color: var(--ink); font-size: 1.03rem; }
.prose h2 { font-size: 1.7rem; margin-top: 2.2rem; }

.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }

/* Persoane (conducere) */
.people-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.person-card {
  text-align: center; background: var(--surface); border-radius: var(--radius-lg);
  padding: 2.2rem 1.6rem; border: 1px solid var(--grey-100); box-shadow: var(--shadow-sm);
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.person-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.person-avatar {
  width: 84px; height: 84px; margin: 0 auto 1.1rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-500));
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 700;
}
.person-avatar-photo { overflow: hidden; background: var(--emerald-50); }
.person-avatar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-card h3 { font-size: 1.15rem; margin-bottom: .15rem; }
.person-role { color: var(--emerald-700); font-weight: 600; font-size: .9rem; }
.person-subject { color: var(--ink-soft); font-size: .88rem; }

/* Listă documente / bife */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative; padding: .45rem 0 .45rem 2rem; color: var(--ink);
}
.check-list li::before {
  content: ''; position: absolute; left: 0; top: .72rem;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--emerald-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* Tabel specializări */
.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.spec-table th, .spec-table td { padding: .95rem 1.2rem; text-align: left; }
.spec-table th { background: var(--emerald-900); color: #fff; font-weight: 600; font-size: .92rem; letter-spacing: .03em; }
.spec-table tbody tr { border-top: 1px solid var(--grey-100); transition: background-color var(--dur); }
.spec-table tbody tr:hover { background: var(--emerald-50); }
.spec-table td { color: var(--ink); font-size: .97rem; }
.spec-table .num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--emerald-800); }

/* ==========================================================================
   Formulare
   ========================================================================== */
.form-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 2.2rem; box-shadow: var(--shadow-md); border: 1px solid var(--grey-100);
}
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .4rem; color: var(--emerald-950); }
.form-group .req { color: var(--danger); }
.form-control {
  width: 100%; padding: .78rem 1rem; font-size: 1rem; font-family: var(--font-body);
  border: 1.5px solid var(--grey-200); border-radius: 10px; background: #FDFEFE;
  color: var(--ink);
  transition: border-color var(--dur), box-shadow var(--dur);
  min-height: 46px;
}
textarea.form-control { min-height: 140px; resize: vertical; }
.form-control:focus {
  outline: none; border-color: var(--emerald-600);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .14);
}
.form-hint { font-size: .84rem; color: var(--ink-soft); margin-top: .3rem; }
.field-error { color: var(--danger); font-size: .86rem; margin-top: .3rem; }

/* Login */
.auth-wrap { min-height: 62vh; display: grid; place-items: center; padding: 3.5rem 0; }
.auth-card { width: min(430px, 100%); }
.auth-card .form-card { padding: 2.6rem 2.4rem; }
.auth-card h1 { font-size: 1.9rem; text-align: center; }
.auth-card .auth-lead { text-align: center; color: var(--ink-soft); margin-bottom: 1.8rem; }

/* ==========================================================================
   Zona elev — note
   ========================================================================== */
.notes-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.notes-table th { background: var(--emerald-900); color: #fff; text-align: left; padding: .9rem 1.1rem; font-size: .9rem; }
.notes-table td { padding: .9rem 1.1rem; border-top: 1px solid var(--grey-100); font-size: .95rem; }
.notes-table tbody tr:hover { background: var(--emerald-50); }
.score-chip {
  display: inline-block; min-width: 58px; text-align: center;
  font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--emerald-50); color: var(--emerald-800);
  border: 1px solid var(--emerald-100);
  padding: .28rem .7rem; border-radius: 999px;
}
.private-note {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .88rem; color: var(--emerald-800);
  background: var(--emerald-50); border: 1px solid var(--emerald-100);
  padding: .45rem .95rem; border-radius: 999px; margin-bottom: 1.4rem;
}
.private-note svg { width: 15px; height: 15px; }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-layout { display: grid; grid-template-columns: 235px 1fr; gap: 2rem; padding: 2.2rem 0 3.5rem; align-items: start; }
.admin-sidebar {
  background: var(--surface); border-radius: var(--radius-lg); padding: 1.2rem;
  border: 1px solid var(--grey-100); box-shadow: var(--shadow-sm);
  position: sticky; top: 88px;
}
.admin-sidebar nav { display: flex; flex-direction: column; gap: .2rem; }
.admin-sidebar a {
  display: flex; align-items: center; gap: .65rem;
  padding: .68rem .9rem; border-radius: 10px; color: var(--ink); font-weight: 500; font-size: .95rem;
  transition: background-color var(--dur), color var(--dur);
}
.admin-sidebar a svg { width: 18px; height: 18px; color: var(--emerald-600); }
.admin-sidebar a:hover { background: var(--emerald-50); color: var(--emerald-900); }
.admin-sidebar a.active { background: var(--emerald-800); color: #fff; }
.admin-sidebar a.active svg { color: var(--emerald-100); }

.admin-main h1 { font-size: 1.85rem; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--surface); border-radius: var(--radius-lg); padding: 1.4rem 1.5rem;
  border: 1px solid var(--grey-100); box-shadow: var(--shadow-sm);
}
.stat-card .n { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--emerald-800); font-variant-numeric: tabular-nums; }
.stat-card .l { color: var(--ink-soft); font-size: .88rem; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-table th { background: var(--grey-100); text-align: left; padding: .8rem 1rem; font-size: .85rem; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); }
.admin-table td { padding: .85rem 1rem; border-top: 1px solid var(--grey-100); font-size: .94rem; vertical-align: middle; }
.admin-table tr:hover td { background: #FAFCFB; }
.admin-table .row-actions { display: flex; gap: .5rem; white-space: nowrap; }

.inline-form { display: inline; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: linear-gradient(160deg, var(--emerald-950), var(--emerald-900));
  color: var(--emerald-100); margin-top: 0; padding: 3.6rem 0 0;
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 2.6rem; }
.footer-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: #fff; margin: .9rem 0 .3rem; }
.footer-motto { font-family: var(--font-display); font-style: italic; font-weight: 500; color: var(--emerald-100); opacity: .85; font-size: .95rem; }
.site-footer h3 { color: #fff; font-family: var(--font-body); font-size: .85rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { color: var(--emerald-100); opacity: .9; }
.footer-links a:hover { color: #fff; opacity: 1; }
.footer-contact li { opacity: .9; font-size: .95rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  padding: 1.3rem 0; font-size: .86rem; opacity: .85;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #fff; }

/* ==========================================================================
   Animații la scroll
   ========================================================================== */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 640ms var(--ease-out), transform 640ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .card-grid, .news-grid, .people-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .admin-sidebar nav { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 1120px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 62px 0 auto 0; z-index: var(--z-header);
    background: var(--surface); box-shadow: var(--shadow-lg);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 1rem 1.4rem 1.6rem;
    border-bottom: 1px solid var(--grey-100);
    transform: translateY(-115%); opacity: 0; visibility: hidden;
    transition: transform 340ms var(--ease-out), opacity 280ms var(--ease-out), visibility 0s 340ms;
  }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .main-nav { max-height: calc(100dvh - 70px); overflow-y: auto; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li { flex-wrap: wrap; align-items: stretch; }
  .main-nav > ul > li > a { flex: 1; padding: .8rem .4rem; font-size: 1.05rem; border-bottom: 1px solid var(--grey-100); border-radius: 0; white-space: normal; }
  .main-nav > ul > li > a::after { display: none; }
  .sub-toggle { width: 48px; height: auto; margin: 0; border-bottom: 1px solid var(--grey-100); border-radius: 0; }
  .sub-menu {
    position: static; width: 100%; min-width: 0; box-shadow: none; border: none;
    border-radius: 0; padding: 0 0 0 1rem; background: transparent;
    display: none; opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { display: none; }
  .has-sub.open .sub-menu { display: block; }
  .sub-menu a { padding: .65rem .4rem; border-bottom: 1px solid var(--grey-100); }
  .sub-menu li:last-child a { border-bottom: none; }
  .nav-side { margin-top: 1.1rem; justify-content: space-between; border-left: none; padding-left: 0; flex-wrap: wrap; gap: .8rem; }
  .brand-text strong { font-size: .92rem; }
  .brand-text span { font-size: .72rem; }
}

@media (max-width: 640px) {
  .card-grid, .news-grid, .people-grid, .stats-grid, .stat-cards { grid-template-columns: 1fr; }
  .stats-grid { gap: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-ctas .btn { width: 100%; }
  .section { padding: 3rem 0; }
  .form-card { padding: 1.6rem 1.3rem; }
  .admin-table { display: block; overflow-x: auto; }
}

/* ==========================================================================
   Imagini articole
   ========================================================================== */
.news-card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.article-featured {
  margin: 0 0 2rem; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md); max-width: 820px;
}
.article-featured img { width: 100%; max-height: 440px; object-fit: cover; display: block; }
.article-figure { margin: 1.8rem 0; }
.article-figure img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-sm); display: block;
}
.article-figure figcaption {
  font-size: .88rem; color: var(--ink-soft); margin-top: .55rem; text-align: center; font-style: italic;
}
.admin-thumb { width: 120px; border-radius: 10px; display: block; box-shadow: var(--shadow-sm); }
.img-code-list { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.img-code-list li {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  background: var(--grey-bg); border: 1px solid var(--grey-100);
  border-radius: 10px; padding: .5rem .7rem;
}
.img-code-list img { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; }
.img-code-list code {
  background: #fff; border: 1px solid var(--grey-200); border-radius: 6px;
  padding: .2rem .5rem; font-size: .84rem; user-select: all;
}

/* ==========================================================================
   Documente atașate
   ========================================================================== */
.attachments { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--grey-100); }
.attachments-title {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1.25rem; color: var(--emerald-950);
}
.attachments-title svg { color: var(--emerald-600); flex: none; }
.attachment-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.attachment-link {
  display: flex; align-items: center; gap: .9rem;
  background: var(--surface); border: 1px solid var(--grey-100);
  border-radius: 12px; padding: .7rem .95rem;
  color: var(--ink); font-weight: 500; font-size: .95rem;
  transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur) var(--ease-out);
}
.attachment-link:hover {
  border-color: var(--emerald-500); box-shadow: var(--shadow-md);
  transform: translateX(4px); color: var(--emerald-900);
}
.attachment-ext {
  flex: none; min-width: 46px; text-align: center;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  background: var(--emerald-800); color: #fff;
  padding: .3rem .45rem; border-radius: 7px;
}
.attachment-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.attachment-dl {
  flex: none; display: inline-flex; align-items: center; gap: .35rem;
  font-size: .84rem; font-weight: 600; color: var(--emerald-700);
}

/* Corpul profesoral — catedre */
.teacher-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; align-items: start; }
.teacher-dept { display: flex; flex-direction: column; }
.teacher-dept-head { display: flex; align-items: flex-start; gap: .85rem; }
.teacher-dept-head .card-icon { margin-bottom: 0; width: 46px; height: 46px; flex: none; }
.teacher-dept-head .card-icon svg { width: 23px; height: 23px; }
.teacher-dept h3 { font-size: 1.08rem; margin: .1rem 0 .1rem; }
.teacher-count { font-size: .82rem; color: var(--emerald-700); font-weight: 600; }
.teacher-list { list-style: none; margin: 1.1rem 0 0; padding: 0; }
.teacher-list li { border-top: 1px solid var(--grey-100); }
.teacher-list li:first-child { border-top: none; }
.teacher-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .45rem .5rem .45rem 0; color: var(--ink); font-size: .95rem;
  border-radius: 10px; text-decoration: none;
  transition: background-color var(--dur), color var(--dur), padding-left var(--dur) var(--ease-out);
}
a.teacher-item:hover { background: var(--emerald-50); color: var(--emerald-900); padding-left: .45rem; }
a.teacher-item:hover .teacher-arrow { opacity: 1; transform: translateX(0); }
.teacher-item-plain { cursor: default; }
.teacher-arrow {
  flex: none; margin-left: auto; color: var(--emerald-600);
  opacity: 0; transform: translateX(-4px);
  transition: opacity var(--dur), transform var(--dur) var(--ease-out);
}
.teacher-ava {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  font-family: var(--font-display); font-size: .8rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-500));
}
.teacher-ava-photo { background: var(--emerald-50); }
.teacher-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.teacher-name { min-width: 0; overflow-wrap: anywhere; }
.teacher-note {
  display: block; font-size: .78rem; font-weight: 600; color: var(--emerald-700);
  letter-spacing: .02em;
}

/* Pagina de profil a profesorului */
.breadcrumb {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font-size: .88rem; color: var(--ink-soft); margin-bottom: 1.4rem;
  opacity: 0; animation: fadeUp 600ms var(--ease-out) 60ms forwards;
}
.breadcrumb a { font-weight: 600; }
.teacher-hero {
  display: flex; align-items: center; gap: 1.8rem; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 600ms var(--ease-out) 150ms forwards;
}
.teacher-hero-photo {
  width: 150px; height: 150px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--emerald-50); box-shadow: var(--shadow-md);
  border: 4px solid #fff;
}
.teacher-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.teacher-hero-initials {
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-500));
  color: #fff; font-family: var(--font-display); font-size: 2.6rem; font-weight: 700;
}
.teacher-hero-text { min-width: 0; flex: 1; }
.teacher-hero-text h1 { margin-bottom: .35rem; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.teacher-hero-role { color: var(--emerald-800); font-weight: 600; font-size: 1.05rem; margin: 0 0 .5rem; }
.teacher-hero-dept {
  display: inline-flex; align-items: center; gap: .45rem; margin: 0;
  font-size: .88rem; color: var(--emerald-700);
  background: var(--emerald-50); border: 1px solid var(--emerald-100);
  padding: .32rem .8rem; border-radius: 999px;
}

.teacher-profile { max-width: 760px; }
.teacher-profile h3 {
  font-size: 1.3rem; color: var(--emerald-800);
  margin: 2rem 0 .6rem; padding-bottom: .4rem;
  border-bottom: 2px solid var(--emerald-100);
}
.teacher-profile h3:first-child { margin-top: 0; }
.teacher-profile h4 {
  font-family: var(--font-body); font-size: .82rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--emerald-600);
  margin: 1.4rem 0 .4rem;
}
.teacher-profile p { color: var(--ink); margin-bottom: .9rem; }
.teacher-profile p strong { color: var(--emerald-950); }
/* Conținutul importat are <strong> în interiorul titlurilor; fără regula asta,
   browserul cere greutatea 900 (neîncărcată) și „falsifică" îngroșarea. */
.teacher-profile h3 strong, .teacher-profile h4 strong,
.article-body h3 strong, .article-body h4 strong,
.prose h2 strong, .prose h3 strong { font-weight: inherit; }
.teacher-profile ul { padding-left: 1.2rem; margin-bottom: 1rem; }
.teacher-profile li { margin-bottom: .3rem; }

@media (max-width: 640px) {
  .teacher-hero { gap: 1.2rem; }
  .teacher-hero-photo { width: 110px; height: 110px; }
  .teacher-hero-initials { font-size: 1.9rem; }
}
@media (max-width: 1024px) { .teacher-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .teacher-grid { grid-template-columns: 1fr; } }

/* Declarații grupate pe an și persoană */
.decl-groups { margin-top: 1.4rem; }
.decl-year { margin-top: 1.4rem; }
.decl-year:first-child { margin-top: .6rem; }
.decl-year-title {
  font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--emerald-800);
  margin: 0 0 .3rem; padding-bottom: .4rem; border-bottom: 2px solid var(--emerald-100);
}
.decl-person {
  font-weight: 700; color: var(--emerald-950); font-size: 1rem;
  margin: 1rem 0 .1rem;
}
.decl-year .attachment-list { margin-top: .5rem; }

/* ==========================================================================
   Widget accesibilitate
   ========================================================================== */
.a11y-widget { position: fixed; right: 18px; bottom: 18px; z-index: 900; }
.a11y-btn {
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--emerald-800); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
  transition: transform var(--dur) var(--ease-out), background-color var(--dur);
}
.a11y-btn:hover { background: var(--emerald-600); transform: scale(1.07); }
.a11y-btn:active { transform: scale(.96); }
.a11y-panel {
  position: absolute; right: 0; bottom: 64px; width: min(320px, calc(100vw - 36px));
  background: var(--surface); border: 1px solid var(--grey-100);
  border-radius: 18px; box-shadow: var(--shadow-lg);
  padding: 1.1rem 1.1rem 1rem;
  animation: a11yIn 240ms var(--ease-out);
}
@keyframes a11yIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.a11y-head h2 { font-family: var(--font-body); font-size: 1.02rem; margin: 0; color: var(--emerald-950); }
.a11y-close {
  width: 32px; height: 32px; border: none; background: var(--grey-bg); border-radius: 8px;
  cursor: pointer; display: grid; place-items: center; color: var(--ink-soft);
  transition: background-color var(--dur), color var(--dur);
}
.a11y-close:hover { background: var(--grey-100); color: var(--ink); }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .45rem 0 .65rem; font-size: .92rem; font-weight: 500; }
.a11y-font-btns { display: flex; gap: .35rem; }
.a11y-font-btns button {
  min-width: 40px; height: 36px; border-radius: 8px; cursor: pointer;
  border: 1.5px solid var(--grey-200); background: #fff; color: var(--ink);
  font-weight: 600; font-family: var(--font-body);
  transition: background-color var(--dur), border-color var(--dur), color var(--dur);
}
.a11y-font-btns button:nth-child(2) { font-size: 1.05rem; }
.a11y-font-btns button:nth-child(3) { font-size: 1.15rem; }
.a11y-font-btns button[aria-pressed="true"] { background: var(--emerald-800); border-color: var(--emerald-800); color: #fff; }
.a11y-opt {
  display: flex; align-items: center; gap: .65rem; width: 100%;
  padding: .55rem .6rem; margin-bottom: .3rem;
  border: none; background: transparent; border-radius: 10px; cursor: pointer;
  font-family: var(--font-body); font-size: .92rem; font-weight: 500; color: var(--ink); text-align: left;
  transition: background-color var(--dur);
}
.a11y-opt:hover { background: var(--emerald-50); }
.a11y-check {
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  border: 2px solid var(--grey-200); background: #fff;
  transition: background-color var(--dur), border-color var(--dur);
}
.a11y-opt[aria-pressed="true"] .a11y-check {
  background: var(--emerald-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/12px no-repeat;
  border-color: var(--emerald-700);
}
.a11y-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .5rem; padding-top: .8rem; border-top: 1px solid var(--grey-100); }
.a11y-foot a { font-size: .84rem; }

/* ==========================================================================
   Moduri de accesibilitate
   ========================================================================== */
html.a11y-font-1 { font-size: 112.5%; }
html.a11y-font-2 { font-size: 127%; }

html.a11y-underline main a:not(.btn), html.a11y-underline .site-footer a { text-decoration: underline; }

html.a11y-gray .site-header, html.a11y-gray main, html.a11y-gray .site-footer { filter: grayscale(1); }

html.a11y-readable body { letter-spacing: .02em; word-spacing: .06em; line-height: 1.9; }

html.a11y-contrast {
  --ink: #000000;
  --ink-soft: #1F2937;
  --grey-bg: #FFFFFF;
  --grey-100: #6B7280;
  --grey-200: #4B5563;
  --emerald-600: #04543F;
  --emerald-700: #04543F;
  --emerald-500: #04543F;
  --emerald-100: #FFFFFF;
  --emerald-50: #FFFFFF;
  --gold: #7C5E00;
}
html.a11y-contrast .hero, html.a11y-contrast .page-hero, html.a11y-contrast .section-tint { background: #fff; }
html.a11y-contrast .card, html.a11y-contrast .news-card, html.a11y-contrast .person-card, html.a11y-contrast .form-card { border-color: #4B5563; }
html.a11y-contrast .stats-band, html.a11y-contrast .cta-band { background: #04291F; }
html.a11y-contrast .stat-label, html.a11y-contrast .cta-band p { color: #fff; }
html.a11y-contrast .site-footer { background: #04291F; }
html.a11y-contrast .site-footer a, html.a11y-contrast .footer-contact li, html.a11y-contrast .footer-motto { color: #fff; opacity: 1; }

html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}
html.a11y-motion .reveal { opacity: 1; transform: none; }
html.a11y-motion .hero .fade-item { opacity: 1; transform: none; animation: none; }
html.a11y-motion .hero-orb { animation: none; }

/* ==========================================================================
   Mișcare redusă
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero .fade-item { opacity: 1; transform: none; animation: none; }
}
