/* ================================================================
   RUSSIAN DIALOGUE — style.css
   Matches g.rany.ing design with Keepz payment support
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; width: 100%; }

body {
  font-family: 'Open Sans', sans-serif;
  color: #333;
  background: #fff;
  overflow-x: hidden;
  width: 100%;
}

/* ── VARIABLES ── */
:root {
  --green: #3E6062;
  --btn-grad: linear-gradient(90deg, #6BAC73 0%, #41984C 100%);
  --btn-grad-dim: linear-gradient(90deg, rgba(107,172,115,.5) 0%, rgba(65,152,76,.5) 100%);
  --testi-grad: linear-gradient(103.21deg, #6BAC73 4.89%, #41984C 96.2%, #5B9462 96.2%);
  --footer-bg: #284D37;
  --section-bg: #F8F8F8;
  --card-shadow: 0px 4px 5px rgba(0,0,0,.04);
  --radius-card: 24px;
  --radius-btn: 40px;
  --content-w: 80%;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { color: var(--green); }

/* ── BUTTON ── */
.navBarButton {
  background: var(--btn-grad);
  border: none;
  border-radius: var(--radius-btn);
  color: #fff;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 28px;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  display: inline-block;
  white-space: nowrap;
}
.navBarButton:hover { opacity: .9; transform: translateY(-1px); }
.navBarButton:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border: 2px solid #41984C;
  color: #41984C;
  border-radius: var(--radius-btn);
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 10px 26px;
  cursor: pointer;
  transition: all .2s;
}
.btn-outline:hover { background: var(--btn-grad); color: #fff; border-color: transparent; }

/* ── HEADER / NAV ── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  transition: box-shadow .2s;
  width: 100%;
}
#site-header.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,.08); }

.nav-wrapper { width: 100%; text-align: center; }

.navBar {
  display: grid;
  grid-template-columns: 200px 1fr auto auto;
  align-items: center;
  gap: 16px;
  width: var(--content-w);
  margin: 0 auto;
  padding: 20px 0;
}

.logo {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--green);
  line-height: 1.2;
  text-align: left;
  letter-spacing: .03em;
  cursor: pointer;
}
.logo .logo-light { color: #fff; }

.nav-links {
  display: flex;
  gap: 32px;
  justify-content: center;
}
.nav-links a {
  font-weight: 700;
  font-size: 18px;
  color: var(--green);
  transition: opacity .2s;
}
.nav-links a:hover { opacity: .7; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
  transition: all .3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-6px); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border-top: 1px solid #eee;
  text-align: center;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-weight: 700; font-size: 18px; color: var(--green); }

/* ── SECTION TITLES ── */
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--green);
  text-align: center;
  margin-bottom: 32px;
}
.subsection-title {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  color: var(--green);
  text-align: center;
  margin: 40px 0 20px;
}

/* ── FADE IN ── */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .5s; }
.fade-in.visible { opacity: 1; transform: none; }

/* ── HERO ── */
#home {
  width: 100%;
  text-align: center;
  padding: 40px 0 20px;
}
.indexPanel {
  display: inline-block;
  width: var(--content-w);
  text-align: left;
}
.indexGrid {
  display: grid;
  grid-template-columns: 1.5fr .1fr 1fr;
  align-items: center;
  gap: 0;
}
.hero-text h2 {
  font-size: clamp(22px, 2.5vw, 36px);
  font-weight: 700;
  color: var(--green);
  line-height: 1.35;
  margin-bottom: 20px;
}
.hero-text p {
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--green);
  line-height: 1.7;
}
#indexImg {
  width: 100%;
  height: min(calc(100vh - 200px), 80vh);
  object-fit: contain;
}

/* ── COURSES ── */
.onlineCourse { margin-top: 60px; text-align: center; }
.onlineCoursePanel {
  display: inline-block;
  width: var(--content-w);
  text-align: left;
}

.course-list { display: flex; flex-direction: column; gap: 16px; }

