/* ============================================================
   Premium polish layer — skad-m.ru
   Cosmetic-only overrides on top of Contio theme. No layout/
   structural changes: shadows, spacing, motion, typography,
   color refinement, hover states.
   ============================================================ */

:root {
  --brand-accent-start: #f55301;
  --brand-accent-end: #ff9f00;
  /* Single source of truth for the brand gradient: a soft 135deg diagonal
     instead of the theme's flat 90deg / mirrored 3-stop gradients, which
     read as a dated ~2016 "flat UI" trend. */
  --brand-gradient: linear-gradient(135deg, var(--brand-accent-start) 0%, var(--brand-accent-end) 100%);
  --ink: #232323;
  --ink-soft: #4a4a4a;
  --radius-md: 12px;
  --radius-lg: 20px;
  /* Neutral shadows for structural elements (header, inputs) */
  --shadow-sm: 0 2px 10px rgba(20, 20, 20, 0.06);
  --shadow-md: 0 12px 30px rgba(20, 20, 20, 0.10);
  --shadow-lg: 0 24px 48px -12px rgba(20, 20, 20, 0.18);
  /* Warm, brand-tinted glow shadows for CTAs/cards — replaces plain grey
     drop-shadows with the soft colored-shadow look common in current UI. */
  --shadow-glow-sm: 0 6px 18px -4px rgba(245, 83, 1, 0.28);
  --shadow-glow-md: 0 16px 36px -8px rgba(245, 83, 1, 0.32);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; }

/* ---------- Typography ---------- */
body {
  color: var(--ink-soft);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  letter-spacing: -0.01em;
}
p { line-height: 1.75; }

::selection {
  background: var(--brand-accent-start);
  color: #fff;
}

/* Accessible, on-brand focus ring instead of the default blue */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand-accent-end);
  outline-offset: 2px;
}

/* ---------- Header simplification ---------- */
/* The header currently stacks three rows (hours/social bar, phone+logo+
   address, then the actual nav menu) — busy for what's essentially just
   "logo + menu + contact". Drop the redundant top bar on desktop (the
   phone number already appears prominently one row down) and tighten
   the remaining row so the header reads as one clean, compact bar. */
@media (min-width: 992px) {
  #ct-header-wrap #ct-header-top {
    display: none;
  }
}
#ct-header-wrap .ct-header-call i,
#ct-header-wrap .ct-header-address i {
  font-size: 22px;
  margin-right: 10px;
}
#ct-header-wrap .ct-header-call .h-item-meta label,
#ct-header-wrap .ct-header-address .h-item-meta label {
  border-bottom: none;
}
#ct-header-wrap .ct-header-call,
#ct-header-wrap .ct-header-address {
  margin: 0 10px;
}

/* ---------- Header ---------- */
.ct-header-layout1 {
  transition: box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}
.ct-header-layout1.is-sticky {
  box-shadow: var(--shadow-md);
  backdrop-filter: saturate(150%) blur(8px);
}
.ct-main-menu > li > a {
  transition: color 0.25s var(--ease);
  position: relative;
}
.ct-main-menu > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--brand-gradient);
  transition: width 0.3s var(--ease);
}
.ct-main-menu > li:hover > a::after,
.ct-main-menu > li.current-menu-item > a::after {
  width: 100%;
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
  will-change: transform;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-sm);
}
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Retire the theme's legacy vendor-prefixed, mirrored 3-stop gradient
   bezel (linear-gradient(90deg,#c0c1c0 0%,#fff 50%,#c0c1c0) with a dead
   IE `filter: progid:DXImageTransform...`) in favor of a clean modern
   fill. This button appears on BOTH a white bar (header nav) and a dark
   section (brochure CTA banner) — a transparent/faint-border treatment
   disappears on one or the other, so it needs a fill that reads on any
   background: solid white + shadow works as a floating pill on white
   and as a high-contrast light button on dark. */
.btn.btn-gray {
  background: #ffffff;
  border: 1.5px solid rgba(35, 35, 35, 0.12);
  color: #1e1e1e !important;
  box-shadow: var(--shadow-sm);
}
.btn.btn-gray:before,
.btn.btn-gray:after {
  display: none !important;
}
.btn.btn-gray:hover,
.btn.btn-gray:focus {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff !important;
  box-shadow: var(--shadow-glow-sm);
}

/* ---------- Cards: services / portfolio / general grid items ---------- */
.grid-item-inner {
  border-radius: var(--radius-lg);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.grid-item-inner:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

/* ---------- Images ---------- */
.ct-media-wrap img,
.grid-item-inner img,
.wp-post-image {
  border-radius: var(--radius-md);
  transition: transform 0.5s var(--ease);
}
.ct-media-wrap { overflow: hidden; border-radius: var(--radius-md); }
.ct-media-wrap:hover img,
.grid-item-inner:hover .ct-media-wrap img {
  transform: scale(1.06);
}

/* ---------- Forms ---------- */
.ct-contact-form-inner input[type="text"],
.ct-contact-form-inner input[type="email"],
.ct-contact-form-inner input[type="tel"],
.ct-contact-form-inner textarea,
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  border-radius: var(--radius-md) !important;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.ct-contact-form-inner input:focus,
.ct-contact-form-inner textarea:focus,
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  border-color: var(--brand-accent-end) !important;
  box-shadow: 0 0 0 3px rgba(255, 159, 0, 0.15) !important;
}

/* ---------- Global gradient modernization ---------- */
/* The theme applies this class across dozens of elements (icons, prices,
   accents) with a flat 90deg gradient. One override here updates all of
   them to the same modern diagonal gradient used everywhere else. */
.text-gradient {
  background-image: var(--brand-gradient);
}

/* ---------- Counters ---------- */
.ct-counter-number {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Primary CTA unification ---------- */
/* The contact-form submit is the single most important conversion button
   on the page; lift it out of generic Bootstrap gray into the brand accent. */
.wpcf7-submit.btn-secondary {
  background: var(--brand-gradient) !important;
  border-color: transparent !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: var(--shadow-glow-sm);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}
.wpcf7-submit.btn-secondary:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-md);
}

