/* ═══════════════════════════════════════════════════════════
   OOP PHP 2026 — Beáta Stehlíková | TUKE
   assets/style.css — v3.1
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=Sora:wght@300;400;600;700&display=swap');

/* ─── DARK THEME (default) ──────────────────────────────── */
:root {
  --bg:       #0d1117;
  --surface:  #161b22;
  --surface2: #1c2430;
  --border:   #30363d;
  --accent:   #e85d04;
  --accent2:  #f48c06;
  --text:     #e6edf3;
  --muted:    #8b949e;
  --code-bg:  #0d1117;
  --nav-h:    60px;
  --shadow:   0 2px 12px rgba(0,0,0,0.35);
}

/* ─── LIGHT THEME ───────────────────────────────────────── */
[data-theme="light"] {
  --bg:       #f5f6f8;
  --surface:  #ffffff;
  --surface2: #eef0f3;
  --border:   #d0d7de;
  --accent:   #c94a00;
  --accent2:  #d97706;
  --text:     #1a1e24;
  --muted:    #57606a;
  --code-bg:  #f0f1f3;
  --shadow:   0 2px 12px rgba(0,0,0,0.07);
}

/* ─── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  transition: background 0.3s, color 0.3s;
}

/* ─── NAV ───────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(13,17,23,0.93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  transition: background 0.3s;
}

[data-theme="light"] nav {
  background: rgba(245,246,248,0.93);
}

.nav-brand {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow: hidden;
}

.nav-links {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.45rem;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface2);
}

/* ─── THEME TOGGLE ──────────────────────────────────────── */
.theme-toggle {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}

.theme-toggle:hover { background: var(--border); transform: scale(1.04); }
.theme-toggle .toggle-icon { font-size: 1rem; }

/* ─── HERO ──────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 5.5rem 2.5rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}

.hero::before {
  content: '</>';
  position: absolute;
  right: 2rem;
  top: 2.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11rem;
  color: rgba(232,93,4,0.055);
  font-weight: 600;
  pointer-events: none;
  line-height: 1;
}

.hero-tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(232,93,4,0.1);
  border: 1px solid rgba(232,93,4,0.28);
  padding: 0.22rem 0.7rem;
  border-radius: 2px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-author { font-size: 0.95rem; color: var(--muted); font-weight: 300; }

/* ─── MAIN CONTAINER ────────────────────────────────────── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2.5rem 5rem;
}

/* ─── SECTION TITLE (thin divider style) ────────────────── */
.section-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── WEEK SECTION ──────────────────────────────────────── */
.week-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.week-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}

.week-section-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(232,93,4,0.1);
  border: 1px solid rgba(232,93,4,0.28);
  padding: 0.22rem 0.6rem;
  border-radius: 3px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.week-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ─── SUBSECTION TITLE ──────────────────────────────────── */
.subsection-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 2rem 0 1rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--accent);
}

/* ─── TWO COLUMN LAYOUT ─────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 0;
}

/* ─── OSNOVA GRID ───────────────────────────────────────── */
#osnova { margin-bottom: 0; }

.osnova-grid { display: grid; gap: 3px; }

.week-row {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.week-row:hover {
  background: var(--surface2);
  border-color: var(--accent);
  transform: translateX(5px);
}

.week-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.week-title { font-size: 0.88rem; }

.week-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-test  { background: rgba(232,93,4,0.13); color: var(--accent);  border: 1px solid rgba(232,93,4,0.28); }
.badge-final { background: rgba(244,140,6,0.1);  color: var(--accent2); border: 1px solid rgba(244,140,6,0.22); }

/* ─── CARDS ─────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow);
  transition: background 0.3s, border-color 0.3s;
}

.two-col .card { margin-bottom: 0; }

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.card h4 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1.4rem 0 0.6rem;
}

.card p { font-size: 0.88rem; color: var(--muted); line-height: 1.75; }
.card strong { color: var(--text); }
.card em { font-size: 0.8rem; }

.card ul, .card ol {
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.card li { font-size: 0.88rem; color: var(--muted); line-height: 1.7; }
.card li strong { color: var(--text); }

/* ─── SCORE GRID ────────────────────────────────────────── */
.score-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.8rem;
  margin: 1.3rem 0 1.2rem;
}

.score-item {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 0.9rem;
  transition: background 0.3s;
}

.score-points {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.score-label { font-size: 0.72rem; color: var(--muted); line-height: 1.45; }
.score-label em { font-size: 0.68rem; display: block; margin-top: 0.2rem; }

/* ─── CODE — inline (napr. <code>mysqli</code> v texte) ─── */
code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  color: var(--accent2);
}

/* ─── PRISM OVERRIDE ────────────────────────────────────────
   Toto je KRITICKÉ — bez toho globálny code { color } prepíše
   všetky Prism farby na jednu oranžovú
─────────────────────────────────────────────────────────── */
pre[class*="language-"] code {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
}

/* ─── CMD BLOCK ─────────────────────────────────────────── */
.cmd-block {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 0.7rem 1rem;
  border-radius: 0 4px 4px 0;
  color: var(--accent2);
  margin: 0.5rem 0;
  transition: background 0.3s;
}

.cmd-block::before { content: '$ '; color: var(--muted); }

/* ─── INSTALL PANELS ────────────────────────────────────── */
.install-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.install-panel {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.1rem;
  transition: background 0.3s;
}

