/* ===== ОБЩИЕ СТИЛИ ===== */
body { 
    font-family: 'Open Sans', sans-serif; 
    line-height: 1.6; 
    color: #333; 
    background-color: #f9f9f9; 
    margin: 0; 
    padding: 0; 
    scroll-behavior: smooth;
}
.container { 
    width: 90%; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
}

/* ===== ШАПКА И МЕНЮ ===== */
header { 
    background: #2a6e8c; 
    color: white; 
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 14px;
}
.logo { 
    font-family: 'Roboto Slab', serif; 
    font-size: 1.3rem; 
    font-weight: 700; 
}
nav ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    display: flex; 
}
nav li { 
    margin-left: 2rem; 
}
nav a { 
    color: white; 
    text-decoration: none; 
    font-weight: 600; 
    transition: color 0.3s;
}
nav a:hover, 
nav a.active { 
    color: #ffcc00; 
}

/* ===== СЕКЦИИ ===== */
section {
    padding: 80px 0;
    min-height: 60vh;
}
.section { 
    background: white; 
    padding: 2.5rem; 
    margin-bottom: 2rem; 
    border-radius: 8px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
}
.section h2 { 
    font-family: 'Roboto Slab', serif; 
    color: #2a6e8c; 
    border-bottom: 3px solid #ffcc00; 
    padding-bottom: 0.5rem; 
    margin-top: 0; 
    font-size: 2rem;
}

/* ===== ГЛАВНАЯ СЕКЦИЯ ===== */
#home {
    background: linear-gradient(rgba(42,110,140,0.85), rgba(42,110,140,0.9)), url('images/about-hero.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}
.hero-content h1 {
    font-family: 'Roboto Slab', serif;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}
.hero-content p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* ===== КНОПКИ ===== */
.btn { 
    display: inline-block; 
    background: #ffcc00; 
    color: #333; 
    padding: 0.8rem 1.8rem; 
    text-decoration: none; 
    border-radius: 50px; 
    font-weight: 700; 
    margin-top: 1rem; 
    border: none; 
    cursor: pointer; 
    transition: background 0.3s; 
}
.btn:hover { 
    background: #e6b800; 
}
.btn-outline {
    background: transparent;
    border: 2px solid #2a6e8c;
    color: #2a6e8c;
}
.btn-outline:hover {
    background: #2a6e8c;
    color: white;
}

/* ===== БЛОК ЦЕННОСТЕЙ ===== */
.values-list { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 1.5rem; 
    margin-top: 1.5rem; 
}
.value-item { 
    text-align: center; 
    padding: 1.5rem; 
    border: 1px solid #e0e0e0; 
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.value-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.value-item i { 
    font-size: 2.5rem; 
    color: #2a6e8c; 
    margin-bottom: 1rem; 
}

/* ===== КОМАНДА ===== */
/* ===== КОМАНДА (ВЕРТИКАЛЬНО, ПО ОДНОМУ В РЯД) ===== */
.team-grid { 
    display: flex;
    flex-direction: column;
    gap: 2rem; 
    margin-top: 2rem; 
    width: 100%;
    max-width: 800px; /* Ограничиваем ширину для читаемости */
    margin-left: auto;
    margin-right: auto;
}
.team-member { 
    background: white; 
    padding: 2rem; 
    border-radius: 16px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}
.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.team-photo { 
    width: 160px; 
    height: 160px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 5px solid #e0f0f7; 
    margin: 0 auto 1.5rem auto;
    display: block;
}
.team-member h3 { 
    color: #2a6e8c; 
    margin: 0 0 0.5rem; 
    font-size: 1.6rem; 
    text-align: center;
}
.team-member .specialist-role {
    font-size: 1rem;
    color: #555;
    margin: 0 0 0.5rem;
    text-align: center;
    line-height: 1.5;
}
.team-member .specialist-experience {
    font-size: 1rem;
    color: #666;
    font-style: italic;
    margin: 0 0 1.5rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px dashed #e0f0f7;
}

/* ===== СЛАЙДЕР СЕРТИФИКАТОВ ===== */
.team-member .certificates-slider {
    margin-top: 0.5rem;
    width: 100%;
    /* Фиксируем высоту, но оставляем место для увеличенных картинок */
    min-height: 150px;
    max-height: 160px;
    position: relative;
    padding-right: 5px;
}

.team-member .certificates-slider h4 {
    font-size: 1rem;
    color: #2a6e8c;
    margin: 0 0 0.8rem 0;
    text-align: center;
    position: sticky;
    top: 0;
    background: white;
    padding: 5px 0;
    z-index: 5;
}

/* Контейнер слайдера */
.slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 130px; /* Фиксируем высоту контейнера */
    overflow: visible;
    padding: 0;
    margin: 0;
    position: relative;
}

/* Трек с сертификатами */
.certificates-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    padding: 5px 0 25px 0; /* Нижний отступ для увеличенных картинок */
    flex: 1;
    z-index: 1;
    height: 100%;
    align-items: center;
}

