/* --- ОБЩИЕ СТИЛИ И ПЕРЕМЕННЫЕ --- */
:root {
    --dark-color: #2F2D2C;
    --main-bg: #FFFFFF;
    --secondary-bg: #F5F5F3; /* Светло-бежевый фон для блока */
    --side-padding: 50px;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--main-bg);
    color: var(--dark-color);
}

.container {
    max-width: 1440px; /* Ограничиваем максимальную ширину для больших экранов */
    margin: 0 auto;
    padding: 0 var(--side-padding);
}

/* --- СТИЛИ СЕКЦИИ HERO --- */
.hero {
    padding-top: 30px;
    padding-bottom: 30px;
}

/* --- HEADER --- */
.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

.main-nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-size: 16px;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #8a8a8a;
}
/* --- hover эффекту пунктов меню --- */

.underline-one {
	color: #00bfff; /* Цвет обычной ссылки */
    position: relative;
    cursor: pointer;
    text-decoration: none; /* Убираем подчеркивание */
}
.underline-one:after {
	content: "";
    display: block;
    position: absolute;
    right: 0;
    bottom: -3px;
    width: 0;
    height: 2px; /* Высота линии */
    background-color: black; /* Цвет подчеркивания при исчезании линии*/
    transition: width 0.5s; /* Время эффекта */
}

.underline-one:hover:after {
	content: "";
    width: 100%;
    display: block;
    position: absolute;
    left: 0;
    bottom: -3px;
    height: 2px; /* Высота линии */
    background-color: red; /* Цвет подчеркивания при появлении линии*/
    transition: width 0.5s;  /* Время эффекта */
}

/* --- ГАМБУРГЕР МЕНЮ --- */
.hamburger {
    display: none; /* Скрыт по умолчанию */
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001; /* Поверх всего */
}
.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-color);
    transition: all 0.3s ease-in-out;
}

/* --- ОСНОВНОЙ КОНТЕНТ --- */
.hero-content {
    display: flex;
    height: 700px;
    background-color: var(--secondary-bg);
    border-radius: 25px;
    overflow: hidden; /* Чтобы картинка не вылезала за скругленные углы */
}

/* Левая часть с текстом */
.hero-text-wrapper {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-top-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.working-hours {
    font-size: 16px;
}

.working-hours span {
    display: block;
    font-weight: 600;
}

.social-icons {
    display: flex;
    gap: 12px;
    padding: 8px;
    background-color: #FFFFFF;
    border-radius: 30px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--dark-color);
    border-radius: 50%;
    transition: transform 0.3s ease;
    
}
.social-icons a:hover {
    transform: scale(1.1);
}
.social-icons svg {
    width: 22px;
    height: 22px;
}

.hero-main-text {
   display: flex;
   flex-direction:column;
   align-items: center;
}

.hero-main-text h1 {
    margin-top: 20px;
    text-align: center;
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-main-text p {
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
    max-width: 450px; /* Ограничим ширину текста */
    margin-bottom: 30px;
}

.cta-button {
    margin-top: 40px;
    display: inline-block;
    background-color: var(--dark-color);
    color: white;
    padding: 18px 60px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #4a4847;
}

.hero-bottom-placeholder {
    height: 80px;
}

/* Правая часть с картинкой */
.hero-image-wrapper {
    flex: 1;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 1200px) {
    .hero-main-text h1 {
        font-size: 52px;
    }
}

@media (max-width: 992px) {
    :root {
        --side-padding: 20px;
    }
    .hero-content {
        flex-direction: column;
        height: auto;
    }
    .hero-text-wrapper {
        padding: 40px;
        order: 2;
    }
    .hero-image-wrapper {
        order: 1;
        height: 400px;
        flex-basis: 400px;
    }
     .hero-main-text {
        margin: 40px 0;
    }
    .hero-main-text h1 {
        font-size: 42px;
    }
    .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        right: var(--side-padding);
        background-color: white;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        padding: 20px;
        border-radius: 10px;
        width: 200px;
        z-index: 1000;
    }
    .main-nav.active {
        display: flex;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    .hamburger {
        display: block;
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (max-width: 480px) {
    .hero-text-wrapper {
        padding: 30px 20px;
    }
    .hero-main-text h1 {
        font-size: 30px;
    }
    .hero-top-info {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 20px;
    }
     .hero-image-wrapper {
        height: 300px;
    }
    .cta-button {
        width: 100%;
        text-align: center;
    }
}

/* --- СТИЛИ СЕКЦИИ "О СЕБЕ" --- */


.section-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 32px;
    color: var(--dark-color);
}

.about-content {
    display: flex;
    gap: 40px;
    background-color: var(--secondary-bg); /* ИЗМЕНЕНО: цвет фона как у первого блока */
    border-radius: 25px; /* ОБНОВЛЕНО: это скругляет углы всего блока */
    overflow: hidden;    /* ОБНОВЛЕНО: это обрезает все, что выходит за скругленные углы (включая углы картинки) */
    min-height: 700px;
}

.about-image-wrapper {
    flex: 1 1 50%;
}

.about-image-wrapper img {
    width: 100%;
    height: 100%;
    max-height: 700px;
    object-fit: cover;
    display: block;
    border-radius: 40px;
}

.about-text-wrapper {
    flex: 1 1 50%;
    padding: 32px; /* ИЗМЕНЕНО: уменьшили внутренние отступы, чтобы текст влез */
    color: var(--dark-color);
}

.about-text-wrapper h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px; /* ИЗМЕНЕНО: уменьшили отступ */
}

.about-text-wrapper p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px; /* ИЗМЕНЕНО: уменьшили отступ */
}

