/* ==========================================================================
   Православні послуги в Українському храмі
   Design tokens lifted 1:1 from the original The7 / Elementor build.
   ========================================================================== */

:root {
  /* palette */
  --accent:        #fac952;
  --accent-dark:   #f4ae3d;
  --title:         #333333;
  --text:          #7f7f7f;
  --btn-text:      #222222;
  --body-bg:       #f5f5f5;
  --surface:       #ffffff;
  --divider:       rgba(0, 0, 0, .12);
  --header-line:   rgba(51, 51, 51, .11);
  --footer-bg:     #1c1c1c;

  /* type */
  --font-base:  "Mulish", Helvetica, Arial, Verdana, sans-serif;
  --font-menu:  "Roboto", Helvetica, Arial, Verdana, sans-serif;

  /* metrics */
  --content-w:     1300px;
  --header-h:      140px;
  --radius:        2px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--body-bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font-base);
  overflow-wrap: break-word;
}
img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .6em;
  color: var(--title);
  font-family: var(--font-base);
  font-weight: 600;
  line-height: 1.2;
}
h1 { font-size: 48px; line-height: 1.1; }
h2 { font-size: 34px; }
h3 { font-size: 24px; line-height: 1.3; }
h4 { font-size: 20px; line-height: 1.3; }
h5 { font-size: 18px; line-height: 1.3; }
h6 { font-size: 16px; line-height: 1.3; }

.wrap { width: 100%; max-width: var(--content-w); margin-inline: auto; padding-inline: 30px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--btn-text); padding: 12px 20px; font-weight: 700;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

/* ---------- header: floating hamburger (The7 "slide-out" header) ---------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 45;
  pointer-events: none;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.menu-toggle {
  pointer-events: auto;
  position: absolute; top: 0; right: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 18px 17px; cursor: pointer;
  background: rgba(255, 255, 255, .88); border: 0; border-radius: 500px;
  color: var(--title); font: 400 16px/20px var(--font-menu);
  transition: background .2s;
}
.menu-toggle:hover { background: #fff; }
.menu-toggle-lines { display: grid; gap: 4px; width: 22px; }
.menu-toggle-lines i { display: block; height: 3px; background: currentColor; border-radius: 1px; }

.nav-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(17, 17, 17, .4);
}
.nav-backdrop[hidden] { display: none; }

.side-nav {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: 300px; max-width: 86vw;
  background: var(--surface);
  padding: 70px 0 24px;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0, 0, 0, .18);
  transform: translateX(100%);
  transition: transform .3s ease;
}
.side-nav[hidden] { display: block; visibility: hidden; }
.side-nav.is-open { transform: none; visibility: visible; }
.side-nav-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 500px; cursor: pointer; color: var(--title);
}
.side-nav-close:hover { color: var(--accent); }
.side-nav-close .icon { width: 20px; height: 20px; }

.side-nav ul { margin: 0; padding: 0; list-style: none; }
.side-nav li + li { border-top: 1px solid rgba(51, 51, 51, .12); }
.side-nav a, .side-nav .is-label > span {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 24px;
  color: var(--title);
  font: 700 16px/1.3 var(--font-menu);
  text-decoration: none;
  transition: color .2s;
}
.side-nav a:hover, .side-nav a:focus-visible { color: var(--accent); }
.side-nav .is-active > a { color: var(--accent); }
.side-nav .is-label > span { color: var(--text); cursor: default; }
.menu-icon { width: 16px; height: 16px; flex: none; }
body.nav-open { overflow: hidden; }

/* ---------- hero ---------- */
/* Inner pages use a shorter hero than the front page — as in the original. */
.hero { position: relative; height: 42vh; min-height: 300px; overflow: hidden; }
.page-home .hero { height: 81vh; min-height: 420px; }
.hero-bg {
  position: absolute; inset: 0;
  background: #fff center/cover no-repeat;
  animation: kenburns 20s ease-out both;
}
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .hero-bg { animation: none; } }
.hero-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.hero-inner {
  position: relative; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 100px 80px 80px;
  /* the original caps the *contents* at 1000px, inside 80px of padding */
  max-width: 1160px; margin-inline: auto;
}
.hero-title, .hero-text { max-width: 1000px; }
.hero-title {
  margin: 0 0 25px;
  color: #fff; font-weight: 600; font-size: 50px; line-height: 1.1;
}
.page-home .hero-title { font-size: 70px; }
.hero-text {
  margin: 0;
  color: var(--accent); font-weight: 600; font-size: 25px; line-height: 1.2;
}
.page-home .hero-text { font-size: 30px; }
/* the candle page ships slightly smaller hero type than the other inner pages */
.page-postaviti-svichku .hero-title { font-size: 48px; }
.page-postaviti-svichku .hero-text  { font-size: 21px; }

