/*
Theme Name: Topenari MSK
Theme URI: https://topenarimsk.cz/
Author: Topenari MSK
Description: Firemni WordPress sablona pro instalace, servis a opravy kotlu.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: topenari-msk
*/

:root {
  --tm-navy: #002d50;
  --tm-navy-dark: #002443;
  --tm-blue: #0058b8;
  --tm-red: #e30613;
  --tm-yellow: #f2b500;
  --tm-green: #418e49;
  --tm-text: #071a35;
  --tm-muted: #4d5c70;
  --tm-border: #dbe2ea;
  --tm-bg: #ffffff;
  --tm-soft: #f5f7fa;
  --tm-shadow: 0 8px 22px rgba(0, 29, 58, 0.12);
  --tm-radius: 3px;
  --tm-container: 1180px;
  --tm-font: "Inter", "Arial", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--tm-bg);
  color: var(--tm-text);
  font-family: var(--tm-font);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.tm-container {
  width: min(var(--tm-container), calc(100% - 48px));
  margin: 0 auto;
}

.tm-topbar {
  background: var(--tm-navy-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.tm-topbar__inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tm-topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tm-topbar__item i {
  color: var(--tm-red);
  font-size: 17px;
}

.tm-header {
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  position: relative;
  z-index: 5;
}

.tm-header__inner {
  min-height: 88px;
  display: grid;
  grid-template-columns: 220px 1fr 250px;
  align-items: center;
  gap: 28px;
}

.tm-logo img {
  width: 185px;
}

.tm-menu-toggle {
  display: none;
}

.tm-nav {
  display: flex;
  justify-content: center;
}

.tm-menu,
.tm-menu ul {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tm-menu a {
  color: #071a35;
  font-size: 15px;
  font-weight: 800;
  line-height: 88px;
  position: relative;
  white-space: nowrap;
}

.tm-menu .current-menu-item > a,
.tm-menu .tm-menu-item-active > a,
.tm-menu a:hover,
.tm-menu a:focus {
  color: var(--tm-red);
}

.tm-menu .current-menu-item > a::after,
.tm-menu .tm-menu-item-active > a::after,
.tm-menu a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 3px;
  background: var(--tm-red);
}

.tm-nav-enhanced .tm-menu .current-menu-item:not(.tm-menu-item-active) > a,
.tm-nav-enhanced .tm-menu .current_page_item:not(.tm-menu-item-active) > a {
  color: #071a35;
}

.tm-nav-enhanced .tm-menu .current-menu-item:not(.tm-menu-item-active) > a::after,
.tm-nav-enhanced .tm-menu .current_page_item:not(.tm-menu-item-active) > a::after {
  display: none;
}

.tm-menu .menu-item-has-children > a::before {
  content: "\f107";
  margin-left: 8px;
  color: #071a35;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  float: right;
}

.tm-phone {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 14px;
  color: var(--tm-red);
}

.tm-phone i {
  font-size: 36px;
}

.tm-phone strong {
  display: block;
  font-size: 25px;
  line-height: 1.05;
  white-space: nowrap;
}

.tm-phone span {
  display: block;
  margin-top: 3px;
  color: #071a35;
  font-size: 13px;
  font-weight: 800;
}

.tm-hero {
  min-height: 460px;
  position: relative;
  overflow: hidden;
  background: var(--tm-navy);
}

.tm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  background: var(--hero-image) center right / cover no-repeat;
  z-index: 0;
}

.tm-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 45, 80, 0.9) 0%, rgba(0, 45, 80, 0.7) 32%, rgba(0, 45, 80, 0.2) 58%, rgba(0, 45, 80, 0) 78%);
  z-index: 1;
  pointer-events: none;
}

.tm-hero__content {
  position: relative;
  z-index: 2;
  width: min(650px, 58%);
  padding: 70px 0 62px;
  color: #fff;
}

