/* --- Кастомный Hero-Аккордеон --- */
.hero-slider-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1200px;
  height: 450px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.slider-panel {
  flex: 1;
  position: relative;
  background-size: cover;
  background-position: center;
  transition: flex-grow 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  overflow: hidden;
}

.slider-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 100%);
  transition: opacity 0.5s ease;
}

.slider-panel.active {
  flex: 4; 
}

.panel-content {
  position: absolute;
  bottom: 30px;
  left: 30px;
  right: 30px;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease 0.3s;
  pointer-events: none;
}

.slider-panel.active .panel-content {
  opacity: 1;
  transform: translateY(0);
}

.panel-content h3 {
  margin: 0 0 10px 0;
  font-size: 24px;
  color: #fff;
  font-weight: 600;
}

.panel-content p {
  margin: 0;
  font-size: 16px;
  color: #e0e0e0;
}

/* Адаптив под мобильные */
@media (max-width: 758px) {
  .hero-slider-container {
    flex-direction: column;
    height: 590px;
  }
  
  .slider-panel.active {
    flex: 5;
  }

  .panel-content {
    bottom: 15px;
    left: 15px;
    right: 15px;
  }
  
  .panel-content h3 {
    font-size: 20px;
  }
  
  .panel-content p {
    font-size: 14px;
  }
}

/* --- Обновленная PRO-Секция Профиля --- */
.pro-about-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: var(--cassiopeia-font-sans, sans-serif);
}

