/* =========================================
   1. VARIABLES & BASE (Design System)
   ========================================= */

.aperon {
  --system-color: #000000;
  --system-color-hover: #00000015;
  /* --- 1. Глобальні кольори та фони --- */
  --ap-bg: #F4E8D0;
  --ap-bg-surface: #FFF7E8;
  --ap-text-main: #4A2C2A;
  --ap-text-muted: #8B5E3C;
  --ap-border-color: #B45F3D;

  /* --- 2. Акценти та Кнопки --- */
  --ap-btn-bg: linear-gradient(180deg, #FF8A5B 0%, #D64B3C 100%);
  --ap-btn-text: #FFF8E7;
  --ap-btn-border: 3px solid #7A2E2E;
  --ap-btn-shadow: 3px 3px 0 #7A2E2E;

  /* --- 3. Форми (Inputs) --- */
  --ap-input-bg: #FFFDF8;
  --ap-input-text: #3B2A26;
  --ap-input-border: 3px solid #B45F3D;
  --ap-input-focus: #00A6A6;

  /* --- 4. Геометрія (Shapes & Radii) --- */
  --ap-radius-card: 16px;
  --ap-radius-elem: 8px;

  /* --- 5. Межі та Тіні --- */
  --ap-card-shadow: 6px 6px 0 rgba(74, 44, 42, 0.25);
  --ap-img-shadow: 4px 4px 0 rgba(74, 44, 42, 0.25);
  --ap-border-width: 3px;
  --ap-border: var(--ap-border-width) solid var(--ap-border-color);

  /* --- 6. Анімація --- */
  --ap-transition-speed: 0.2s;

  /* Застосування базових стилів */
  background: var(--ap-bg);
  color: var(--ap-text-main);
  font-family: var(--ap-font-family);
  line-height: 1.5;
  transition: background var(--ap-transition-speed) ease, color var(--ap-transition-speed) ease;
}

.aperon section {
  margin: 0 auto;
  padding: 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 948px;
}

/* Typography */
.aperon h1, .aperon h2, .aperon h3 {
  color: var(--ap-text-main);
  margin: 0;
}

.aperon h1 {font-size: clamp(1.8rem, 8vw, 3.5rem);font-weight: 800;line-height: 1.1;}
.aperon h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); font-weight: 700; }
.aperon h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 600; }
.aperon p { font-size: 1rem; color: var(--ap-text-muted); }

/* =========================================
   2. SHARED UI ELEMENTS
   ========================================= */

/* Buttons */
.aperon button,
.aperon .button{
  display: inline-block;
  background: var(--ap-btn-bg);
  color: var(--ap-btn-text);
  border: var(--ap-btn-border);
  border-radius: var(--ap-radius-elem);
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--ap-btn-shadow);
  transition: opacity var(--ap-transition-speed) ease, 
              transform var(--ap-transition-speed) ease, 
              box-shadow var(--ap-transition-speed) ease;
}

.aperon button:hover,
.aperon .button:hover{
  opacity: 0.9;
  transform: translateY(-1px);
}

.aperon button:active,
.aperon .button:active {
  transform: translateY(0);
}

/* Forms & Inputs */
.aperon form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 500px;
  width: 100%;
}

.aperon section:has(form) {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.aperon input,
.aperon textarea,
.aperon select {
  width: 100%;
  padding: 12px;
  background: var(--ap-input-bg);
  border: var(--ap-input-border);
  border-radius: var(--ap-radius-elem);
  color: var(--ap-input-text);
  font-family: inherit;
  transition: border-color var(--ap-transition-speed) ease, 
              box-shadow var(--ap-transition-speed) ease;
}

.aperon input:focus,
.aperon textarea:focus,
.aperon select:focus {
  outline: none;
  border-color: var(--ap-input-focus);
  box-shadow: 0 0 0 1px var(--ap-input-focus);
}

.aperon label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
  font-weight: 600;
}

.aperon .input-pill {
  display: flex;
  background: var(--ap-input-bg);
  border: var(--ap-input-border);
  border-radius: 99px;
  padding: 4px 16px;
  transition: border-color var(--ap-transition-speed) ease;
}