.about-text-wrapper .quote {
    font-style: italic;
    border-left: 3px solid var(--dark-color);
    padding-left: 20px;
    margin-top: 12px;    
    margin-bottom: 20px; 
}

.skills-list {
    margin-top: 12px; /
}

.skills-list .skill-category {
    font-weight: 600;
    margin-bottom: 4px;
}

.skills-list ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 8px; 
}

.skills-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 4px;
    line-height: 1.2;
}

.skills-list li::before {
    content: '–';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--dark-color);
}


/* --- АДАПТИВНОСТЬ ДЛЯ СЕКЦИИ "О СЕБЕ" --- */

@media (max-width: 992px) {
    .section-title {
        font-size: 40px;
    }
    
    .about-content {
        flex-direction: column;
        height: auto;
    }

    .about-image-wrapper {
        width: 100%;
        height: 400px;
    }

    .about-text-wrapper {
        padding: 40px;
    }
}

@media (max-width: 480px) {
    .about {
        padding-top: 50px;
        padding-bottom: 50px;
    }
    .section-title {
        font-size: 32px;
    }
    .about-text-wrapper {
        padding: 30px 20px;
    }
    .about-text-wrapper h3 {
        font-size: 26px;
    }
}

/* --- СТИЛИ СЕКЦИИ "ОБРАЗОВАНИЕ И ОПЫТ" --- */
.experience {
    padding-top: 32px; /* Отступ от секции "О себе" */
    padding-bottom: 80px;
}

.experience-grid {
    display: flex;
    gap: 30px; /* Расстояние между карточками */
    justify-content: space-between;
}

.experience-card {
    flex: 1; /* Карточки занимают равное пространство */
    background-color: var(--secondary-bg); /* Используем тот же фон */
    border-radius: 25px;
    padding: 30px;
    height: 270px; /* Заданная высота карточки */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-card:hover {
    transform: scale(1.03); /* Немного увеличиваем карточку */
    box-shadow: 0 8px 25px rgba(47, 45, 44, 0.1); /* Добавляем мягкую тень */

}

.experience-card h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.experience-card p {
    font-size: 14px;
    color: #7B7B7B; /* Заданный цвет текста */
    line-height: 1.6;
}

/* --- АДАПТИВНОСТЬ ДЛЯ СЕКЦИИ "ОБРАЗОВАНИЕ" --- */
@media (max-width: 992px) {
    .experience-grid {
        flex-direction: column; /* Карточки встают друг под другом */
    }
    .experience-card {
        height: auto; /* Высота подстраивается под контент */
        min-height: 200px; /* Минимальная высота для красоты */
    }
}

@media (max-width: 480px) {
    .experience {
        padding-bottom: 50px;
    }
}

/* --- СТИЛИ СЕКЦИИ "НАГРАДЫ И БЛАГОДАРНОСТИ" --- */
.awards {
    padding-top: 32px; /* Отступ от предыдущего блока */
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 колонки одинаковой ширины */
    gap: 30px; /* Расстояние между элементами */
}

.award-item {
    text-align: center; /* Центрируем подпись под картинкой */
    overflow: hidden;
}

.award-item:hover img {
    transform: scale(1.05); /* Увеличиваем изображение на 5% */
}

.award-item img {
    width: 100%; /* Картинка занимает всю ширину колонки */
    min-height: 350px; /* Заданная высота картинки */
    max-height: 430px; 
    object-fit:contain; /* Изображение заполняет блок, сохраняя пропорции */
    object-position: top; /* Приоритет верхней части изображения при обрезке */
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}


.award-item p {
    font-size: 16px; /* Заданный размер текста */
    color: var(--dark-color);
}

.awards-button-wrapper {
    text-align: center; /* Центрируем кнопку */
    margin-top: 60px; /* Заданный отступ у кнопки */
}

/* --- АДАПТИВНОСТЬ ДЛЯ СЕКЦИИ "НАГРАДЫ" --- */

/* Планшеты */
@media (max-width: 992px) {
    .awards-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки на планшетах */
    }
}

