/*
Theme Name: Olga Center
Theme URI: https://wp.psiholog-msk.com
Author: Team Olga
Description: Lightweight custom theme for psychological center website.
Version: 1.0.0
Text Domain: olga-center
*/

:root {
  --bg: #f3f3f5;
  --paper: #ffffff;
  --text: #22222a;
  --muted: #6a6a74;
  --accent: #8e68d4;
  --accent-2: #7b54bf;
  --line: #e1e1e6;
  --radius: 14px;
  --shadow: 0 16px 40px rgba(58, 37, 112, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.top-strip {
  background: var(--accent);
  color: #fff;
  font-size: 13px;
}
.top-strip-inner {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.top-links,
.top-contacts {
  display: flex;
  align-items: center;
  gap: 18px;
}
.top-strip a {
  color: #fff;
  opacity: 0.95;
}
.top-strip a:hover {
  opacity: 1;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 36px;
  z-index: 40;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #e5e5ea;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}
.brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .01em;
  color: var(--text);
}
.brand small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  max-width: 280px;
}

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
.main-nav a { color: var(--text); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 0;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-light { background: #fff; color: var(--accent); border: 1px solid var(--line); }

.hero {
  padding: 56px 0 22px;
}
.hero-wrap {
  background: linear-gradient(135deg, #20153c, #36225f 60%, #4a3280);
  color: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 26px;
}
.hero h1 { margin: 0 0 14px; font-size: clamp(30px, 5vw, 54px); line-height: 1.08; }
.hero p { margin: 0 0 18px; color: rgba(255,255,255,.92); }
.hero-meta {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  padding: 18px;
}
.hero-meta li { margin-bottom: 8px; }

.section { padding: 48px 0; }
.section h2 { margin: 0 0 16px; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.2; }
.section .lead { color: var(--muted); max-width: 760px; margin: 0 0 20px; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 20px rgba(65, 44, 114, 0.06);
}
.card h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.3; }
.card p { margin: 0 0 12px; color: var(--muted); }

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 20px;
}
.paper {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
}

.cta {
  padding: 24px;
  border-radius: 24px;
  background: #efe8ff;
  border: 1px solid #d9cbff;
}

.site-footer {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--muted);
}

.entry {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 34px);
}
.entry h1 { margin-top: 0; line-height: 1.2; }
.entry p, .entry li { color: #353247; }

.page-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
}
.page-sidebar {
  align-self: start;
}
.side-nav {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
}
.side-nav a {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: #35343f;
  font-size: 14px;
}
.side-nav a:last-child {
  border-bottom: 0;
}
.side-nav a.is-active {
  font-weight: 700;
}
.entry-about img {
  width: 100%;
  max-width: 760px;
  height: auto;
  border-radius: 18px !important;
}

.about-photo-frame {
  position: relative;
  margin: 0 0 28px;
  max-width: 760px;
}
.about-photo-frame::before {
  content: "";
  position: absolute;
  top: 18px;
  right: -24px;
  width: 88%;
  height: 92%;
  background: #d9c7ff;
  border-radius: 20px;
  z-index: 0;
}
.about-photo-frame img {
  position: relative;
  z-index: 1;
  display: block;
  box-shadow: 0 14px 32px rgba(30, 22, 56, 0.16);
}

.about-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 16px;
}
.about-block-soft {
  background: #f8f3ff;
  border-color: #decdfc;
}
.about-block h3 {
  margin: 0 0 8px;
  font-size: 20px;
}
.about-block p {
  margin: 0 0 10px;
}
.about-block p:last-child {
  margin-bottom: 0;
}
.about-cta {
  margin: 10px 0 0;
  background: #ece3ff;
  border: 1px solid #d4c3fb;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 16px 18px;
}
.about-cta p {
  margin: 0;
}