.aperon .input-pill input {
  background: transparent;
  color: var(--ap-input-text);
  border: none;
  padding: 8px 0;
}

/* Shared Cards */
.aperon .features,
.aperon .plan,
.aperon .testimonial,
.aperon .pricing-card,
.aperon .faq-item,
.aperon .gallery-item {
  position: relative;
  background: var(--ap-bg-surface);
  border: var(--ap-border);
  border-radius: var(--ap-radius-card);
  padding: 24px;
  box-shadow: var(--ap-card-shadow);
  transition: background var(--ap-transition-speed) ease, 
              border-color var(--ap-transition-speed) ease, 
              box-shadow var(--ap-transition-speed) ease;
}

/* =========================================
   3. BLOCKS
   ========================================= */

/* Hero */
.aperon .hero .image {
  width: 100%;
  max-height: 60vh;
  border-radius: var(--ap-radius-card);
  overflow: hidden;
}
.aperon .hero .image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.aperon .hero h2 {margin: 0;font-weight: normal;font-size: clamp(1.2rem, 5vw, 1.8rem);}

.aperon .hero-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Hero v2 (Background Image) */
.aperon .hero-bg {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: #FFFFFF; /* Forces text to be white over dark overlay */
  max-width: 100%;
}
.aperon .hero-bg h1, .aperon .hero-bg h2 {color: #FFFFFF;text-align: center;font-size: clamp(1.8rem, 8vw, 3.5rem);}
.aperon .hero-bg h2 {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
    font-weight: normal;
}
.aperon .hero-bg-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* z-index: 0; */
}
.aperon .hero-bg-media .image, .aperon .hero-bg-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aperon .hero-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Dark tint */
  pointer-events: none;
  z-index: 1;
}
.aperon .hero-content {
  /* position: relative; */
  z-index: 1;
  text-align: center;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aperon .hero-bg .hero-buttons {
  justify-content: center;
}

/* Hero v3 (Diagonal Strip) */
.aperon .hero-strip {
  position: relative;
  overflow: hidden; /* Crucial for cutting off the strip */
  background: var(--ap-bg-surface);
  border: var(--ap-border);
  border-radius: var(--ap-radius-card);
  padding: 24px;
  text-align: center;
  box-shadow: var(--ap-card-shadow);
  max-width: 900px;
  margin: 24px auto;
}
.aperon .diagonal-strip {
  --f: 0em; /* control the folded part */
  
  position: absolute;
  top: 0;
  right: 0;
  line-height: 1.8;
  padding-inline: 1.2lh;
  padding-bottom: var(--f);
  clip-path: polygon(
    100% calc(100% - var(--f)),100% 100%,calc(100% - var(--f)) calc(100% - var(--f)),var(--f) calc(100% - var(--f)), 0 100%,0 calc(100% - var(--f)),999px calc(100% - var(--f) - 999px),calc(100% - 999px) calc(100% - var(--f) - 999px));
  transform: translate(calc((1 - cos(45deg))*100%), -100%) rotate(45deg);
  transform-origin: 0% 100%;

  background: var(--ap-border-color);
  color: var(--ap-text-main);
  font-weight: 800;
  font-size: 1.2rem;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);

  padding-top: 6px;
  padding-bottom: 6px;
}
.aperon .hero-strip .image {
  border-radius: calc(var(--ap-radius-card) / 2);
  overflow: hidden;
  max-width: clamp(300px, 100vw, 900px);
  max-height: clamp(300px, 60vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  position: relative;
}
.aperon .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Form */

.aperon .form h3 { margin-bottom: 12px; }

/* Form v2 (Questionnaire) */
.aperon .form-questionnaire {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 748px;
}

.aperon .form-questionnaire h2 {
  text-align: center;
  margin-bottom: 24px;
}

.aperon .form-questionnaire form {
  max-width: 700px;
  width: 100%;
}

.aperon .form-step {
  display: none;
  flex-direction: column;
  gap: 16px;
  background: var(--ap-bg-surface);
  padding: 32px;
  border: var(--ap-border);
  border-radius: var(--ap-radius-card);
  box-shadow: var(--ap-card-shadow);
  animation: fadeIn 0.3s ease;
}

.aperon .form-step.is-active,
.aperon.edit-mode .form-step {
  display: flex;
  margin-bottom: 16px;
}

/* Header & Controls */
.aperon .step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.aperon .step-header h3 {
  margin: 0;
}

.aperon .step-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  /* flex-shrink: 0; */
}