.certificates-track::-webkit-scrollbar {
    height: 4px;
}

.certificates-track::-webkit-scrollbar-thumb {
    background: #2a6e8c;
    border-radius: 4px;
}

/* Контейнер одного сертификата */
.cert-item {
    flex: 0 0 auto;
    width: 110px; /* Чуть уменьшил */
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
    transform-origin: center center;
    background: transparent;
    padding: 0;
    border-radius: 8px;
    will-change: transform;
    margin: 0 3px;
}

/* Картинка сертификата */
.cert-item img {
    width: 100%;
    height: 70px; /* Уменьшил высоту картинки */
    object-fit: cover;
    border: 2px solid #e0f0f7;
    border-radius: 8px;
    background: #f5f5f5;
    transition: all 0.3s ease;
    display: block;
}

/* Текст под сертификатом */
.cert-item p {
    margin: 3px 0 0;
    font-size: 0.65rem; /* Уменьшил шрифт */
    color: #555;
    line-height: 1.2;
    transition: color 0.3s ease;
    word-break: break-word;
    max-width: 110px;
}

/* Эффект при наведении - увеличение с выходом за границы */
.cert-item:hover {
    transform: scale(2.2) !important;
    z-index: 9999 !important;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 20px 30px rgba(0,0,0,0.3);
}

.cert-item:hover img {
    height: auto;
    max-height: 240px;
    width: 100%;
    border-color: #2a6e8c;
}

.cert-item:hover p {
    color: #2a6e8c;
    font-weight: 600;
    font-size: 0.7rem;
    transform: none;
    white-space: normal;
}

/* Кнопки слайдера */
.slider-btn {
    width: 24px; /* Ещё меньше */
    height: 24px;
    border-radius: 50%;
    background: #2a6e8c;
    color: white;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
    z-index: 1001;
    position: relative;
}

.slider-btn:hover {
    background: #1e5670;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 5px;
}

.dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.2s;
}

.dot.active {
    background: #2a6e8c;
    transform: scale(1.2);
}

/* ===== СЕКЦИЯ ПРАЙС-ЛИСТА ===== */
.price-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}
.price-item {
    background: white;
    border: 2px solid #e0f0f7;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
}
.price-item:hover {
    border-color: #2a6e8c;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(42, 110, 140, 0.1);
}
.price-item.highlighted {
    border-color: #ffcc00;
    background: linear-gradient(to bottom right, #fffff0, #fff9e6);
}
.price-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #ffcc00;
    color: #333;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
}
.price-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed #e0f0f7;
}
.price-header h3 {
    font-size: 1.2rem;
    color: #2a6e8c;
    margin: 0;
    flex: 1;
}
.price-tag {
    background: #2a6e8c;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    margin-left: 1rem;
}
.price-item.highlighted .price-tag {
    background: #ff9900;
}
.price-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}
.price-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.price-features li:last-child {
    border-bottom: none;
}
.price-features i {
    color: #2a6e8c;
    margin-right: 0.5rem;
}
.price-action {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}
.section-intro {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== СПИСОК НАПРАВЛЕНИЙ ===== */
.directions-list {
    margin-top: 1.5rem;
    counter-reset: item;
    list-style: none;
    padding-left: 0;
}
.directions-list > li {
    counter-increment: item;
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    position: relative;
}
.directions-list > li:before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    color: #2a6e8c;
}
.skills-sublist {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
}
.skills-sublist > li {
    margin-bottom: 0.8rem;
}
.skills-sublist ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-top: 0.3rem;
    color: #555;
}

/* ===== ПОДВАЛ ===== */
footer { 
    background: #2a6e8c; 
    color: white; 
    text-align: center; 
    padding: 3rem 0; 
}
.footer-container { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}
.footer-links a { 
    color: #ffcc00; 
    margin: 0 10px; 
    text-decoration: none; 
}
.footer-links a:hover { 
    text-decoration: underline; 
}

/* ===== ОТСТУП ДЛЯ ЯКОРЕЙ ===== */
html {
    scroll-padding-top: 80px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    nav li {
        margin: 0 1rem 0.5rem;
    }
    section {
        padding: 40px 0;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .team-grid {
        grid-template-columns: 1fr;
    }
    .price-header {
        flex-direction: column;
    }
    .price-tag {
        margin-left: 0;
        margin-top: 0.5rem;
        align-self: flex-start;
    }
    .price-action {
        flex-direction: column;
    }
    .price-header h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    .cert-item {
        width: 110px;
    }
    .cert-modal {
    display: none;  /* ДОЛЖНО быть none по умолчанию */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.cert-modal[style*="display: flex"] {
    display: flex !important;  /* Когда функция меняет стиль */
}
}

