/* Obrii Portal — реклама, форми послуг, листівки. Кольори й радіуси беруться з теми. */

/* --- рекламне місце --- */
.ad { margin-inline: auto; width: 100%; max-width: 1200px; }
.ad--article_top, .ad--article_bottom { max-width: 800px; margin-inline: 0; justify-items: start; }
.ad--sidebar { max-width: 300px; }
.ad__box { width: 100%; aspect-ratio: var(--ad-ratio, 6 / 1); border-radius: var(--r-m, 16px); overflow: hidden; background: var(--surface-2, #eef2ee); }
.ad__box a { display: block; height: 100%; transition: transform 0.12s ease-out; }
.ad__box a:active { transform: scale(0.99); }
.ad__box img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s ease; }
.ad__box img.is-ready { opacity: 1; }

.ad-house { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; margin-block: clamp(16px, 3vw, 32px); padding: 18px 22px; border-radius: var(--r-l, 24px); border: 1.5px dashed color-mix(in srgb, var(--green) 55%, transparent); background: var(--green-soft); }
.ad-house div { display: grid; gap: 2px; }
.ad-house strong { font-size: 1.08rem; letter-spacing: -0.012em; }
.ad-house span { color: var(--muted); font-size: 0.92rem; }

/* --- обкладинка: зірочка на картках і смужка редакції (бачить лише редакція) --- */
.card { position: relative; }
.coverbtn { position: absolute; top: 8px; left: 8px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem; line-height: 1; color: #fff; background: rgba(15, 21, 18, 0.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transform: scale(0.9); transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease; }
.card:hover .coverbtn, .coverbtn:focus-visible, .coverbtn.is-on { opacity: 1; transform: none; }
.coverbtn:hover { background: #1da349; }
.coverbtn:active { transform: scale(0.9); }
.coverbtn.is-on { background: #ffd500; color: #0f1512; }
@media (hover: none) { .coverbtn { opacity: 0.92; transform: none; width: 30px; height: 30px; font-size: 0.95rem; } }
.coverbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, #ffd500 16%, var(--surface)); border: 1px solid color-mix(in srgb, #ffd500 55%, transparent); font-size: 0.92rem; }
.coverbar > div { flex: 1; min-width: 220px; }
.coverbar__star { width: 30px; height: 30px; border-radius: 50%; background: #ffd500; color: #0f1512; display: grid; place-items: center; flex: none; }
.coverbar span { color: var(--muted); }
.coverbar small { display: block; color: var(--muted); margin-top: 2px; }
.coverbar .btn { padding: 7px 14px; font-size: 0.86rem; }
.covermsg { margin: 12px 0; padding: 11px 14px; border-radius: 12px; font-weight: 600; font-size: 0.93rem; }
.covermsg--ok { background: var(--green-soft); color: var(--green-ink); }
.covermsg--no { background: #fdecec; color: #a11a1a; }

/* --- сторінки послуг --- */
.page-wide { max-width: none; }
.of { display: grid; gap: clamp(32px, 5vw, 64px); }
.of-hero { display: grid; gap: 14px; max-width: 820px; }
.of-hero__title { font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.06; letter-spacing: -0.028em; font-weight: 820; }
.of-hero__text { color: var(--muted); font-size: clamp(1.02rem, 1.3vw, 1.18rem); line-height: 1.5; max-width: 62ch; }
.of-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.of-ok { background: var(--green-soft); color: var(--green-ink); padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.of-error { background: #fdecec; color: #a11a1a; padding: 12px 16px; border-radius: 12px; font-weight: 600; margin-bottom: 16px; }
.of-hp { position: absolute; left: -9999px; }
.of-hint { color: var(--muted); font-size: 0.86rem; font-weight: 400; }

/* бренд-бук: схеми сторінок і картки місць */
.of-book { display: grid; gap: clamp(20px, 3vw, 32px); }
.of-wires { display: flex; flex-wrap: wrap; gap: clamp(16px, 3vw, 40px); }
.wf { margin: 0; display: grid; gap: 10px; justify-items: center; }
.wf figcaption { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.wf__page { position: relative; width: 168px; padding: 10px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-s); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.wf__bar { order: 0; height: 12px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 16%, transparent); }
.wf__text { order: 4; height: 34px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.wf__text:nth-of-type(2) { order: 2; height: 58px; }
.wf__text--short { order: 6; height: 22px; }
.wf__slot { display: grid; place-items: center; height: 24px; border-radius: 7px; background: var(--green); color: #fff; font-size: 0.8rem; font-weight: 750; }
.wf__slot--header { order: 1; }
.wf__slot--home_top, .wf__slot--article_top, .wf__slot--category_top { order: 3; }
.wf__slot--home_middle, .wf__slot--article_bottom { order: 5; }
.wf__slot--footer { order: 9; }
.wf__page--article { padding-right: 52px; }
.wf__slot--sidebar { position: absolute; right: 10px; top: 60px; width: 34px; height: 92px; }
.of-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.8vw, 20px); }
.of-slot { position: relative; background: var(--surface); border-radius: var(--r-l); padding: 22px 20px 18px; box-shadow: var(--shadow-s); display: grid; gap: 8px; align-content: start; }
.of-slot__n { width: 30px; height: 30px; border-radius: 9px; background: var(--green); color: #fff; font-weight: 750; display: grid; place-items: center; }
.of-slot h3 { font-size: 1.04rem; letter-spacing: -0.012em; line-height: 1.2; }
.of-slot p { color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.of-slot dl { margin: 6px 0 0; display: grid; gap: 6px; font-size: 0.9rem; }
.of-slot dl div { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.of-slot dt { color: var(--muted); }
.of-slot dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.of-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.8vw, 20px); }
.of-rules > div { background: var(--surface-2); border-radius: var(--r-l); padding: 20px; }
.of-rules h3 { font-size: 1rem; margin-bottom: 10px; }
.of-rules ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: 0.93rem; display: grid; gap: 6px; }

/* місця натискаються: номер у схемі та картка відкривають спливне вікно */
button.wf__slot { border: 0; width: 100%; cursor: pointer; font: inherit; font-size: 0.8rem; font-weight: 750; transition: transform 0.1s ease-out, filter 0.2s ease, box-shadow 0.2s ease; }
button.wf__slot:hover { filter: brightness(1.12); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 30%, transparent); }
button.wf__slot:active { transform: scale(0.95); }
button.wf__slot--sidebar { width: 34px; }
.of-slot[data-ad-open] { cursor: pointer; border: 1.5px solid transparent; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.2s ease; }
.of-slot[data-ad-open]:hover { transform: translateY(-3px); box-shadow: var(--shadow-l); border-color: color-mix(in srgb, var(--green) 60%, transparent); }
.of-slot[data-ad-open]:active { transform: scale(0.985); }
.of-slot__more { margin-top: 6px; color: var(--green-ink); font-weight: 650; font-size: 0.88rem; }

.adpop { border: 0; padding: 0; background: none; width: min(94vw, 560px); max-height: 92vh; overflow: visible; }
.adpop::backdrop { background: rgba(4, 12, 8, 0.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.adpop[open] { animation: adpop-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes adpop-in { from { opacity: 0; transform: scale(0.96); } }
.adpop__in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; background: var(--surface); color: var(--ink); border-radius: 26px; padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow-l); border: 1px solid var(--line); max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; }
.adpop__close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; line-height: 1; color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); transition: background-color 0.2s ease, transform 0.1s ease-out; }
.adpop__close:hover { background: color-mix(in srgb, var(--ink) 13%, transparent); }
.adpop__close:active { transform: scale(0.92); }
.adpop__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding-right: 44px; }
.adpop__head h3 { font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1.15; }
.adpop__where { color: var(--muted); font-size: 0.93rem; margin-top: 4px; }
.adpop__stage { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 14px; border-radius: 16px; background: var(--surface-2); }
.adpop__shape { width: 100%; max-height: 240px; min-height: 78px; padding: 8px 10px; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 12px; color: #fff; background: radial-gradient(120% 160% at 0 0, #2cbf62, #1da349 45%, #0e5a63); }
.adpop__shape .ad__label { color: rgba(255, 255, 255, 0.8); }
.adpop__shape b { font-size: 1.2rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.adpop__shape small { opacity: 0.85; font-size: 0.8rem; }
.adpop__facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; font-size: 0.92rem; }
.adpop__facts div { display: grid; gap: 1px; border-top: 1px solid var(--line); padding-top: 8px; }
.adpop__facts dt { color: var(--muted); font-size: 0.8rem; }
.adpop__facts dd { margin: 0; font-weight: 650; }
.adpop__calc { display: grid; gap: 12px; }
.adpop__calc label { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.adpop [hidden] { display: none !important; }
.adpop .of-total { padding-top: 14px; }
@media (max-width: 600px) {
  .adpop { width: 100vw; max-width: 100vw; margin: auto 0 0; max-height: 92dvh; }
  .adpop__in { border-radius: 22px 22px 0 0; max-height: 92dvh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .adpop[open] { animation: adpop-up 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .adpop .of-total { position: static; margin-inline: 0; padding-inline: 0; }
  .adpop .of-total .btn { width: auto; }
}
@keyframes adpop-up { from { transform: translateY(40%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .adpop[open] { animation: none; } }

/* форма */
.of-form form { background: var(--surface); border-radius: var(--r-l); padding: clamp(18px, 3vw, 36px); box-shadow: var(--shadow-s); display: grid; gap: 22px; }
.of-form > .section__title { margin-bottom: 18px; }
.of-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; min-width: 0; }
.of-form legend { font-weight: 750; font-size: 1.08rem; letter-spacing: -0.01em; padding: 0; margin-bottom: 12px; }
.of-form label { display: grid; gap: 6px; }
.of-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.of-row [hidden] { display: none; }
.of-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.of-choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.of-choice, .of-plan { position: relative; cursor: pointer; }
.of-choice input, .of-plan input, .of-frame input { position: absolute; opacity: 0; pointer-events: none; }
.of-choice span, .of-plan span { display: grid; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.1s ease-out; }
.of-choice:active span, .of-plan:active span { transform: scale(0.985); }
.of-choice small, .of-plan small { color: var(--muted); font-weight: 400; font-size: 0.86rem; }
.of-choice input:checked + span, .of-plan input:checked + span { border-color: var(--green); background: var(--green-soft); }
.of-choice input:focus-visible + span, .of-plan input:focus-visible + span, .of-frame input:focus-visible + .gc { outline: 3px solid color-mix(in srgb, var(--green) 70%, transparent); outline-offset: 2px; }
.of-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.of-plan span { text-align: center; padding: 22px 14px; }
.of-plan b { font-size: 1.7rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.of-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); font-size: 0.93rem; }
.of-check input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--green); }
.of-total { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); }
.of-total span { display: block; color: var(--muted); font-size: 0.88rem; }
.of-total strong { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.of-preview { display: grid; gap: 6px; justify-items: start; }
.of-preview img { max-width: 100%; max-height: 260px; border-radius: var(--r-m); }
.of-form--split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.of-live { position: sticky; top: calc(var(--header-h, 64px) + 20px); display: grid; gap: 12px; }
.of-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.of-frame { justify-items: center; text-align: center; cursor: pointer; position: relative; }
.of-frame .gc { width: 100%; padding: 8px; border-radius: 12px; transition: transform 0.12s ease-out, box-shadow 0.2s ease; }
.of-frame .gc__in { display: block; height: 40px; padding: 0; border-radius: 6px; }
.of-frame:active .gc { transform: scale(0.95); }
.of-frame input:checked + .gc { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--green); }
.of-frame small { font-size: 0.8rem; font-weight: 600; }

/* --- листівка --- */
.gc { --gc-ink: #1d1a16; --gc-accent: #1da349; padding: 16px; border-radius: 24px; background: radial-gradient(120% 140% at 0 0, #2cbf62, #1da349 40%, #0e5a63); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 18px 44px rgba(0, 0, 0, 0.14); }
.gc__in { background: #fffdf7; color: var(--gc-ink); border-radius: 14px; padding: clamp(20px, 3vw, 34px) clamp(16px, 2.6vw, 30px); text-align: center; display: grid; gap: 10px; justify-items: center; }
.gc__photo { width: 132px; height: 132px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px #fffdf7, 0 0 0 7px var(--gc-accent); margin-bottom: 8px; }
.gc__photo[hidden] { display: none; }
.gc__photo img { width: 100%; height: 100%; object-fit: cover; }
.gc__occasion { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.28rem; color: var(--gc-accent); line-height: 1.2; }
.gc__to { font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: -0.02em; line-height: 1.12; font-weight: 800; }
.gc__text { font-family: Georgia, "Times New Roman", serif; font-size: 1.04rem; line-height: 1.6; max-width: 44ch; overflow-wrap: anywhere; }
.gc__from { font-weight: 650; font-size: 0.95rem; opacity: 0.75; }
.gc__from:not(:empty)::before { content: "— "; }
.gc--prapor { --gc-accent: #0057b7; background: linear-gradient(180deg, #0057b7 0 50%, #ffd500 50% 100%); }
.gc--zoloto { --gc-accent: #9a6d12; background: linear-gradient(135deg, #b88a2a, #f6e3a1 30%, #c79a3a 55%, #f6e3a1 78%, #a97d22); }
.gc--zoloto .gc__in { outline: 1px solid #c79a3a; outline-offset: -8px; }
.gc--obrii { --gc-accent: #0f7a35; }
.gc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 28px); align-items: start; }
.gc-link { display: block; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.gc-link:hover { transform: translateY(-4px); }
.gc-link:active { transform: scale(0.985); }
.gc-stage { max-width: 560px; margin-inline: auto; }
.of--single { padding-block: clamp(28px, 5vw, 64px); }
.of-single__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

@media (max-width: 1080px) { .of-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .of-form--split { grid-template-columns: minmax(0, 1fr); }
  .of-live { position: static; order: -1; }
  .of-rules, .gc-grid { grid-template-columns: minmax(0, 1fr); }
  .of-plans, .of-choices--2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) { .of-slots { grid-template-columns: minmax(0, 1fr); } .of-total .btn { width: 100%; } }

/* ---------- квіткові рамки: акварельний кутик шаром поверх листівки ---------- */
.gc--poliovi { --gc-accent: #b3282d; --gc-tint: #eef4e6; --gc-art: url("frames/poliovi.webp"); }
.gc--pivonii { --gc-accent: #a8566b; --gc-tint: #f9eceb; --gc-art: url("frames/pivonii.webp"); }
.gc--soniakhy { --gc-accent: #a86f00; --gc-tint: #fdf1c7; --gc-art: url("frames/soniakhy.webp"); }
.gc--kalyna { --gc-accent: #a3122a; --gc-tint: #f6e7e4; --gc-art: url("frames/kalyna.webp"); }
.gc--barvinok { --gc-accent: #4450b0; --gc-tint: #e9ecfa; --gc-art: url("frames/barvinok.webp"); }
.gc--vyshyvanka { --gc-accent: #c8102e; --gc-tint: #f8ece8; --gc-art: url("frames/vyshyvanka.webp"); }
.gc:is(.gc--poliovi, .gc--pivonii, .gc--soniakhy, .gc--kalyna, .gc--barvinok, .gc--vyshyvanka) { position: relative; padding: 10px; background: var(--gc-tint); overflow: hidden; }
.gc:is(.gc--poliovi, .gc--pivonii, .gc--soniakhy, .gc--kalyna, .gc--barvinok, .gc--vyshyvanka)::before,
.gc:is(.gc--poliovi, .gc--pivonii, .gc--soniakhy, .gc--kalyna, .gc--barvinok, .gc--vyshyvanka)::after { content: ""; position: absolute; z-index: 1; width: min(40%, 190px); aspect-ratio: 1; background: var(--gc-art) no-repeat 0 0 / contain; pointer-events: none; }
.gc:is(.gc--poliovi, .gc--pivonii, .gc--soniakhy, .gc--kalyna, .gc--barvinok, .gc--vyshyvanka)::before { top: 2px; left: 2px; }
.gc:is(.gc--poliovi, .gc--pivonii, .gc--soniakhy, .gc--kalyna, .gc--barvinok, .gc--vyshyvanka)::after { bottom: 2px; right: 2px; transform: rotate(180deg); }
.gc:is(.gc--poliovi, .gc--pivonii, .gc--soniakhy, .gc--kalyna, .gc--barvinok, .gc--vyshyvanka) .gc__in { padding: clamp(40px, 9%, 64px) clamp(30px, 11%, 64px); outline: 1px solid color-mix(in srgb, var(--gc-accent) 28%, transparent); outline-offset: -7px; }
.gc:is(.gc--poliovi, .gc--pivonii, .gc--soniakhy, .gc--kalyna, .gc--barvinok, .gc--vyshyvanka) .gc__in > * { position: relative; z-index: 2; }
.of-frames { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.of-frame .gc { padding: 6px !important; }
.of-frame .gc__in { height: 46px; padding: 0 !important; outline: 0 !important; }
.of-frame .gc::before, .of-frame .gc::after { width: 46% !important; }
.of-live__date { margin-top: 12px; text-align: center; font-weight: 600; font-size: 0.95rem; color: var(--muted); }
.of-live__date:empty { display: none; }
.of input[type="file"] { width: 100%; padding: 10px 12px; border: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 14px; background: var(--surface-2); font: inherit; font-size: 0.92rem; }
.of input[type="date"] { min-height: 50px; font-variant-numeric: tabular-nums; }
