/* ==========================================================================
   0. ДИЗАЙН-СИСТЕМА (ПЕРЕМЕННЫЕ ИЗ ТВОЕГО ФАЙЛА)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap");
:root {
  /* Цвета фона и пятен */
  --bg-main: #E8ECEF;
  --blob-1: #8B9DFF;
  --blob-2: #8B9DFF;
  --blob-3: #C8B6FF;

  /* Типографика */
  --text-heading: #0F172A; 
  --text-main: #1E293B;    
  --text-muted: #334155;   
  --text-light: #454e5f;   
  --text-accent: #4d5c80;  

  /* Акцентный цвет (Кнопки) */
  --accent-color: #2563EB;
  --accent-hover: #1D4ED8;

  /* Настройки матового стекла */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 10px 30px 0 rgba(31, 38, 135, 0.08);
}

/* ==========================================================================
   1. БАЗОВЫЕ НАСТРОЙКИ И ШРИФТЫ
   ========================================================================== */


*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  background-color: var(--bg-main);
  margin: 0;
  padding: 0;
  font-family: 'Nunito', sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none; /* Убиваем маковский эффект отскока */
}

.zen-wrapper {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow-x: clip; 
  z-index: 1;
}

/* ==========================================================================
   2. ФОНОВЫЕ ЭФФЕКТЫ (ПЛАВНАЯ ЛАВА-ЛАМПА)
   ========================================================================== */
.blobs-container {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  overflow: hidden; z-index: 0; pointer-events: none; 
}

.ambient-blob {
  position: absolute; border-radius: 50%; filter: blur(80px); 
  z-index: 0; opacity: 0.9; 
}

.blob-1 { width: 800px; height: 800px; background: var(--blob-1); top: -150px; left: -100px; animation: float-1 25s infinite alternate ease-in-out; } 
.blob-2 { width: 700px; height: 700px; background: var(--blob-2); bottom: -150px; right: -50px; animation: float-2 30s infinite alternate ease-in-out; } 
.blob-3 { width: 600px; height: 600px; background: var(--blob-3); top: 40%; left: 30%; animation: float-3 35s infinite alternate ease-in-out; } 

@keyframes float-1 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(120px, 80px) scale(1.05); } 100% { transform: translate(-60px, 120px) scale(0.95); } }
@keyframes float-2 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-100px, -120px) scale(0.95); } 100% { transform: translate(80px, -60px) scale(1.05); } }
@keyframes float-3 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(140px, -100px) scale(1.05); } 100% { transform: translate(-120px, 80px) scale(0.95); } }

/* ==========================================================================
   3. ГЛОБАЛЬНЫЕ UI КОМПОНЕНТЫ (СТЕКЛО, КНОПКИ)
   ========================================================================== */
.glass-container {
  position: relative; z-index: 1; max-width: 1200px; width: 100%; margin: 0 auto; padding: 2rem;
}

.glass-badge, .glass-btn, .glass-card, .glass-photo-frame {
  background: var(--glass-bg); 
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
}

.glass-badge {
  display: inline-block; padding: 8px 20px; border-radius: 30px;
  font-size: 0.9rem; font-weight: 600; color: var(--text-accent); margin-bottom: 2rem;
}

.glass-btn {
  padding: 16px 36px; border-radius: 30px; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all 0.3s ease; text-decoration: none;
  display: inline-flex; justify-content: center; align-items: center;
}

.glass-btn.primary { background: var(--accent-color); color: #FFFFFF; border: none; box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3); }
.glass-btn.primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4); }

.glass-btn.secondary { background: var(--glass-bg); color: var(--text-light); border: 1px solid rgba(59, 88, 145, 0.3); box-shadow: 0 8px 25px rgba(98, 98, 98, 0.3); }
.glass-btn.secondary:hover { background: rgba(255, 255, 255, 0.894); border: 1px solid rgba(85, 100, 131, 0.778); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(98, 98, 98, 0.4); }

.glass-card { padding: 2.5rem; border-radius: 24px; text-align: left; transition: transform 0.3s ease; width: 100%; }
.glass-card:hover { transform: translateY(-5px); }
.glass-card h3 { font-size: 1.3rem; font-weight: 700; color: var(--text-heading); margin: 0 0 1rem 0; }
.glass-card p { font-size: 1rem; margin: 0; color: var(--text-light); line-height: 1.5; }