.course-card {
  background: #fff;
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0 16px;
  align-items: center;
}
.card-main h3 { font-size: 20px; color: var(--green); margin-bottom: 6px; }
.card-main p { color: #555; font-size: 16px; line-height: 1.5; }
.card-action { grid-row: 1; grid-column: 2; align-self: center; }

.card-expand {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s;
  padding: 0;
  color: #444;
  font-size: 16px;
  line-height: 1.7;
}
.card-expand.open {
  max-height: 300px;
  padding-top: 16px;
}

/* ── PRICING ── */
.pricing-section {
  margin-top: 60px;
  text-align: center;
  padding-bottom: 60px;
}

.pricing-headers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
.pricing-headers div {
  font-weight: 700;
  font-size: 18px;
  color: var(--green);
  text-align: center;
  padding: 8px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.price-card {
  background: #fff;
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.price-card h4 { font-size: 20px; color: var(--green); }
.price-card p { color: #555; font-size: 15px; line-height: 1.5; }
.price-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--green);
}
.price-value span { font-size: 16px; font-weight: 400; color: #888; }
.price-features { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.price-features div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #555;
}
.price-features img { width: 16px; height: 16px; }

.payment-secure {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.payment-methods { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.pm-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f5f5f5;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
}
.secure-text { font-size: 13px; color: #888; }

/* ── LEVELS ── */
.lessons_levels {
  background: var(--section-bg);
  width: 100%;
  text-align: center;
  padding: 60px 0;
}
.lessons_levelsPanel {
  display: inline-block;
  width: var(--content-w);
}
.level-list { display: flex; flex-direction: column; gap: 16px; text-align: left; }

.level-card {
  background: #fff;
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.level-card-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 20px 24px;
  gap: 16px;
}
.level-card-top h3 { font-size: 20px; color: var(--green); margin-bottom: 4px; }
.level-badge {
  display: inline-block;
  background: var(--section-bg);
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-top: 4px;
}

.level-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s ease, padding .3s;
  padding: 0 24px;
}
.level-expand.open {
  max-height: 1000px;
  padding: 0 24px 24px;
}
.level-expand h4 {
  font-size: 13px;
  font-weight: 700;
  color: #999;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 16px 0 8px;
}
.level-expand p { font-size: 15px; color: #555; line-height: 1.7; }

/* ── BOOKS ── */
.books-section {
  background: var(--section-bg);
  width: 100%;
  text-align: center;
  padding: 60px 0;
}
.books-panel {
  display: inline-block;
  width: var(--content-w);
}
.books-carousel { position: relative; }

.book-slide { display: none; }
.book-slide.active { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; text-align: left; }

.book-img img {
  width: 100%;
  max-width: 500px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,.1);
  margin: 0 auto;
}
.book-info h3 { font-size: 24px; color: var(--green); margin-bottom: 12px; }
.book-info p { font-size: 16px; color: #555; line-height: 1.7; margin-bottom: 16px; }
.book-price { font-size: 28px; font-weight: 700; color: var(--green); margin-bottom: 20px; }
.book-price span { font-size: 16px; color: #888; font-weight: 400; }

.books-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}
.carousel-arrow-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #E2E3E7;
  background: #fff;
  box-shadow: 3px 4px 8px rgba(0,0,0,.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--green);
  transition: background .2s;
}
.carousel-arrow-btn:hover { background: #f0fff4; }

#books-dots, #testi-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #D9D9D9;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .2s;
  padding: 0;
}
.dot.active { background: #41984C; transform: scale(1.3); }

/* ── TESTIMONIALS ── */
.Testimonials {
  width: 100%;
  text-align: center;
  padding: 60px 0;
  overflow: hidden;
  --cardWidth: min(600px, 90vw);
}
.Testimonials h2 { margin-bottom: 40px; }

.testi-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  overflow: hidden;
}

.testimonial-card {
  position: absolute;
  width: var(--cardWidth);
  background: var(--testi-grad);
  border-radius: var(--radius-btn);
  padding: 30px 36px;
  color: #fff;
  text-align: left;
  transition: transform .4s ease, opacity .4s ease;
  opacity: 0;
  pointer-events: none;
}
.testimonial-card.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  position: relative;
  pointer-events: auto;
}
.testimonial-card.prev {
  opacity: .45;
  transform: translateX(calc(-1 * var(--cardWidth) - 32px)) scale(.92);
  pointer-events: none;
}
.testimonial-card.next {
  opacity: .45;
  transform: translateX(calc(var(--cardWidth) + 32px)) scale(.92);
  pointer-events: none;
}

.testi-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}
.testi-text {
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 20px;
  min-height: 120px;
}
.testi-author strong { display: block; font-size: 16px; font-weight: 700; }
.testi-author span { font-size: 13px; opacity: .75; }

.testi-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

/* ── CONTACT ── */
.questions {
  width: 100%;
  text-align: center;
  padding: 60px 0 80px;
  background:
    url(img/questionBGL.svg) left bottom no-repeat,
    url(img/questionBGR.svg) right bottom no-repeat;
  background-size: 200px;
}
.questionsPanel {
  width: min(500px, 90%);
  display: inline-block;
  text-align: left;
}
.questionsPanel h2 { text-align: center; margin-bottom: 12px; }
.questionsPanel > p { text-align: center; color: #555; font-size: 16px; margin-bottom: 24px; line-height: 1.6; }

.questionsPanel input,
.questionsPanel textarea {
  margin: 8px 0;
  width: 100%;
  background: #F8F8F8;
  border: 1px solid #E2E3E7;
  padding: 12px 16px;
  font-size: 16px;
  font-family: 'Open Sans', sans-serif;
  color: #4E787A;
  border-radius: 8px;
  outline: none;
  transition: border-color .2s;
  resize: vertical;
}
.questionsPanel input:focus,
.questionsPanel textarea:focus { border-color: #41984C; }

.questionsPanel .submit-wrap { margin-top: 16px; text-align: center; }
.questionsPanel .navBarButton { width: 100%; font-size: 18px; padding: 14px; }

.form-success {
  text-align: center;
  padding: 32px;
  color: #41984C;
  font-size: 18px;
  font-weight: 700;
}

/* ── NOTIFY ME ── */
.notify-form { margin-top: 8px; }
.notify-row { display: flex; gap: 8px; }
.notify-row input {
  flex: 1;
  background: #F8F8F8;
  border: 1px solid #E2E3E7;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-family: 'Open Sans', sans-serif;
  color: #4E787A;
  outline: none;
}
.notify-ok { color: #41984C; font-size: 14px; margin-top: 6px; }

/* ── FOOTER ── */
.bottom {
  background: var(--footer-bg);
  text-align: center;
  padding: 40px 0 20px;
}
.bottomPanel {
  display: inline-block;
  width: var(--content-w);
  text-align: left;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 20px;
}
.bottom span, .bottom a, .bottom p { color: #D9D9D9; }
.bottom a:hover { color: #fff; }

.footer-logo .logo { font-size: 22px; color: #fff; margin-bottom: 8px; }
.footer-tagline { font-size: 14px; color: #aaa; line-height: 1.5; }

.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-size: 15px; font-weight: 600; }

.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact a { font-size: 14px; }
.footer-social { display: flex; gap: 12px; margin-top: 8px; }
.social-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.social-icon:hover { background: rgba(255,255,255,.25); }
.social-icon svg { width: 18px; height: 18px; fill: #D9D9D9; }

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #8aab94;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  :root { --content-w: 92%; }

  .navBar {
    grid-template-columns: 1fr auto;
    padding: 16px 0;
  }
  .nav-links, .navBar > .navBarButton { display: none; }
  .hamburger { display: flex; }

  .indexGrid { grid-template-columns: 1fr; gap: 24px; }
  .indexGrid > :nth-child(2) { display: none; }
  #indexImg { height: 50vw; max-height: 340px; }
  .hero-text { text-align: center; }

  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-headers { grid-template-columns: 1fr; }
  .pricing-headers div:not(:first-child) { display: none; }

  .book-slide.active { grid-template-columns: 1fr; }
  .book-img { order: 1; }
  .book-info { order: 2; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  .course-card { grid-template-columns: 1fr; }
  .card-action { grid-column: 1; text-align: left; margin-top: 8px; }

  .level-card-top { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .Testimonials { --cardWidth: 88vw; }
  .testimonial-card.prev, .testimonial-card.next { display: none; }
  .testi-stage { min-height: 300px; }
}
