.documents-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.document-card {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e3e6ea;
  border-radius: 6px;
  background: #ffffff;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.document-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.document-icon {
  min-width: 48px;
  height: 48px;
  background: #f2f4f7;
  color: #c62828;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  margin-right: 14px;
  text-transform: uppercase;
}

.document-icon.docx {
  color: #1a3e72;
}

.document-icon.xlsx {
  color: #2e7d32;
}

.doc-text {
  display: flex;
  flex-direction: column;
}

.document-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a3e72;
  line-height: 1.35;
}

.document-title:hover {
  text-decoration: underline;
}

.document-meta {
  font-size: 13px;
  color: #6c757d;
  margin-top: 4px;
}

@media (max-width: 992px) {
  .documents-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .documents-grid {
    grid-template-columns: 1fr;
  }
}

/* Общие стили страницы */
.main-info-page {
    font-family: Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

.intro-text h2 {
    color: #1a3e72;
    border-bottom: 2px solid #1a3e72;
    padding-bottom: 10px;
}

/* Стили таблицы */
.official-table-wrapper {
    margin: 25px 0;
    overflow-x: auto;
}

.camp-info-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e3e6ea;
}

.camp-info-table th {
    background: #1a3e72;
    color: #fff;
    padding: 12px;
    text-align: left;
}

.camp-info-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.camp-info-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* Блок карточек (ваши кастомные стили) */
.documents-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.document-card {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #e3e6ea;
    border-radius: 6px;
    background: #ffffff;
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: default;
}

.document-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.document-icon {
    min-width: 48px;
    height: 48px;
    background: #f2f4f7;
    color: #c62828;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-right: 14px;
}

.document-icon.docx { color: #c62828; }
.document-icon.xlsx { color: #2e7d32; }

.doc-text { display: flex; flex-direction: column; }

.document-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a3e72;
    line-height: 1.35;
}

.document-meta {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

/* Адаптивность */
@media (max-width: 992px) { .documents-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .documents-grid { grid-template-columns: 1fr; } }


/* --- Desktop: Вложенность вбок --- */
@media (min-width: 768px) {
    #topmenu .dropdown-menu li {
        position: relative;
    }
    #topmenu .dropdown-menu .dropdown-menu {
        top: 0;
        left: 100% !important;
        margin-top: -6px;
        display: none;
    }
    #topmenu .dropdown-menu li:hover > .dropdown-menu {
        display: block !important;
    }
}

/* --- Mobile: Вложенность вниз --- */
@media (max-width: 767px) {
    #topmenu .dropdown-menu .dropdown-menu {
        position: static !important;
        float: none !important;
        display: none; 
        border: none !important;
        box-shadow: none !important;
        padding-left: 20px !important; /* Отступ для иерархии */
        background: rgba(0,0,0,0.03) !important;
    }
    /* Класс для открытия через JS */
    #topmenu .open-child > .dropdown-menu {
        display: block !important;
    }
}

/* Контейнер для блоков миссии и территории */
.info-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Две колонки на десктопе */
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    border-top: 4px solid #1a3e72; /* Акцент сверху вместо боковой линии */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.feature-card h4 {
    color: #1a3e72;
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
}

.feature-card p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    color: #4a5568;
}

/* Адаптация для мобилок */
@media (max-width: 768px) {
    .info-features {
        grid-template-columns: 1fr; /* Одна колонка на мобильных */
        gap: 16px;
    }
    
    .feature-card {
        padding: 20px;
    }
}

/* Обнуляем отступы и красные строки специально для этого блока */
.camp-team-wrapper p {
  text-indent: 0 !important; /* Убираем тот самый странный стиль */
  margin-bottom: 10px !important;
  text-align: left !important
}

/* Обнуляем отступы Joomla */
.team-wrapper p, .team-wrapper h3, .team-wrapper div {
    text-indent: 0 !important;
    margin-left: 0 !important;
}

