/* ============================================================
   Contacts footer section — dark, 3-column layout.
   Fakturační | Provozovna | Kontaktní
   Loaded from partials/contacts.php (which is included in
   footer.php on every non-home page).
   ============================================================ */

:root {
  /* Deepest tier v design hierarchii — „podlaha" stránky.
     O ~55 % tmavší než .why-us surface, čímž vzniká čitelný „step
     down" rhythm mezi content sekcí a utility footerem. */
  --contacts-bg:          #0b0d11;
  --contacts-surface:     rgba(255, 255, 255, 0.045);
  --contacts-surface-2:   rgba(255, 255, 255, 0.015);
  --contacts-border:      rgba(255, 255, 255, 0.08);
  --contacts-border-soft: rgba(255, 255, 255, 0.05);
  --contacts-text:        #e8ebee;
  --contacts-muted:       #9aa0a7;
  --contacts-muted-2:     #c5c9ce;
  --contacts-accent:      var(--color-green-3, #209c94);
  --contacts-accent-hover:#2bbfb5;

  /* Shared polish tokens — zrcadlí why-us.css, aby obě sekce psaly
     stejnou vizuální DNA (highlight, easing). */
  --contacts-card-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --contacts-ease:           cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset legacy footer styles for this section ---------- */
footer#contact {
  position: relative;
  background: var(--contacts-bg) !important;
  padding: 0;
  margin: 0;
  width: 100%;
  color: var(--contacts-text);
  /* Subtle „step down" separator — tenká linka s brand hintem, která
     odděluje patičku od .why-us content sekce nad ní.
     Spolu s deeper bg to působí jako přirozené „ustoupení" patičky. */
  border-top: 1px solid rgba(32, 156, 148, 0.14);
  box-shadow: inset 0 24px 48px -36px rgba(0, 0, 0, 0.65);
}

/* Vypnout legacy ::before dekoraci z main.css — nahrazeno vlastním
   border-top + inner-shadow separatorem. */
footer#contact::before {
  display: none !important;
}

/* Kill inherited typography padding from _typography.scss
   (p { padding: 0.67em 0 }, h1-h6 { padding: 0.67em 0 }, p { width: 100% }).
   Specificity (0,0,1,0) via the leading .contacts class — just enough
   to win against element-only rules in _typography.scss (0,0,0,1), but
   source-order ties mean any later component rule (also 0,0,1,0) still
   wins per-property. */
.contacts :where(p, h2, h3, h4, h5, h6, dl, dd, dt, ul, li) {
  padding: 0;
  margin: 0;
  width: auto;
}

.contacts :where(ul) {
  list-style: none;
}

/* ---------- Layout container ---------- */
.contacts__inner {
  max-width: 1680px;
  margin: 0 auto;
  padding: 96px 4vw 72px;
  font-family: var(--font-stack);
}

/* Open, borderless 3-column layout — sloupce nejsou karty, jen volné
   vertikální „proudy" obsahu. Vertikální hairline mezi sloupci dává
   strukturu bez vizuálního „zabalení". */
.contacts__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: 72px;
  align-items: start;
  position: relative;
}

/* Dva jemné svislé separátory mezi sloupci — jen hairline, bez boxů. */
.contacts__grid::before,
.contacts__grid::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 15%,
    rgba(255, 255, 255, 0.12) 85%,
    transparent 100%);
  pointer-events: none;
}

/* První separátor mezi sloupcem 1 a 2 — poloha 1fr + polovina gapu. */
.contacts__grid::before {
  left: calc((100% - 72px * 2) / 3.35 + 36px);
}

/* Druhý separátor mezi sloupcem 2 a 3. */
.contacts__grid::after {
  left: calc(((100% - 72px * 2) / 3.35) * 2 + 108px);
}

/* ---------- Column — bez pozadí, bez borderu, bez karet ---------- */
.contacts__col {
  position: relative;
  min-width: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Column head: badge icon + title, bez spodní linky — oddělení dělá
   margin + typografická hierarchie. */
.contacts__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
  padding: 0;
  border-bottom: none;
}

/* Icon — bez pozadí, jen akcentovaná ikona. Působí jako „bullet" u názvu
   sekce místo původního „badge" v kartě. */
