:root {
  --primary: #2563eb;       /* Královská modrá */
  --primary-dark: #1e40af;
  --bg-body: #f1f5f9;       /* Světle šedé pozadí */
  --bg-card: #ffffff;
  --text-main: #1e293b;     /* Tmavě šedá pro text */
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- HERO SECTION --- */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  padding: 4rem 0 6rem 0; /* Extra padding dole pro přesah vyhledávání */
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero p {
  margin-top: 1rem;
  font-size: 1.1rem;
  opacity: 0.95;
  align-items: right;
}

/* --- HERO SECTION (LOGO VLEVO, TEXT VPRAVO) --- */
.hero {
  background: linear-gradient(135deg, #001d6d 0%, #0b40d3 100%);
  color: white;
  padding: 2rem 5rem 4rem 5rem;
}

.hero-content {
  display: flex;            /* Aktivuje flexbox */
  align-items: center;      /* Zarovná logo a text vertikálně na střed */
  justify-content: space-between; /* KLÍČOVÉ: Odtlačí prvky k okrajům (jeden vlevo, druhý vpravo) */
  gap: 2rem;                /* Minimální mezera, kdyby se k sobě přiblížily */
}

.hero-logo {
  width: 200px;
  height: auto;
  flex-shrink: 0;           /* Logo se nebude zmenšovat */
  margin: 1rem 20rem 2rem 1rem;
}

.hero-text {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.9;
  text-align: right;        /* Zarovná samotný text doprava */
  max-width: 400px;         /* Omezí šířku textu, aby nebyl přes celou obrazovku */
}

/* --- SEARCH BAR --- */
.search-bar-wrapper {
  margin-top: -3.5rem; /* Posun nahoru přes Hero */
  margin-bottom: 3rem;
  position: relative;
  z-index: 10;
}

.search-box {
  background: white;
  padding: 0.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap; /* Pro mobily */
}

.input-group, .select-group {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 1rem;
  position: relative;
}

.search-icon, .columns-icon {
  color: var(--text-muted);
  margin-right: 0.75rem;
}

.search-box input, .search-box select {
  border: none;
  font-size: 1rem;
  width: 100%;
  padding: 0.75rem 0;
  outline: none;
  font-family: inherit;
  color: var(--text-main);
  background: transparent;
}

.divider {
  width: 1px;
  height: 2.5rem;
  background-color: var(--border-color);
  display: none; /* Skryté na mobilu */
}

@media (min-width: 768px) {
  .divider { display: block; }
  .search-box { flex-wrap: nowrap; }
}

.search-box button {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.search-box button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

/* --- RESULTS --- */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.results-header h2 {
  font-size: 1.5rem;
  margin: 0;
  color: #334155;
}

.badge-count {
  background: #e0e7ff;
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr; /* Jeden sloupec */
  gap: 1.5rem;
  margin-bottom: 4rem;
}

/* --- JOB CARD --- */
.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.job-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.job-card h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--primary-dark);
}

/* Štítek kategorie */
.institute-badge {
  background-color: #f1f5f9;
  color: #475569;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  display: inline-block;
}

.match-score {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #10b981; /* Zelená */
  font-weight: 600;
  margin-bottom: 1rem;
}

.job-content {
  color: #475569;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Tlačítko Více */
.read-more-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.read-more-btn:hover {
  text-decoration: underline;
}

/* --- STATES --- */
.state-empty, .state-loading {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.state-empty i, .state-loading i {
  color: #cbd5e1;
  margin-bottom: 1rem;
}

footer {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
}

/* --- PAGINATION --- */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.page-btn {
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  min-width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: #f8fafc;
}

.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: default;
  background: #f1f5f9;
}

.page-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  font-weight: 600;
  user-select: none; /* Aby to nešlo označit myší */
}