.install-panel h4 {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.7rem !important;
}

.install-panel ol {
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.install-panel li { font-size: 0.82rem; color: var(--muted); }
.install-panel li strong { color: var(--text); }

/* ─── ALERT ─────────────────────────────────────────────── */
.alert {
  display: flex;
  gap: 0.9rem;
  background: rgba(232,93,4,0.07);
  border: 1px solid rgba(232,93,4,0.22);
  border-radius: 4px;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
}

.alert-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.05rem; }
.alert p { font-size: 0.84rem; color: var(--muted); margin: 0; }
.alert strong { color: var(--text); }

/* ─── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
  margin-top: 0.9rem;
}

.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-outline:hover { background: rgba(232,93,4,0.09); }

/* ─── ENV ROWS ──────────────────────────────────────────── */
.env-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 0.45rem;
  transition: background 0.3s;
}

.env-label { font-size: 0.76rem; color: var(--muted); font-weight: 600; min-width: 130px; }
.env-value { font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; color: var(--accent2); }

/* ─── LITERATURA ────────────────────────────────────────── */
.lit-grid { display: grid; gap: 0.5rem; }

.lit-link {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.lit-link:hover {
  border-color: var(--accent);
  background: var(--surface2);
  transform: translateX(4px);
}

.lit-link-arrow { font-family: 'IBM Plex Mono', monospace; color: var(--accent); font-weight: 600; flex-shrink: 0; margin-top: 0.1rem; }
.lit-link-body  { display: flex; flex-direction: column; gap: 0.1rem; }
.lit-link-title { font-size: 0.88rem; font-weight: 600; }
.lit-link-desc  { font-size: 0.76rem; color: var(--muted); }

/* ─── DIVIDER ───────────────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ─── FOOTER ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.8rem 2.5rem;
  background: var(--surface);
  transition: background 0.3s;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.footer-copy { font-size: 0.85rem; color: var(--text); font-weight: 600; }
.footer-made { font-size: 0.76rem; color: var(--muted); }
.footer-made .heart { color: #e85d04; }

/* ─── ANIMATIONS ────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero { animation: fadeUp 0.45s ease both; }

.week-row { animation: fadeUp 0.35s ease both; }
.week-row:nth-child(1)  { animation-delay: 0.04s; }
.week-row:nth-child(2)  { animation-delay: 0.07s; }
.week-row:nth-child(3)  { animation-delay: 0.10s; }
.week-row:nth-child(4)  { animation-delay: 0.13s; }
.week-row:nth-child(5)  { animation-delay: 0.16s; }
.week-row:nth-child(6)  { animation-delay: 0.19s; }
.week-row:nth-child(7)  { animation-delay: 0.22s; }
.week-row:nth-child(8)  { animation-delay: 0.25s; }
.week-row:nth-child(9)  { animation-delay: 0.28s; }
.week-row:nth-child(10) { animation-delay: 0.31s; }
.week-row:nth-child(11) { animation-delay: 0.34s; }
.week-row:nth-child(12) { animation-delay: 0.37s; }

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .score-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 780px) {
  .two-col      { grid-template-columns: 1fr; }
  .install-tabs { grid-template-columns: 1fr; }
  .score-grid   { grid-template-columns: repeat(2, 1fr); }
  .container    { padding: 0 1.5rem 4rem; }
  .hero         { padding: 3.5rem 1.5rem 2.5rem; }
  nav           { padding: 0 1.2rem; }
}

@media (max-width: 600px) {
  .nav-links a      { display: none; }
  .nav-links li:first-child a { display: inline; }
  .toggle-label     { display: none; }
  .score-grid       { grid-template-columns: repeat(2, 1fr); }
  .week-section-title { font-size: 1.1rem; }
}

/* ═══════════════════════════════════════════════════════════
   CODE BLOCKS — Prism.js integrácia
═══════════════════════════════════════════════════════════ */

/* ── Wrapper okolo každého kódového bloku ───────────────── */
.code-block-wrap {
  position: relative;
  margin: 1.25rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ── Hlavička bloku — názov súboru + copy tlačidlo ─────── */
.code-block-wrap .code-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--muted);
}

/* ── Prism pre blok — tmavé pozadie aj na light mode ───── */
.code-block-wrap pre[class*="language-"] {
  margin: 0;
  border-radius: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  max-height: 420px;
  overflow-y: auto;
  background: #0d1117 !important;
}

[data-theme="light"] .code-block-wrap pre[class*="language-"] {
  background: #1e2030 !important;
}

/* ── Copy tlačidlo ──────────────────────────────────────── */
.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.2rem 0.65rem;
  border-radius: 5px;
  font-size: 0.7rem;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.copy-btn:hover  { background: var(--surface2); color: var(--text); }
.copy-btn.copied { border-color: #4caf50; color: #4caf50; }

/* ── OOP pojmy — farebné štítky v texte ────────────────── */
.oop-term {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  margin-right: 0.3rem;
  vertical-align: middle;
}

/* ── Porovnanie procedurálne vs OOP (2 stĺpce) ─────────── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.compare-grid .compare-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.compare-col.bad  h4 { color: #e57373; }
.compare-col.good h4 { color: #81c784; }

@media (max-width: 600px) {
  .compare-grid { grid-template-columns: 1fr; }
}
