/* =====================================================================
   ATESTAT — "Chimia si reactii chimice"
   Tema: stiinta / laborator (paleta intunecata, accente verde-smarald)

   ===== GHID RAPID DE MODIFICARI =====
   1. Culorile principale se schimba in blocul ":root" de mai jos.
      - --bg, --bg-deep ........ fundalul paginii (cel mai inchis)
      - --card, --card-2 ....... cardurile / casetele
      - --ink .................. culoarea textului normal
      - --muted ................ text secundar (paragrafe gri)
      - --line ................. liniile / chenarele
      - --primary, --primary-2 . accent principal (verde smarald)
      - --accent ............... accent secundar (turcoaz lab)
      - --warn ................. galben de avertizare (atentie)
      - --danger ............... rosu pentru reactii periculoase
   2. Tipografia se schimba in regula "body { font-family: ... }".
   3. Latimea continutului se schimba din "main { max-width: 1080px }".
   4. Pentru a face fundalul si mai inchis, scade luminozitatea
      la --bg si --bg-deep (de ex. #000204).
   5. Pentru a folosi tema pe orice element nou, foloseste
      clasele: .section-card, .info-grid, .info-tile, .conclusion,
      .btn .primary / .ghost, .fact-list, .atestat-table.
   ===================================================================== */

:root {
  /* === PALETA INTUNECATA "LABORATOR DE CHIMIE" === */
  --bg:         #02080a;  /* fundal global, aproape negru cu nuanta petrol */
  --bg-deep:    #010406;  /* fundalul cel mai inchis (sectiuni inferioare) */
  --card:       #061013;  /* card standard, petrol foarte inchis */
  --card-2:     #081619;  /* card alternativ (randuri pare in tabele) */
  --ink:        #dcefe7;  /* text principal, alb-verzui */
  --muted:      #7a988b;  /* text secundar, gri-verzui */
  --line:       #0f2a2e;  /* contur subtire */
  --primary:    #1faa6e;  /* verde smarald — actiune principala */
  --primary-2:  #138a55;  /* verde smarald inchis — hover / accent */
  --accent:     #00c4b4;  /* turcoaz — accent secundar (eprubete) */
  --warn:       #d49b1c;  /* galben — caseta atentie */
  --danger:     #b8342a;  /* rosu — reactii reactive / periculoase */
  --shadow:     0 14px 36px rgba(0, 0, 0, 0.75);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  line-height: 1.65;

  /* Fundal cu "halouri" subtile — sugereaza vapori intr-un laborator.
     Modifica procentele (15%, 85%, 50%) ca sa muti aceste pete de lumina. */
  background:
    radial-gradient(circle at 15% 20%, rgba(31, 170, 110, 0.10), transparent 32%),
    radial-gradient(circle at 85% 12%, rgba(0, 196, 180, 0.08), transparent 30%),
    radial-gradient(circle at 50% 85%, rgba(212, 155, 28, 0.06), transparent 35%),
    linear-gradient(180deg, #03090b 0%, var(--bg) 45%, var(--bg-deep) 100%);
  min-height: 100vh;
}

/* ===== HEADER / NAVIGATIE =====
   Modifica "background" daca vrei o bara de navigare alt fel colorata.
   "backdrop-filter" da efectul de sticla mata pe scroll. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 8, 10, 0.94);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.brand {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.95rem;
}

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

nav a {
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  border-radius: 0.65rem;
  transition: background-color 220ms ease, transform 220ms ease;
}

nav a:hover,
nav a:focus-visible {
  background: #0a2a26;
  transform: translateY(-1px);
}

/* Linkul paginii curente — culoarea de fundal vine din --primary */
nav a.active {
  color: #021410;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  font-weight: 700;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* ===== SECTIUNEA HERO (din index.html) ===== */
.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: linear-gradient(145deg, rgba(6, 16, 19, 0.97), rgba(2, 8, 10, 0.95));
  box-shadow: var(--shadow);
  padding: 1.2rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

/* Halo decorativ in coltul dreapta-sus al hero-ului */
.hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(31, 170, 110, 0.22), transparent 70%);
  right: -110px;
  top: -110px;
}

