/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f1e5;
  color: #3c3c3c;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== LAYOUT ===== */
.page-wrapper {
  max-width: 768px;
  margin: 0 auto;
  background-color: #f5f1e5;
  min-height: 100vh;
}

/* ===== SECTIONS ===== */
.section {
  width: 100%;
  position: relative;
}

.section--beige {
  background-color: #f5f1e5;
}

.section--black {
  background-color: #000000;
}

.section--with-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===== BANNER IMAGES ===== */
.banner {
  display: block;
  width: 100%;
  line-height: 0;
}

.banner img {
  width: 100%;
  height: auto;
  display: block;
}

.banner--link {
  cursor: pointer;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.banner--link:hover {
  opacity: 0.92;
}

/* ===== CAROUSEL (Podsvetka page) ===== */
.carousel {
  width: 100%;
  display: flex;
  overflow-x: auto;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.carousel:active {
  cursor: grabbing;
}

.carousel__item {
  min-width: 85%;
  flex-shrink: 0;
  scroll-snap-align: start;
  line-height: 0;
}

.carousel__item img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

@media (min-width: 769px) {
  .carousel__item {
    min-width: 70%;
  }
}

/* ===== TOGGLE SECTIONS (Course page) ===== */
.toggle-section {
  width: 100%;
  line-height: 0;
}

.toggle-trigger {
  display: block;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.toggle-trigger:hover {
  opacity: 0.9;
}

.toggle-trigger img {
  width: 100%;
  height: auto;
  display: block;
}

.toggle-content {
  display: none;
  width: 100%;
  line-height: 0;
  animation: fadeIn 0.3s ease;
}

.toggle-content.is-open {
  display: block;
}

.toggle-content img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== PAYMENT FORMS ===== */
.form-section {
  padding: 20px 16px;
  background-color: #f5f1e5;
}

.form-block {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #3c3c3c;
  margin-bottom: 6px;
}

.form-group input[type="email"],
.form-group input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: #3c3c3c;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: #3c3c3c;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #d81b00;
}

.form-checkbox span {
  font-size: 12px;
  color: #3c3c3c;
  line-height: 1.4;
}

.form-checkbox a {
  color: #d81b00;
  text-decoration: underline;
}

.btn-pay {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background-color: #d81b00;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  text-align: center;
  text-decoration: none;
}

.btn-pay:hover {
  background-color: #c01800;
}

.btn-pay:active {
  transform: scale(0.98);
}

/* ===== LINK BUTTONS (Telegram, Documents) ===== */
.link-buttons {
  padding: 8px 16px 24px;
}

.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: #ffffff;
  text-align: center;
  margin-bottom: 8px;
  transition: opacity 0.2s, transform 0.1s;
}

.link-btn:hover {
  opacity: 0.9;
}

.link-btn:active {
  transform: scale(0.98);
}

.link-btn--telegram {
  background-color: #339af0;
}

.link-btn--red {
  background-color: #d81b00;
}

.link-btn--dark {
  background-color: #000000;
}

.link-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-color: #3C3C3C;
}

::-webkit-scrollbar-track {
  border-radius: 10px;
  background-color: #ECEAE5;
}

/* ===== BACK BUTTON ===== */
.back-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  text-decoration: none;
}

.back-btn:hover {
  background: rgba(0,0,0,0.7);
}

.back-btn svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .form-section {
    padding: 16px 12px;
  }
  
  .carousel__item {
    min-width: 92%;
  }
}

@media (min-width: 769px) {
  .page-wrapper {
    box-shadow: 0 0 40px rgba(0,0,0,0.08);
  }
}
