/* ========================================
   Lukáš Nevrlý – Osobní web
   Světlý design, modrá – styl Astra/WordPress
   ======================================== */

:root {
  --blue:        #1565c0;
  --blue-hover:  #0d47a1;
  --blue-light:  #e8f0fe;
  --blue-mid:    #1976d2;
  --bg:          #ffffff;
  --bg-section:  #f5f7fa;
  --bg-card:     #ffffff;
  --nav-bg:      #ffffff;
  --text:        #1a1a2e;
  --text-muted:  #5f6b7a;
  --border:      #dce3ed;
  --visited:     #2e7d32;
  --planned:     #1565c0;
  --radius:      10px;
  --shadow:      0 2px 16px rgba(21,101,192,0.1);
  --shadow-card: 0 1px 6px rgba(0,0,0,0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* ── Navigace ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 2px solid var(--blue);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  box-shadow: 0 2px 8px rgba(21,101,192,0.08);
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  letter-spacing: 0.3px;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--blue-light);
  color: var(--blue);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 60%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 920px;
  width: 100%;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 4rem;
  align-items: center;
}

.photo-wrap {
  position: relative;
}

.photo-wrap::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #42a5f5);
  z-index: 0;
}

.profile-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 4px solid #fff;
}

.photo-placeholder {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--blue-light);
  border: 4px solid #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--blue-mid);
  font-size: 0.82rem;
  text-align: center;
  gap: 0.5rem;
}

.photo-placeholder svg {
  width: 56px;
  height: 56px;
  opacity: 0.5;
  fill: var(--blue-mid);
}

.hero-content h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.hero-content h1 span {
  color: var(--blue);
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tag {
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid #c5d8f8;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue);
  color: #fff;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 3px 10px rgba(21,101,192,0.25);
}

.cta-btn:hover {
  background: var(--blue-hover);
  transform: translateY(-2px);
}

/* ── Obecné sekce ── */
section { padding: 5rem 2rem; }

.section-inner {
  max-width: 920px;
  margin: 0 auto;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.72rem;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: var(--text);
  border-bottom: 3px solid var(--blue);
  padding-bottom: 0.5rem;
  display: inline-block;
}

/* ── O mně ── */
#o-mne { background: var(--bg-section); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.about-card:hover {
  box-shadow: var(--shadow);
  border-color: #c5d8f8;
}

.about-card .card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.about-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.about-card p, .about-card li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.about-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.about-card ul li::before {
  content: '›';
  color: var(--blue);
  margin-right: 0.5rem;
  font-weight: 700;
}

.about-full { grid-column: 1 / -1; }

/* ── Kontakt ── */
#kontakt { background: var(--bg); border-top: 1px solid var(--border); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.contact-item { display: flex; flex-direction: column; gap: 0.25rem; }

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.contact-value {
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  overflow-wrap: break-word;
  word-break: break-all;
}

.contact-value:hover { color: var(--blue); }

