/* Контейнер і грід */
.ios26-experts { margin: 8px 0 32px; }
.ios26-experts__grid {
  display: grid;
  grid-template-columns: 1fr;           /* телефон — 1 в ряд */
  gap: 24px;
}

/* Планшет — 2 в ряд */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .ios26-experts__grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Десктоп — 1 в ряд (за вимогою) */
@media (min-width: 1024px) {
  .ios26-experts__grid { grid-template-columns: 1fr; }
}

/* Картка */
.ios26-expert {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: start;
  gap: 18px 24px;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fafafa);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 8px 28px rgba(2,6,23,.06);
}

.ios26-expert__media img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 6px 22px rgba(0,0,0,.12);
}

.ios26-expert__title { margin: 0 0 8px; font: 800 24px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif; color:#0f172a; }
.ios26-expert__title a { color: inherit; text-decoration: none; }

.ios26-expert__meta { margin: 0; }
.ios26-expert__meta .meta-row { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 8px 0; }
.ios26-expert__meta dt { color:#6b7280; font-weight: 700; }
.ios26-expert__meta dd { margin: 0; color:#0f172a; }

.chips { display:flex; flex-wrap:wrap; gap:8px; }
.chip { padding:6px 12px; border-radius:999px; background:#f1f5ff; border:1px solid #cfe0ff; color:#1e40af; font-weight:700; }

/* Кнопка */
.btn26 {
  display:inline-block; padding:12px 18px; border-radius:14px;
  background:#3b82f6; color:#fff; text-decoration:none; font-weight:800;
  box-shadow: 0 10px 26px rgba(59,130,246,.26);
}
.btn26:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* Мобільна верстка картки */
@media (max-width: 479.98px) {
  .ios26-expert { grid-template-columns: 72px 1fr; padding: 16px; }
  .ios26-expert__media img { width:72px; height:72px; }
  .ios26-expert__title { font-size: 22px; }
  .ios26-expert__meta .meta-row { grid-template-columns: 100px 1fr; }
}

/* Порожній стан */
.ios26-experts-empty { opacity:.6; }
/* === iOS26 — Gallery fix === */
/* === iOS26 — WP Gallery (оновлено під 4 колонки на десктопі) === */
/* ===== Контейнер галереї ===== */
.gallery{
  --gap:16px;
  --radius:16px;

  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr));   /* Десктоп: 4 */
  gap:var(--gap);
  margin:0 0 24px 0;
  padding:0;
}

/* Вимикаємо стандартні float/clear від WP Classic Gallery */
/* Контейнер галереї */
.gallery{
  --gap:16px;
  --radius:16px;

  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr));   /* десктоп: 4 */
  gap:var(--gap);
  margin:0 0 24px 0;
  padding:0;
}

/* Скидаємо стандартні стилі WP */

.entry-content .gallery,
.wp-block-gallery,
.wp-block-gallery .blocks-gallery-grid{
  --gal-gap: 16px;
  --gal-radius: 16px;

  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* desktop: 4 */
  gap: var(--gal-gap);
  margin: 0 0 24px 0 !important;
  padding: 0 !important;
}

/* Скидання дивних width/inline-стилів від WP */
.gallery .gallery-item,
.wp-block-gallery .blocks-gallery-item{
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  max-width: none !important;
  list-style: none !important;
}

/* Обгортка з картинкою */
.gallery .gallery-icon,
.wp-block-gallery .blocks-gallery-item figure{
  position: relative;
  width: 100% !important;
  border-radius: var(--gal-radius);
  overflow: hidden;
  background: #f3f5f7;
  aspect-ratio: 1 / 1;                /* квадрат за замовчуванням */
}

/* Варіанти пропорцій, якщо в HTML є .portrait / .landscape */
.gallery .gallery-icon.portrait,
.wp-block-gallery .blocks-gallery-item figure.portrait{ aspect-ratio: 3 / 4; }

.gallery .gallery-icon.landscape,
.wp-block-gallery .blocks-gallery-item figure.landscape{ aspect-ratio: 4 / 3; }

/* Посилання і зображення займають всю карточку */
.gallery .gallery-icon > a,
.wp-block-gallery .blocks-gallery-item a{
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

.gallery .gallery-icon img,
.wp-block-gallery .blocks-gallery-item img{
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* Підпис під фото */
.gallery .gallery-caption,
.wp-block-gallery .blocks-gallery-caption{
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  color: #6b7280;
  padding: 6px 2px 0;
}

/* Прибрати <br> та "clear" які вставляє класична галерея */
.gallery br,
.gallery .gallery-clear{ display: none !important; }

/* ===== Адаптив ===== */

/* планшет */
@media (max-width: 1024px){
  .entry-content .gallery,
  .wp-block-gallery,
  .wp-block-gallery .blocks-gallery-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* мобільний */
@media (max-width: 640px){
  .entry-content .gallery,
  .wp-block-gallery,
  .wp-block-gallery .blocks-gallery-grid{
    grid-template-columns: 1fr;
  }
}