/* ---------- Footer service list (new footer column) ---------- */
.footer-services-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.footer-services-list li {
  margin-bottom: 12px;
}
.footer-services-list a {
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
  position: relative;
  padding-left: 0;
}
.footer-services-list a:hover {
  color: var(--brand-accent-end);
  padding-left: 6px;
}

/* ---------- Portfolio/news carousel spacing ---------- */
/* These slick carousels render edge-to-edge with no gap between slides,
   which flattens the card shadows/radius added above. Give them breathing room. */
.ct-portfolio-carousel3 .carousel-item,
.ct-blog-carousel-layout1 .carousel-item {
  padding: 0 10px;
}
.ct-portfolio-carousel3 .ct-carousel-inner,
.ct-blog-carousel-layout1 .ct-carousel-inner {
  margin: 0 -10px;
}

/* ---------- Section labels ("О нас", "Вопросы и ответы", etc.) ---------- */
/* The little dash before these eyebrow labels was a flat solid orange bar;
   bring it in line with the diagonal brand gradient used everywhere else. */
.ct-heading .item--sub-title.style1:before {
  background-color: var(--brand-accent-start);
  background-image: var(--brand-gradient);
}

/* ---------- FAQ accordion ---------- */
/* Sharp square corners + flat gradient + plain black shadow on the open
   item is the same dated pattern already retired elsewhere on the page. */
.ct-accordion.layout1 .ct-accordion-item {
  border-radius: var(--radius-md);
  overflow: hidden;
}
.ct-accordion.layout1 .ct-accordion-item:before {
  background-color: var(--brand-accent-start);
  background-image: var(--brand-gradient);
}
.ct-accordion.layout1 .ct-accordion-item.active {
  box-shadow: var(--shadow-glow-sm);
}

/* ---------- Carousel dot indicators ---------- */
/* Plain grey dots that just scale up on the active slide. Give the active
   dot the brand gradient and morph it into a short pill, matching the
   "expanding indicator" pattern used in current carousel/stepper UI. */
.slick-dots li button {
  transition: all 0.3s var(--ease);
  background-color: #d8d8d8;
}
.slick-dots li.slick-active button {
  transform: scale(1);
  width: 22px;
  border-radius: 4px;
  background-color: var(--brand-accent-start);
  background-image: var(--brand-gradient);
}

/* ---------- Modern scrollbar (WebKit + Firefox) ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--brand-accent-start), var(--brand-accent-end));
  border-radius: 10px;
  border: 2px solid #f1f1f1;
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--brand-accent-start) #f1f1f1;
}

/* ---------- Footer ---------- */
#footer, .ct-footer {
  position: relative;
}
#footer a,
.ct-footer a {
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}
#footer a:hover,
.ct-footer a:hover {
  opacity: 0.85;
}

/* ---------- Motion polish ---------- */
a, .grid-item-inner, .btn, img {
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
