/* ════════════════════════════════════════════
   Путь Ислама — styles.css
   Palette: emerald / gold / cream
   ════════════════════════════════════════════ */

:root {
  --emerald-900: #0d2b22;
  --emerald-700: #14532d;
  --emerald-600: #1a6b3c;
  --emerald-100: #e3efe7;
  --gold-500: #c9a227;
  --gold-400: #d9b64a;
  --gold-300: #e8cf85;
  --cream: #faf6ec;
  --cream-dark: #f2ead8;
  --ink: #22302a;
  --ink-soft: #4c5a52;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", -apple-system, "Segoe UI", sans-serif;

  --arch: 999px 999px 0 0;
  --shadow-card: 0 10px 30px rgba(13, 43, 34, 0.10);
  --shadow-card-hover: 0 22px 55px rgba(13, 43, 34, 0.22);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

.section { padding: clamp(3.2rem, 6vw, 5.5rem) 0; }

/* ── Reveal on scroll ─────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Section headings ─────────────────────── */
.section-head { text-align: center; margin-bottom: clamp(2rem, 4.5vw, 3rem); }

.section-mark {
  width: 44px; height: 44px;
  margin: 0 auto 1rem;
  color: var(--gold-500);
}
.section-mark svg { width: 100%; height: 100%; fill: currentColor; }
.section-mark--gold { color: var(--gold-400); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.15;
  color: var(--emerald-900);
}
.section-head--light .section-title { color: var(--cream); }

.section-sub {
  margin-top: .75rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.section-head--light .section-sub { color: var(--gold-300); }

/* ── Buttons ──────────────────────────────── */
.btn {
  display: inline-block;
  padding: .95rem 2.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .04em;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--emerald-900);
  box-shadow: 0 8px 26px rgba(201, 162, 39, .35);
}
.btn--gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(201, 162, 39, .5);
}
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(250, 246, 236, .5);
}
.btn--ghost:hover {
  border-color: var(--gold-400);
  color: var(--gold-300);
  transform: translateY(-3px);
}

/* ════════════ NAVIGATION ════════════ */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(13, 43, 34, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
  padding: .7rem 0;
}
.nav__inner {
  width: min(1160px, 92%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: .02em;
}
.nav__star {
  width: 26px; height: 26px;
  fill: var(--gold-400);
  flex-shrink: 0;
}
.nav__links {
  display: flex;
  gap: 2.2rem;
}
.nav__links a {
  color: var(--cream);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .03em;
  position: relative;
  padding: .25rem 0;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--gold-400);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav__cta {
  background: var(--gold-400);
  color: var(--emerald-900) !important;
  padding: .45rem 1.1rem !important;
  border-radius: 999px;
  font-weight: 700 !important;
}
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--gold-300); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav__burger span {
  width: 24px; height: 2px;
  background: var(--cream);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ════════════ HERO ════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(13, 43, 34, .55) 0%, rgba(13, 43, 34, .35) 45%, rgba(13, 43, 34, .82) 100%),
    url("../images/hero-mosque-sunset.webp") center / cover no-repeat;
}
.hero__content {
  width: min(820px, 90%);
  padding: 7rem 0 5rem;
  animation: heroIn 1.2s var(--ease) both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: none; }
}
.hero__eyebrow {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 1.4rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: 1.12;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
.hero__subtitle {
  max-width: 640px;
  margin: 0 auto 2.4rem;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: rgba(250, 246, 236, .92);
}
.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.foundations__more {
  text-align: center;
  margin-top: 2.6rem;
}
.hero__scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(250, 246, 236, .6);
  border-radius: 14px;
}
.hero__scroll span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--gold-300);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ════════════ ABOUT ════════════ */
.about {
  position: relative;
  background:
    linear-gradient(rgba(242, 234, 216, .3), rgba(242, 234, 216, .3)),
    url("../images/bg-pattern-geometric.jpg") center / 640px repeat;
}
.about__inner {
  position: relative;
  max-width: 760px;
  text-align: center;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: clamp(2.2rem, 5vw, 3.4rem);
}
.about .section-title { margin-bottom: 1.6rem; }
.about__inner .card__link { display: inline-block; margin-top: .6rem; }
.about__topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin: 1.8rem 0 2rem;
}
.about__topics a {
  font-size: .85rem;
  font-weight: 700;
  color: var(--emerald-700);
  background: var(--emerald-100);
  padding: .5rem 1.05rem;
  border-radius: 999px;
  transition: background .25s, color .25s;
}
.about__topics a:hover {
  background: var(--emerald-700);
  color: #fff;
}
.about__lead {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-style: italic;
  color: var(--emerald-700);
  margin-bottom: 1.4rem;
  line-height: 1.5;
}
.about__text {
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
  text-align: left;
}
.about__text:last-child { margin-bottom: 0; }

