/*
Theme Name: Промінь життя плюс
Theme URI: https://promin-zhittya.km.ua/
Author: Промінь життя плюс
Description: Блочна тема для сайту пансіонату «Промінь життя плюс»: швидка, без залежностей, з набором готових секцій.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: mnogaya-lita
*/

:root {
	--ml-primary: #07729c;
	--ml-primary-dark: #055473;
	--ml-accent: #e96524;
	--ml-light: #eef6f9;
	--ml-dark: #333;
	--ml-radius: 8px;
}

html { scroll-behavior: smooth; }
body { overflow-x: clip; }
img { height: auto; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-post-content > * { margin-block-start: 0; margin-block-end: 0; }

/* ---------- Іконки (шрифти micon зі старого сайту) ---------- */
.micon { display: inline-block; line-height: 1; }

/* ---------- Шапка ---------- */
.ml-header { padding: 0 !important; }
.ml-topbar { padding: 14px 0; width: min(1140px, 100% - 40px); margin-inline: auto; align-items: center; }
.ml-topbar .ml-logo img { display: block; height: 56px; width: auto; }
.ml-topbar .ml-contacts { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.ml-topbar .ml-contacts li { display: flex; gap: 10px; align-items: center; color: var(--ml-dark); font-size: .9rem; line-height: 1.3; }
.ml-topbar .ml-contacts a { color: var(--ml-dark); text-decoration: none; }
.ml-topbar .ml-contacts a:hover { color: var(--ml-accent); }
.ml-topbar .ml-contacts .micon { color: var(--ml-primary); font-size: 1.5rem; }

.ml-nav { background: var(--ml-primary); color: #fff; position: sticky; top: 0; z-index: 50; }
.ml-nav__inner { width: min(1140px, 100% - 40px); margin-inline: auto; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ml-nav .wp-block-navigation { --wp--style--block-gap: 0; }
.ml-nav .wp-block-navigation-item__content { color: #fff !important; padding: 18px 18px; font-weight: 600; font-size: .95rem; transition: background .2s; }
.ml-nav .wp-block-navigation-item__content:hover,
.ml-nav .current-menu-item > .wp-block-navigation-item__content { background: var(--ml-primary-dark); }
.ml-nav .wp-block-navigation__submenu-container { background: var(--ml-primary-dark) !important; border: 0 !important; min-width: 260px; }
.ml-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 12px 20px; }
.ml-nav .wp-block-navigation__responsive-container-open { color: #fff; }
.ml-nav__cta { display: flex; }
.ml-nav__cta a { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; color: #fff; font-size: 1.4rem; text-decoration: none; }
.ml-nav__cta a.ml-call { background: var(--ml-accent); }
.ml-nav__cta a.ml-tg { background: var(--ml-primary-dark); }
.ml-nav__cta a:hover { filter: brightness(1.1); }

@media (max-width: 781px) {
	.ml-topbar .ml-contacts { display: none; }
	.ml-topbar { justify-content: center !important; }
	.ml-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--ml-primary); }
}

/* ---------- Підвал ---------- */
.ml-footer { background: #0c2e3d; color: #cfe0e7; padding: 56px 20px 24px; }
.ml-footer a { color: #fff; text-decoration: none; }
.ml-footer a:hover { color: var(--ml-accent); }
.ml-footer h4, .ml-footer .wp-block-heading { color: #fff; font-size: 1.1rem; margin-bottom: .75rem; }
.ml-footer .ml-footer__copy { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 20px; font-size: .85rem; text-align: center; }
.ml-footer .wp-block-navigation .wp-block-navigation-item__content { color: #cfe0e7 !important; padding: 4px 0; }

/* ---------- Секції контенту ---------- */
.ml-section { padding-block: 72px; }
.ml-section--light { background: var(--ml-light); }
.ml-section--primary { background: var(--ml-primary); color: #e7f3f8; }
.ml-section--primary :is(h1,h2,h3,h4,p,li) { color: #fff; }
.ml-section--primary a { color: #fff; }
.ml-eyebrow { color: var(--ml-accent); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; margin: 0 0 .5rem; }
.ml-section-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.ml-section-head h2 { margin-top: 0; }
@media (max-width: 781px) { .ml-section { padding-block: 48px; } }

/* Банер */
.ml-hero.wp-block-cover { min-height: 520px; padding: 64px 0; background: linear-gradient(120deg, #055473, #07729c); }
.ml-hero .wp-block-cover__background { background: linear-gradient(90deg, rgba(5,84,115,.94) 0%, rgba(5,84,115,.78) 42%, rgba(5,84,115,.12) 100%) !important; opacity: 1 !important; }
.ml-hero .wp-block-cover__inner-container { width: min(1140px, 100% - 40px); max-width: none; padding: 0; }
.ml-hero .wp-block-cover__inner-container > * { margin-left: 0 !important; margin-right: 0 !important; max-width: 640px; }
.ml-hero h1 { color: #fff !important; margin: 0 0 .5em; }
.ml-hero p { color: #eef6f9; font-size: 1.125rem; }
.ml-hero .wp-block-buttons { margin-top: 28px; }
.ml-hero .wp-block-button__link { background: var(--ml-accent); }
.ml-hero .wp-block-button__link:hover { background: #fff; color: var(--ml-primary); }
@media (max-width: 781px) { .ml-hero.wp-block-cover { min-height: 0; padding: 48px 0; } .ml-hero .wp-block-cover__background { background: rgba(5,84,115,.86) !important; } }

/* Заголовок сторінки без банера */
.ml-section--title { background: var(--ml-light); padding-block: 48px; border-bottom: 4px solid var(--ml-accent); }
.ml-section--title h1 { margin: 0; }
.ml-section--dark { background: #0b3a4f; color: #d9e8ee; }
.ml-section--dark :is(h1,h2,h3,h4,p,li) { color: #fff; }
.ml-section--dark a, .ml-section--primary a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ml-section--dark a:hover, .ml-section--primary a:hover { color: #ffd2b8; }
.ml-section--primary .wp-block-button__link, .ml-section--dark .wp-block-button__link { text-decoration: none; }

/* Кроки / послуги (іконка + заголовок + текст) */
.ml-cards > *, .ml-schedule > *, .ml-section-head > * { margin-block-start: 0; }
.ml-section-head > * + * { margin-block-start: 12px; }
.ml-prose { max-width: 820px; margin-inline: auto; }
.ml-prose p, .ml-prose li { font-size: 1.0625rem; }
.ml-lead { font-size: 1.125rem; color: var(--ml-dark); }
.ml-section .wp-block-buttons { margin-top: 20px; }
.ml-section--primary .wp-block-columns { gap: 48px; }
.ml-card > * + * { margin-block-start: 8px; }
.ml-schedule__item { display: flex; }
.ml-schedule__item > .wp-block-group { flex: 1; }
.ml-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.ml-card { background: #fff; border-radius: var(--ml-radius); padding: 32px 28px; box-shadow: 0 6px 24px rgba(7,114,156,.10); }
.ml-section--light .ml-card { box-shadow: 0 6px 24px rgba(7,114,156,.08); }
.ml-section--primary .ml-card { background: rgba(255,255,255,.08); box-shadow: none; border: 1px solid rgba(255,255,255,.25); }
.ml-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ml-accent); color: #fff; font-size: 1.9rem; margin-bottom: 18px; }
.ml-card h3 { font-size: 1.3rem; font-weight: 700; margin: 0 0 .5rem; }
.ml-card p { margin: 0; font-size: 1rem; }
.ml-card ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.ml-card__link { display: inline-block; margin-top: 14px; font-weight: 600; text-decoration: none; }
.ml-card__link::after { content: " →"; }

/* Лічильники */
.ml-counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin-top: 8px; }
.ml-counter { text-align: center; padding: 20px 12px; }
.ml-counter .micon { font-size: 2.2rem; color: var(--ml-accent); }
.ml-counter__num { display: block; font-size: 3.25rem; font-weight: 700; line-height: 1.1; color: #fff; margin: 8px 0; }
.ml-counter__num::after { content: "+"; color: var(--ml-accent); }
.ml-counter p { margin: 0; color: #e7f3f8; }

/* Текст із зображенням */
.ml-media.wp-block-media-text { gap: 56px; align-items: center; grid-template-columns: 46% 1fr !important; }
.ml-media.wp-block-media-text.has-media-on-the-right { grid-template-columns: 1fr 46% !important; }
@media (max-width: 781px) { .ml-media.wp-block-media-text, .ml-media.wp-block-media-text.has-media-on-the-right { grid-template-columns: 1fr !important; } }
.ml-media .wp-block-media-text__media img { border-radius: var(--ml-radius); width: 100%; aspect-ratio: 5/4; object-fit: cover; height: auto; box-shadow: 0 12px 32px rgba(7,114,156,.18); }
.ml-media .wp-block-media-text__content p { font-size: 1rem; }
.ml-media .wp-block-media-text__content ul { padding-left: 1.2rem; }
.ml-media .wp-block-media-text__content li { margin-bottom: .5em; }
.ml-media .wp-block-media-text__content { padding: 0; }
@media (max-width: 781px) { .ml-media.wp-block-media-text { gap: 24px; } }

/* Колонки із зображенням */
.ml-imgcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.ml-imgcol img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--ml-radius); display: block; }
.ml-imgcol h3 { margin: 18px 0 8px; font-size: 1.3rem; font-weight: 700; }
.ml-imgcol p { margin: 0; font-size: 1rem; }

/* Розклад дня */
.ml-schedule { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .ml-schedule { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ml-schedule { grid-template-columns: 1fr; } }
.ml-schedule__item { display: flex; gap: 16px; background: #fff; border-left: 4px solid var(--ml-accent); border-radius: 0 var(--ml-radius) var(--ml-radius) 0; padding: 20px; box-shadow: 0 4px 16px rgba(7,114,156,.08); }
.ml-schedule__item .micon { color: var(--ml-primary); font-size: 1.8rem; flex: none; }
.ml-schedule__item h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 6px; }
.ml-schedule__item p { margin: 0; font-size: .95rem; line-height: 1.6; }

/* FAQ */
.ml-faq { max-width: 860px; margin-inline: auto; }
.ml-faq .wp-block-details { border: 1px solid #d5e5ec; border-radius: var(--ml-radius); padding: 0; margin-bottom: 12px; background: #fff; }
.ml-faq .wp-block-details summary { cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--ml-dark); }
.ml-faq .wp-block-details[open] summary { color: var(--ml-primary); }
.ml-faq .wp-block-details > :not(summary) { padding: 0 22px; }
.ml-faq .wp-block-details > :last-child { padding-bottom: 20px; }

/* Галерея */
.ml-gallery.wp-block-gallery { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ml-gallery.wp-block-gallery > figure { width: 100% !important; margin: 0 !important; flex: none !important; }
.ml-gallery.wp-block-gallery img { border-radius: 6px; width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; cursor: zoom-in; transition: transform .25s; }
.ml-gallery.wp-block-gallery figure:hover img { transform: scale(1.03); }
@media (max-width: 900px) { .ml-gallery.wp-block-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .ml-gallery.wp-block-gallery { grid-template-columns: repeat(2, 1fr); } }

/* Форма (Contact Form 7) */
.ml-contact { max-width: 720px; margin-inline: auto; }
.wpcf7 form p { margin: 0 0 16px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea {
	width: 100%; padding: 14px 16px; border: 1px solid #c9dbe3; border-radius: 6px; font: inherit; background: #fff; color: var(--ml-dark);
}
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 2px solid var(--ml-primary); border-color: transparent; }
.wpcf7 input[type="submit"] { background: var(--ml-accent); color: #fff; border: 0; border-radius: 4px; padding: 14px 32px; font-weight: 700; cursor: pointer; font: inherit; font-weight: 700; }
.wpcf7 input[type="submit"]:hover { background: var(--ml-primary); }
.wpcf7-not-valid-tip { color: #c0392b; font-size: .85rem; }
.wpcf7 form .wpcf7-response-output { border-radius: 6px; }

/* Плавна кнопка «вгору» без JS не потрібна; доступність */
:focus-visible { outline: 2px solid var(--ml-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Підвал: компактне меню без підменю */
.ml-footer .wp-block-navigation .wp-block-navigation__submenu-container { display: none !important; }
.ml-footer .wp-block-navigation { gap: 2px; }
.ml-footer .wp-block-navigation-item__content { padding: 4px 0 !important; }

@media (max-width: 781px) { .ml-topbar .ml-logo img { height: 44px; } .ml-topbar { padding: 10px 0; } }