/* Techniques page */
.methods-page h1 {
  margin: 0 0 8px;
  font-size: 52px;
  line-height: 1.06;
}
.methods-breadcrumb {
  color: #8b8898;
  font-size: 13px;
  margin-bottom: 24px;
}
.methods-section {
  margin-bottom: 36px;
}
.methods-section h2 {
  font-size: 42px;
  margin: 0 0 16px;
  line-height: 1.1;
}
.methods-intro {
  margin: 0 0 22px;
  color: #5e5c6a;
}
.methods-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.methods-grid--single {
  grid-template-columns: minmax(0, 320px);
}
.method-card {
  text-align: left;
  border: 1px solid #e7e7eb;
  background: #fff;
  min-height: 176px;
  padding: 18px 16px;
  border-radius: 0;
  cursor: pointer;
  transition: .2s transform, .2s box-shadow, .2s border-color, .2s background;
}
.method-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(41, 31, 71, 0.11);
  border-color: #ded4f5;
  background: #fdfcff;
}
.method-card__img {
  display: block;
  margin: 2px 0 16px;
  text-align: center;
}
.method-card__img img {
  width: 150px;
  height: 90px;
  object-fit: cover;
  border-radius: 0;
}
.method-card__title {
  display: block;
  color: #2f2d39;
  font-size: 30px;
  line-height: 1.22;
}

.method-modal {
  display: none;
}
.method-modal.is-open {
  display: block;
}
.method-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 18, 54, 0.55);
  z-index: 90;
}
.method-modal__dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(920px, calc(100% - 24px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 50px rgba(25, 17, 45, 0.28);
  z-index: 91;
  padding: 26px;
}
.method-modal__close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: block;
  border: 0;
  background: #f1ebff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.method-detail__crumb {
  color: #8b8898;
  font-size: 13px;
  margin-bottom: 10px;
}
.method-detail h3 {
  margin: 0 0 16px;
  font-size: 46px;
  line-height: 1.12;
}
.method-detail img {
  width: 100%;
  max-width: 440px;
  border-radius: 12px;
  margin: 0 0 16px;
}
.method-detail__text {
  color: #333142;
}
.method-detail__text p,
.method-detail__text li {
  color: #333142;
}

/* Biblioteka page */
.library-page h1 {
  margin: 0 0 10px;
  font-size: 48px;
  line-height: 1.08;
}
.library-page .methods-breadcrumb {
  margin-bottom: 18px;
  color: #8f8d9d;
  font-size: 13px;
}
.library-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 8px;
}
.library-item {
  display: grid;
  grid-template-columns: 280px 1fr 44px;
  align-items: center;
  gap: 20px;
  border: 1px solid #e8e3f4;
  background: #fff;
  padding: 16px;
  border-radius: 14px;
  color: #2f2d39;
  text-decoration: none;
  transition: .2s transform, .2s box-shadow, .2s border-color;
}
.library-item:hover {
  transform: translateY(-2px);
  border-color: #ccb7f1;
  box-shadow: 0 12px 24px rgba(52, 38, 89, 0.14);
  text-decoration: none;
}
.library-item__image-wrap {
  display: block;
  width: 100%;
  height: 170px;
  overflow: hidden;
  border-radius: 10px;
}
.library-item__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.library-item__content {
  display: block;
}
.library-item__date {
  display: block;
  color: #8f8d9c;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.library-item__title {
  display: block;
  color: #2f2d39;
  font-size: 30px;
  line-height: 1.18;
}
.library-item__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #d9ccf1;
  background: #f9f5ff;
  font-size: 18px;
  color: #7a5fb2;
  transition: .2s transform, .2s background, .2s border-color;
}
.library-item:hover .library-item__arrow {
  transform: translateX(2px);
  background: #f1e8ff;
  border-color: #c8afea;
}
.library-pagination {
  margin-top: 24px;
}
.library-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #e3deef;
  color: #4b4860;
  text-decoration: none;
  margin-right: 6px;
}
.library-pagination .page-numbers.current {
  background: #6f4faf;
  border-color: #6f4faf;
  color: #fff;
}