.section-title { font-size: 2.2rem; color: var(--text-heading); text-align: center; margin: 4rem 0 2rem 0; }

/* ==========================================================================
   4. ШАПКА, НАВИГАЦИЯ И БУРГЕР
   ========================================================================== */
.header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; }
.logo-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-heading); transition: opacity 0.3s ease; }
.logo-link:hover { opacity: 0.7; }
.logo-icon { width: 32px; height: 32px; color: var(--text-accent); }
.logo-text { font-size: 1.5rem; font-weight: 700; letter-spacing: 0.5px; }

.header-right { display: flex; align-items: center; }
.glass-nav { display: flex; background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); padding: 8px 12px; border-radius: 40px; }
.glass-nav a { margin: 0 15px; text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: 0.95rem; transition: color 0.3s; }
.glass-nav a:hover { color: var(--accent-color); }

.burger-btn { display: none; flex-direction: column; justify-content: space-between; width: 30px; height: 20px; background: transparent; border: none; cursor: pointer; z-index: 100; }
.burger-btn span { display: block; width: 100%; height: 2px; background-color: var(--text-heading); transition: all 0.3s ease-in-out; }
.mobile-menu { position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; background: rgba(232, 236, 239, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 99; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: right 0.4s ease-in-out; }
.mobile-menu.is-open { right: 0; }
.mobile-nav-links { display: flex; flex-direction: column; text-align: center; gap: 2rem; }
.mobile-nav-links a { font-size: 1.8rem; color: var(--text-heading); text-decoration: none; font-weight: 600; transition: opacity 0.3s ease; }
.mobile-nav-links a:hover { opacity: 0.7; }
.burger-btn.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger-btn.is-active span:nth-child(2) { opacity: 0; }
.burger-btn.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ==========================================================================
   5. ГЛАВНАЯ СТРАНИЦА (HOME)
   ========================================================================== */
.hero-section { padding: 6rem 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-content { max-width: 800px; width: 100%; }
.hero-section h1 { font-size: 4.5rem; line-height: 1.1; font-weight: 700; color: var(--text-heading); margin: 0 0 1.5rem 0; letter-spacing: -1px; }
.hero-section p { font-size: 1.25rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 3rem; }

/* ФИКС: Кнопки не растягиваются, стрелка внутри позиционируется */
.action-group { display: flex; gap: 1.5rem; justify-content: center; align-items: center; position: relative; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding-bottom: 4rem; width: 100%; }
.icon-placeholder { width: 62px; height: 62px; background: rgba(255, 255, 255, 0.4); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 50%; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: center; }
.icon-placeholder svg { width: 32px; height: 32px; color: var(--accent-color); transition: transform 0.3s ease; }
.glass-card:hover .icon-placeholder svg { transform: scale(1.1); color: var(--accent-hover); }

/* ФИКС: Настройки пилюль (аккордеона) для 6 элементов */
.specialties-section { text-align: center; padding: 4rem 0; position: relative; }
/* ==========================================================================
   АККОРДЕОН ПИЛЮЛЬ (ФИНАЛЬНЫЙ ФИКС)
   ========================================================================== */
.specialties-container { 
  display: flex; 
  flex-direction: row; 
  flex-wrap: nowrap; 
  justify-content: center; 
  align-items: flex-start; 
  gap: 12px; 
  max-width: 1400px; 
  margin: 0 auto; 
  min-height: 320px; 
}

/* 1. Настройки закрытой карточки */
.specialty-card {
  padding: 0 15px; /* Отключаем вертикальные отступы, выравниваем флексом */
  height: 64px; /* Фиксированная высота для пилюли */
  border-radius: 40px; 
  cursor: pointer; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; /* Центрируем заголовок по вертикали */
  align-items: center; 
  overflow: hidden; 
  flex: 1 1 auto; 
  width: 20%; 
  min-width: 210px; 
  transition: all 0.4s ease; 
  background: rgba(255, 255, 255, 0.6); 
}

/* 2. Заголовок (всегда видимый) */
.specialty-card h3.specialty-title { 
  opacity: 1 !important; 
  color: var(--text-heading) !important; 
  font-weight: 700; 
  font-size: 1rem; 
  margin: 0; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  width: 100%; 
  text-align: center; 
  transition: color 0.3s ease;
}

/* 3. Скрытое описание (Схлопываем его в 0, чтобы не толкало заголовок) */
.specialty-card p.specialty-desc {
  font-size: 0.95rem; 
  line-height: 1.5; 
  color: var(--text-muted); 
  margin: 0; /* Убираем отступы */
  height: 0; /* Схлопываем высоту в 0 */
  opacity: 0; 
  text-align: center; 
  transition: opacity 0.4s ease, margin 0.4s ease; 
}

/* 4. Настройки открытой (активной) карточки */
.specialty-card.is-active { 
  height: auto; 
  padding: 24px 20px; /* Возвращаем отступы для раскрытой карточки */
  justify-content: flex-start; /* Текст начинается сверху вниз */
  border-radius: 24px; 
  background: rgba(255, 255, 255, 0.95); 
  transform: translateY(-4px); 
  flex: 2 1 auto; 
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15); 
    z-index: 25;
}

.specialty-card.is-active h3.specialty-title { 
  color: var(--accent-color) !important; 
  white-space: normal; 
}

.specialty-card.is-active p.specialty-desc { 
  margin: 16px 0 0 0; /* Возвращаем отступы */
  height: auto; /* Возвращаем нормальную высоту */
  opacity: 1; /* Показываем текст */

}

/* ==========================================================================
   АДАПТИВ (ДЛЯ НОУТБУКОВ И ТЕЛЕФОНОВ)
   ========================================================================== */
@media (max-width: 950px) {
  .specialties-container { 
    flex-direction: column; 
    align-items: center; 
    height: auto; 
  }
  .specialty-card { 
    width: 100%; 
    max-width: 500px; 
    height: 64px; 
  }
  .specialty-card.is-active {
    height: auto; 
    padding-bottom: 24px;
  }
}

/* ==========================================================================
   6. СТРАНИЦА "ОБО МНЕ" И ЛАЙТБОКС
   ========================================================================== */
.about-hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; padding: 4rem 0; align-items: center; }
.profession-title { font-size: 1.5rem; color: var(--text-accent); margin: -10px 0 2rem 0; font-weight: 600; }
.bio-content p { font-size: 1.15rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 1.5rem; }
.glass-photo-frame { width: 100%; aspect-ratio: 3 / 4; border-radius: 24px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.photo-text { color: var(--text-accent); font-style: italic; text-align: center; line-height: 1.5; }
.rules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; margin-bottom: 4rem; }

