/*
Theme Name: Nava Rytual
Theme URI: https://nava-rytual.com/
Author: Nava Rytual
Description: Адаптивна тема WordPress для похоронного дому «НАВА».
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: nava-rytual
*/

:root {
	--bg: #1b1916;
	--surface: #211e1a;
	--surface-2: #29241f;
	--ink: #f4efe4;
	--muted: #b7afa0;
	--gold: #a0855f;
	--gold-soft: #c2a67d;
	--line: rgba(244, 239, 228, .14);
	--shadow: 0 24px 50px -20px rgba(0, 0, 0, .6);
	--container: 1180px;
	--serif: 'Playfair Display', Georgia, serif;
	--sans: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.65; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 5vw, 4.7rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); margin-bottom: 1rem; }
h3 { line-height: 1.25; }
.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.narrow-copy, .narrow-content { max-width: 820px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.eyebrow { color: var(--gold-soft); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: .9rem; }
.subheading { margin: 3.2rem 0 1.4rem; font-family: var(--serif); font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; padding: .72rem 1.25rem; border: 1px solid transparent; border-radius: 2px; font-weight: 600; transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--gold); color: #100d08; }
.btn-solid:hover { background: var(--gold-soft); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }

.site-header { position: sticky; top: 0; z-index: 50; overflow: visible; background: rgba(27, 25, 22, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
body.admin-bar .site-header { top: 32px; }
.header-inner { min-height: 78px; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 146px; height: 47px; object-fit: contain; }
.site-navigation { margin-left: auto; }
.nav-menu, .footer-menu { list-style: none; margin: 0; padding: 0; }
.nav-menu { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.6rem); }
.nav-menu > .menu-item { position: relative; }
.nav-menu a { color: var(--muted); font-size: .9rem; }
.nav-menu a:hover, .nav-menu .current-menu-item > a { color: var(--gold-soft); }
.nav-menu .menu-item-has-children > a { display: inline-flex; align-items: center; gap: .4rem; }
.nav-menu .menu-item-has-children > a::after { content: '⌄'; color: var(--gold-soft); font-size: .8rem; line-height: 1; transform: translateY(-1px); }
.nav-menu .sub-menu { position: absolute; top: calc(100% + 1px); left: 50%; z-index: 60; display: grid; min-width: 230px; gap: .15rem; margin: 0; padding: .65rem; list-style: none; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 35px rgba(0, 0, 0, .35); opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, -6px); transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
.nav-menu .menu-item-has-children:hover > .sub-menu,
.nav-menu .menu-item-has-children:focus-within > .sub-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); transition-delay: 0s; }
.nav-menu .sub-menu a { display: block; padding: .58rem .7rem; white-space: nowrap; }
.nav-menu .sub-menu a:hover, .nav-menu .sub-menu .current-menu-item > a { background: rgba(194, 166, 125, .09); }
.header-actions { display: flex; align-items: center; gap: .85rem; }
.header-phone { white-space: nowrap; color: var(--gold-soft); font-size: .9rem; }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.menu-toggle > span:not(.screen-reader-text) { display: block; height: 1px; margin: 5px 0; background: currentColor; }