.aperon .step-type-select {
  padding: 6px 6px;
  border-radius: 6px;
  background: transparent;
  border: 2px dashed var(--ap-border-color);
  color: var(--ap-text-main);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  min-width: 20px;
}

/* Inputs & Full-Width Selectables */
.aperon .step-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Full-Width Clickable Cards */
.aperon .selectable-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  background: var(--ap-bg-main);
  border: var(--ap-border);
  border-radius: var(--ap-radius-card, 8px);
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  user-select: none;
  color: var(--ap-text-main);
}

.aperon .selectable-card:hover {
  border-color: var(--ap-border-color);
  background: var(--ap-bg-surface);
}

/* Active Highlight when Checked */
.aperon .selectable-card:has(.selectable-input:checked) {
  border-color: var(--ap-border-color);
  background: var(--ap-btn-bg);
  color: var(--ap-btn-text);
  box-shadow: var(--ap-btn-shadow);
}

.aperon .selectable-input {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--ap-btn-bg);
  cursor: pointer;
  flex-shrink: 0;
}

.aperon .selectable-card input:focus{
  outline:none;
  border: none;
  box-shadow: none;
}


.aperon .selectable-text {
  flex: 1;
  font-size: 14px;
}

/* Editor inline-edit container */
.aperon .option-editor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 8px;
}

.aperon .option-editor span {width: 100%;}

.aperon .step-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Features */
.aperon .features {
    max-width: 900px;
    margin: 24px auto;
}
.aperon .feature-card { position: relative; }

.aperon .features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.aperon .features .image {
  width: 64px;
  height: 64px;
  border-radius: var(--ap-radius-elem);
  overflow: hidden;
}
.aperon .features .image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Pricing */
.aperon .pricing h2 { text-align: center; margin-bottom: 12px; }

.aperon .pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.aperon .pricing-card { display: flex; flex-direction: column; }
.aperon .pricing-card > div:nth-of-type(1) { font-size: 2.5rem; font-weight: 800; }
.aperon .pricing-card ul { list-style: none; padding: 0; margin: 0 0 24px 0; flex: 1; }
.aperon .pricing-card li { padding: 8px 0; border-bottom: var(--ap-border); }
.aperon .pricing-card li::before { content: "✓ "; font-weight: bold; }

/* Countdown */
.aperon .countdown { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.aperon .countdown-row { display: flex; gap: 12px; align-items: center; }
.aperon .countdown-time { display: flex; flex-direction: column; align-items: center; }
.aperon .countdown-time > span {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  background: var(--ap-bg-surface); border: var(--ap-border);
  border-radius: var(--ap-radius-elem); font-size: 1.5rem; font-weight: bold;
}
.aperon .separator { font-size: 1.5rem; font-weight: bold; }
.aperon .countdown-price {
  background: var(--ap-btn-bg); color: var(--ap-btn-text);
  border: var(--ap-btn-border);
  padding: 12px 24px; border-radius: var(--ap-radius-elem);
  font-size: 1.5rem; font-weight: bold;
  box-shadow: var(--ap-btn-shadow);
}

/* Testimonials */
.aperon .testimonial-card { position: relative; }
.aperon .testimonials h2 { text-align: center; margin-bottom: 12px; }
.aperon .testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.aperon .testimonial-card {justify-items: center;align-items: center;text-align: center;overflow: hidden;}
.aperon .testimonial-card .image {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin-bottom: 16px; overflow: hidden;
}
.aperon .testimonial-card blockquote { margin: 0 0 16px; font-style: italic; }
.aperon .testimonial-card .image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 50%; /* Аватарка має лишатися круглою */
}