/* Дипломы и Лайтбокс */
.certificates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 2rem; padding-bottom: 6rem; }
.cert-card { display: flex; flex-direction: column; padding: 1.5rem; align-items: center; text-align: center; }
.cert-image-wrapper { width: 100%; height: 280px; border-radius: 16px; overflow: hidden; margin-bottom: 1.5rem; border: 1px solid var(--glass-border); box-shadow: inset 0 0 10px rgba(0,0,0,0.05); }
.cert-image { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.4s ease; cursor: pointer; }
.cert-card:hover .cert-image { transform: scale(1.05); }

.lightbox-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.lightbox-modal.is-active { display: flex; opacity: 1; }
.lightbox-content { max-width: 90%; max-height: 90vh; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transform: scale(0.95); transition: transform 0.3s ease; }
.lightbox-modal.is-active .lightbox-content { transform: scale(1); }
.lightbox-close { position: absolute; top: 20px; right: 40px; color: #ffffff; font-size: 45px; font-weight: 300; cursor: pointer; transition: color 0.3s ease, transform 0.3s ease; }
.lightbox-close:hover { color: var(--accent-color); transform: scale(1.1); }

/* ==========================================================================
   7. СТРАНИЦА "ПОДХОД"
   ========================================================================== */
.approach-hero-asym { text-align: left; padding: 6rem 0 4rem 0; max-width: 800px; }
.approach-hero-asym h1 { font-size: 4rem; margin-top: 1rem; color: var(--text-heading);}
.approach-subtitle { font-size: 1.25rem; line-height: 1.6; color: var(--text-light); margin-top: 1.5rem; max-width: 600px; }
.process-split { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; margin-bottom: 8rem; align-items: start; }
.sticky-title { position: sticky; top: 120px; font-size: 2.5rem; color: var(--text-heading); margin: 0; line-height: 1.2; }

/* Таймлайн */
.process-right { display: flex; flex-direction: column; gap: 2rem; position: relative;}
.process-right::before { content: ''; position: absolute; left: 60px; top: 40px; bottom: 40px; width: 2px; background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(37, 99, 235, 0.25) 10%, rgba(37, 99, 235, 0.25) 90%, rgba(0,0,0,0) 100%); z-index: -1; }

