p {
    hyphens: auto;
    -webkit-hyphens: auto; /* Для поддержки в старых версиях Safari */
    -moz-hyphens: auto;    /* Для старых версий Firefox */
    overflow-wrap: break-word;
}

/* Обеспечиваем, чтобы все карточки имели одинаковую высоту */
.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-body {
    flex-grow: 1; /* Заполняет пространство, чтобы высота была одинаковой */
    padding: 30px;
}

/* =========================
   HERO + ABOUT (вынесено из inline)
   ========================= */
.hero {
    position: relative;
    overflow: hidden; /* Скрываем контент, который будет за пределами секции */
    animation: slideUp 1s ease-out forwards; /* Применяем анимацию при загрузке секции */
    transform: translateY(150%); /* Начальное положение секции ниже экрана */
    opacity: 0; /* Скрываем секцию до начала анимации */
}

.hero__img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.about-us {
    position: relative;
    overflow: hidden;
    animation: slideLeft 1s ease-out forwards;
    animation-delay: 1s; /* Задержка, чтобы начать анимацию после "hero" */
    transform: translateX(-100%); /* Начальное положение слева за экраном */
    opacity: 0; /* Скрываем до начала анимации */
}

.about-us__img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Сообщения */
.hero__messages {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    padding: 10px;
    text-align: center;
}

.hero__alert.alert {
    background-color: #28a745; /* Зеленый цвет для успешного сообщения */
    color: white;
    border-radius: 4px;
    padding: 15px;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 1;
    transition: opacity 1s ease-out; /* Плавное исчезновение */
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.fade-out {
    opacity: 0;
}

/* Настройки для больших экранов */
@media (max-width: 769px) {
    .hero__img {
        width: 100%;
        height: 350px;
    }
}

@media (max-width: 500px) {
    .hero__img {
        width: 100%;
        height: 220px;
        object-fit: cover;
    }

    .about-us__img {
        width: 100%;
        height: 17px;
        object-fit: cover;
    }
}

/* =========================
   PROJECT CARDS (вынесено из inline)
   ========================= */
.project-card {
    border-radius: 0px;
    border: 0px solid;
}

/* Фоны карточек (из inline background-color) */
.project-card--bg-a {
    background-color: rgba(41, 164, 217, 0.15);
}

.project-card--bg-b {
    background-color: rgba(41, 211, 217, 0.15);
}

.project-card__link {
    text-decoration: none;
    color: inherit;
}

/* Стили для иконок проектов */
.project-icon {
    font-size: 3.5rem;
    padding-top: 20px;
    color: #4c5359; /* Изначальный цвет иконки */
    transition: color 0.3s ease;
}

/* Стили для заголовков проектов */
.project-title {
    font-size: 25px;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.project-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #0a97d9; /* Синий цвет подчеркивания */
    transition: width 0.3s ease;
}

/* При наведении на карточку проекта */
.project-card:hover .project-icon {
    color: #0a97d9; /* Меняем цвет иконки на синий при наведении */
}

.project-card:hover .project-title::after {
    width: 100%; /* Полоса подчеркивает название проекта */
}

.project-card:hover .project-title {
    color: #0a97d9; /* Меняем цвет текста при наведении */
}

/* Анимация карточек */
.project-card {
    opacity: 0;
    transform: translateY(100px);
}

.project-card.visible {
    animation: slideUp 0.8s ease-out forwards;
}

/* =========================
   TEXT OVERLAY SECTION (вынесено из inline)
   ========================= */
.text-overlay-section {
    background-size: cover;
    background-position: center;
    position: relative;
}

.text-overlay-section__container {
    min-height: 300px;
}

.text-box {
    background-color: white;
    border-radius: 0px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 800px;
}

.text-overlay-section__box {
    border-radius: 0px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 800px;
}

.text-overlay-section__title {
    font-size: 28px;
    font-weight: bold;
    padding-bottom: 10px;
}

.text-overlay-section__item {
    font-size: 18px;
    color: #555;
    padding-top: 1rem;
    padding-bottom: 0px;
}

.text-box p {
    font-size: 18px;
    color: #555;
}

.text-with-line {
    position: relative;
    padding-top: 20px;
}
.text-with-line::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: #007bff; /* Синий цвет полоски */
}

/* Анимация блока */
.animated-box {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animated-box.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   CERTIFICATIONS (вынесено из inline)
   ========================= */
.certifications__title {
    font-size: 28px;
    font-weight: bold;
    padding-bottom: 1rem;
}

.certifications__lead {
    font-size: 18px;
    color: #555;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 1.5rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.tab-button {
    background-color: #0a97d9;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 0 8px;
}

.tab-button.active {
    background-color: #0056b3;
}

.tab-content {
    display: none;
    text-align: center;
}

.tab-content.active {
    display: block;
}

@media (max-width: 450px) {
    .tabs {
        flex-direction: column;
        align-items: center;
    }

    .tab-button {
        width: 100%;
        max-width: 150px;
        margin-bottom: 15px;
    }
}

.certification-item {
    padding: 10px 0;
    font-size: 18px;
    border: 3px solid #0a97d9;
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
}

/* =========================
   IMAGE SECTION + CONTACT FORM (вынесено из inline)
   ========================= */
.image-section {
    position: relative;
    height: 800px;
    background-size: cover;
    background-position: center;
}

.image-section__pad {
    padding: 0 20px;
}

.contact-section {
    opacity: 0; /* Изначально блок невидим */
    transform: translateY(300px); /* Изначально смещен вниз за пределы экрана */
    transition: transform 1s ease-out, opacity 1s ease-out; /* Плавный переход */
    z-index: 10; /* Поверхность формы над фоном */
}

.contact-section.visible {
    opacity: 1;
    padding: 20px;
}

/* Карточка формы */
.contact-section__card {
    border: 3px solid #0a97d9;
    border-radius: 0px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 1);
    padding: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-section__title {
    color: #000000;
}

.contact-form {
    margin: 0 10px;
}

.contact-form__label {
    color: #000000;
}

.contact-form__control {
    border: 2px solid #0a97d9;
    border-radius: 0px;
}

.contact-form__btn {
    background-color: #0a97d9;
    border-color: #0a97d9;
    border-radius: 0px;
    width: 150px;
}

/* =========================
   ANIMATIONS (оставила корректно в одном месте)
   ========================= */
@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideLeft {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
