/* ===== V6: Ritualhelp-style — темний хедер/футер, чітка структура, професійний тон ===== */
/* За зразком https://ritualhelp.com.ua/ */

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img, picture, video { display: block; max-width: 100%; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

:root {
  --font-heading: 'Open Sans', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --color-bg: #f8f9fa;
  --color-bg-alt: #fff;
  --color-bg-card: #fff;
  --color-accent: #2c6b5e;
  --color-accent-hover: #1e5249;
  --color-text: #333;
  --color-text-muted: #555;
  --color-cta-bg: #2c6b5e;
  --color-cta-bg-hover: #1e5249;
  --color-white: #fff;
  --color-header-footer: #2d2d2d;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --header-height: 4rem;
  --container: min(92%, 1100px);
  --hero-overlay: rgba(0, 0, 0, 0.5);
}

.container {
  width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* ===== Header — темний, як на ritualhelp ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-header-footer);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color-white);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.header__logo:hover {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
}

.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-white);
}

.header__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.header__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header__menu { display: flex; gap: 1.75rem; }
.header__menu a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.95rem;
}
.header__menu a:hover {
  color: var(--color-white);
}

@media (max-width: 768px) {
  .header__burger { display: flex; }
  .header__nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-header-footer);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
  }
  .header__nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .header__menu { flex-direction: column; gap: 0.5rem; }
  .header__menu a { display: block; padding: 0.75rem; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}

.btn--primary {
  background: var(--color-cta-bg);
  color: var(--color-white);
  text-decoration: none;
}

.btn--primary:hover {
  background: var(--color-cta-bg-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ===== Hero — як на ritualhelp: підзаголовок, великий H1, телефон, CTA ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 2rem) 1.5rem 2rem;
  text-align: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../formImageSingleHouses.jpg');
  background-size: cover;
  background-position: center 30%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  display: block;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 1.25rem;
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero__phone {
  display: inline-block;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 1.5rem;
  text-decoration: none;
}

.hero__phone:hover {
  text-decoration: underline;
  color: var(--color-white);
}

.hero__cta {
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Секційні переходи — м'які градієнти ===== */
.section-divider {
  height: 0;
  width: 100%;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.section-divider--from-hero {
  height: 4rem;
  border: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(248, 249, 250, 0.6) 40%,
    var(--color-bg) 100%
  );
}

.section-divider--alt-to-default {
  height: 3rem;
  border: none;
  background: linear-gradient(
    180deg,
    var(--color-bg-alt) 0%,
    rgba(248, 249, 250, 0.7) 50%,
    var(--color-bg) 100%
  );
}

.section-divider--default-to-alt {
  height: 3rem;
  border: none;
  background: linear-gradient(
    180deg,
    var(--color-bg) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    var(--color-bg-alt) 100%
  );
}

/* ===== Sections ===== */
.section {
  padding: 3.5rem 0;
  background: var(--color-bg);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--with-bg {
  position: relative;
  overflow: hidden;
}

.section--with-bg .container {
  position: relative;
  z-index: 1;
}

.section--with-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  pointer-events: none;
}

.section--with-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0.5;
  background: linear-gradient(
    180deg,
    var(--color-bg) 0%,
    var(--color-bg) 8%,
    rgba(248, 249, 250, 0.4) 22%,
    transparent 40%,
    transparent 60%,
    rgba(248, 249, 250, 0.4) 78%,
    var(--color-bg) 92%,
    var(--color-bg) 100%
  );
  pointer-events: none;
}

.section--with-bg.section--alt::after {
  background: linear-gradient(
    180deg,
    var(--color-bg-alt) 0%,
    var(--color-bg-alt) 8%,
    rgba(255, 255, 255, 0.35) 22%,
    transparent 40%,
    transparent 60%,
    rgba(255, 255, 255, 0.35) 78%,
    var(--color-bg-alt) 92%,
    var(--color-bg-alt) 100%
  );
  pointer-events: none;
}

.section--about-bg::before {
  background-image: url('https://images.unsplash.com/photo-1490750967868-88aa4486c946?w=1920&q=80');
}

.section--services-bg::before {
  background-image: url('https://images.unsplash.com/photo-1528605248644-14dd04022da1?w=1920&q=80');
}

.section--care-bg::before {
  background-image: url('https://images.unsplash.com/photo-1513694203232-719a280e022f?w=1920&q=80');
}

.section--conditions-with-image {
  position: relative;
  overflow: hidden;
}

.section--conditions-with-image::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('https://images.unsplash.com/photo-1586023492125-27b2c045efd7?w=1920&q=80');
  background-size: cover;
  background-position: center center;
  opacity: 0.12;
  pointer-events: none;
}

