/* Rodnik UI refresh — minimal, compatible improvements
   Goals:
   - Keep the site's original layout and geometry
   - Improve readability and spacing
   - Modernize CF7 fields without changing structure
   - Improve galleries without switching layout engines (no grid/aspect-ratio)
*/

:root {
  --rodnik-brand: #124b89;
  --rodnik-brand-light: #44b4e7;
  --rodnik-ink: #1a2b3c;
  --rodnik-muted: #5c6b7a;
  --rodnik-surface: #ffffff;
  --rodnik-radius: 14px;
  --rodnik-radius-lg: 20px;
  --rodnik-shadow: 0 18px 50px rgba(15, 45, 90, 0.12);
  --rodnik-shadow-soft: 0 8px 24px rgba(15, 45, 90, 0.08);
  --rodnik-btn-radius: 6px;
}

/* ── Unified buttons (site-wide) ─────────────────────── */

a.btn,
input[type="submit"].btn,
.wpcf7 input[type="submit"],
.wpcf7-submit,
#emailSub-widget input[type="submit"],
.comment-form input[type="submit"],
.product-blok a.btn,
.sub-text-blok-left-center .btn,
.sub-text-blok-left .btn,
.news-text .btn {
  border-radius: var(--rodnik-btn-radius) !important;
  font-family: inherit !important;
  font-size: 16px !important;
  line-height: 1.65em !important;
  text-transform: uppercase;
  transition: all 0.2s linear;
}

a.btn:hover,
input[type="submit"].btn:hover,
.wpcf7 input[type="submit"]:hover,
.wpcf7-submit:hover,
#emailSub-widget input[type="submit"]:hover,
.comment-form input[type="submit"]:hover {
  color: #fff;
}

/* ── Hero E: левый блок + чипы, текст у левого края ─── */

.main-img.rodnik-hero--e {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(400px, 52vh, 560px);
  height: auto;
  margin-bottom: 0;
  overflow: hidden;
  text-align: left;
}

.main-img.rodnik-hero--e::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 34, 72, 0.88) 0%, rgba(8, 34, 72, 0.55) 48%, rgba(8, 34, 72, 0.15) 100%);
  z-index: 1;
}

.main-img.rodnik-hero--e .gp-loader {
  display: none;
}

.main-img.rodnik-hero--e .main-img-inside {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(36px, 6vh, 56px) clamp(20px, 4vw, 40px);
  box-sizing: border-box;
}

.main-img.rodnik-hero--e .header-info {
  padding-top: 0 !important;
}

.main-img.rodnik-hero--e .header-info-text {
  width: auto !important;
  max-width: 640px;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.rodnik-hero-e {
  text-align: left;
}

.rodnik-hero-e,
.rodnik-hero--e .rodnik-hero-title,
.rodnik-hero--e .rodnik-hero-subtitle,
.rodnik-hero-chip {
  font-family: inherit;
}

.rodnik-hero--e .rodnik-hero-title,
.main-img.rodnik-hero--e .info-text .line-1 {
  margin: 0 0 14px !important;
  padding: 0 !important;
  font-size: clamp(1.45rem, 3.1vw, 2.1rem) !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #fff !important;
  text-shadow: none;
}

.rodnik-hero--e .rodnik-hero-accent,
.main-img.rodnik-hero--e .rodnik-hero-accent {
  color: #7dd8ff !important;
  font-weight: 800;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  box-decoration-break: unset;
  -webkit-box-decoration-break: unset;
  text-shadow: 0 1px 12px rgba(68, 180, 231, 0.45);
}

.rodnik-hero--e .rodnik-hero-subtitle {
  margin: 0 0 20px !important;
  color: #e6eef7;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.5;
  max-width: 560px;
}

.rodnik-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.rodnik-hero-chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}

.rodnik-hero-cta-row {
  margin: 0;
}

