/*
Theme Name: РемонтПочем
Theme URI: https://remontpochem.ru/
Author: РемонтПочем
Description: Лёгкая тема WordPress для сервиса независимой проверки и расчёта смет.
Version: 1.4.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: remontpochem
*/

:root {
  --navy: #07183f;
  --navy-2: #10265c;
  --indigo: #4e46ff;
  --indigo-2: #6f61ff;
  --mint: #2fd9b1;
  --mint-soft: #eafbf6;
  --blue-soft: #f2f4ff;
  --ink: #0b1739;
  --muted: #66708c;
  --line: #e5e8f2;
  --white: #fff;
  --danger: #ef5e72;
  --warn: #ffbf43;
  --shadow: 0 24px 80px rgba(22, 36, 92, .12);
  --shadow-soft: 0 14px 42px rgba(22, 36, 92, .08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "DejaVu Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1376px, calc(100% - 96px));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 100000;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  margin: 0;
  overflow: visible;
  clip: auto;
  color: #fff;
  background: var(--navy);
  border-radius: 10px;
  white-space: normal;
}

:focus-visible {
  outline: 3px solid rgba(78, 70, 255, .45);
  outline-offset: 3px;
}

.site-header {
  position: relative;
  z-index: 100;
  min-height: 84px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(229, 232, 242, .8);
  background: rgba(255, 255, 255, .96);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link,
.custom-logo-link {
  flex: 0 0 auto;
  display: block;
}

.logo,
.custom-logo {
  width: 230px;
  height: 54px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #394461;
  font-size: 15px;
  font-weight: 600;
}

.nav a {
  white-space: nowrap;
  transition: color .2s ease;
}

.nav a:hover {
  color: var(--indigo);
}

.mobile-nav-actions {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #dfe3ef;
  border-radius: 12px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle-line {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform .2s ease, opacity .2s ease;
}

.site-header.is-menu-open .menu-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-menu-open .menu-toggle-line:nth-child(2) {
  opacity: 0;
}

.site-header.is-menu-open .menu-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.btn {
  min-height: 54px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.01em;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  min-height: 42px;
  padding: 0 19px;
  border-radius: 12px;
  font-size: 14px;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--indigo), #5d54ff);
  box-shadow: 0 12px 26px rgba(78, 70, 255, .22);
}

.btn-primary:hover {
  box-shadow: 0 16px 32px rgba(78, 70, 255, .3);
}

.btn-secondary {
  background: white;
  border-color: #dfe3ef;
  color: var(--navy);
}

.btn-ghost {
  background: #f5f6fb;
  color: #37415e;
}

.btn-mint {
  color: #063d35;
  background: linear-gradient(135deg, #52e2c0, #2fd9b1);
  box-shadow: 0 12px 26px rgba(47, 217, 177, .22);
}

.arrow {
  font-size: 20px;
  margin-top: -1px;
}

.site-footer {
  background: #071532;
  color: #b8c0d5;
  padding: 46px 0 34px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 35px;
  padding-bottom: 31px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.footer-logo-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 8px 11px;
  width: 245px;
  height: 63px;
  display: flex;
  align-items: center;
}

.footer-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 28px;
  font-size: 12px;
}

.footer-links a:hover,
.footer-cookie-settings:hover {
  color: #fff;
}

.footer-cookie-settings {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
}

.cookie-banner {
  position: fixed;
  z-index: 10000;
  right: 24px;
  bottom: 24px;
  width: min(620px, calc(100% - 48px));
  padding: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(78, 70, 255, .16);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(7, 24, 63, .2);
  backdrop-filter: blur(16px);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.cookie-banner-copy strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 17px;
}

.cookie-banner-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.cookie-banner-copy a {
  color: var(--indigo);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cookie-button:hover {
  transform: translateY(-1px);
}

.cookie-button-secondary {
  color: #394461;
  background: #f5f6fb;
  border-color: var(--line);
}

.cookie-button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-2));
  box-shadow: 0 10px 24px rgba(78, 70, 255, .22);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 25px;
  font-size: 10px;
  line-height: 1.6;
  color: #7785a4;
}

.inner-main {
  min-height: 60vh;
  padding: 72px 0 100px;
  background: linear-gradient(180deg, #fbfcff 0, #fff 220px);
}

.content-shell {
  max-width: 900px;
  margin: 0 auto;
}

.entry-header {
  margin-bottom: 36px;
}

.entry-title {
  margin: 0;
  color: var(--navy);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: -.04em;
}

.entry-content {
  color: #4e5873;
  font-size: 17px;
  line-height: 1.72;
}

.entry-content h2,
.entry-content h3 {
  color: var(--navy);
  line-height: 1.25;
}

.entry-content a:not(.btn) {
  color: var(--indigo);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content img {
  border-radius: 18px;
}

.post-card {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.post-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

@media (max-width: 1180px) {
  .nav {
    gap: 20px;
  }

  .logo,
  .custom-logo {
    width: 215px;
  }
}

@media (max-width: 1000px) {
  .container {
    width: min(92%, 900px);
  }

  .site-header {
    min-height: 78px;
  }

  .logo,
  .custom-logo {
    width: 205px;
    height: 50px;
  }

  .menu-toggle {
    display: flex;
    order: 3;
  }

  .nav {
    position: absolute;
    top: calc(100% + 13px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    color: var(--navy);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .nav a {
    padding: 14px 12px;
    border-radius: 10px;
  }

  .nav a:hover {
    background: #f5f6fb;
  }

  .site-header.is-menu-open .nav {
    display: flex;
  }

  .footer-links {
    display: none;
  }
}

@media (max-width: 700px) {
  .container {
    width: calc(100% - 38px);
  }

  .site-header {
    min-height: 70px;
  }

  .header-inner {
    gap: 12px;
  }

  .logo,
  .custom-logo {
    width: 174px;
    height: 44px;
  }

  .nav-actions {
    display: none;
  }

  .mobile-nav-actions {
    display: block;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid var(--line);
  }

  .mobile-nav-actions .btn {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
  }

  .footer-top {
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .cookie-banner {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 18px;
    border-radius: 17px;
  }

  .cookie-banner-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cookie-banner-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cookie-button {
    width: 100%;
  }

  .inner-main {
    padding: 56px 0 76px;
  }
}

@media (max-width: 420px) {
  .container {
    width: calc(100% - 34px);
  }

  .logo,
  .custom-logo {
    width: 158px;
  }

  .footer-logo-wrap {
    width: 210px;
  }

  .cookie-banner-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