.pro-profile-box {
  background: #f8f9fa;
  border-left: 5px solid var(--cassiopeia-color-link, #0d6efd);
  padding: 30px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 40px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.pro-profile-box h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #212529;
}

.pro-lead {
  font-size: 19px;
  line-height: 1.6;
  color: #333;
}

.pro-badges {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pro-badges span {
  background: #e9ecef;
  color: #495057;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* Сетка деталей */
.pro-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.pro-details-block {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.pro-details-block h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--cassiopeia-color-primary, #111);
}

.pro-details-block h3 i {
  color: var(--cassiopeia-color-link, #0d6efd);
  margin-right: 8px;
}

.pro-details-block ul {
  padding-left: 20px;
  margin: 0;
}

.pro-details-block ul li {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #495057;
}

/* Сетка под-компетенций */
.pro-skills-subgrid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pro-skills-subgrid div {
  font-size: 14px;
  line-height: 1.5;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e9ecef;
  color: #495057;
}

.pro-skills-subgrid div strong {
  color: #212529;
  display: block;
  margin-bottom: 2px;
}

/* Блок опыта */
.pro-experience-box h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
}

.pro-experience-box h3 i {
  color: var(--cassiopeia-color-link, #0d6efd);
  margin-right: 8px;
}

.exp-card {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.exp-header h4 {
  margin: 0 0 5px 0;
  font-size: 18px;
  font-weight: 700;
  color: #212529;
}

.exp-company {
  font-size: 14px;
  color: #6c757d;
  display: block;
  margin-bottom: 15px;
}

.exp-body ul {
  padding-left: 20px;
  margin: 0;
}

.exp-body ul li {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 10px;
  color: #495057;
}

/* Адаптивность */
@media (max-width: 992px) {
  .pro-details-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* --- Сетка Портфолио (Наши работы) --- */
.portfolio-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.portfolio-card {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
  border-color: var(--cassiopeia-color-link, #0d6efd);
}

/* Область картинки */
.portfolio-img-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #f1f3f5;
}

.portfolio-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-img-wrapper img {
  transform: scale(1.05);
}

/* Контент карточки */
.portfolio-info {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.portfolio-info h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #212529;
}

.portfolio-info p {
  font-size: 14.5px;
  line-height: 1.5;
  color: #495057;
  margin: 0 0 20px 0;
  flex-grow: 1; /* Чтобы кнопки всегда были на одном уровне */
}

/* Технологические теги внутри карточки */
.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.portfolio-tags span {
  font-size: 12px;
  background: #f8f9fa;
  color: #495057;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  font-weight: 600;
}

/* Ссылка/Кнопка */
.portfolio-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: var(--cassiopeia-color-link, #0d6efd);
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.portfolio-link:hover {
  background: var(--cassiopeia-color-primary, #0a58ca);
}

.portfolio-link i {
  margin-left: 8px;
  font-size: 12px;
}

/* Адаптив под мобилки */
@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Секция Контактов --- */
.contacts-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: var(--cassiopeia-font-sans, sans-serif);
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
}

/* Карточки быстрых ссылок */
.contact-links-box {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-item-card {
  display: flex;
  align-items: center;
  padding: 18px 22px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  text-decoration: none !important;
  color: #212529 !important;
  transition: all 0.2s ease;
}

.contact-item-card:hover {
  background: #ffffff;
  border-color: var(--cassiopeia-color-link, #0d6efd);
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transform: translateX(5px);
}

.contact-item-card i {
  font-size: 24px;
  width: 40px;
  color: var(--cassiopeia-color-link, #0d6efd);
}

.contact-item-card .contact-meta {
  display: flex;
  flex-direction: column;
}

.contact-meta .contact-label {
  font-size: 12px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-meta .contact-value {
  font-size: 16px;
  font-weight: 600;
}

/* Форма обратной связи */
.contact-form-box {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.contact-form-box h3 {
  font-size: 20px;
  margin-bottom: 20px;
  font-weight: 600;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #495057;
}

.form-control-custom {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 15px;
  transition: border-color 0.15s ease;
}

.form-control-custom:focus {
  border-color: var(--cassiopeia-color-link, #0d6efd);
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.btn-submit-custom {
  width: 100%;
  padding: 12px;
  background: var(--cassiopeia-color-link, #0d6efd);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-submit-custom:hover {
  background: var(--cassiopeia-color-primary, #0a58ca);
}

/* Адаптив */
@media (max-width: 768px) {
  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* Стили для блока кастомной капчи */
.captcha-wrapper {
    margin-bottom: 20px !important;
}

.captcha-question {
    font-weight: 700 !important;
    color: #0d6efd !important;
    background: #e7f1ff !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    display: inline-block !important;
    margin-left: 5px !important;
}

.captcha-input {
    max-width: 150px !important;
    margin-top: 8px !important;
}

/* --- ПРИНУДИТЕЛЬНЫЕ СТИЛИ КНОПОК МЕНЮ --- */

/* Переводим список в горизонтальный ряд кнопок */
.header ul, 
.container-nav ul,
.navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Сбрасываем блочные отступы элементов списка */
.header ul li, 
.container-nav ul li,
.navbar-nav .nav-item {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
}

/* Превращаем каждую ссылку внутри меню в КНОПКУ */
.header ul li a,
.container-nav ul li a,
.navbar-nav .nav-link,
.mod-menu__item {
    display: block !important;
    padding: 10px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #343a40 !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

/* Эффект наведения (Hover) */
.header ul li a:hover,
.container-nav ul li a:hover,
.navbar-nav .nav-item:hover .nav-link {
    background: #ffffff !important;
    color: var(--cassiopeia-color-link, #0d6efd) !important;
    border-color: var(--cassiopeia-color-link, #0d6efd) !important;
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.08) !important;
}

/* ЭФФЕКТ ФИЗИЧЕСКОГО НАЖАТИЯ (Click) */
.header ul li a:active,
.container-nav ul li a:active,
.navbar-nav .nav-link:active {
    transform: scale(0.95) translateY(1px) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.02) !important;
    background: #f1f3f5 !important;
}

/* Подсветка активной страницы, на которой находится юзер */
.header ul li.active a,
.header ul li.current a,
.navbar-nav .nav-item.active .nav-link,
.navbar-nav .nav-item.current .nav-link {
    background: var(--cassiopeia-color-link, #0d6efd) !important;
    color: #ffffff !important;
    border-color: var(--cassiopeia-color-link, #0d6efd) !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2) !important;
}
/* Выстраиваем шапку строго по центру в одну линию */
.header .navbar,
.header .container-nav,
.header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
}

/* Выравниваем сам блок логотипа */
.navbar-brand {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Корректируем отступы у контейнера меню */
.header .mod-menu {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* На мобильных экранах (меньше 992px) делаем аккуратный вертикальный стек, чтобы всё не сжималось */
@media (max-width: 992px) {
    .header .navbar,
    .header .container-nav,
    .header {
        flex-direction: column !important;
        gap: 15px !important;
    }
}

/* --- Жесткий фикс отображения панелей на мобильных устройствах --- */
@media (max-width: 768px) {
    /* Находим контейнер, где лежат твои панели (убедись, что класс совпадает, например .slider-container или .accordion) */
    .slider-container, 
    .accordion-container,
    .main-banner { 
        display: flex !important;
        flex-direction: column !important; /* Выстраиваем панели друг под другом */
        height: auto !important; /* Разрешаем контейнеру расти вниз */
        min-height: 600px !important; /* Даем гарантированное пространство */
        gap: 10px !important;
    }

    /* Каждая отдельная панель на мобильном */
    .slider-panel {
        width: 100% !important; /* На весь экран по ширине */
        height: 80px !important; /* В свернутом состоянии — аккуратная полоса */
        min-height: 80px !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important; /* Плавное раскрытие вниз */
        overflow: hidden !important;
        display: block !important;
    }

    /* АКТИВНАЯ панель (раскрытая) на мобильном */
    .slider-panel.active {
        height: 300px !important; /* Раскрывается и показывает картинку во всей красе! */
        min-height: 300px !important;
    }

    /* Контент внутри панели (текст) на мобильном */
    .panel-content {
        padding: 15px !important;
        background: rgba(0, 0, 0, 0.6) !important; /* Затемнение, чтобы текст читался на фоне картинки */
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
    }

    .panel-content h3 {
        font-size: 18px !important;
        margin-bottom: 5px !important;
        color: #fff !important;
    }

    .panel-content p {
        font-size: 13px !important;
        line-height: 1.3 !important;
        color: #ddd !important;
        display: block !important; /* Гарантируем, что текст не скрыт */
    }
}