.contacts__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: none;
  color: var(--contacts-accent);
  border: none;
  border-radius: 0;
  flex: 0 0 22px;
  align-self: center;
  box-sizing: border-box;
}

.contacts__icon > svg {
  display: block;
  width: 22px;
  height: 22px;
  margin: auto;
  color: inherit;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

/* Titulek sekce — eyebrow label, menší, uppercase. Prostoj patří obsahu
   (firma / adresa / lidé), ne nadpisu sekce. */
.contacts__title {
  color: var(--contacts-muted-2);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
  align-self: center;
}

/* ---------- Body shared ---------- */
.contacts__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- Billing / Provozovna column content ---------- */
.contacts__company {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.contacts__addr {
  color: var(--contacts-muted-2);
  font-size: 1.6rem;
  font-style: normal;
  line-height: 1.7;
}

/* Meta pár IČ / DIČ — bez boxů a borderů, jen hairline oddělovač shora
   a vzdušné sloupce „label : value". */
.contacts__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 28px;
  padding: 16px 0 0;
  margin-top: 2px;
  border-top: 1px solid var(--contacts-border-soft);
  border-bottom: none;
  font-size: 1.55rem;
  line-height: 1.4;
}

.contacts__meta-row {
  display: contents;
}

.contacts__meta dt {
  color: var(--contacts-muted);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 1.2rem;
  align-self: center;
}

.contacts__meta dd {
  color: #ffffff;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  align-self: center;
  font-size: 1.55rem;
}

.contacts__note {
  color: var(--contacts-muted);
  font-size: 1.3rem;
  line-height: 1.6;
  padding-top: 6px;
  border-top: 1px solid var(--contacts-border-soft);
  margin-top: 4px;
}

/* ---------- Map link — plain inline link s podtržením a šipkou. ---------- */
.contacts__map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 0;
  background: none;
  color: var(--contacts-accent);
  font-size: 1.5rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(32, 156, 148, 0.35);
  padding-bottom: 2px;
  width: fit-content;
  transition: color 0.25s var(--contacts-ease),
              border-color 0.25s var(--contacts-ease);
}

.contacts__map-link > svg {
  display: block;
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

.contacts__map-link:hover {
  background: none;
  border-bottom-color: var(--contacts-accent-hover);
  color: var(--contacts-accent-hover);
  transform: none;
}

/* ============================================================
   People column
   ============================================================ */
.contacts__body--people {
  gap: 28px;
}

.contacts__person {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
}

.contacts__person + .contacts__person {
  padding-top: 28px;
  border-top: 1px solid var(--contacts-border-soft);
}

/* Avatar circle with letter initials. Lehce silnější glow na nové
   deeper dark paletě, aby zůstal přirozeným focal pointem karty. */
.contacts__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #26b3a9 0%, #15756e 100%);
  color: #ffffff;
  border-radius: 50%;
  font-family: var(--font-stack);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 6px 20px -6px rgba(32, 156, 148, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.contacts__person-body {
  min-width: 0;
  padding-top: 2px;
}

/* Name block with its own breathing room */
.contacts__person-name {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 10px;
}

.contacts__person-role {
  display: inline-block;
  width: auto;
  color: var(--contacts-muted);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

/* Phone + email row — side-by-side on desktop/tablet.
   Each item is a self-contained chip, so the eye reads them as peer
   actions rather than a tight stacked list. */
.contacts__person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  list-style: none;
}

/* Each contact row = flex: [icon] [label/value]. Explicit, fixed height
   so the row never shrinks/grows between "Zobrazit telefon" and the
   revealed phone number / e-mail (which have different box models —
   inline span vs. inline-block <a> + border). This eliminates the
   layout jump on reveal. */
.contacts__link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--contacts-text);
  font-size: 1.45rem;
  line-height: 1;
  height: 32px;
  min-height: 32px;
}

.contacts__link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--contacts-accent);
  flex-shrink: 0;
}

.contacts__link-icon > svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