.site-notice { border-bottom: 1px solid var(--line); padding: .8rem 0; font-size: .95rem; }
.site-notice--success { background: #263127; color: #d8f0d7; }
.site-notice--error { background: #372321; color: #ffd9d2; }

.hero { padding: clamp(3rem, 7vw, 7rem) 0; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 80% 20%, #332a20 0, var(--bg) 48%); }
.hero-grid { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(320px, 1.1fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); }
.hero-media { position: relative; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-media img { width: 100%; aspect-ratio: 1536 / 1234; object-fit: cover; }
.hero-copy p:not(.eyebrow) { color: var(--muted); max-width: 58ch; }
.hero-copy .hero-lead { color: var(--ink); font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.section { padding: clamp(4.5rem, 8vw, 7.5rem) 0; border-bottom: 1px solid var(--line); }
.section > .container > p:not(.eyebrow), .narrow-copy > p { color: var(--muted); }
.section-alt { background: var(--surface); }
.feature-grid, .steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.feature-card, .step-card { padding: 1.4rem; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.feature-card > span, .step-card > span { color: var(--gold-soft); font-size: .85rem; }
.feature-card h3, .step-card h3 { margin: .65rem 0 .45rem; font-size: 1.1rem; }
.feature-card p, .step-card p { margin: 0; color: var(--muted); font-size: .92rem; }

.section-intro { color: var(--muted); max-width: 56ch; margin-bottom: 2rem; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.service-card { display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: start; gap: .8rem; width: 100%; min-height: 150px; padding: 1.25rem; text-align: left; border: 1px solid var(--line); background: var(--bg); color: var(--ink); transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.service-card:hover { transform: translateY(-2px); border-color: var(--gold); background: var(--surface-2); }
.service-number { color: var(--gold-soft); font-size: .8rem; }
.service-card-content { display: grid; gap: .55rem; }
.service-card-content strong { font-size: 1rem; line-height: 1.3; }
.service-card-content span { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.service-arrow { color: var(--gold-soft); font-size: 1.2rem; }

.cta-strip { padding: 2.5rem 0; background: #11100e; border-bottom: 1px solid var(--line); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-inner h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); margin-bottom: .35rem; }
.cta-inner p { margin: 0; color: var(--muted); }

.faq-list { margin-top: 2rem; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); padding: 1.2rem 0; }
.faq-list summary { cursor: pointer; list-style: none; padding-right: 2rem; position: relative; font-size: 1.05rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 0; color: var(--gold-soft); font-size: 1.4rem; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p { max-width: 70ch; margin: .8rem 0 0; color: var(--muted); }

.reviews-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 2rem 0; }
.reviews-grid blockquote { margin: 0; padding: 1.35rem; border: 1px solid var(--line); color: var(--muted); font-size: .94rem; }
.reviews-grid cite { display: block; margin-top: 1rem; color: var(--gold-soft); font-style: normal; font-size: .85rem; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 7vw, 7rem); align-items: start; }
.contact-list { display: grid; gap: 1.2rem; margin: 2rem 0; }
.contact-list > * { display: grid; gap: .15rem; }
.contact-list strong { color: var(--gold-soft); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.contact-list span { color: var(--muted); }
.contact-list a:hover, .map-link:hover, .footer-contact a:hover { color: var(--gold-soft); }
.messenger-list { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0 1.2rem; }
.messenger-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: .55rem .85rem; border: 1px solid var(--line); color: var(--muted); font-size: .88rem; transition: border-color .2s ease, color .2s ease, background .2s ease; }
.messenger-button:hover { border-color: var(--gold-soft); color: var(--gold-soft); background: rgba(194, 166, 125, .08); }
.map-link { color: var(--gold-soft); font-size: .9rem; }
.contact-panel { padding: clamp(1.4rem, 4vw, 2.4rem); background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.contact-panel h3 { margin-bottom: .35rem; font-family: var(--serif); font-size: 1.8rem; font-weight: 500; }
.contact-panel > p, .modal-panel > p { color: var(--muted); }
.contact-form { display: grid; gap: .55rem; margin-top: 1.4rem; }
.contact-form label { font-size: .88rem; color: var(--muted); }
.contact-form label span { color: #847e73; }
.contact-form input, .contact-form textarea { width: 100%; padding: .78rem .85rem; border: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--ink); }
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #847e73; }
.checkbox-label { display: flex; align-items: flex-start; gap: .6rem; margin-top: .35rem; }
.checkbox-label input { width: auto; margin-top: .35rem; }

.site-footer { padding: 4rem 0 1.3rem; background: #100f0d; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; }
.footer-brand { display: inline-block; margin-bottom: 1rem; }
.footer-brand img { width: 146px; height: 47px; object-fit: contain; }
.site-footer p { max-width: 32ch; }
.footer-title { margin-bottom: 1rem; color: var(--ink); font-size: 1rem; }
.footer-menu { display: grid; gap: .55rem; }
.footer-menu a, .footer-contact { color: var(--muted); font-size: .92rem; }
.footer-menu a:hover, .footer-contact a:hover { color: var(--gold-soft); }
.footer-contact { display: grid; gap: .55rem; }
.footer-contact span { margin-top: .35rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .8rem; }

.inner-page { min-height: 60vh; padding: 5rem 0; }
.inner-page > .container { max-width: 1100px; }
.content-card { max-width: 1000px; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--line); background: var(--surface); }
.entry-header { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.entry-header h1 { margin-bottom: 0; }
.entry-content { color: var(--muted); }
.entry-content h2, .entry-content h3 { color: var(--ink); }
.entry-content a { color: var(--gold-soft); text-decoration: underline; }
.post-list { display: grid; gap: 1.2rem; }
.not-found { text-align: center; margin-inline: auto; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility 0s linear .2s; }
.modal.is-open { visibility: visible; opacity: 1; transition-delay: 0s; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); }
.modal-panel { position: relative; width: min(100%, 560px); max-height: min(90vh, 760px); overflow: auto; padding: clamp(1.5rem, 5vw, 2.8rem); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.modal-close { position: absolute; top: .6rem; right: .75rem; width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 1.8rem; line-height: 1; }
.modal-close:hover { color: var(--ink); }

@media (max-width: 1050px) {
	.nav-menu { gap: .8rem; }
	.header-phone { display: none; }
	.feature-grid, .steps-grid { grid-template-columns: repeat(2, 1fr); }
	.reviews-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
	.menu-toggle { display: block; }
	.site-navigation { position: fixed; top: var(--nava-mobile-nav-top, 78px); right: 0; left: 0; z-index: 49; max-height: calc(100vh - var(--nava-mobile-nav-top, 78px)); max-height: calc(100dvh - var(--nava-mobile-nav-top, 78px)); overflow-y: auto; padding: 1.2rem 20px 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 18px 28px rgba(0, 0, 0, .28); transform: translateY(-130%); visibility: hidden; pointer-events: none; transition: transform .2s ease, visibility 0s linear .2s; }
	.site-navigation.is-open { transform: translateY(0); visibility: visible; pointer-events: auto; transition-delay: 0s; }
	.nav-menu { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; display: grid; gap: 0; }
	.nav-menu li { border-bottom: 1px solid var(--line); }
	.nav-menu a { display: block; padding: .8rem 0; font-size: 1rem; }
	.nav-menu .menu-item-has-children > a { justify-content: space-between; }
	.nav-menu .sub-menu,
	.nav-menu .menu-item-has-children:hover > .sub-menu,
	.nav-menu .menu-item-has-children:focus-within > .sub-menu,
	.nav-menu .current-menu-ancestor > .sub-menu { position: static; display: grid; min-width: 0; gap: 0; padding: 0 0 .35rem 1rem; background: transparent; border: 0; box-shadow: none; opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: none; }
	.nav-menu .sub-menu li { border-top: 1px solid rgba(244, 239, 228, .08); border-bottom: 0; }
	.nav-menu .sub-menu a { padding: .65rem 0; white-space: normal; font-size: .93rem; }
	.header-actions .btn { display: none; }
	.hero-grid, .contact-grid { grid-template-columns: 1fr; }
	.hero-copy { order: -1; }
	.services-grid { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
	.container { width: min(var(--container), calc(100% - 28px)); }
	.brand img, .footer-brand img { width: 126px; height: 41px; }
	.hero { padding: 2.8rem 0 4rem; }
	.feature-grid, .steps-grid, .services-grid, .reviews-grid, .footer-grid { grid-template-columns: 1fr; }
	.service-card { min-height: auto; }
	.cta-inner, .footer-bottom { align-items: flex-start; flex-direction: column; }
	.cta-inner .btn { width: 100%; }
}

@media (max-width: 782px) {
	body.admin-bar .site-header { top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
