:root{--bg:#f2f7f3;--paper:#ffffff;--ink:#17231b;--muted:#647066;--accent:#164b32;--accent-2:#0f3525;--soft:#dfeee5;--line:#d8e5dc}*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--ink)}a{color:inherit;text-decoration:none}.site-header{position:sticky;top:0;z-index:20;background:rgba(15,53,37,.94);backdrop-filter:blur(12px);border-bottom:1px solid rgba(255,255,255,.12)}.topbar{max-width:1180px;margin:auto;padding:18px 22px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:12px;align-items:center;font-weight:800;line-height:1.1;color:white}.brand small{font-weight:500;color:#cfe3d7}.cross{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.12);color:white}.burger{display:none;border:0;background:#2f6f4f;color:white;border-radius:10px;padding:10px 13px;font-size:20px}.nav{max-width:1180px;margin:auto;padding:0 22px 16px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}.nav-link,.nav a{padding:10px 14px;border:1px solid rgba(255,255,255,.18);border-radius:999px;color:#d9eadf;font-size:14px;background:transparent;font:inherit;cursor:pointer}.nav-link.active,.nav a.active,.nav-link:hover,.nav a:hover,.has-submenu.active>.submenu-toggle{background:#2f6f4f;border-color:#2f6f4f;color:white}.nav-item{position:relative}.submenu-toggle{display:flex;align-items:center;gap:7px}.submenu-arrow{font-size:15px;line-height:1;transition:transform .24s ease}.submenu{position:absolute;left:0;top:100%;margin-top:10px;min-width:240px;padding:10px;background:rgba(15,53,37,.98);border:1px solid rgba(255,255,255,.14);border-radius:20px;box-shadow:0 18px 45px rgba(0,0,0,.24);display:grid;gap:6px;opacity:0;visibility:hidden;transform:translateY(-8px) scale(.98);transform-origin:top left;transition:opacity .22s ease,transform .22s ease,visibility .22s ease;pointer-events:none}.submenu a{border-radius:14px;border:1px solid transparent;padding:11px 13px;color:#d9eadf;background:transparent}.submenu a:hover,.submenu a.active{background:#2f6f4f;border-color:rgba(255,255,255,.10);color:white}.has-submenu:hover .submenu,.has-submenu:focus-within .submenu,.has-submenu.open .submenu{opacity:1;visibility:visible;transform:translateY(0) scale(1);pointer-events:auto}.has-submenu:hover .submenu-arrow,.has-submenu:focus-within .submenu-arrow,.has-submenu.open .submenu-arrow{transform:rotate(180deg)}
@media(min-width:861px){
  .has-submenu::after{content:"";position:absolute;left:0;right:0;top:100%;height:12px;display:block;}
  .has-submenu:hover .submenu,.has-submenu:focus-within .submenu,.has-submenu.open .submenu{opacity:1;visibility:visible;transform:translateY(0) scale(1);pointer-events:auto}
  .submenu:hover{opacity:1;visibility:visible;transform:translateY(0) scale(1);pointer-events:auto}
}
main{max-width:1180px;margin:auto;padding:28px 22px 34px}.hero{border-radius:32px;overflow:hidden}.hero-photo{min-height:560px;background:url('../../public/img/header.jpg') center/cover no-repeat;position:relative;box-shadow:0 24px 70px rgba(15,53,37,.18)}.hero-overlay{min-height:560px;background:linear-gradient(90deg,rgba(6,26,17,.78),rgba(15,53,37,.48),rgba(15,53,37,.14));display:flex;align-items:center;padding:58px}.hero-content{max-width:720px}.eyebrow{color:#d9eadf;font-weight:700;text-transform:uppercase;font-size:13px;letter-spacing:.08em}.hero h1{color:white;font-size:clamp(38px,6vw,72px);line-height:.95;margin:16px 0;text-shadow:0 3px 18px rgba(0,0,0,.25)}.hero p{font-size:18px;color:#eef7f1;line-height:1.65;max-width:680px}.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:26px}.btn{display:inline-flex;align-items:center;justify-content:center;padding:14px 18px;border-radius:14px;background:var(--accent);color:white;font-weight:700}.btn:hover{background:#2f6f4f}.btn.ghost{background:transparent;color:var(--accent);border:1px solid var(--accent)}.btn.ghost.light{color:white;border-color:rgba(255,255,255,.75);background:rgba(255,255,255,.08)}.btn.ghost.light:hover{background:rgba(255,255,255,.16)}.content{display:grid;grid-template-columns:1.2fr .8fr;gap:24px;margin-top:28px}.article,.info-card{background:var(--paper);border:1px solid var(--line);border-radius:28px;box-shadow:0 18px 50px rgba(15,53,37,.09)}.article{padding:36px}.article h2{font-size:32px;margin:0 0 18px}.article p{font-size:17px;line-height:1.8;color:#334139}.cards{display:grid;gap:12px;align-content:start}.info-card{padding:18px 20px;font-weight:700;color:#243329}.footer{max-width:1180px;margin:40px auto 0;padding:28px 22px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:20px;color:var(--muted)}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px;margin-top:22px}.gallery-item{overflow:hidden;border-radius:20px;border:1px solid var(--line);background:var(--paper);box-shadow:0 10px 26px rgba(15,53,37,.08)}.gallery-item img{display:block;width:100%;height:180px;object-fit:cover;transition:transform .25s ease}.gallery-item:hover img{transform:scale(1.04)}.empty-note{padding:18px 20px;border:1px dashed var(--line);border-radius:18px;color:var(--muted);background:rgba(255,255,255,.55)}@media(max-width:860px){.burger{display:block}.nav{display:none;padding:0 22px 18px}.nav.open{display:flex}.nav a,.nav-link{width:100%;text-align:center;justify-content:center}.nav-item{width:100%}.submenu{position:static;min-width:0;margin-top:7px;padding:7px;border-radius:16px;max-height:0;opacity:0;visibility:hidden;overflow:hidden;transform:translateY(-6px);transition:max-height .28s ease,opacity .22s ease,transform .22s ease,padding .22s ease,margin .22s ease}.has-submenu.open .submenu{max-height:420px;opacity:1;visibility:visible;transform:translateY(0);padding:7px;margin-top:7px}.has-submenu:not(.open) .submenu{padding-top:0;padding-bottom:0;margin-top:0}.has-submenu:hover .submenu:not(.open){pointer-events:none}.hero-photo,.hero-overlay{min-height:430px}.hero-overlay{padding:34px;background:linear-gradient(180deg,rgba(6,26,17,.78),rgba(15,53,37,.52))}.hero h1{font-size:34px}.hero p{font-size:16px}.content{grid-template-columns:1fr}.article{padding:28px}.footer{display:block}}@media(max-width:520px){main{padding:18px 14px 28px}.topbar{padding:15px 16px}.hero{border-radius:24px}.hero-photo,.hero-overlay{min-height:360px}.hero-overlay{padding:26px}.hero-actions .btn{width:100%}.brand{font-size:15px}.cross{width:38px;height:38px}.article h2{font-size:27px}}

/* Контентные изображения внутри отдельных страниц */
.content-image{margin:26px 0;border-radius:24px;overflow:hidden;border:1px solid var(--line);background:var(--paper);box-shadow:0 14px 36px rgba(15,53,37,.10)}
.content-image img{display:block;width:100%;max-height:420px;object-fit:cover}
.content-image figcaption{padding:12px 16px;color:var(--muted);font-size:14px;background:#f7fbf8}
.article ul,.article ol{font-size:17px;line-height:1.8;color:#334139;padding-left:24px}
.article h3{font-size:23px;margin:28px 0 12px;color:var(--accent-2)}
.schedule-list{display:grid;gap:10px;margin-top:20px}
.schedule-list div{display:flex;gap:14px;justify-content:space-between;align-items:center;padding:14px 16px;border:1px solid var(--line);border-radius:16px;background:#f7fbf8}
.schedule-list b{color:var(--accent-2)}
.schedule-list span{text-align:right;color:#334139}
@media(max-width:520px){.schedule-list div{display:block}.schedule-list span{display:block;text-align:left;margin-top:4px}.content-image img{max-height:300px}}

/* Точное наполнение страниц с фото с исходного сайта */
.clergy-card{display:grid;grid-template-columns:170px 1fr;gap:22px;margin:26px 0;padding:20px;border:1px solid var(--line);border-radius:24px;background:#f7fbf8;box-shadow:0 10px 28px rgba(15,53,37,.06)}
.clergy-card img{width:170px;max-height:230px;object-fit:cover;border-radius:18px;border:1px solid var(--line);background:white}
.clergy-card h4{font-size:22px;margin:0 0 8px;color:var(--accent-2)}
.clergy-card p{margin:0 0 10px;font-size:16px;line-height:1.65}
.portrait-block{max-width:360px;margin-left:auto;margin-right:auto}
.portrait-block img{max-height:480px;object-fit:contain;background:#f7fbf8}
.schedule-cards{display:grid;gap:14px;margin-top:20px}
.schedule-day{padding:18px 20px;border:1px solid var(--line);border-radius:20px;background:#f7fbf8;box-shadow:0 10px 24px rgba(15,53,37,.05)}
.schedule-day h3{margin:0 0 8px;color:var(--accent-2)}
.schedule-day h3 span{font-size:18px;color:var(--muted);font-weight:700}
.schedule-day p{margin:0 0 8px;font-size:16px;color:#334139}
.schedule-day ul{margin:8px 0 0;padding-left:20px}
.schedule-day li{margin:5px 0;line-height:1.55}
@media(max-width:640px){.clergy-card{grid-template-columns:1fr}.clergy-card img{width:100%;max-height:360px;object-fit:contain}.portrait-block{max-width:100%}}


/* Mobile submenu click fix: desktop hover stays desktop-only; mobile opens strictly by .open */
@media (max-width: 860px) {
  .has-submenu:hover .submenu,
  .has-submenu:focus-within .submenu {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
  }

  .has-submenu.open .submenu,
  .has-submenu.open:hover .submenu,
  .has-submenu.open:focus-within .submenu {
    display: grid;
    max-height: 560px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    padding: 7px;
    margin-top: 7px;
  }

  .submenu a {
    display: block;
    width: 100%;
    pointer-events: auto;
    text-align: center;
    touch-action: manipulation;
  }

  .submenu-toggle {
    width: 100%;
    touch-action: manipulation;
  }
}

/* Final mobile submenu fix: clickable inner links */
@media (max-width: 860px) {
  .nav.open {
    align-items: stretch;
  }

  .nav .has-submenu {
    display: block;
    width: 100%;
  }

  .nav .has-submenu > .submenu-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
  }

  .nav .has-submenu > .submenu {
    position: static;
    display: grid;
    width: 100%;
    min-width: 0;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
    transform: none;
    padding: 0 7px;
    margin: 0;
  }

  .nav .has-submenu.open > .submenu,
  .nav .has-submenu.open:hover > .submenu,
  .nav .has-submenu.open:focus-within > .submenu {
    max-height: 700px;
    opacity: 1;
    visibility: visible;
    overflow: visible;
    pointer-events: auto;
    transform: none;
    padding: 7px;
    margin-top: 7px;
  }

  .nav .has-submenu.open > .submenu a {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
    pointer-events: auto;
    touch-action: manipulation;
  }
}