/* ---------- content ---------- */
main#content { background: var(--surface); }
#content > .wrap { padding-top: 60px; padding-bottom: 80px; }
.page-home #content > .wrap { padding-top: 30px; }
.page-title { text-align: center; margin-bottom: 30px; }
/* inner pages run the text in a 66%-wide column; the front page is full width */
.prose { max-width: 858px; margin-inline: auto; }
.page-home .prose { max-width: none; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: .5em; }

/* alignment carried over per element from the original content */
.ta-center  { text-align: center; }
.ta-right   { text-align: right; }
.ta-justify { text-align: justify; }
.prose ul.ta-center, .prose ol.ta-center { display: inline-block; text-align: start; }
.prose a:hover { color: var(--accent); }

/* horizontal rule between content sections */
.divider {
  max-width: 858px; margin: 15px auto; border: 0; border-top: 1px solid #000;
}

/* ---------- intro: title/tagline beside the service links ---------- */
.intro {
  display: grid; grid-template-columns: 35% 1fr; column-gap: 30px; row-gap: 40px;
  align-items: center; margin-bottom: 50px;
}
.intro-lead { padding-left: 30px; }
.intro-title { font-size: 25px; line-height: 1.2; margin-bottom: .6em; }
.intro-text { margin: 0; }
.intro-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin: 0; padding: 0 20px 0 0; list-style: none;
}
.intro-links a {
  display: flex; align-items: center; gap: 15px;
  color: var(--title); font-weight: 600; font-size: 18px; line-height: 1.3;
  text-decoration: none;
}
.intro-links a:hover { color: var(--accent-dark); text-decoration: none; }
.link-icon {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  background: var(--accent); color: #fff; border-radius: 2px;
  transition: background .2s;
}
.link-icon .icon { width: 16px; height: 16px; }
.intro-links a:hover .link-icon { background: var(--accent-dark); }

/* ---------- button ---------- */
.btn-row { text-align: center; margin: 15px 0; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 12px 20px;
  background: var(--accent); color: var(--btn-text);
  border: 0; border-radius: var(--radius);
  font: 700 15px/1.2 var(--font-base); text-decoration: none;
  transition: background .2s;
}
.btn-icon { width: 15px; height: 15px; flex: none; }
.btn:hover, .btn:focus-visible { background: var(--accent-dark); color: var(--btn-text); text-decoration: none; }

/* ---------- service cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px; margin: 40px 0; padding: 0; list-style: none;
}
.card {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  height: 100%; padding: 30px 20px;
  background: var(--surface); border-radius: var(--radius);
  text-align: center; text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0, 0, 0, .1); text-decoration: none; }
.card-icon {
  display: grid; place-items: center; width: 56px; height: 56px;
  background: var(--accent); color: #fff; border-radius: 2px;
}
.card-icon .icon { width: 26px; height: 26px; }
.card-text { color: var(--title); font-weight: 600; font-size: 18px; line-height: 1.3; }

/* ---------- "ще послуги" ---------- */
.services { margin: 50px 0 0; }
.services-label {
  display: flex; align-items: center; gap: 20px;
  margin: 0 0 30px;
  color: var(--title); font: 800 20px/1.2 var(--font-base); text-transform: uppercase;
}
/* the original uses Elementor's "slashes" divider pattern */
.services-label::before, .services-label::after {
  content: ""; flex: 1; height: 20px;
  background: repeating-linear-gradient(115deg,
      #000 0 1px, transparent 1px 10px);
}
.services-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 30px; margin: 0; padding: 0; list-style: none;
}
.services-grid a {
  display: grid; place-items: center; height: 100%;
  padding: 10px 9px; min-height: 72px;
  background: var(--surface); border: 1px solid var(--divider);
  color: var(--accent-dark); font-size: 20px; line-height: 1.2; text-align: center;
  transition: background .2s, color .2s, border-color .2s;
}
.services-grid a:hover {
  background: var(--accent); color: var(--btn-text);
  border-color: var(--accent); text-decoration: none;
}