.social-links { display: flex; gap: 1rem; }

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.social-btn:hover {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.social-btn.facebook { background: #1877f2; color: #fff; }
.social-btn.instagram {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
}

/* ── Zápatí ── */
footer {
  text-align: center;
  padding: 1.75rem 2rem;
  background: var(--text);
  color: #aab4c0;
  font-size: 0.85rem;
  border-top: 3px solid var(--blue);
}

footer a { color: #90b8f8; }

/* ── Stránka akcí: záhlaví ── */
.page-header {
  padding: 7rem 2rem 3rem;
  text-align: center;
  background: linear-gradient(135deg, #e8f0fe 0%, #ffffff 70%);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.page-header p { color: var(--text-muted); }

/* ── Tabulka akcí ── */
.events-section { padding: 3rem 2rem 5rem; background: var(--bg-section); }

.events-inner { max-width: 1020px; margin: 0 auto; }

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.45rem 1.2rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-weight: 500;
}

.tab-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

.tab-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* Stav načítání */
.loading-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-state {
  background: #fff3f3;
  border: 1px solid #f5c6c6;
  border-radius: var(--radius);
  padding: 1.5rem;
  color: #c0392b;
  text-align: center;
}

.error-state a { color: var(--blue); }

/* Tabulka */
.events-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  background: var(--bg-card);
}

.events-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.events-table thead {
  background: var(--blue);
  color: #fff;
}

.events-table th {
  padding: 0.9rem 1.2rem;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.events-table td {
  padding: 0.85rem 1.2rem;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.events-table tr:hover td { background: #f0f5ff; }
.events-table tr.has-foto { cursor: pointer; }
.events-table tr.has-foto:hover td { background: #e6f0ff; }

.event-name { font-weight: 600; color: var(--text); }
.event-venue { color: var(--text-muted); font-size: 0.85rem; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge.visited {
  background: #e8f5e9;
  color: var(--visited);
  border: 1px solid #a5d6a7;
}

.badge.planned {
  background: var(--blue-light);
  color: var(--planned);
  border: 1px solid #c5d8f8;
}

.no-data {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  background: var(--bg-card);
}

/* Informační box */
.setup-info {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.88rem;
  color: #78350f;
  display: none;
}

.setup-info.visible { display: block; }

.setup-info strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #92400e;
}

.setup-info ol {
  margin: 0.5rem 0 0 1.2rem;
  color: #78350f;
}

.setup-info li { margin-bottom: 0.3rem; }
.setup-info code {
  background: #fef3c7;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.85em;
}

/* ── Statistiky ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.stat-card .stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ── Filtrační řádek v tabulce ── */
.filter-row th {
  background: #f0f4ff;
  padding: 0.5rem 0.75rem;
  white-space: normal;   /* přepisuje nowrap z .events-table th */
  overflow: hidden;
}

.col-filter {
  display: block;        /* zabrání přetékání na mobilu */
  width: 100%;
  min-width: 0;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
}

.col-filter:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(21,101,192,0.12);
}

.col-filter::placeholder { color: var(--text-muted); }

.stats-row-clickable { cursor: pointer; }
.stats-row-clickable:hover td { background: #dce8ff !important; }

/* ── Statistiky ── */
.stats-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.stats-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--blue-light);
}

/* ── Životopis ── */
.cv-section { padding: 3rem 2rem 5rem; background: var(--bg-section); }
.cv-inner { max-width: 860px; margin: 0 auto; }

.cv-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 3rem;
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.cv-block-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--blue);
  margin-bottom: 1.5rem;
  margin-top: 2.75rem;
}

.cv-block-title:first-of-type { margin-top: 0; }

.cv-block-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}

/* Timeline – pracovní zkušenosti */
.timeline { position: relative; padding-left: 1.8rem; }

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.55rem;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue-mid);
  border: 2.5px solid var(--bg-section);
  box-shadow: 0 0 0 2px var(--blue-mid);
  z-index: 1;
}

.timeline-item.current::before {
  background: var(--visited);
  box-shadow: 0 0 0 2px var(--visited);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.timeline-card:hover {
  box-shadow: var(--shadow);
  border-color: #c5d8f8;
}

.timeline-item.current .timeline-card {
  border-left: 3px solid var(--visited);
}

.timeline-period {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  letter-spacing: 0.2px;
}

.timeline-employer {
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.1rem;
}

.timeline-position {
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 500;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-top: 0.4rem;
  line-height: 1.6;
}

/* ── Životopis – seskupení po zaměstnavateli ── */
.employer-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.employer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--blue);
  color: #fff;
  padding: 0.85rem 1.4rem;
}

.employer-name {
  font-weight: 700;
  font-size: 0.97rem;
  flex: 1;
}

.employer-duration {
  font-size: 0.77rem;
  background: rgba(255,255,255,0.2);
  padding: 0.2rem 0.75rem;
  border-radius: 100px;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.position-item {
  display: grid;
  grid-template-columns: 175px 1fr;
  border-top: 1px solid var(--border);
  transition: background 0.15s;
}

.position-item:hover { background: var(--blue-light); }

.position-period {
  padding: 0.8rem 1.1rem;
  border-right: 1px solid var(--border);
  background: #f8faff;
}

.position-item.current .position-period {
  background: #f0faf0;
  border-right-color: #a5d6a7;
}

.position-period-range {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

.position-period-dur {
  font-size: 0.72rem;
  color: #aab4c0;
  margin-top: 0.2rem;
}

.position-detail {
  padding: 0.8rem 1.4rem;
}

.position-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.position-item.current .position-title { color: var(--visited); }

.position-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.employer-toggle {
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  color: var(--blue);
  cursor: pointer;
  border-top: 1px solid var(--border);
  background: var(--blue-light);
  user-select: none;
  transition: background 0.15s;
  font-weight: 500;
}

.employer-toggle:hover { background: #d0e4ff; }

@media (max-width: 600px) {
  .position-item { grid-template-columns: 1fr; }
  .position-period { border-right: none; border-bottom: 1px solid var(--border); background: #f8faff; }
}

.badge-current {
  display: inline-block;
  background: var(--visited);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.55rem;
  border-radius: 100px;
  margin-left: 0.6rem;
  vertical-align: middle;
  letter-spacing: 0.3px;
}

/* ── Responsivita ── */
@media (max-width: 700px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .photo-wrap {
    width: 190px;
    margin: 0 auto;
  }

  .hero-tags { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .about-full { grid-column: 1; }
  nav { padding: 0 1rem; }
  .nav-links { gap: 0; }
  .social-links { flex-direction: column; }
  .contact-grid { grid-template-columns: 1fr; }
}