/* Clickable "Zobrazit telefon / Zobrazit e-mail" trigger */
.contacts__link .js_click {
  color: var(--contacts-accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px dashed rgba(32, 156, 148, 0.45);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  padding-bottom: 1px;
  width: fit-content;
}

.contacts__link:hover .js_click {
  color: var(--contacts-accent-hover);
  border-bottom-color: var(--contacts-accent-hover);
}

/* After reveal, the span is replaced with <a href="tel:…">…</a>.
   The transparent border + matching padding mirrors .js_click's exact
   vertical footprint (1px dashed border + 1px padding-bottom), so the
   row height doesn't shrink by 2px when the trigger span is hidden —
   no visible jump when the user reveals the number / email. */
.contacts__link .js_show_phone a,
.contacts__link .js_show_mail a {
  display: inline-block;
  color: #ffffff !important;
  font-weight: 500;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s;
}

.contacts__link .js_show_phone a:hover,
.contacts__link .js_show_mail a:hover {
  color: var(--contacts-accent) !important;
}

/* ============================================================
   Copyright strip – harmonize with new dark footer
   ============================================================ */
.copyright {
  /* Match the contacts footer bg exactly so the copyright line reads
     as a continuation of the dark footer, not a separate darker strip. */
  background: var(--contacts-bg) !important;
  border-top: 1px solid var(--contacts-border);
}

.copyright p {
  color: var(--contacts-muted) !important;
}

.copyright a {
  color: var(--contacts-muted-2) !important;
}

.copyright a:hover {
  color: var(--contacts-accent) !important;
}

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet: 2 columns + contacts spans full row */
@media (max-width: 1100px) {
  .contacts__inner {
    padding: 72px 3vw 56px;
  }
  .contacts__grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px 56px;
  }
  /* Jen jeden svislý oddělovač mezi dvěma sloupci na tabletu. */
  .contacts__grid::before {
    left: calc(50% - 1px);
  }
  .contacts__grid::after {
    display: none;
  }
  .contacts__col--people {
    grid-column: 1 / -1;
    padding-top: 16px;
    border-top: 1px solid var(--contacts-border-soft);
  }
  .contacts__col--people .contacts__body--people {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding-top: 4px;
  }
  .contacts__col--people .contacts__person + .contacts__person {
    padding-top: 0;
    border-top: none;
  }
}

/* Phone: single column stack */
@media (max-width: 700px) {
  .contacts__inner {
    padding: 56px 24px 40px;
  }
  .contacts__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  /* Žádné svislé separátory na mobilu — sekce odděluje jen vertikální
     mezera a jemný border-top u lidí. */
  .contacts__grid::before,
  .contacts__grid::after {
    display: none;
  }
  .contacts__col {
    padding: 0;
  }
  .contacts__col + .contacts__col {
    padding-top: 32px;
    border-top: 1px solid var(--contacts-border-soft);
  }
  .contacts__col--people {
    grid-column: auto;
    padding-top: 32px;
  }
  .contacts__col--people .contacts__body--people {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .contacts__col--people .contacts__person + .contacts__person {
    padding-top: 24px;
    border-top: 1px solid var(--contacts-border-soft);
  }
  .contacts__head {
    gap: 12px;
    margin-bottom: 20px;
  }
  .contacts__icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }
  .contacts__icon > svg {
    width: 20px;
    height: 20px;
  }
  .contacts__title {
    font-size: 1.2rem;
  }
  .contacts__company {
    font-size: 1.75rem;
  }
  .contacts__addr {
    font-size: 1.5rem;
  }
  .contacts__avatar {
    width: 52px;
    height: 52px;
    font-size: 1.75rem;
  }
  .contacts__person {
    gap: 16px;
  }
  .contacts__person-name {
    font-size: 1.65rem;
    margin-bottom: 8px;
  }
  .contacts__person-role {
    font-size: 1.2rem;
    margin-bottom: 16px;
    padding: 3px 8px;
  }
  /* On narrow phones stack the two contact rows under each other. */
  .contacts__person-links {
    flex-direction: column;
    gap: 10px;
  }
}

/* Extra small (≤420px): shrink paddings further */
@media (max-width: 420px) {
  .contacts__inner {
    padding: 40px 18px 28px;
  }
  .contacts__map-link {
    width: auto;
    justify-content: flex-start;
  }
}