.step-card-horizontal { display: flex; align-items: flex-start; gap: 2rem; padding: 3rem; }
.step-number-side { font-size: 3.5rem; font-weight: 700; color: rgba(102, 118, 158, 0.47); line-height: 0.8; background: rgba(255, 255, 255, 0.7); padding: 10px; border-radius: 12px; }
.anti-icon-side { font-size: 2rem; font-weight: 700; color: var(--text-heading); background: rgba(102, 118, 158, 0.232); width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid rgba(0, 0, 0, 0.2); }

.centered-cta { text-align: center; padding: 6rem 0; margin: 0 auto; max-width: 900px; display: flex; flex-direction: column; align-items: center; border-top: 1px solid rgba(255, 255, 255, 0.4); }
.cta-glass-panel { text-align: center; max-width: 900px; margin: 0 auto; padding: 4rem 2rem; background: rgba(255, 255, 255, 0.5); border-radius: 30px; }
.cta-glass-panel h2 { font-size: 2.2rem; color: var(--text-heading); margin-bottom: 1rem; }

/* ==========================================================================
   8. СТРАНИЦА "КОНТАКТЫ" И ПОДВАЛ
   ========================================================================== */
.contacts-hero { padding: 4rem 0; max-width: 700px; }
.contacts-hero h1 { font-size: 3.5rem; margin-bottom: 1rem; color: var(--text-heading);}
.contacts-dashboard { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; margin-bottom: 6rem; align-items: stretch; }
.contacts-info-side { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-info-card { display: flex; align-items: flex-start; gap: 1.5rem; padding: 2rem; }

.contact-icon-wrapper { width: 48px; height: 48px; background: rgba(255, 255, 255, 0.4); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-heading); flex-shrink: 0; }
.contact-icon-wrapper svg { width: 22px; height: 22px; }
.contact-details h3 { font-size: 1.2rem; margin: 0 0 0.5rem 0; }
.contact-details p { font-size: 0.95rem; margin: 0 0 1rem 0; }
.contact-link { font-size: 1.1rem; font-weight: 700; color: var(--text-heading); text-decoration: none; transition: opacity 0.2s ease; }
.contact-link:hover { opacity: 0.7; }
.text-link { font-size: 1rem; text-decoration: underline; text-decoration-color: rgba(44, 53, 69, 0.3); }
.social-links-small { display: flex; align-items: center; gap: 10px; }
.separator { color: var(--text-light); opacity: 0.5; }

.map-links { display: flex; gap: 10px; flex-wrap: wrap; }
.small-btn { padding: 8px 16px; font-size: 0.85rem; background: rgba(255, 255, 255, 0.7); color: var(--text-heading); border-radius: 12px; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.9); }
.small-btn:hover { background: #FFFFFF; }

.contacts-map-side { height: 100%; min-height: 400px; }
.map-wrapper { height: 100%; padding: 0; position: relative; }
.map-wrapper iframe { width: 100%; height: 100%; border: none; border-radius: 24px; position: absolute; top: 0; left: 0; z-index: 2; }
.map-placeholder-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--text-accent); font-style: italic; z-index: 1; }

.contacts-section { text-align: center; padding: 4rem 0; border-top: 1px solid rgba(255, 255, 255, 0.4); margin-top: 2rem; }
.contacts-section h2 { font-size: 2rem; color: var(--text-heading); margin-bottom: 1rem; }
.contacts-section p { color: var(--text-light); font-size: 1.1rem; margin-bottom: 2rem; }
.social-links { display: flex; justify-content: center; gap: 1.5rem; }
.social-icon { display: flex; align-items: center; justify-content: center; width: 64px !important; height: 64px !important; background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 50%; color: var(--text-light); text-decoration: none; transition: all 0.3s ease; }
.social-icon svg { width: 26px !important; height: 26px !important; transition: transform 0.3s ease; }
.social-icon:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.95); color: var(--text-heading); box-shadow: 0 10px 25px rgba(31, 38, 135, 0.08); }
.social-icon:hover svg { transform: scale(1.1); }

