/* ==========================================================================
   Příručka pro nového zaměstnance – MČ Praha 6
   Responsive stylesheet
   ========================================================================== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800&display=swap');

/* --- Variables --- */
:root {
  --teal: #00B7A0;
  --teal-dark: #009985;
  --teal-light: #e6f9f6;
  --text: #1a1a1a;
  --text-light: #555;
  --bg: #ffffff;
  --bg-alt: #f7f9fa;
  --border: #e0e0e0;
  --max-w: 900px;
  --gap: 2rem;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

/* --- Container --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Montserrat', 'Arial', sans-serif;
  color: var(--teal);
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--teal);
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal-dark);
}

h4 {
  font-size: 1rem;
  font-weight: 700;
}

p {
  margin: 0.5em 0 1em;
}

a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover, a:focus {
  color: var(--teal-dark);
}

strong {
  font-weight: 700;
}

ul, ol {
  padding-left: 1.5em;
  margin: 0.5em 0 1em;
}

li {
  margin-bottom: 0.3em;
}

/* --- Hero / Cover --- */
.hero {
  background: var(--teal);
  color: #fff;
  padding: 4rem var(--gap) 3rem;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 0.2em;
}

.hero .subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  opacity: 0.9;
  margin-top: 0.5em;
}

.hero img {
  max-width: 180px;
  margin-bottom: 1.5rem;
}

/* --- Navigation / TOC --- */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}

.toc h2 {
  border-bottom: none;
  font-size: 1.25rem;
  margin-top: 0;
  padding-bottom: 0;
}

.toc ol {
  counter-reset: toc;
  list-style: none;
  padding-left: 0;
  columns: 2;
  column-gap: 2rem;
}

.toc li {
  counter-increment: toc;
  margin-bottom: 0.5em;
  break-inside: avoid;
}

.toc li::before {
  content: counter(toc) ". ";
  font-weight: 700;
  color: var(--teal);
}

.toc a {
  text-decoration: none;
  color: var(--text);
}

.toc a:hover {
  color: var(--teal);
  text-decoration: underline;
}

/* --- Sections --- */
section {
  padding: 1.5rem 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* --- Intro block (welcome messages) --- */
.intro-block {
  background: var(--bg-alt);
  border-left: 4px solid var(--teal);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.intro-block .person-photo {
  flex-shrink: 0;
  width: 90px;
  height: 112px;
  border-radius: 0 0 10px 10px;
  object-fit: cover;
  border: 2px solid var(--teal);
  margin-top: 0;
}

.intro-block .person-text {
  flex: 1;
  min-width: 0;
}

.intro-block .person-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  color: var(--teal);
  font-size: 1rem;
  margin-bottom: 0;
}

.intro-block .person-title {
  font-family: 'Montserrat', sans-serif;
  color: var(--teal);
  font-size: 0.85rem;
  margin-top: 0;
  margin-bottom: 0.8em;
}

/* --- Info box --- */
.info-box {
  background: var(--teal-light);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin: 1em 0;
}

.info-box h3 {
  margin-top: 0;
}

/* --- Contact card --- */
.contact-card {
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin: 1em 0;
}

.contact-card p {
  margin: 0.2em 0;
}

/* --- Grid for two-column card layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.card {
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--border);
}

.card-icon {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.card-icon .card-icon-img {
  flex-shrink: 0;
  width: 64px;
  height: auto;
}

.card-icon .card-body {
  flex: 1;
  min-width: 0;
}

.card h3 {
  margin-top: 0;
  font-size: 1rem;
}

.card p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.95rem;
}

th, td {
  padding: 0.6em 1em;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--teal);
  color: #fff;
  font-weight: 700;
}

tr:nth-child(even) {
  background: var(--bg-alt);
}

/* --- Benefits grid --- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.benefit-item {
  background: var(--teal-light);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  text-align: center;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: var(--teal-dark);
  font-size: 0.95rem;
}

/* --- Links list --- */
.links-list {
  list-style: none;
  padding: 0;
}

.links-list li {
  padding: 0.6em 0;
  border-bottom: 1px solid var(--border);
}

.links-list li:last-child {
  border-bottom: none;
}

.links-list a {
  font-weight: 700;
  text-decoration: none;
  display: block;
}

.links-list a:hover {
  text-decoration: underline;
}

.links-list .link-desc {
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.9rem;
  display: block;
  margin-top: 0.15em;
}

/* --- Floor plan (dislokace) --- */
.floor-list {
  list-style: none;
  padding: 0;
}

.floor-list li {
  padding: 0.5em 0;
  border-bottom: 1px solid var(--border);
}

.floor-list .floor-name {
  font-weight: 700;
  color: var(--teal);
  display: block;
  font-family: 'Montserrat', sans-serif;
}

.floor-list .floor-desc {
  font-size: 0.9rem;
}

/* --- Images --- */
img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.section-img {
  margin: 1rem 0;
  display: block;
}

/* --- Important note --- */
.note {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.2rem;
  margin: 1em 0;
  font-size: 0.95rem;
}

/* --- Footer --- */
footer {
  background: var(--teal);
  color: #fff;
  text-align: center;
  padding: 2rem var(--gap);
  margin-top: 3rem;
}

footer a {
  color: #fff;
}

footer p {
  margin: 0.3em 0;
  font-size: 0.9rem;
}

/* --- Print --- */
@media print {
  .hero { background: none; color: var(--text); padding: 1rem 0; }
  .hero h1 { color: var(--teal); }
  .toc { break-after: page; }
  section { break-inside: avoid; }
  a { color: var(--text); text-decoration: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
  footer { background: none; color: var(--text); }
}

/* --- Mobile --- */
@media (max-width: 768px) {
  :root { --gap: 1.2rem; }

  .hero { padding: 2.5rem var(--gap) 2rem; }
  .hero h1 { font-size: 1.8rem; }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }

  .toc ol { columns: 1; }

  .grid-2 { grid-template-columns: 1fr; }

  .benefits-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

  table { font-size: 0.85rem; }
  th, td { padding: 0.4em 0.6em; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.15rem; }

  .intro-block { padding: 1rem 1.2rem; gap: 1rem; }
  .intro-block .person-photo { width: 70px; height: 88px; }
}
