/**
 * Стилі для ACF контентних блоків сторінок
 */

/* Загальні стилі для блоків */
.page-content-blocks {
  margin: 2rem 0;
  clear: both;
}

/* Контейнер для блоків в спеціальних шаблонах */
.smc-about .page-content-blocks,
.smc-catalog .page-content-blocks,
.cap-mission ~ .page-content-blocks {
  margin-top: 3rem;
}

.content-block {
  margin-bottom: 3rem;
}

.content-block:last-child {
  margin-bottom: 0;
}

.content-block .block-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Текстовий блок */
.text-block .block-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.text-block .block-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
}

/* Відступи */
.block-spacing-normal {
  padding: 2rem 0;
}

.block-spacing-small {
  padding: 1rem 0;
}

.block-spacing-large {
  padding: 4rem 0;
}

.block-spacing-none {
  padding: 0;
}

/* Кольори фону */
.block-bg-light-gray {
  background-color: #f8f9fa;
  padding-left: 2rem;
  padding-right: 2rem;
}

.block-bg-dark {
  background-color: #2c3e50;
  color: #fff;
  padding-left: 2rem;
  padding-right: 2rem;
}

.block-bg-dark .block-title,
.block-bg-dark .block-content {
  color: #fff;
}

.block-bg-primary {
  background-color: var(--primary-color, #3498db);
  color: #fff;
  padding-left: 2rem;
  padding-right: 2rem;
}

.block-bg-primary .block-title,
.block-bg-primary .block-content {
  color: #fff;
}

/* Блок з двома колонками */
.two-columns .columns-wrapper {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.two-columns.columns-50-50 .columns-wrapper {
  grid-template-columns: 1fr 1fr;
}

.two-columns.columns-60-40 .columns-wrapper {
  grid-template-columns: 60fr 40fr;
}

.two-columns.columns-40-60 .columns-wrapper {
  grid-template-columns: 40fr 60fr;
}

.two-columns.columns-70-30 .columns-wrapper {
  grid-template-columns: 70fr 30fr;
}

.two-columns.columns-30-70 .columns-wrapper {
  grid-template-columns: 30fr 70fr;
}

.two-columns .column {
  font-size: 1rem;
  line-height: 1.8;
}

/* Адаптивність для двох колонок */
@media (max-width: 768px) {
  .two-columns .columns-wrapper {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
}

/* Блок зображення з текстом */
.image-text .img-text-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.image-text.image-right .img-text-wrapper {
  direction: rtl;
}

.image-text.image-right .text-column {
  direction: ltr;
}

.image-text .img-column img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.image-text .text-column {
  padding: 1rem;
}

.image-text .block-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.image-text .block-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
}

/* Адаптивність для зображення з текстом */
@media (max-width: 768px) {
  .image-text .img-text-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .image-text.image-right .img-text-wrapper {
    direction: ltr;
  }
}

/* Блок списку */
.list-block .block-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.list-block .block-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-block .block-list li {
  padding: 0.75rem 0 0.75rem 2rem;
  position: relative;
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
  border-bottom: 1px solid #e9ecef;
}

.list-block .block-list li:last-child {
  border-bottom: none;
}

/* Стилі списку - маркери */
.list-style-bullets .block-list li::before {
  content: "•";
  position: absolute;
  left: 0.5rem;
  color: var(--primary-color, #3498db);
  font-size: 1.5rem;
  line-height: 1;
}

/* Стилі списку - номери */
.list-style-numbers .block-list {
  counter-reset: list-counter;
}

.list-style-numbers .block-list li {
  counter-increment: list-counter;
}

.list-style-numbers .block-list li::before {
  content: counter(list-counter) ".";
  position: absolute;
  left: 0.5rem;
  color: var(--primary-color, #3498db);
  font-weight: 700;
}

/* Стилі списку - галочки */
.list-style-checkmarks .block-list li::before {
  content: "✓";
  position: absolute;
  left: 0.5rem;
  color: #27ae60;
  font-size: 1.2rem;
  font-weight: 700;
}

/* HTML блок */
.html-block .block-inner {
  padding: 1rem;
}

/* Загальні стилі для WYSIWYG контенту в блоках */
.block-content p {
  margin-bottom: 1rem;
}

.block-content p:last-child {
  margin-bottom: 0;
}

.block-content ul,
.block-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.block-content ul li,
.block-content ol li {
  margin-bottom: 0.5rem;
}

.block-content a {
  color: var(--primary-color, #3498db);
  text-decoration: none;
  transition: color 0.2s;
}

.block-content a:hover {
  color: var(--primary-color-dark, #2980b9);
  text-decoration: underline;
}

.block-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.block-content h2,
.block-content h3,
.block-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.block-content h2 {
  font-size: 1.5rem;
}

.block-content h3 {
  font-size: 1.3rem;
}

.block-content h4 {
  font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 992px) {
  .content-block .block-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 576px) {
  .text-block .block-title,
  .image-text .block-title,
  .list-block .block-title {
    font-size: 1.5rem;
  }
  
  .content-block {
    margin-bottom: 2rem;
  }
  
  .block-spacing-normal {
    padding: 1.5rem 0;
  }
  
  .block-spacing-large {
    padding: 2.5rem 0;
  }
}