/* ---------- order form (/forma-zamovlennya/) ---------- */
.page-forma-zamovlennya .divider,
.page-forma-zamovlennya .page-title { max-width: 613px; margin-inline: auto; }
.order-form-wrap { max-width: 613px; margin-inline: auto; }
.order-form .field { margin: 0 0 14px; }
.order-form label {
  display: block; margin-bottom: 5px;
  color: var(--title); font-size: 15px; line-height: 1.4;
}
.order-form input[type="text"] {
  width: 100%; padding: 7px 10px;
  background: var(--surface); color: var(--title);
  border: 1px solid #d5d5d5; border-radius: var(--radius);
  font: 400 15px/1.4 var(--font-base);
}
.order-form input[type="text"]:focus-visible { border-color: var(--accent-dark); }
.order-form input[aria-invalid="true"] { border-color: #c0392b; }
/* the form's submit button carries white text in the original, unlike the page buttons */
.btn--block {
  display: flex; width: 100%; justify-content: center;
  padding: 9px 20px; color: #fff;
}
.btn--block:hover, .btn--block:focus-visible { color: #fff; }
/* honeypot — hidden from people, visible to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note {
  margin: 0 0 18px; padding: 12px 16px; border-radius: var(--radius);
  border-left: 3px solid; font-size: 15px;
}
.form-note--ok  { background: #f2f8f0; border-color: #4c9a3f; color: #2f5c27; }
.form-note--err { background: #fdf2f0; border-color: #c0392b; color: #8c2a1f; }

/* ---------- order form embed ---------- */
.order-frame { width: 350px; max-width: 100%; height: 450px; border: 0; display: block; }
.order-frame--inline { margin: 40px auto; }

/* ---------- back to top ---------- */
.scroll-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--accent); color: var(--btn-text); border-radius: 0;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s, background .2s;
}
.scroll-top.is-visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--accent-dark); }
.scroll-top .icon { width: 20px; height: 20px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); }

/* No chrome of our own — the embedded form brings its own card. */
.modal-box {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  background: none; padding: 0;
  max-width: calc(100vw - 32px); max-height: calc(100vh - 32px);
}
.modal-body { min-height: 0; overflow: auto; }

/* the close button sits above the form, on the dark overlay */
.modal-close {
  flex: none;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .9); border: 0; border-radius: 500px;
  cursor: pointer; color: var(--title);
  transition: background .2s, color .2s;
}
.modal-close:hover { background: #fff; color: var(--accent-dark); }
.modal-close .icon { width: 18px; height: 18px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--footer-bg) url("../img/logo-alt.png") bottom right no-repeat;
  color: rgba(255, 255, 255, .75);
}
/* the footer grid is 1300px wide, like the original's boxed container */
.site-footer .wrap { max-width: 1360px; }
.footer-inner {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; padding-top: 60px; padding-bottom: 40px;
}
/* the first column is centred in the original, the other two are flush left */
.footer-about { text-align: center; }
.footer-about > * { max-width: 340px; margin-inline: auto; }
.footer-col + .footer-col { padding-left: 30px; }
.footer-title { color: #fff; font-size: 21px; line-height: 1.3; margin-bottom: 15px; }
.footer-tagline { margin: 0 auto; }

.contact + .contact { margin-top: 20px; }
.contact-label {
  display: flex; align-items: center; gap: 10px; margin: 0 0 2px;
  color: #fff; font-weight: 600; font-size: 16px; line-height: 1.3;
}
.contact-label .icon { width: 16px; height: 16px; flex: none; color: var(--accent); }
.contact-value { margin: 0; }
.contact-value a { color: var(--accent); }
.contact-value a:hover { color: #fff; }

.footer-bottom { padding-bottom: 30px; text-align: center; font-size: 14px; }
.footer-bottom p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero-title { font-size: 36px; }
  .page-home .hero-title { font-size: 60px; }
  .hero-text { font-size: 21px; }
  .page-postaviti-svichku .hero-text { font-size: 18px; }
  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
}

@media (max-width: 992px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .services-grid a { font-size: 17px; }
  .intro { grid-template-columns: 1fr; gap: 30px; }
  .intro-lead { padding-left: 0; }
  .intro-title { font-size: 30px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .footer-col + .footer-col { padding-left: 0; }
  .contact-label { justify-content: center; }
}

@media (max-width: 778px) {
  .wrap { padding-inline: 20px; }
  .hero { height: 43vh; }
  .page-home .hero { height: 75vh; }
  .hero-inner { padding: 0 45px; max-width: 100vw; }
  .hero-title { font-size: 34px; }
  .page-home .hero-title { font-size: 36px; }
  .hero-text { font-size: 19px; line-height: 1.3; }
  .page-home .hero-text { font-size: 21px; }
  .page-postaviti-svichku .hero-title { font-size: 30px; }
  .page-postaviti-svichku .hero-text  { font-size: 15px; }
  h1 { font-size: 32px; }
  h2 { font-size: 26px; line-height: 1.3; }
  h3 { font-size: 22px; }
  #content { padding: 40px 0 60px; }
  .menu-toggle { top: 6px; right: 10px; padding: 10px 16px; font-size: 15px; }
  .intro-links { grid-template-columns: 1fr; gap: 16px; }
  .intro-title { font-size: 26px; text-align: center; }
  .intro-lead { text-align: center; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .card { padding: 22px 14px; }
  .card-text { font-size: 16px; }
}

@media (max-width: 480px) {
  .hero-inner { padding: 0 20px; }
  .services-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .services-grid a { font-size: 16px; min-height: 60px; }
}