/* FAQ */
.aperon .faq h2 { text-align: center; margin-bottom: 12px; }
.aperon .faq-list {display: flex;flex-direction: column;gap: 12px;max-width: 700px;margin: 0 auto;}
.aperon .faq-item h3 { margin-bottom: 8px; }

/* Gallery */
.aperon .single-image {
  max-width: 748px;
}

.aperon .single-image img {
  border-radius: var(--ap-radius-card);
}

.aperon .gallery h2 { 
  text-align: center; 
  margin-bottom: 12px; 
}

/* 1. Switch to CSS Columns for the Masonry effect */
.aperon .gallery-grid {
  column-width: 250px; /* Creates as many columns as will fit */
  column-gap: 16px;
  width: 100%;
  max-width: 1200px;
  margin: auto;
}

/* 2. Prevent items from splitting across columns and add vertical spacing */
.aperon .gallery-item {
  padding: 0;
  overflow: hidden;
  break-inside: avoid; /* Standard */
  page-break-inside: avoid; /* Fallback for Safari */
  margin-bottom: 16px; /* Replaces grid gap for vertical spacing */
  display: inline-block; /* Helps stabilize column rendering */
  width: 100%;
  max-height: 100vh;
}

.aperon .gallery .image { 
  width: 100%;
}

/* 3. Allow images to determine their own height */
.aperon .gallery .image img {
  width: 100%; 
  height: auto; /* Changed from 100% to auto to keep natural aspect ratio */
  display: block;
  border-radius: var(--ap-radius-card);
  box-shadow: var(--ap-img-shadow);
}
/* Gallery v1 (Slider) */
.aperon .gallery-slider {
  --ap-slider-gap: 16px;
  --ap-slider-height: 380px;
  --ap-nav-size: 44px;

  width: 100%;
  position: relative;
}

.aperon .gallery-slider h2 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--ap-text-main);
}

.aperon .slider-container {
  display: flex;
  align-items: center;
  gap: var(--ap-slider-gap);
  position: relative;
  width: 100%;
}

/* Track with active scroll snapping */
.aperon .slider-track {
  display: flex;
  align-items: center;
  gap: var(--ap-slider-gap);
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 4px 0 12px;
  flex: 1;

  -ms-overflow-style: none;
  scrollbar-width: none;
}

.aperon .slider-track::-webkit-scrollbar {
  display: none;
}