.main-img.rodnik-hero--e .line-5 {
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

.main-img.rodnik-hero--e .line-5 a.btn {
  display: inline-block !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 10px 18px !important;
  border-radius: var(--rodnik-btn-radius) !important;
  font-family: inherit !important;
  font-size: 16px !important;
  line-height: 1.65em !important;
  font-weight: inherit !important;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  transition: all 0.2s linear;
}

.main-img.rodnik-hero--e .line-5 a.btn:hover {
  transform: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

/* ── Forms: reduce “sticking”, modern but conservative ── */

.contact-blok { padding: 34px 0; }

.contact-blok h2 { margin-bottom: 14px !important; }

.contact-blok .cf7-text { margin-bottom: 26px !important; }

.contact-blok-inner {
  padding: 0 24px !important;
}

.contact-blok h2 {
  font-size: 22px !important;
  text-transform: uppercase !important;
  font-weight: 400 !important;
  color: #000 !important;
  text-align: center !important;
  margin-bottom: 12px !important;
}

.contact-blok .cf7-text {
  display: block;
  max-width: 560px;
  margin: 0 auto 24px !important;
  padding: 0 !important;
  color: #000 !important;
  font-style: italic !important;
  font-size: 15px !important;
  line-height: 1.5;
  text-align: center;
}

.contact-blok .wpcf7 {
  max-width: 560px;
  margin: 0 auto !important;
}

.contact-blok .wpcf7-form {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
  align-items: start;
  padding: 0 !important;
}

.contact-blok .wpcf7 p {
  margin-bottom: 0 !important;
  color: var(--rodnik-ink) !important;
  font-weight: 500 !important;
}

.contact-blok .wpcf7-form > p:nth-of-type(1),
.contact-blok .wpcf7-form > p:nth-of-type(2) {
  width: auto !important;
  margin: 0 !important;
}

.contact-blok .wpcf7-form > p:nth-of-type(3),
.contact-blok .wpcf7-form > p:nth-of-type(5),
.contact-blok .wpcf7-form > p:nth-of-type(6) {
  grid-column: 1 / -1;
  width: 100% !important;
}

.contact-blok .wpcf7-form > p:empty {
  display: none !important;
}

.contact-blok .wpcf7-form-control-wrap {
  display: block;
  width: 100% !important;
  margin-bottom: 14px;
}

.contact-blok .wpcf7-form p br { display: none; }

/* ── Shared CF7 fields (soft modernization) ───────────── */

.wpcf7-form-control.wpcf7-text,
.wpcf7-form-control.wpcf7-textarea,
.wpcf7-form-control.wpcf7-tel,
.wpcf7-form-control.wpcf7-email,
.wpcf7-form-control.wpcf7-number,
.wpcf7-form-control.wpcf7-select {
  border-radius: var(--rodnik-btn-radius) !important;
  border: 1px solid #aaa !important;
}

/* Make sure old theme paddings don't create oversized fields */
.wpcf7-form-control.wpcf7-text,
.wpcf7-form-control.wpcf7-tel,
.wpcf7-form-control.wpcf7-email,
.wpcf7-form-control.wpcf7-number,
.wpcf7-form-control.wpcf7-select {
  padding: 11px 12px !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  margin-bottom: 0 !important;
}

.wpcf7-form-control.wpcf7-textarea {
  padding: 11px 12px !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  min-height: 120px;
}

.wpcf7-text:focus,
.wpcf7-textarea:focus,
.wpcf7-tel:focus,
.wpcf7-email:focus,
.wpcf7-form-control:focus {
  outline: none !important;
  border-color: var(--rodnik-brand-light) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(68, 180, 231, 0.2) !important;
}

.wpcf7-textarea { resize: vertical; }

.wpcf7 input[type="submit"],
.wpcf7-submit {
  padding: 10px 18px !important;
  background: var(--rodnik-brand) !important;
  background-color: var(--rodnik-brand) !important;
  color: #fff !important;
  font-weight: 300 !important;
  border: 0 !important;
  cursor: pointer;
}

.wpcf7-form p + p { margin-top: 0 !important; }

.wpcf7-form p { margin-bottom: 12px !important; }

.wpcf7-form label { display: block; }

.wpcf7-acceptance label { font-weight: 400 !important; }

.wpcf7 input[type="submit"]:hover,
.wpcf7-submit:hover {
  background: var(--rodnik-brand-light) !important;
  background-color: var(--rodnik-brand-light) !important;
  color: #fff !important;
  transform: none;
  box-shadow: none;
}

.wpcf7-acceptance .wpcf7-list-item,
.wpcf7-acceptance label {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px !important;
  line-height: 1.45 !important;
  font-weight: 400 !important;
  color: var(--rodnik-muted) !important;
}

.wpcf7-acceptance input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--rodnik-brand);
}