/* ════════════ CARDS ════════════ */
.foundations {
  background:
    linear-gradient(rgba(242, 234, 216, .3), rgba(242, 234, 216, .3)),
    url("../images/bg-pattern-geometric.jpg") center / 640px repeat;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.4rem, 3vw, 2.4rem);
}

.card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: var(--shadow-card-hover);
}
.card__media {
  height: 240px;
  overflow: hidden;
  position: relative;
}
.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(13, 43, 34, .25));
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.card:hover .card__media img { transform: scale(1.07); }

.card__body {
  padding: 1.8rem 1.9rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--emerald-900);
  margin-bottom: .7rem;
  position: relative;
  padding-bottom: .7rem;
}
.card__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 44px; height: 2px;
  background: var(--gold-500);
  transition: width .4s var(--ease);
}
.card:hover .card__title::after { width: 78px; }

.card__text {
  color: var(--ink-soft);
  font-size: .95rem;
  margin-bottom: 1.4rem;
  flex: 1;
}
.card__link {
  align-self: flex-start;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
  color: var(--emerald-600);
  border-bottom: 2px solid transparent;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.card__link:hover {
  color: var(--gold-500);
  border-color: var(--gold-500);
}

/* ════════════ HERITAGE ════════════ */
.heritage {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(201, 162, 39, .12), transparent 60%),
    linear-gradient(160deg, var(--emerald-900), var(--emerald-700));
  color: var(--cream);
}
.heritage__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.4rem, 3vw, 2.2rem);
}
.heritage__item {
  background: rgba(250, 246, 236, .05);
  border: 1px solid rgba(217, 182, 74, .22);
  border-radius: 16px;
  padding: 2rem 1.9rem;
  transition: transform .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease);
}
.heritage__item:hover {
  transform: translateY(-6px);
  background: rgba(250, 246, 236, .09);
  border-color: rgba(217, 182, 74, .55);
}
.heritage__icon {
  width: 46px; height: 46px;
  color: var(--gold-400);
  margin-bottom: 1.1rem;
}
.heritage__icon svg { width: 100%; height: 100%; }
.heritage__item h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: .6rem;
  color: var(--gold-300);
}
.heritage__item p {
  color: rgba(250, 246, 236, .82);
  font-size: .95rem;
}

/* ════════════ FOOTER ════════════ */
.footer {
  background: url("../images/footer-bg-pattern.webp") center / 500px repeat;
  color: var(--cream);
}
.footer__overlay {
  background: rgba(13, 43, 34, .93);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 2.5rem;
}
.footer__logo { font-size: 1.35rem; margin-bottom: 1rem; }
.footer__tagline {
  color: rgba(250, 246, 236, .7);
  font-size: .92rem;
}
.footer__col h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold-300);
  margin-bottom: 1rem;
}
.footer__col a {
  display: block;
  color: rgba(250, 246, 236, .78);
  font-size: .92rem;
  margin-bottom: .6rem;
  width: fit-content;
  transition: color .3s var(--ease), transform .3s var(--ease);
}
.footer__col a:hover {
  color: var(--gold-300);
  transform: translateX(4px);
}
.footer__social {
  display: flex;
  gap: .8rem;
  margin-top: 1.1rem;
}
.footer__social a {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 182, 74, .35);
  border-radius: 50%;
  margin-bottom: 0;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.footer__social a:hover {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--emerald-900);
  transform: translateY(-3px) translateX(0);
}
.footer__social svg { width: 18px; height: 18px; }

.footer__donate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.footer__qr {
  width: 108px;
  height: 108px;
  background: #fff;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  margin-bottom: .7rem;
}
.footer__donate-label {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--gold-300);
}

.footer__bottom {
  border-top: 1px solid rgba(250, 246, 236, .12);
  padding: 1.4rem 0;
  text-align: center;
  font-size: .82rem;
  color: rgba(250, 246, 236, .55);
}

/* ════════════ RESPONSIVE ════════════ */
@media (max-width: 900px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.4rem;
    background: rgba(13, 43, 34, .97);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s var(--ease);
  }
  .nav__links.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .nav__links a { font-size: 1.3rem; }
  .nav__logo, .nav__burger { position: relative; z-index: 102; }

  .cards { grid-template-columns: 1fr; }
  .heritage__grid { grid-template-columns: 1fr; }
  .about__text { text-align: center; }
}

