/* ========================================================
   ЕДИНЫЕ СТИЛИ ДЛЯ ИНФОБЛОКОВ SAD62MOGILEV.BY
   ======================================================== */

/* Сброс паразитных отступов и пустых параграфов WordPress */
.sad-wrap p {
  margin: 0 !important;
  padding: 0 !important;
}
.sad-wrap p:empty,
.sad-wrap a:empty,
.sad-wrap div:empty {
  display: none !important;
}

/* Общий контейнер */
.sad-wrap {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #334155;
  box-sizing: border-box;
}

/* Базовая карточка */
.sad-card {
  background: #ffffff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.05);
  box-sizing: border-box;
}

/* 1. Карточки руководства с фото */
.sad-card-leader {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  padding: 12px 14px;
  gap: 14px;
}
.sad-leader-photo {
  flex: 0 0 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.sad-leader-photo img {
  width: 130px;
  height: 165px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}
.sad-leader-info {
  flex: 1 1 230px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 200px;
}
.sad-leader-schedule {
  flex: 2 1 320px;
  background: #f8fafc;
  border: 1px solid #e0f2fe;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 250px;
}

/* 2. Карточки контактов (штат / кабинеты) */
.sad-card-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  gap: 12px;
}
.sad-contact-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sad-cabinet-badge {
  background: #f8fafc;
  border: 1px solid #e0f2fe;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: #475569;
  text-align: right;
  white-space: nowrap;
}

/* 3. Карточки ссылок */
.sad-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  gap: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sad-card-link:hover,
.sad-card-doc:hover {
  border-color: #38bdf8;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.10);
}

/* 4. Карточки документов */
.sad-card-doc {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* 5. Карточка со сканом документа (учредительные) */
.sad-card-scan {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  padding: 0 16px 0 14px;
  gap: 20px;
}
.sad-scan-preview {
  flex: 0 0 250px;
  width: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.sad-scan-preview img {
  width: 100%;
  height: auto;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
  display: block;
}
.sad-scan-info {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 260px;
  padding: 14px 0;
  box-sizing: border-box;
}

/* Универсальные элементы: бейджи, кнопки, ссылки */
.sad-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: bold;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: none !important;
}
.sad-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

/* Ссылки (жесткий приоритет над стилями темы WP) */
.sad-wrap a.sad-link,
.sad-wrap .sad-link {
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  border-bottom: none !important;
}
.sad-wrap a.sad-link:hover,
.sad-wrap .sad-link:hover {
  color: #0284c7 !important;
}
.sad-wrap a.sad-phone,
.sad-wrap .sad-phone {
  color: #0284c7 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  text-decoration: none !important;
  box-shadow: none !important;
  border-bottom: none !important;
}

/* Кнопки */
.sad-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f0f9ff !important;
  color: #0284c7 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  border: 1px solid #bae6fd !important; /* возвращаем полноценную рамку со всех сторон */
  text-decoration: none !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  transition: background 0.15s ease !important;
}
.sad-btn:hover {
  background: #e0f2fe;
}
.sad-btn-full {
  width: 100%;
  padding: 7px 12px;
  box-sizing: border-box;
}

/* Зеленый блок безопасности / уведомлений */
.sad-alert-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
  box-sizing: border-box;
}

/* Сетка достижений и наград */
.sad-achieve-container {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 16px !important;
  margin-top: 20px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.sad-achieve-container p,
.sad-achieve-container br {
  display: none !important;
}

.sad-achieve-card {
  flex: 0 1 220px !important;
  width: 220px !important;
  max-width: 240px !important;
  min-width: 180px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  display: flex !important;
  flex-direction: column !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  float: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.sad-achieve-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 14px rgba(2, 132, 199, 0.15) !important;
  border-color: #38bdf8 !important;
}

.sad-achieve-img {
  width: 100% !important;
  height: 260px !important;
  max-height: 260px !important;
  background: #f8fafc !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.sad-achieve-img img,
.sad-achieve-card img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 260px !important;
  object-fit: cover !important;
  object-position: top center !important;
  display: block !important;
  float: none !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}

.sad-achieve-meta {
  padding: 8px 12px !important;
  background: #ffffff !important;
  border-top: 1px solid #f1f5f9 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #0284c7 !important;
  box-sizing: border-box !important;
}

@media (max-width: 640px) {
  .sad-achieve-card {
    flex: 0 1 calc(50% - 10px) !important;
    width: calc(50% - 10px) !important;
    min-width: 140px !important;
  }
  .sad-achieve-img,
  .sad-achieve-img img,
  .sad-achieve-card img {
    height: 190px !important;
    max-height: 190px !important;
  }
}



/* ========================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (ДО 680px)
   ======================================================== */
@media (max-width: 680px) {
  .sad-card-leader {
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 10px !important;
  }
  .sad-leader-photo {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    display: block !important;
  }
  .sad-leader-photo img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
  .sad-card-contact,
  .sad-card-link {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }
  .sad-cabinet-badge,
  .sad-card-link .sad-btn {
    width: 100% !important;
    text-align: left !important;
    box-sizing: border-box !important;
  }
  .sad-card-scan {
    flex-direction: column !important;
    gap: 14px !important;
    padding: 10px 12px !important;
  }
  .sad-scan-preview {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  .sad-scan-preview img {
    max-width: 320px !important;
    margin: 0 auto !important;
  }
  .sad-scan-info {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }
}