.wpcf7-acceptance a {
  color: var(--rodnik-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wpcf7-response-output {
  border-radius: 10px !important;
  margin-top: 16px !important;
  font-size: 14px !important;
}

.contact-blok .wpcf7-response-output {
  color: var(--rodnik-ink) !important;
  width: 100% !important;
}

/* ── Internal page order forms ─────────────────────────── */

.entry .wpcf7,
.postcont .wpcf7,
.type-page .wpcf7 {
  margin: 36px auto !important;
  scroll-margin-top: 80px;
  max-width: 560px;
  width: 100%;
}

.entry .wpcf7-form,
.postcont .wpcf7-form,
.type-page .wpcf7-form {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
  padding: 28px 24px 22px !important;
  border-radius: 0;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: none;
}

.entry .wpcf7-form > h2,
.entry .wpcf7-form h2,
.postcont .wpcf7-form > h2,
.type-page .wpcf7-form > h2 {
  grid-column: 1 / -1;
  margin: 0 0 10px !important;
  font-size: 22px !important;
  line-height: 1.35 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  font-weight: 400 !important;
  color: #000 !important;
}

.entry .wpcf7-form h2 strong,
.postcont .wpcf7-form h2 strong,
.type-page .wpcf7-form h2 strong {
  color: var(--rodnik-brand);
  font-weight: inherit;
}

.entry .wpcf7-form center,
.postcont .wpcf7-form center,
.type-page .wpcf7-form center {
  grid-column: 1 / -1;
  display: block;
  margin: 0 0 18px !important;
  padding: 0 !important;
  text-align: center !important;
  color: #000;
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
}

/* Flatten Shortcodes Ultimate columns into the grid */
.entry .wpcf7-form .su-row,
.postcont .wpcf7-form .su-row,
.type-page .wpcf7-form .su-row,
.entry .wpcf7-form .su-column,
.postcont .wpcf7-form .su-column,
.type-page .wpcf7-form .su-column,
.entry .wpcf7-form .su-column-inner,
.postcont .wpcf7-form .su-column-inner,
.type-page .wpcf7-form .su-column-inner {
  display: contents !important;
  width: auto !important;
  float: none !important;
  margin: 0 !important;
}

.entry .wpcf7-form .su-column p,
.postcont .wpcf7-form .su-column p,
.type-page .wpcf7-form .su-column p {
  display: contents !important;
  margin: 0 !important;
}

.entry .wpcf7-form p br,
.postcont .wpcf7-form p br,
.type-page .wpcf7-form p br {
  display: none;
}

.entry .wpcf7-form .wpcf7-form-control-wrap,
.postcont .wpcf7-form .wpcf7-form-control-wrap,
.type-page .wpcf7-form .wpcf7-form-control-wrap {
  display: block;
  width: 100% !important;
  margin: 0 !important;
}

.entry .wpcf7-form .wpcf7-form-control-wrap[data-name="your-adres"],
.postcont .wpcf7-form .wpcf7-form-control-wrap[data-name="your-adres"],
.type-page .wpcf7-form .wpcf7-form-control-wrap[data-name="your-adres"],
.entry .wpcf7-form .wpcf7-form-control-wrap[data-name="your-problem"],
.postcont .wpcf7-form .wpcf7-form-control-wrap[data-name="your-problem"],
.type-page .wpcf7-form .wpcf7-form-control-wrap[data-name="your-problem"] {
  grid-column: 1 / -1;
}

.entry .wpcf7-form > p,
.postcont .wpcf7-form > p,
.type-page .wpcf7-form > p {
  grid-column: 1 / -1;
  width: auto !important;
  float: none !important;
  margin: 0 !important;
}

.entry .wpcf7-form .wpcf7-form-control,
.postcont .wpcf7-form .wpcf7-form-control,
.type-page .wpcf7-form .wpcf7-form-control {
  width: 100% !important;
  box-sizing: border-box;
}

.entry .wpcf7-form textarea.wpcf7-textarea,
.postcont .wpcf7-form textarea.wpcf7-textarea,
.type-page .wpcf7-form textarea.wpcf7-textarea {
  min-height: 120px;
}

.entry .wpcf7-form > p:has(.wpcf7-submit),
.postcont .wpcf7-form > p:has(.wpcf7-submit),
.type-page .wpcf7-form > p:has(.wpcf7-submit) {
  text-align: center;
}

.entry .wpcf7-form .wpcf7-submit,
.postcont .wpcf7-form .wpcf7-submit,
.type-page .wpcf7-form .wpcf7-submit {
  width: 160px !important;
  min-width: 0;
  margin: 8px auto 0 !important;
  display: block;
  border-radius: var(--rodnik-btn-radius) !important;
}

.entry input.wpcf7-text,
.postcont input.wpcf7-text,
.type-page input.wpcf7-text,
.entry input.wpcf7-tel,
.postcont input.wpcf7-tel,
.type-page input.wpcf7-tel {
  background: #fff !important;
}

/* ── Galleries: fix broken look without layout overrides ─ */
.entry .gallery img,
.postcont .gallery img,
.type-page .gallery img {
  border-radius: 6px !important;
  box-shadow: 0 8px 18px rgba(15, 45, 90, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.entry .gallery a:hover img,
.postcont .gallery a:hover img,
.type-page .gallery a:hover img {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 45, 90, 0.16);
}

.gallery .gallery-item { padding-bottom: 10px; }

.gallery .gallery-caption { opacity: 0.9; }

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 768px) {
  .contact-blok .wpcf7-form {
    grid-template-columns: 1fr !important;
  }

  .contact-blok .wpcf7-form > p:nth-of-type(1),
  .contact-blok .wpcf7-form > p:nth-of-type(2),
  .contact-blok .wpcf7-form > p:nth-of-type(3),
  .contact-blok .wpcf7-form > p:nth-of-type(5),
  .contact-blok .wpcf7-form > p:nth-of-type(6) {
    grid-column: 1 / -1;
  }

  .main-img.rodnik-hero--e .main-img-inside {
    width: 92%;
    padding: 32px 20px;
  }

  .rodnik-hero--e .rodnik-hero-title,
  .main-img.rodnik-hero--e .info-text .line-1 {
    font-size: 1.28rem !important;
    line-height: 1.25 !important;
    text-transform: none;
  }

  .main-img.rodnik-hero--e .line-5 a.btn {
    font-size: 14px !important;
    padding: 10px 14px !important;
  }

  .rodnik-hero-chip {
    font-size: 12px;
    padding: 5px 10px;
  }
  .contact-blok .wpcf7-form > p:nth-of-type(1),
  .contact-blok .wpcf7-form > p:nth-of-type(2) {
    width: 100% !important;
    margin-right: 0 !important;
  }

  .entry .wpcf7-form,
  .postcont .wpcf7-form,
  .type-page .wpcf7-form {
    grid-template-columns: 1fr !important;
    padding: 18px 16px 14px !important;
  }

  .entry .wpcf7-form .wpcf7-form-control-wrap[data-name="your-name"],
  .postcont .wpcf7-form .wpcf7-form-control-wrap[data-name="your-name"],
  .type-page .wpcf7-form .wpcf7-form-control-wrap[data-name="your-name"],
  .entry .wpcf7-form .wpcf7-form-control-wrap[data-name="your-tel"],
  .postcont .wpcf7-form .wpcf7-form-control-wrap[data-name="your-tel"],
  .type-page .wpcf7-form .wpcf7-form-control-wrap[data-name="your-tel"] {
    grid-column: 1 / -1 !important;
  }

  .entry .wpcf7-form .wpcf7-submit,
  .postcont .wpcf7-form .wpcf7-submit,
  .type-page .wpcf7-form .wpcf7-submit {
    width: 100% !important;
    min-width: 0 !important;
  }
}