.hero h1 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  font-size: clamp(1.6rem, 3.8vw, 2.6rem);
  color: #e6fff5;
}

.hero p { color: var(--muted); margin-top: 0; }

.hero img {
  width: 100%;
  height: clamp(230px, 34vw, 360px);
  object-fit: contain;
  object-position: center;
  background: linear-gradient(180deg, #061013 0%, #02080a 100%);
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  padding: 0.5rem;
}

.cta-row {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* ===== BUTOANE ===== */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 0.7rem;
  padding: 0.65rem 0.92rem;
  transition: transform 170ms ease, filter 170ms ease;
}

.btn.primary {
  color: #021410;
  background: linear-gradient(120deg, var(--primary), var(--accent));
}

.btn.ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.12);
}

/* ===== CARDURI DE SECTIUNE ===== */
.section-card {
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--card);
  padding: 1rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.section-card h1 { color: #e6fff5; margin-top: 0; }
.section-card h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  color: var(--accent);
}

/* Grila cu placi de informatii (ex: tipuri de reactii) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.info-tile {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.85rem;
  background: var(--card-2);
  transition: transform 200ms ease, border-color 200ms ease;
}

.info-tile:hover {
  transform: translateY(-2px);
  border-color: var(--primary-2);
}

.info-tile h3 {
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 0.45rem;
}

/* Lista de fapte / curiozitati */
.fact-list { margin: 0; padding-left: 1.2rem; }
.fact-list li + li { margin-top: 0.55rem; }
.fact-list li::marker { color: var(--accent); }

/* ===== CONCLUZIE (banda verde stanga) =====
   Schimba "border-left" cu --danger pentru un ton de avertizare. */
.conclusion {
  margin-top: 1.35rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--primary);
  border-radius: 0.85rem;
  background: #050f0c;
  padding: 1rem;
}

.conclusion h2 { color: var(--accent); margin-top: 0; }

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 1.4rem 1rem 2.2rem;
  font-size: 0.92rem;
}

/* ===== ANIMATIE LA INCARCARE ===== */
.reveal { animation: fadeUp 550ms ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal:nth-child(2) { animation-delay: 80ms; }
.reveal:nth-child(3) { animation-delay: 160ms; }
.reveal:nth-child(4) { animation-delay: 240ms; }
.reveal:nth-child(5) { animation-delay: 320ms; }

/* ===== TABEL CU INFO DESPRE PROIECT (index.html) ===== */
.atestat-table-wrap {
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--card);
  padding: 1rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.atestat-table-wrap h2 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.atestat-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }

.atestat-table th,
.atestat-table td {
  border: 1px solid var(--line);
  padding: 0.65rem 0.9rem;
  text-align: left;
}

.atestat-table thead th {
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  color: #021410;
  font-weight: 700;
}

.atestat-table tbody tr:nth-child(even) { background: var(--card-2); }

/* ===== BIBLIOGRAFIE ===== */
.biblio-list { margin: 0; padding-left: 1.2rem; }
.biblio-list li { margin-bottom: 0.7rem; }

.biblio-list a {
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}

.biblio-list a:hover { text-decoration: underline; color: var(--accent); }

/* ===== CASETA DE AVERTIZARE (optional, foloseste-o cu <div class="warn-box">) ===== */
.warn-box {
  margin-top: 1rem;
  border: 1px solid var(--warn);
  border-left: 6px solid var(--warn);
  background: rgba(212, 155, 28, 0.06);
  border-radius: 0.7rem;
  padding: 0.85rem 1rem;
  color: #f3e2b6;
}

/* ===== ECUATII CHIMICE (foloseste cu <code class="eq">...</code>) =====
   Le scoatem in evidenta cu un fundal mat. Indicii sub/sup sunt
   deja sustinuti nativ in HTML (<sub>, <sup>). */
code.eq {
  display: inline-block;
  font-family: "Cascadia Mono", "Consolas", monospace;
  background: #03100d;
  color: #b8f5d4;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.98em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .nav-wrap { flex-direction: column; align-items: flex-start; }
  nav ul { width: 100%; }
  nav li { flex: 1; }
  nav a { width: 100%; text-align: center; }
}