/* Slide item layout & snap target */
.aperon .slider-item,
.aperon .slider-track .image {
  flex: 0 0 auto;
  height: auto;
  max-height: var(--ap-slider-height);
  max-width: 100%;
  scroll-snap-align: center;
  position: relative;
  border-radius: var(--ap-radius-card, 12px);
  border: var(--ap-border);
  background: var(--ap-bg-surface, #ffffff);
  box-shadow: var(--ap-card-shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Image scaling */
.aperon .slider-item .image,
.aperon .slider-item img,
.aperon .slider-track .image img {
  width: auto;
  height: auto;
  max-height: var(--ap-slider-height);
  max-width: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.aperon .slider-item:hover img,
.aperon .slider-track .image:hover img {
  transform: scale(1.03);
}

/* Navigation controls */
.aperon .slider-nav {
  background: var(--ap-bg-surface);
  color: var(--ap-text-main);
  width: 48px;
  height: 96px;
  padding: 0;
}

/* Captions */
.aperon .slider-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px 16px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.aperon .slider-caption-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.aperon .slider-caption-desc {
  font-size: 13px;
  opacity: 0.85;
  margin: 0;
}

/* Dots pagination */
.aperon .slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.aperon .slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ap-border, #d1d5db);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: all 0.25s ease;
}

.aperon .slider-dot.is-active {
  width: 24px;
  border-radius: 12px;
  background: var(--ap-primary, #3b82f6);
}

/* Disable snapping when an item is being dragged */
.aperon .slider-track:has(.is-dragging) {
  scroll-behavior: auto;
  scroll-snap-type: none !important;
}

.aperon .slider-track .image.is-dragging {
  scroll-snap-align: none !important;
  z-index: 50;
}

/* 1. Header Block */
.aperon .header-block { padding: 16px 24px; max-width: 1200px; }
.aperon .header-block__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: var(--ap-bg-surface);
    padding: 12px 24px;
    padding-left: 12px;
    gap: 6px;
    border-radius: var(--ap-radius-card);
    border: var(--ap-border);
    box-shadow: var(--ap-card-shadow);
}
.aperon .header-block__logo { max-width: 150px; height: auto; }
.aperon .header-block__logo img { width: 100%; height: auto; display: block; object-fit: contain; max-height: 70px; max-width: 150px; }
.aperon .header-block__nav .header-block__link-wrapper { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.aperon .header-block__link {
    color: var(--ap-text-main);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--ap-transition-speed) ease;
}
.aperon .header-block__link:hover { color: var(--ap-border-color); }

/* 2. Steps Block */
.aperon .steps-block { align-items: center; }
.aperon .steps-block h2 { margin-bottom: 12px; text-align: center; }
.aperon .steps-block__list { display: flex; flex-direction: column; gap: 24px; max-width: 700px; width: 100%; }
.aperon .steps-block__item {
    display: flex;
    gap: 16px;
    background: var(--ap-bg-surface);
    padding: 24px;
    border: var(--ap-border);
    border-radius: var(--ap-radius-card);
    box-shadow: var(--ap-card-shadow);
    position: relative;
}
.aperon .steps-block__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: var(--ap-btn-bg);
    color: var(--ap-btn-text);
    font-size: 1.25rem;
    font-weight: 800;
    border-radius: 50%;
    border: 3px solid var(--ap-text-main);
}
.aperon .steps-block__content { display: flex; flex-direction: column; gap: 8px; }

/* Stpes Block v2 */

.aperon .steps-v2 {
    padding: 48px 24px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.aperon .steps-v2 h2 { margin-bottom: 12px; text-align: center; }

.aperon .steps-v2-timeline {
    position: relative;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 40px; /* Spacing between consecutive steps */
}

/* Central Vertical Line */
.aperon .steps-v2-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: var(--ap-text-muted);
    transform: translateX(-50%);
    z-index: 1;
}

/* Individual Step Row */
.aperon .steps-v2-item {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 80px;
}

/* Teal Circular Node */
.aperon .steps-v2-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    color: var(--ap-bg-surface);
    background-color: var(--ap-text-muted);
    color: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 500;
    z-index: 2;
    gap: 6px;
}

/* Content Container */
.aperon .steps-v2-card {
    width: 50%;
    padding: 0 72px; /* Pull text away from the center */
    box-sizing: border-box;
    position: relative;
}

/* Alternating Layout Styles */
.aperon .steps-v2-item:nth-child(odd) .steps-v2-card {
    margin-left: 50%;
    text-align: left;
}

.aperon .steps-v2-item:nth-child(even) .steps-v2-card {
    margin-right: 50%;
    text-align: right;
}

/* Typography Matches */
.aperon .steps-v2-card h3 {
    color: var(--ap-text-main); /* Teal Title */
    text-transform: uppercase;
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.3;
}

.aperon .steps-v2-card p {
    color: #4A4A4A;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* Editor States & Buttons */
.aperon .steps-v2-item .delete {
    bottom: auto;
    right: auto;
    border-radius: 12px;
    position: static;
}
.aperon .steps-v2-content.is-editing iframe,
.aperon .steps-v2-content.is-editing a {
    pointer-events: none;
}

.aperon .steps-v2-add-btn {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.aperon .steps-v2-add-btn .editor-button {
    flex-direction: row;
    gap: 8px;
    padding: 12px 24px;
}

/* Responsive Overrides - Collapses layout on smaller screens */
@media (max-width: 768px) {
    .aperon .steps-v2-timeline::before {
        left: 40px;
    }

    .aperon .steps-v2-node {
        left: 40px;
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    /* Force all cards to the right side on mobile */
    .aperon .steps-v2-card,
    .aperon .steps-v2-item:nth-child(odd) .steps-v2-card,
    .aperon .steps-v2-item:nth-child(even) .steps-v2-card {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-left: 100px; /* Make room for shifted node */
        padding-right: 16px;
        text-align: left;
    }
}

/* 3. Features Block */
.aperon .features-block { align-items: center; }
.aperon .features-block h2 { margin-bottom: 12px; text-align: center; }
.aperon .features-block__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    width: 100%;
}
.aperon .features-block__card {
    background: var(--ap-bg-surface);
    padding: 24px;
    border: var(--ap-border);
    border-radius: var(--ap-radius-card);
    box-shadow: var(--ap-card-shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    text-align: center;
    align-items: center;
}
.aperon .features-block .image { border-radius: var(--ap-radius-card); overflow: hidden; max-height: 400px; }

/* 4. Service Pricing (Non-SaaS) */
.aperon .service-price { align-items: center; }
.aperon .service-price .image { border-radius: var(--ap-radius-card); overflow: hidden; max-height: 400px; }
.aperon .service-price h2 { margin-bottom: 12px; text-align: center; }
.aperon .service-price__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
}
.aperon .service-price__card {
    background: var(--ap-bg-surface);
    padding: 32px 24px;
    border: var(--ap-border);
    border-radius: var(--ap-radius-card);
    box-shadow: var(--ap-card-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    position: relative;
}
.aperon .service-price__header h3 { margin-bottom: 8px; font-size: 1.4rem; }
.aperon .service-price__cost { display: flex; flex-direction: column; }
.aperon .service-price__old { text-decoration: line-through; color: var(--ap-text-muted); font-size: 1rem; font-weight: 600; min-height: 20px;}
.aperon .service-price__current { font-size: 2.5rem; font-weight: 800; color: var(--ap-text-main); line-height: 1.1; }
.aperon .service-price__btn { width: 100%; text-align: center; }

/* 5. Footer Block */
.aperon .footer-block { 
    margin-top: 48px; 
    border-top: var(--ap-border); 
    padding-top: 48px;
    max-width: 1200px;
}
.aperon .footer-block__wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    width: 100%;
}
.aperon .footer-block__section { display: flex; flex-direction: column; gap: 16px; }
.aperon .footer-block__heading { font-size: 1.25rem; font-weight: 700; color: var(--ap-text-main); margin: 0; }
.aperon .footer-block__contacts { display: flex; flex-direction: column; gap: 12px; }
.aperon .footer-block__contact-item { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.aperon .footer-block__contact-label { font-weight: 700; color: var(--ap-text-main); }
.aperon .footer-block__contact-value { color: var(--ap-text-muted); }

/* Footer UniversalLinks Overrides */
.aperon .footer-block__link-wrapper { display: flex; flex-direction: column; gap: 12px; }
.aperon .footer-block__link {
    color: var(--ap-text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--ap-transition-speed) ease;
    width: fit-content;
}
.aperon .footer-block__link:hover { color: var(--ap-border-color); text-decoration: underline; }

.aperon .footer-block__bottom {
    margin-top: 32px;
    text-align: center;
    padding-top: 16px;
    border-top: 2px dashed var(--ap-border-color);
}

/* Simple */
.aperon .simple-text {
  max-width: 748px;
}

.aperon .simple-text li {
  list-style-type: disc;
  margin-left: 1.25rem;
}

.aperon .cta-button-block {
  max-width: 748px;
  margin: auto;
}
.aperon .cta-button-block .button { width: 100%; text-align: center; }

.aperon .single-image span { text-align: center; width: 100%; display: block; }

.aperon .embed-iframe-block {
  padding-top: 2rem;
  padding-bottom: 2rem;
  max-width: 948px; /* Equivalent to max-w-4xl */
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.aperon .embed-settings {
  margin-bottom: 1rem;
  background-color: #f9fafb; /* Equivalent to bg-gray-50 */
  padding: 1rem; /* Equivalent to p-4 */
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem; /* Equivalent to rounded-xl */
}

.aperon .embed-settings label {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
  color: #374151; /* Equivalent to text-gray-700 */
}

.aperon .embed-settings textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem; /* Equivalent to rounded-md */
  min-height: 80px;
  outline: none;
  resize: vertical;
}

.aperon .iframe-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9; /* Equivalent to aspect-video */
  background-color: #f3f4f6; /* Equivalent to bg-gray-100 */
  border-radius: 0.75rem; /* Equivalent to rounded-xl */
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aperon .iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  position: absolute;
  top: 0;
  left: 0;
}

/* Disables mouse capture on the iframe while in the editor preview mode */
.aperon .iframe-wrapper.is-editing iframe {
  pointer-events: none;
}

.aperon .iframe-placeholder {
  color: #9ca3af; /* Equivalent to text-gray-400 */
  font-size: 0.875rem;
}

/* =========================================
   4. EDITOR STATE (Повністю збережений)
   ========================================= */

.aperon [data-slot="file-upload"] input { width: 1px; height: 1px; padding: 0; }

/* Delete-Button */
.aperon .delete {
  position: absolute;
  bottom: 0px; right: 0px;
  color: var(--system-color);
  border: 2px dashed var(--system-color);
  border-radius: 12px 0px 0px 0px;
  padding: 8px 8px;
  z-index: 0;
  cursor: pointer;
  transition: color 0.1s ease, border-color 0.1s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.aperon .delete:hover {
  background: var(--system-color-hover);
}

.aperon .pricing .delete,
.aperon .faq .delete{
  top: calc(var(--ap-border-width) * -1);
  right: calc(var(--ap-border-width) * -1);
  bottom: auto;
  border-radius: 0px 0px 0px 12px;
}

.aperon .image .delete {
  top: 50%;
  left: 50%;
  border-radius: 120px;
  width: fit-content;
  height: fit-content;
  transform: translate(-50%, -50%);
  background: #ffffff57;
}

/* Editor-Buttton */
.aperon .editor-button {
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  border: 2px dashed var(--system-color);
  color: var(--system-color);
  transition: background 0.1s ease, 
              border-color 0.1s ease, 
              color 0.1s ease;
  user-select: none;
}
.aperon .editor-button:hover {
  background: var(--system-color-hover);
}
.aperon .editor-button.active {
  color: var(--ap-btn-text);
  background: var(--ap-btn-bg);
}

.aperon form .editor-button,
.aperon .pricing-card .editor-button{
  flex-direction: row;
  min-height: 0px;
}

.aperon .image.editor-button{ min-height: 0px; }

.aperon .hero-bg .image.editor-button,
.aperon .hero-bg .delete {
  transform: none;
  bottom: 12px;
  right: 12px;
  top: auto;
  left: auto;
  width: fit-content;
  height: fit-content;
  position: absolute;
  display: flex;
  z-index: 4;
  backdrop-filter: blur(5px);
}

.aperon .hero-bg .hero-buttons .editor-button {
  background: #ffffff57;
  backdrop-filter: blur(5px);
}

/* Edit Mode Overrides */

.aperon .custom-input {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 12px;
  background: var(--ap-input-bg);
  border: var(--ap-border);
  border-radius: var(--ap-radius-elem);
  color: var(--ap-input-text);
  font-family: inherit;
}

.aperon .custom-input > [contentEditable] {
  width: 100%;
}

.aperon .pricing-card li {
  display: flex;
  align-items: center;
}

.aperon .pricing-card li span {
  width: 100%;
}

/* InlineEditor */
.aperon:not(.preview-mode) .inline-editor {
  border: 2px dashed transparent;
  cursor: text;
  transition: border-color 0.1s ease;
}

.aperon:not(.preview-mode) .inline-editor:hover {
  border: 2px dashed var(--system-color);
}

.aperon:not(.preview-mode) .inline-editor:focus {
  outline: none;
  background: var(--system-color-hover);
}

.aperon:not(.preview-mode) .inline-editor.is-empty::before {
  content: attr(placeholder);
  opacity: 0.4;
}

.aperon:not(.preview-mode) .inline-editor.is-empty:focus::before {
  content: "";
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .aperon .features-grid, .aperon .pricing-grid, .aperon .testimonials-grid {
    grid-template-columns: 1fr;
  }
}