/* ==========================================================================
   9. РУКОПИСНЫЕ СТРЕЛКИ (ИЗ ТВОЕГО ФАЙЛА)
   ========================================================================== */
.hand-drawn-note {
  position: absolute; font-family: 'Caveat', cursive; font-size: 2.2rem;
  line-height: 1.2; pointer-events: none; z-index: 10; opacity: 0;
  animation: fadeInNote 1s ease 1.5s forwards; 
}
@keyframes fadeInNote { to { opacity: 0.9; } }

.note-hero {
  display: flex; flex-direction: column; align-items: center; color: var(--accent-color); 
  left: -280px; bottom: 10px; transform: rotate(5deg);
}
.note-hero span { font-size: 2.2rem; line-height: 1.1; text-align: center; }
.note-hero svg { width: 250px; height: auto; margin-top: 5px; margin-right: -300px; }

.note-pills-wide {
  display: flex; flex-direction: row; align-items: center; color: var(--text-accent);
  bottom: 30px; left: 10%; width: 80%; max-width: 1000px;
}
.note-pills-wide .note-text { flex-shrink: 0; white-space: nowrap; margin-right: 20px; margin-top: -30px; transform: rotate(-4deg); }
.note-pills-wide svg { flex-grow: 1; height: auto; min-width: 500px; overflow: visible; }

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Заполняет всю рамку, обрезая лишнее по краям */
  object-position: center top; /* Фокусируемся на верхней части фото (лице) */
  transition: transform 0.5s ease;
}

/* Легкое увеличение портрета при наведении мыши на рамку */
.glass-photo-frame:hover .portrait-img {
  transform: scale(1.03);
}

/* ==========================================================================
   10. АДАПТИВНОСТЬ (МОБИЛЬНЫЕ УСТРОЙСТВА)
   ========================================================================== */
@media (max-width: 1000px) {
  .hand-drawn-note { display: none; }
}

@media (max-width: 900px) {
  .header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.349); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); margin: -2rem -2rem 2rem -2rem; padding: 1rem 2rem; border-bottom: 1px solid rgba(255, 255, 255, 0.514); box-shadow: 0 4px 15px rgba(59, 92, 100, 0.24); }
  .nav-links { display: none; }
  .burger-btn { display: flex; }
  .hero-section { padding: 2rem 0; }
  .hero-section h1 { font-size: 3rem; }
  .action-group { flex-direction: column; width: 100%; }
  .principles { grid-template-columns: 1fr; }
  .glass-card { padding: 1.5rem; }
  .specialties-container { flex-direction: column; align-items: center; height: auto; }
  .specialty-card { width: 100%; max-width: 350px; padding: 12px 24px; }
  .approach-hero-asym { padding: 2rem 0 3rem 0; }
  .approach-hero-asym h1 { font-size: 2.5rem; }
  .process-split { grid-template-columns: 1fr; gap: 2rem; }
  .process-right::before { display: none; }
  .sticky-title { position: static; margin-bottom: 1rem; }
  .step-card-horizontal { flex-direction: column; padding: 2rem; gap: 1rem; }
  .about-hero { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 0; }
  .glass-photo-frame { aspect-ratio: 1 / 1; max-width: 400px; margin: 0 auto; }
  .rules-grid, .certificates-grid { grid-template-columns: 1fr; }
  .contacts-dashboard { grid-template-columns: 1fr; }
  .contacts-map-side { min-height: 350px; }
}

@media (max-width: 768px) {
  .specialty-card { max-width: 320px; }
}

@media (max-width: 600px) {
  .contacts-hero h1 {
    font-size: 2.5rem; /* Чуть уменьшаем заголовок, чтобы не ломал сетку */
  }

  .contacts-dashboard {
    gap: 1.5rem; /* Уменьшаем расстояние между карточками */
  }

  .contact-info-card {
    flex-direction: column; /* Ставим иконку над текстом */
    align-items: center; /* Центрируем всё */
    text-align: center;
    padding: 1.5rem; /* Уменьшаем огромные внутренние отступы */
  }

  .contact-details {
    width: 100%;
    word-break: break-word; /* Принудительно переносим длинные ссылки и номера */
  }

  .social-links-small, 
  .map-links {
    justify-content: center; /* Центрируем кнопки внутри карточки */
    flex-wrap: wrap; /* Разрешаем кнопкам перескакивать на вторую строку */
    gap: 12px;
  }
}