/* Мобильные устройства */
@media (max-width: 576px) {
    .awards-grid {
        grid-template-columns: 1fr; /* 1 колонка на мобильных */
        gap: 40px;
    }
    .award-item img {
        height: auto; /* Высота подстраивается под ширину */
        max-height: 400px;
    }
}

/* --- СТИЛИ СЕКЦИИ "ГАЛЕРЕЯ" --- */
.gallery {
    padding-top: 32px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 215px; 
    gap: 10px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 10px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* --- Размещение элементов в сетке --- */
/* Большая картинка (2x2) */
.gallery-item.item-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

/* Картинка на горке (2x2) */
.gallery-item.item-4 {
    grid-column: 3 / 5;
    grid-row: 2 / 4;
}

/* Картинка на карусели (2x2) */
.gallery-item.item-7 {
    grid-column: 1 / 3;
    grid-row: 4 / 6;
}

/* Картинка в игровой (2x2) */
.gallery-item.item-8 {
    grid-column: 3 / 5;
    grid-row: 4 / 6;
}

/* --- ИСПРАВЛЕНА ПОСЛЕДНЯЯ СТРОКА --- */
/* Последняя строка, левый элемент (1x1) */
.gallery-item.item-9 {
    grid-column: 1 / 2;
    grid-row: 6 / 7;
}

/* Последняя строка, второй элемент (1x1) */
.gallery-item.item-10 {
    grid-column: 2 / 3;
    grid-row: 6 / 7;
}

/* Последняя строка, широкий элемент (2x1) */
.gallery-item.item-11 {
    grid-column: 3 / 5;
    grid-row: 6 / 7;
}


/* --- АДАПТИВНОСТЬ ДЛЯ ГАЛЕРЕИ --- */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 250px;
    }
    
    /* Сбрасываем сложное позиционирование */
    .gallery-item {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    /* Делаем некоторые элементы широкими для разнообразия */
    .gallery-item.item-1,
    .gallery-item.item-4,
    .gallery-item.item-7,
    .gallery-item.item-11 { /* Добавили сюда 11-й элемент */
        grid-column: 1 / 3 !important;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 300px;
    }
    .gallery-item {
        border-radius: 15px;
    }
}

/* --- СТИЛИ ФУТЕРА (ПОДВАЛА) --- */
.site-footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0;
    margin-top: 32px; /* Отступ от галереи */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info p {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.footer-socials {
    display: flex;
    gap: 8px;
    background-color: white;
    padding: 8px;
    border-radius: 50px; /* Создает форму "пилюли" */
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--dark-color);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.footer-socials a:hover {
    transform: scale(1.1);
}

.footer-socials svg {
    width: 22px;
    height: 22px;
}


/* --- АДАПТИВНОСТЬ ДЛЯ ФУТЕРА --- */
@media (max-width: 576px) {
    .footer-content {
        flex-direction: column; /* Элементы встают друг под другом */
        gap: 25px; /* Расстояние между текстом и иконками */
    }
    .site-footer {
        padding: 40px 0;
    }
}

/* --- СТИЛИ ДЛЯ ОТДЕЛЬНОЙ СТРАНИЦЫ НАГРАД --- */

/* Добавляем отступ для шапки, чтобы она не прилипала к верху */
.awards-page-header {
    padding-top: 30px;
    padding-bottom: 10px;
}

/* Добавляем отступы для основного контента страницы */
.awards-page {
    padding-top: 50px;
    padding-bottom: 80px;
}

/* Стили для контейнера кнопки "Назад" */
.back-button-wrapper {
    margin-bottom: 40px; /* Отступ от кнопки до сетки с наградами */
}

/* Уменьшаем размер кнопки "Назад" и выравниваем ее по левому краю */
.back-button-wrapper .cta-button {
    padding: 14px 30px;
    margin-top: 0;
}