.tm-hero__tags {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tm-hero__tags span:nth-of-type(1) {
  color: #006bd3;
}

.tm-hero__tags span:nth-of-type(2) {
  color: var(--tm-red);
}

.tm-hero__tags span:nth-of-type(3) {
  color: var(--tm-yellow);
}

.tm-hero h1 {
  margin: 0;
  max-width: 590px;
  font-size: 54px;
  line-height: 1.1;
  font-weight: 900;
}

.tm-hero__lead {
  margin: 16px 0 28px;
  max-width: 540px;
  font-size: 21px;
  line-height: 1.45;
  font-weight: 500;
}

.tm-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.tm-checks li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 900;
}

.tm-checks i {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--tm-navy);
  font-size: 10px;
}

.tm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.tm-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--tm-radius);
  padding: 0 30px;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tm-button--red {
  background: var(--tm-red);
  color: #fff;
}

.tm-button--red:hover,
.tm-button--red:focus {
  background: #c9000b;
}

.tm-button--outline {
  border-color: rgba(255, 255, 255, 0.65);
  color: #fff;
  background: rgba(0, 29, 58, 0.15);
}

.tm-section-title {
  margin: 0 0 34px;
  color: var(--tm-text);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  text-align: center;
  position: relative;
}

.tm-section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 42px;
  height: 3px;
  background: var(--tm-red);
  transform: translateX(-50%);
}

.tm-services {
  padding: 42px 0 34px;
  background: #fff;
}

.tm-services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tm-service {
  min-height: 162px;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 18px;
  border: 1px solid var(--tm-border);
  border-radius: 3px;
  padding: 24px 22px 18px;
  background: #fff;
}

.tm-service__icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 32px;
  box-shadow: 0 8px 14px rgba(0, 45, 80, 0.12);
}

.tm-service h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
}

.tm-service p {
  margin: 0;
  color: #071a35;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  white-space: pre-line;
}

.tm-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tm-blue);
  font-size: 14px;
  font-weight: 900;
}

.tm-benefits {
  background: var(--tm-navy);
  color: #fff;
}

.tm-benefits__grid {
  min-height: 124px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
}

.tm-benefit {
  min-height: 72px;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 18px;
  padding: 0 34px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.tm-benefit p {
  margin: 0;
}

.tm-benefit:first-child {
  padding-left: 0;
}

.tm-benefit:last-child {
  border-right: 0;
  padding-right: 0;
}

.tm-benefit i {
  font-size: 44px;
}

.tm-benefit strong {
  display: block;
  font-size: 17px;
  line-height: 1.1;
}

.tm-benefit span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.tm-proof {
  padding: 38px 0 34px;
  background: #fff;
}

.tm-proof__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 44px;
}

.tm-proof h2 {
  margin: 0 0 24px;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
  position: relative;
}

.tm-proof h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -11px;
  width: 40px;
  height: 3px;
  background: var(--tm-red);
}

.tm-projects {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.tm-projects a,
.tm-gallery-grid a {
  display: block;
}

.tm-projects img {
  width: 100%;
  aspect-ratio: 103 / 110;
  object-fit: cover;
  border: 1px solid #d9d9d9;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tm-projects a:hover img,
.tm-projects a:focus img,
.tm-gallery-grid a:hover img,
.tm-gallery-grid a:focus img {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 29, 58, 0.18);
}

.tm-projects__button {
  margin-top: 18px;
  text-align: center;
}

.tm-small-button {
  min-width: 240px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--tm-blue);
  border-radius: 2px;
  color: var(--tm-blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tm-brands {
  padding-left: 44px;
  border-left: 1px solid var(--tm-border);
}

.tm-brands img {
  width: 290px;
  margin: 32px auto 0;
}

.tm-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 28px auto 0;
  width: fit-content;
  max-width: 290px;
  color: var(--tm-red);
}

.tm-brand-logo img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  margin: 0;
}

.tm-brand-logo span {
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.tm-process {
  padding: 42px 0 46px;
  border-top: 1px solid var(--tm-border);
  background: #fff;
}

.tm-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: relative;
  margin-top: 20px;
}

.tm-steps::before {
  content: "";
  position: absolute;
  top: 29px;
  left: 110px;
  right: 110px;
  border-top: 1px dotted #9bb5d1;
}