/* Homepage like Bitrix reference */
.home-hero {
  padding: 16px 0 0;
}
.home-slider {
  position: relative;
  background: #fff;
  border: 1px solid #e3e3e7;
  overflow: hidden;
}
.home-slide {
  display: none;
  grid-template-columns: 1fr 1fr;
  min-height: 350px;
}
.home-slide.is-active {
  display: grid;
}
.home-slide__text {
  padding: 46px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.home-slide__text h2 {
  margin: 0 0 12px;
  font-size: 48px;
  line-height: 1.06;
}
.home-slide__text p {
  margin: 0 0 24px;
  color: #575662;
  max-width: 520px;
}
.home-slide__image {
  display: block;
}
.home-slide__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-slider__dots {
  position: absolute;
  right: 18px;
  bottom: 14px;
  display: flex;
  gap: 8px;
}
.home-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.72);
}
.home-slider__dot.is-active {
  background: var(--accent);
}

.home-advantages {
  margin-top: 14px;
  background: #fff;
  border: 1px solid #e3e3e7;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.home-advantages__item {
  padding: 16px 16px 14px;
  border-right: 1px solid #ececf0;
}
.home-advantages__item:last-child {
  border-right: 0;
}
.home-advantages__item h3 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
}
.home-advantages__item p {
  margin: 0;
  color: #666670;
  font-size: 14px;
  line-height: 1.4;
}

.home-directions {
  padding: 28px 0 40px;
}
.home-directions__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.home-directions__subtitle {
  color: #8e8e98;
  font-size: 12px;
  margin-bottom: 4px;
}
.home-directions h2 {
  margin: 0;
  font-size: 46px;
  line-height: 1.08;
}
.home-directions__all {
  color: #3a3946;
  font-size: 14px;
}
.home-directions__intro {
  margin: 12px 0 18px;
  max-width: 880px;
  color: #5f5e69;
}
.home-directions__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.home-direction-card {
  background: #fff;
  border: 1px solid #e3e3e7;
  padding: 14px;
}
.home-direction-card__image {
  display: block;
  margin-bottom: 10px;
}
.home-direction-card__image img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.home-direction-card__section {
  color: #93919d;
  font-size: 12px;
  margin-bottom: 4px;
}
.home-direction-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}
.home-direction-card h3 a {
  color: #292833;
}
.home-direction-card p {
  margin: 0;
  color: #5e5d67;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 960px) {
  .hero-wrap, .about-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .top-strip { display: none; }
  .site-header { top: 0; }
  .page-layout { grid-template-columns: 1fr; }
  .page-sidebar { display: none; }
  .about-photo-frame::before {
    right: -10px;
    top: 10px;
  }
  .methods-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .methods-grid--single {
    grid-template-columns: minmax(0, 1fr);
  }
  .methods-page h1 {
    font-size: 44px;
  }
  .library-page h1 {
    font-size: 44px;
  }
  .library-item {
    grid-template-columns: 220px 1fr 40px;
  }
  .library-item__image-wrap {
    height: 130px;
  }
  .library-item__title {
    font-size: 24px;
  }
  .methods-section h2 {
    font-size: 36px;
  }
  .method-card__title {
    font-size: 24px;
  }
  .method-detail h3 {
    font-size: 36px;
  }
  .home-slide {
    grid-template-columns: 1fr;
  }
  .home-slide__text h2 {
    font-size: 38px;
  }
  .home-advantages,
  .home-directions__grid {
    grid-template-columns: 1fr 1fr;
  }
  .home-directions h2 {
    font-size: 38px;
  }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .home-advantages,
  .home-directions__grid {
    grid-template-columns: 1fr;
  }
  .methods-grid {
    grid-template-columns: 1fr;
  }
  .methods-page h1 {
    font-size: 36px;
  }
  .library-page h1 {
    font-size: 36px;
  }
  .library-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .library-item__image-wrap {
    height: 180px;
  }
  .library-item__arrow {
    display: none;
  }
  .library-item__title {
    font-size: 21px;
  }
  .methods-section h2 {
    font-size: 30px;
  }
  .method-card__title {
    font-size: 22px;
  }
  .method-modal__dialog {
    padding: 18px;
  }
  .home-slide__text {
    padding: 22px 18px;
  }
  .home-slide__text h2 {
    font-size: 32px;
  }
  .home-directions h2 {
    font-size: 32px;
  }
}