.team-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 15px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.team-card {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.card-cyan { background: linear-gradient(180deg, #d4f8ff 0%, #ffffff 60%); }
.card-green { background: linear-gradient(180deg, #e2ffda 0%, #ffffff 60%); }
.card-orange { background: linear-gradient(180deg, #fff2d4 0%, #ffffff 60%); }

.hand-icon {
  position: absolute;
  width: 80px;
  height: 80px;
  z-index: 1;
  opacity: 0.7;
  pointer-events: none;
}

/* Позиции и Покраска SVG через фильтры (так как SVG внешний) */
.hand-top-left { top: -10px; left: -10px; transform: rotate(-15deg); filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(151deg); }
.hand-on-photo { top: 15%; right: -15px; transform: rotate(20deg); filter: invert(41%) sepia(94%) saturate(5435%) hue-rotate(345deg); z-index: 3; }
.hand-top-right { top: -5px; right: -10px; transform: rotate(40deg); filter: invert(56%) sepia(38%) saturate(588%) hue-rotate(74deg); }
.hand-bottom-left { bottom: 10px; left: -20px; transform: rotate(-45deg); filter: invert(89%) sepia(57%) saturate(632%) hue-rotate(357deg); }
.hand-bottom-right { bottom: -10px; right: -5px; transform: rotate(10deg); filter: invert(24%) sepia(92%) saturate(3015%) hue-rotate(320deg); }

.team-image {
  width: 75%;
  margin: 20px auto 10px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  border: 4px solid #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 2;
  position: relative;
}

.team-image img { width: 100%; height: 100%; object-fit: cover; }

.team-content {
  padding: 15px;
  flex-grow: 1;
  z-index: 4;
  text-align: center;
}

.team-name { font-size: 17px; font-weight: 700; color: #1a3e72; margin: 0 0 5px 0; }
.team-post { font-size: 14px; color: #6c757d; margin-bottom: 10px; min-height: 32px; }

.team-details {
  font-size: 14px;
  color: #444;
  border-top: 1px dashed #ddd;
  padding-top: 10px;
  margin-bottom: 12px;
  text-align: left;
}

.team-details p { margin: 2px 0 !important; text-indent: 0 !important; }

.team-phone {
  font-weight: 700;
  color: #1a3e72;
  text-decoration: none;
  font-size: 16px;
  display: inline-block;
  padding: 5px 15px;
  background: rgba(255,255,255,0.6);
  border-radius: 20px;
}

/* Мобильная адаптация */
@media (max-width: 850px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .team-grid { grid-template-columns: 1fr; } }

/* 1. Заставляем саму КАРТОЧКУ центрировать всё внутри */
.team-card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; /* Центрирует всё по горизонтали */
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* 2. Жестко центрируем КОНТЕЙНЕР картинки */
.team-image {
    width: 180px !important; /* Задаем фиксированный размер, чтобы не зависеть от % */
    height: 180px !important;
    margin: 20px 0 10px 0 !important; /* Убираем auto, так как flex-align уже центрирует */
    position: relative;
    z-index: 2;
    border-radius: 50%; /* Сделаем круглым, как на макете */
    border: 4px solid #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    
    /* Дополнительная страховка центрирования */
    display: block !important;
    float: none !important;
    clear: both !important;
}

/* 3. Сбрасываем все стили Joomla для САМОЙ КАРТИНКИ */
.team-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    max-width: none !important;
    border: none !important;
}

/* 4. Исправляем текст (чтобы не разлетался) */
.team-content {
    width: 100%;
    padding: 0 15px 15px 15px;
    box-sizing: border-box;
    text-indent: 0 !important;
}

.team-details p {
    text-align: left; /* Текст внутри деталей лучше оставить по левому краю */
    text-indent: 0 !important;
    margin: 5px 0 !important;
    text-align: left !important;
}

.apply-button-jsn {
    display: inline-block !important;
    padding: 18px 50px !important;
    background-color: #ff5722 !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(255,87,34,0.3) !important;
    cursor: pointer !important;
    border: none !important;
}
.apply-button-jsn:hover {
    background-color: #e64a19 !important;
    transform: translateY(-2px);
}

.team-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Растягивает блок с текстом на всю доступную высоту */
}

.team-details {
    flex-grow: 1; /* Растягивает блок с подробностями, толкая кнопку вниз */
}

.team-phone {
    margin-top: auto; /* Дополнительная страховка, чтобы кнопка всегда была внизу */
}

/* Контейнер */
.social-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

/* Базовый стиль кнопок */
.css-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    text-decoration: none !important;
    position: relative;
}

/* Цвет VK */
.css-icon.vk {
    background: linear-gradient(135deg, #0077ff, #005fcc);
}
.css-icon.vk .icon-logo {
    color: white;
    font-family: "Open Sans", sans-serif;
    font-weight: 800;
    font-size: 16px;
}

/* Цвет Telegram */
.css-icon.tg {
    background: linear-gradient(135deg, #24A1DE, #1d86ba);
}

/* Рисуем самолетик Телеграма на CSS */
.icon-paper-plane {
    width: 20px;
    height: 20px;
    background: white;
    /* Используем маску для отрисовки самолета без шрифтов */
    -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.101 12.327L22 2 19 22l-6.75-6.19-4.896 4.697.05-5.97L1.101 12.327z'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.101 12.327L22 2 19 22l-6.75-6.19-4.896 4.697.05-5.97L1.101 12.327z'/%3E%3C/svg%3E") no-repeat center;
transform: translate(-1px, 1px); 
    display: block;
    
}

/* Ховер-эффект */
.css-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    filter: brightness(1.1);
}

/* Для мобильных устройств ставим их в ряд */
@media (max-width: 767px) {
    .social-block {
        flex-direction: row;
        justify-content: center;
        margin-top: 10px;
    }
}


/* Кнопка MAX с принудительным градиентом */
.css-icon.icon-max {
    background: #2b59ff !important; /* Фоллбек для старых браузеров */
    background: linear-gradient(135deg, #00afff 0%, #2b59ff 40%, #bb2bff 100%) !important;
    border: 2px solid #ffffff !important; /* Убедимся, что рамка на месте */
}

/* Логотип MAX внутри кнопки */
.icon-max-logo {
    display: block;
    width: 26px; 
    height: 26px;
    background-color: #ffffff !important;
    /* Ваш точный путь из CorelDRAW */
    -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1373 1355'%3E%3Cpath d='M701.06 1354.74c-134.84,0 -197.48,-19.62 -306.07,-98.14 -69.11,88.34 -286.65,157.07 -296.23,39.26 0,-88.27 -19.93,-162.64 -41.91,-244.49 -26.92,-100.29 -56.85,-211.85 -56.85,-373.98 0,-386.58 319.11,-677.39 697.5,-677.39 378.3,0 674.95,304.95 674.95,681.16 0,376.16 -306.11,673.59 -671.41,673.59zm5.46 -1020.49c-184.1,-9.58 -327.76,117.35 -359.44,316.04 -26.26,164.55 20.27,365.04 60.05,375.13 18.78,4.75 66.84,-33.88 96.43,-63.33 48.75,31.39 104.64,55.73 166.79,58.93 189.02,9.84 356.49,-137.14 366.41,-324.97 9.93,-187.84 -141.21,-351.95 -330.23,-361.8z'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1373 1355'%3E%3Cpath d='M701.06 1354.74c-134.84,0 -197.48,-19.62 -306.07,-98.14 -69.11,88.34 -286.65,157.07 -296.23,39.26 0,-88.27 -19.93,-162.64 -41.91,-244.49 -26.92,-100.29 -56.85,-211.85 -56.85,-373.98 0,-386.58 319.11,-677.39 697.5,-677.39 378.3,0 674.95,304.95 674.95,681.16 0,376.16 -306.11,673.59 -671.41,673.59zm5.46 -1020.49c-184.1,-9.58 -327.76,117.35 -359.44,316.04 -26.26,164.55 20.27,365.04 60.05,375.13 18.78,4.75 66.84,-33.88 96.43,-63.33 48.75,31.39 104.64,55.73 166.79,58.93 189.02,9.84 356.49,-137.14 366.41,-324.97 9.93,-187.84 -141.21,-351.95 -330.23,-361.8z'/%3E%3C/svg%3E") no-repeat center;
    mask-size: contain;
    -webkit-mask-size: contain;
}

Обновим мобильную версию, чтобы три кнопки умещались в ряд 
@media (max-width: 767px) {
    .social-block {
        flex-direction: row !important;
        justify-content: center;
        gap: 15px;
        margin: 15px 0;
    }
}

/* Цвет и градиент для кнопки MAX */
.css-icon.icon-max {
    background: linear-gradient(135deg, #1a3e72, #0d2140);
}

/* Стили для буквы M (наследуем логику VK) */
.css-icon.icon-max .icon-logo {
    color: #ffffff !important; /* Яркий белый цвет */
    font-family: "Open Sans", sans-serif;
    font-weight: 800;
    font-size: 20px; /* Сделал чуть крупнее, так как буква одна */
    line-height: 1;
    display: block;
}

/* Приводим выпадающий список к стилю текстовых полей */
.jsn-uf-select2-container .select2-choice {
    background-image: none !important; /* Убираем градиент */
    background-color: #ffffff !important; /* Делаем фон белым */
    border: 1px solid #000000 !important; /* Тонкая черная рамка как у полей выше */
    border-radius: 0 !important; /* Убираем закругления, если поля острые */
    height: 38px !important; /* Высота как у остальных полей */
    line-height: 38px !important;
    box-shadow: none !important; /* Убираем внутренние тени */
    display: flex !important;
    align-items: center;
}

/* Стили текста внутри списка */
.jsn-uf-select2-container .select2-choice span {
    color: #333 !important;
    font-size: 14px !important;
}

/* Стили стрелочки справа */
.jsn-uf-select2-container .select2-choice div {
    background: transparent !important;
    border-left: none !important;
}

/* Стиль при фокусе (когда нажали на список) */
.select2-container-active .select2-choice,
.select2-container-active .select2-choices {
    border: 1px solid #1a3e72 !important; /* Синий акцент при клике */
    outline: none !important;
}

/* Исправляем отступы меток (label) для единообразия */
.control-group label.control-label {
    font-weight: bold !important;
    margin-bottom: 8px !important;
    display: block !important;
    color: #333 !important;
}

/* Стили для разделов распорядка дня */
.schedule-phase-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    margin: 30px 0 15px 0;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
}

.phase-morning { background: #e8f5e9; color: #2e7d32; border-left: 5px solid #2e7d32; }
.phase-day { background: #e3f2fd; color: #1a3e72; border-left: 5px solid #1a3e72; }
.phase-evening { background: #f3e5f5; color: #6a1b9a; border-left: 5px solid #6a1b9a; }

.time-col {
    font-weight: 700;
    color: #1a3e72;
    white-space: nowrap;
    width: 120px;
}

.meal-row {
    background-color: #fff9c4 !important; /* Выделение приемов пищи нежным желтым */
}

/* Дополнительные стили для смысловых блоков */
.quote-block {
    text-align: center;
    margin-bottom: 40px;
}

.quote-text {
    font-size: 20px;
    color: #1a3e72;
    font-style: italic;
    max-width: 950px;
    margin: 20px auto;
}

.highlight-box {
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    border-left: 5px solid #1a3e72;
    margin-top: 30px;
}

.dark-footer-block {
    background: #1a3e72;
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
}

.dark-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.rule-item {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
}

.rule-item h5 {
    color: #ff9800;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Дополнительные стили для смысловых блоков */
.quote-block {
    text-align: center;
    margin-bottom: 40px;
}

.quote-text {
    font-size: 20px;
    color: #1a3e72;
    font-style: italic;
    max-width: 800px;
    margin: 20px auto;
}

.highlight-box {
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    border-left: 5px solid #1a3e72;
}

.dark-footer-block {
    background: #1a3e72;
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
}

.dark-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.rule-item {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
}

.rule-item h5 {
    color: #ff9800;
    margin-bottom: 10px;
    font-weight: bold;
}

.card-header-inline {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.card-header-inline .feature-icon {
    margin-bottom: 0 !important; /* Убираем нижний отступ, чтобы выровнять с текстом */
    line-height: 1;
}

.card-header-inline h4 {
    margin: 0 !important;
}

.mycontent p {
    text-align: left !important;
}

.quote-block {
    width: 100% !important;
    max-width: 1000px !important; /* Увеличиваем лимит ширины */
    margin: 0 auto !important;
    text-align: center !important;
}

.quote-text {
    max-width: 100% !important; /* Убираем узкое ограничение */
    display: inline-block !important;
    white-space: normal !important; /* Разрешаем естественный перенос строк */
    word-wrap: break-word !important;
    margin: 0 auto !important;
}

/* Специальная сетка для видео: 2 в ряд на ПК, 1 на мобильных */
.video-grid-custom {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
}

/* Планшеты и мобильные (меньше 768px) */
@media (max-width: 768px) {
    .video-grid-custom {
        grid-template-columns: 1fr !important;
    }
}

/* Высокая адаптивная карта */
.map-responsive-tall {
    overflow: hidden;
    padding-bottom: 65%; 
    position: relative;
    height: 0;
    margin-top: 20px;
}

@media (min-width: 1200px) {
    .map-responsive-tall {
        padding-bottom: 400px; 
    }
}

/* Стили для ссылок-карточек, чтобы они не выглядели как синий текст */
a.document-card {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
a.document-card:hover .document-title {
    color: #c62828; /* Цвет при наведении */
}

.text-info {
    text-align:center;
}