.tm-step {
  position: relative;
  text-align: center;
  padding: 0 14px;
}

.tm-step__num {
  font-size: 30px!important;
  color: #fff!important;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tm-blue);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

.tm-step i {
  display: block;
  margin: 14px 0 8px;
  color: var(--tm-blue);
  font-size: 26px;
}

.tm-step strong {
  display: block;
  font-size: 15px;
  line-height: 1.15;
}

.tm-step span {
  display: block;
  margin-top: 7px;
  color: var(--tm-muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.tm-reviews {
  padding: 34px 0 24px;
  background: var(--tm-navy);
  color: #fff;
  overflow: hidden;
}

.tm-reviews .tm-section-title {
  color: #fff;
  margin-bottom: 34px;
}

.tm-reviews__wrap {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 18px;
}

.tm-review-arrow {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 34px;
  opacity: 0.9;
  text-align: center;
  cursor: pointer;
  padding: 8px;
}

.tm-review-grid {
  display: flex;
  gap: 36px;
  overflow: hidden;
}

.tm-review-grid .tm-review {
  flex: 0 0 calc((100% - 72px) / 3);
  transition: order 0.25s ease;
}

.tm-review {
  min-height: 136px;
  padding: 24px 28px 20px;
  border-radius: 3px;
  background: #fff;
  color: var(--tm-text);
  text-align: center;
  box-shadow: var(--tm-shadow);
}

.tm-stars {
  margin-bottom: 10px;
  color: var(--tm-red);
  font-size: 18px;
  letter-spacing: 3px;
}

.tm-review p {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}

.tm-review strong {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 900;
}

.tm-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.tm-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.85;
}

.tm-dot:first-child {
  background: #fff;
  opacity: 0.85;
}

.tm-dot.is-active {
  background: var(--tm-red);
  opacity: 1;
}

.tm-cta {
  background: var(--tm-red);
  color: #fff;
}

.tm-cta__inner {
  min-height: 104px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 36px;
  padding: 24px 0;
}

.tm-cta h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 900;
}

.tm-cta p {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.tm-cta__phone {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 30px;
  font-weight: 900;
  white-space: nowrap;
}

.tm-cta__button {
  min-width: 178px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: #fff;
  color: var(--tm-red);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.tm-footer {
  background: var(--tm-navy);
  color: #fff;
  font-size: 13px;
}

.tm-footer__inner {
  min-height: 180px;
  display: grid;
  grid-template-columns: 260px 1fr 1fr;
  gap: 74px;
  align-items: start;
  padding-top: 28px;
}

.tm-footer__brand img {
  width: 180px;
  margin-bottom: 8px;
}

.tm-footer__brand p,
.tm-footer p {
  margin: 0;
  line-height: 1.35;
}

.tm-footer h3 {
  margin: 9px 0 8px;
  font-size: 14px;
  line-height: 1.2;
}

.tm-footer a {
  color: #fff;
}

.tm-footer__contacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 40px;
  row-gap: 0;
}

.tm-footer__contacts h3 {
  grid-column: 1 / -1;
}

.tm-footer__contacts p,
.tm-footer__hours p {
  margin-bottom: 3px;
}

.tm-footer__hours strong {
  color: var(--tm-red);
}

.tm-social {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 24px;
}

.tm-copy {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.tm-page-hero {
  padding: 70px 0;
  background: var(--tm-navy);
  color: #fff;
}

.tm-page-hero h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.1;
  font-weight: 900;
}

.tm-gallery-page {
  padding: 58px 0 70px;
  background: #fff;
}

.tm-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tm-gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--tm-border);
  box-shadow: var(--tm-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tm-lightbox-open {
  overflow: hidden;
}

.tm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 44px 80px;
  background: rgba(0, 18, 35, 0.88);
}

.tm-lightbox.is-open {
  display: flex;
}

.tm-lightbox__image {
  max-width: min(1100px, 100%);
  max-height: calc(100vh - 88px);
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.tm-lightbox__close,
.tm-lightbox__nav {
  position: absolute;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.tm-lightbox__close {
  top: 18px;
  right: 24px;
  font-size: 46px;
  line-height: 1;
}

.tm-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 34px;
  padding: 20px;
}

.tm-lightbox__nav--prev {
  left: 18px;
}

.tm-lightbox__nav--next {
  right: 18px;
}

@media (max-width: 900px) {
  .tm-container {
    width: min(100% - 32px, var(--tm-container));
  }

  .tm-topbar__inner,
  .tm-header__inner,
  .tm-cta__inner,
  .tm-footer__inner {
    grid-template-columns: 1fr;
  }

  .tm-topbar__inner {
    min-height: auto;
    padding: 8px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .tm-header__inner {
    min-height: auto;
    grid-template-columns: 1fr auto;
    padding: 12px 0;
    gap: 12px;
    position: relative;
  }

  .tm-logo {
    grid-column: 1;
    grid-row: 1;
  }

  .tm-menu-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    display: inline-grid;
    width: 48px;
    height: 44px;
    place-content: center;
    gap: 4px;
    border: 1px solid var(--tm-red);
    border-radius: 4px;
    background: var(--tm-red);
    color: #fff;
    cursor: pointer;
  }

  .tm-menu-toggle span {
    width: 22px;
    height: 2px;
    display: block;
    background: currentColor;
  }

  .tm-menu-toggle strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .tm-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: none;
    width: 100%;
    justify-content: flex-start;
    padding: 8px 0 4px;
    border-top: 1px solid var(--tm-border);
  }

  .tm-menu-open .tm-nav {
    display: block;
  }

  .tm-menu,
  .tm-menu ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .tm-menu a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--tm-border);
    line-height: 1.2;
    white-space: normal;
  }

  .tm-menu .current-menu-item > a::after,
  .tm-menu .tm-menu-item-active > a::after,
  .tm-menu a:hover::after {
    display: none;
  }

  .tm-phone {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
  }

  .tm-hero::before {
    width: 100%;
    opacity: 0.65;
  }

  .tm-hero::after {
    background: rgba(0, 45, 80, 0.78);
  }

  .tm-hero__content {
    width: 100%;
    padding: 36px 0 28px;
  }

  .tm-hero h1 {
    font-size: clamp(30px, 8vw, 36px);
    max-width: min(100%, 320px);
  }

  .tm-hero__lead {
    max-width: min(100%, 340px);
  }

  .tm-services__grid,
  .tm-benefits__grid,
  .tm-proof__grid,
  .tm-footer__contacts {
    grid-template-columns: 1fr;
  }

  .tm-review-grid .tm-review {
    flex-basis: 100%;
  }

  .tm-benefit {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px 0;
  }

  .tm-benefit:last-child {
    border-bottom: 0;
  }

  .tm-proof__grid {
    gap: 24px;
  }

  .tm-brands {
    padding-left: 0;
    border-left: 0;
  }

  .tm-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tm-steps::before {
    display: none;
  }

  .tm-projects {
    grid-template-columns: repeat(2, 1fr);
  }

  .tm-gallery-grid {
    grid-template-columns: 1fr;
  }

  .tm-cta__inner {
    gap: 10px;
    padding: 14px 0;
  }

  .tm-footer__inner {
    gap: 18px;
    padding-bottom: 16px;
  }

  .tm-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 9px 0;
  }
}

@media (max-width: 520px) {
  .tm-hero__tags {
    font-size: 15px;
  }

  .tm-checks,
  .tm-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .tm-button {
    width: 100%;
  }

  .tm-service {
    grid-template-columns: 48px 1fr;
    padding: 12px;
  }

  .tm-service__icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .tm-projects {
    grid-template-columns: 1fr;
  }

  .tm-reviews__wrap {
    grid-template-columns: 36px 1fr 36px;
  }

  .tm-review-arrow {
    display: block;
  }

  .tm-lightbox {
    padding: 40px 16px;
  }

  .tm-lightbox__nav {
    display: none;
  }
}