/* ── Accessibility ────────────────────────── */
:focus-visible {
  outline: 3px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ════════════ ВНУТРЕННИЕ СТРАНИЦЫ ════════════ */
.card__title a { color: inherit; transition: color .3s var(--ease); }
.card__title a:hover { color: var(--emerald-600); }
.card__media { cursor: pointer; }

.page-hero {
  min-height: 46vh;
  display: grid;
  align-items: end;
  background-size: cover;
  background-position: center;
  color: var(--cream);
  padding: 8rem 0 3rem;
}
.page-hero__eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: .8rem;
}
.page-hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.1;
  text-shadow: 0 2px 24px rgba(0,0,0,.35);
}

.page-article {
  background:
    linear-gradient(rgba(242, 234, 216, .3), rgba(242, 234, 216, .3)),
    url("../images/bg-pattern-geometric.jpg") center / 640px repeat;
}
.page-article__inner { max-width: 780px; }

.breadcrumbs {
  font-size: .85rem;
  color: var(--ink-soft);
  margin-bottom: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.breadcrumbs a { color: var(--emerald-600); }
.breadcrumbs a:hover { color: var(--gold-500); }
.breadcrumbs b { color: var(--ink); font-weight: 600; }

.page-article__text { margin-top: 3.2rem; padding-top: 2.6rem; border-top: 1px solid #eee7d6; }
.posts__title--article { border-bottom: none; padding-bottom: 0; margin-bottom: 1.2rem; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.page-article__text p { margin-bottom: 1.2rem; color: var(--ink-soft); }
.page-article__text .about__lead { color: var(--emerald-700); }
.page-article__text strong { color: var(--emerald-900); }

.posts { margin-top: 3.5rem; }
.posts__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  color: var(--emerald-900);
  padding-bottom: .8rem;
  margin-bottom: 1.8rem;
  border-bottom: 2px solid var(--gold-400);
}
.post {
  background: #fff;
  border-radius: 16px;
  padding: 1.8rem 2rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow-card);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}
.post--with-cover {
  grid-template-columns: 1fr 96px;
  align-items: start;
}
.post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.post__body { min-width: 0; }
.post__cover {
  width: 96px;
  height: 96px;
  max-width: 96px;
  max-height: 96px;
  border-radius: 12px;
  overflow: hidden;
}
.post__cover { cursor: pointer; }
.post__cover img {
  display: block;
  width: 96px !important;
  height: 96px !important;
  max-width: 96px !important;
  object-fit: cover;
  transition: transform .3s var(--ease);
}
.post__cover:hover img { transform: scale(1.06); }

/* ── Лайтбокс: увеличенный просмотр превью ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  background: rgba(13, 43, 34, .88);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img {
  width: min(85vw, 820px);
  height: min(85vh, 820px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
@media (max-width: 560px) {
  .post--with-cover { grid-template-columns: 1fr; }
  .post--with-cover .post__cover { order: -1; width: 100%; height: 160px; max-width: 100%; }
  .post--with-cover .post__cover img { width: 100% !important; height: 100% !important; max-width: 100% !important; }
}
.post__meta {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: .5rem;
}
.post__heading {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--emerald-900);
  margin-bottom: .6rem;
}
.post__text { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1rem; }
.post__video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin-top: .8rem;
}
.post__video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.page-article__back {
  display: inline-block;
  margin-top: 2.5rem;
}

/* ── Отдельная страница поста (post.php) ── */
.post-full {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.post-full--with-cover {
  grid-template-columns: 1fr 240px;
  align-items: start;
}
.post-full__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  color: var(--emerald-900);
  line-height: 1.2;
  margin: .6rem 0 1.6rem;
}
.post-full__cover {
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.post-full__cover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.post-full__cover img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.post-full__text {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 1.6rem;
}
.post-page .post__video { margin-bottom: 1.6rem; }

@media (max-width: 640px) {
  .post-full--with-cover { grid-template-columns: 1fr; }
  .post-full--with-cover .post-full__cover { order: -1; max-width: 280px; margin: 0 auto; }
}

/* ── Страница «Материалы» ── */
.materials-page .container { max-width: 800px; }
.materials-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2.2rem;
}
.materials-filter__btn {
  display: inline-block;
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  padding: .55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid #d8d2c2;
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.materials-filter__btn:hover { border-color: var(--emerald-600); color: var(--emerald-700); }
.materials-filter__btn.is-active {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: #fff;
}
.post__badge {
  color: var(--emerald-600);
  font-weight: 700;
}
.post__badge:hover { color: var(--gold-500); }
.materials-empty { color: var(--ink-soft); text-align: center; padding: 2rem 0; }