.section--conditions-with-image::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0.5;
  background: linear-gradient(
    180deg,
    var(--color-bg-alt) 0%,
    var(--color-bg-alt) 10%,
    rgba(255, 255, 255, 0.3) 25%,
    transparent 45%,
    transparent 55%,
    rgba(255, 255, 255, 0.3) 75%,
    var(--color-bg-alt) 90%,
    var(--color-bg-alt) 100%
  );
  pointer-events: none;
}

.section--conditions-with-image .container {
  position: relative;
  z-index: 1;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.section__title--light {
  color: var(--color-white);
}

.section__intro {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
  max-width: 60ch;
}

.section__intro--light {
  color: rgba(255, 255, 255, 0.9);
  margin-left: auto;
  margin-right: auto;
}

.section__outro {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

.prose { max-width: 65ch; }
.prose p { margin-bottom: 1rem; }
.prose p:last-child { margin-bottom: 0; }

.prose .highlight {
  font-weight: 500;
  color: var(--color-text);
  padding: 1rem 1.25rem;
  background: rgba(44, 107, 94, 0.08);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ===== Cards — сітка, мінімум декора, як ritualhelp ===== */
.cards {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .cards:not(.cards--compact) { grid-template-columns: repeat(2, 1fr); }
  .cards--compact { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--color-bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(44, 107, 94, 0.2);
}

.card__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(44, 107, 94, 0.1);
  color: var(--color-accent);
  border-radius: var(--radius);
  font-size: 1.2rem;
  margin-bottom: 0.9rem;
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.card__text {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.card--compact .card__text {
  font-size: 0.9rem;
}

/* ===== Contact — темна секція, форма + карта як на ritualhelp ===== */
.section--cta {
  background: var(--color-header-footer);
  color: var(--color-white);
  text-align: center;
  padding: 3.5rem 0;
}

.contact-block {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  align-items: center;
}

.contact-block__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  color: var(--color-white);
}

.contact-block__item i { font-size: 1.2rem; }

.contact-block__item--note,
.contact-block__item--address {
  width: 100%;
  justify-content: center;
  font-size: 0.95rem;
  opacity: 0.9;
}

.contact-block a:hover {
  text-decoration: underline;
  color: var(--color-white);
}

.contact-block__phone {
  font-weight: 600;
  font-size: 1.15rem;
}

.contact-layout {
  margin-top: 2rem;
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    text-align: left;
  }
  .theme-v6 .contact-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-form__title,
.contact-map__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.contact-form-wrap {
  background: rgba(255, 255, 255, 0.97);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-form__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 0.25rem;
}

.contact-form__label:first-child { margin-top: 0; }

.contact-form__input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form__input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}

.contact-form__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(44, 107, 94, 0.15);
}

.contact-form__textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form__submit {
  margin-top: 0.5rem;
  align-self: flex-start;
}

.contact-map__frame-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.contact-map__iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-map__hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Footer — темний, як ritualhelp ===== */
.footer {
  padding: 2rem 0;
  background: var(--color-header-footer);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer__nav { display: flex; gap: 1.25rem; }
.footer__nav a { color: rgba(255, 255, 255, 0.85); }
.footer__nav a:hover { color: var(--color-white); }

.footer__versions {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

.footer__versions a { color: rgba(255, 255, 255, 0.9); }
.footer__versions a:hover { color: var(--color-white); }

.footer__credit {
  font-size: 0.8rem;
  opacity: 0.7;
}

.footer__credit a { color: rgba(255, 255, 255, 0.9); }

/* ===== Focus ===== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn--primary:hover { transform: none; }
}
