/* 1. Цветовая палитра и основные стили */
:root {
    --bg-light: #F8F5F2; /* Очень светлый, почти белый фон */
    --bg-section: #EAE3DC; /* Нежный фон для секций */
    --text-dark: #4a4540; /* Темный, но не черный текст */
    --accent-primary: #B98B73; /* Основной акцент (терракотовый) */
    --accent-hover: #a37b63; /* Акцент при наведении */
    --text-muted: #8c8178; /* Приглушенный текст */
    --white: #ffffff;
    --gradient-color: #fcefeb;
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    color: var(--text-dark);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    font-weight: 600;
}

h2 span {
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 10px;
}

/* 2. Шапка (Header) */
header {
    /* Создаём заметный градиент из трёх цветов:
     - Начинаем с нового розового оттенка.
     - Переходим в цвет фона секций.
     - Завершаем на основном цвете фона сайта.
    */
    background: linear-gradient(0deg,
        var(--gradient-color) 0%,
        var(--bg-section) 40%,
        var(--bg-light) 80%
    );

    padding: 80px 0;
}

.header-container {
    position: relative;
    z-index: 1;
}

.profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.profile-text {
    max-width: 500px;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.specialization {
    font-size: 2.3rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-weight: 300;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-icon {
    color: var(--text-muted);
    font-size: 1.8rem;
    transition: var(--transition);
}

/* РЕШЕНИЕ ПРОБЛЕМЫ 1: Цвет при наведении теперь контрастный */
.social-icon:hover {
    color: var(--accent-primary);
    transform: scale(1.1);
}

.profile-img-wrapper {
    width: 320px;
    height: 420px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* 3. Навигация */
.main-nav {
    position: sticky;
    top: 0;
    background: rgba(248, 245, 242, 0.85); /* Полупрозрачный фон */
    backdrop-filter: blur(10px); /* Эффект размытия */
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 0;
    z-index: 999;
    border-bottom: 1px solid var(--bg-section);
}

.main-nav .container {
    display: flex;
    justify-content: center;
    gap: 35px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 5px 10px;
    border-radius: 5px;
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--text-dark);
    background-color: var(--bg-section);
}


/* 4. Общие стили для секций */
section {
    padding: 100px 0;
    position: relative;
    overflow: hidden; /* Важно для фоновых псевдо-элементов */
}


/* 5. Секция "Обо мне" */
#about {
    position: relative; /* Важно для позиционирования псевдоэлемента */
    z-index: 1; /* Поднимаем контент над фоном */
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('src/images/flowers3.jpeg');
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.3; /* Прозрачность ТОЛЬКО для фона */
    z-index: -1; /* Отправляем фон под основной контент */
}

.about-text {
    max-width: 750px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 20px;
}

.about-text .quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-top: 30px;
}

.about-text ul {
    list-style: none;
    font-size: 1.1rem;
    max-width: 500px;
    margin: 10px auto 30px;
    text-align: left;
}

.about-text ul li i {
    color: var(--accent-primary); /* или любой другой цвет: #5e548e, #d6336c и т.д. */
    margin-right: 10px;
    font-size: 1.1rem;
    vertical-align: middle;
}

/* 6. Секция "Запросы" (Аккордеон) */
#requests {
    background-color: var(--bg-section);
}

.requests-accordion {
    max-width: 850px;
    margin: 0 auto;
}

.request-item {
    border-bottom: 1px solid var(--text-muted);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 10px;
    cursor: pointer;
    transition: var(--transition);
}

.request-header:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.request-title {
    font-size: 1.3rem;
    font-weight: 500;
    margin: 0;
}

.request-icon {
    font-size: 2rem;
    font-weight: 300;
    color: var(--accent-primary);
    transition: transform 0.4s ease;
    min-width: 25px;
    text-align: center;
}

/* Переработанная часть с использованием CSS Grid */
.request-content {
    display: grid;
    grid-template-rows: 0fr;
    padding: 0 40px;
    transition:
        grid-template-rows 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.5s ease;
}

.request-item.active .request-content {
    grid-template-rows: 1fr;
    padding: 0 40px 30px;
}

.request-content > div {
    overflow: hidden;
    min-height: 0; /* Важно для корректной работы анимации */
}

.request-item.active .request-icon {
    transform: rotate(45deg);
}

.request-content ul {
    padding-left: 20px; /* или больше, если нужно */
    margin: 0;
}

/* 7. Секция "Квалификация" */
#qualification {
    position: relative; /* Важно для позиционирования псевдоэлемента */
    z-index: 1; /* Поднимаем контент над фоном */
}

#qualification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('src/images/flowers6.jpeg');
    background-repeat: no-repeat;
    background-position: bottom;
    background-size: cover;
    opacity: 0.3; /* Прозрачность ТОЛЬКО для фона */
    z-index: -1; /* Отправляем фон под основной контент */
}

.qualification-cards {
    display: flex;
    justify-self: center;
    gap: 30px;
    max-width: 900px;
    margin: 40px auto 0;
    position: relative;
    z-index: 1;
}

.qualification-card {
    max-width: 450px;
    background: var(--white);
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: var(--transition);
    border-top: 4px solid var(--accent-primary);
    cursor: pointer;
}

.qualification-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.qualification-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.qualification-card h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.qualification-details p {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 1rem;
}

.qualification-details i {
    color: var(--accent-primary);
    width: 20px;
    text-align: center;
}

/* 8. Секция "Сертификаты" */
#certificates {
    background-color: var(--bg-section);
}

.certificates-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.certificates-grid .certificate {
    width: 300px;
    flex-shrink: 0; /* Не сжимать меньше 300px */
}

.certificate {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.certificate:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.certificate-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    cursor: pointer;
}

.certificate-info {
    padding: 25px;
}

.certificate-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.certificate-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}


/* 9. Секция "Контакты" */
#contact {
    position: relative; /* Важно для позиционирования псевдоэлемента */
    z-index: 1; /* Поднимаем контент над фоном */
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('src/images/flowers7.jpeg');
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.3; /* Прозрачность ТОЛЬКО для фона */
    z-index: -1; /* Отправляем фон под основной контент */
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 25px;
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

/* РЕШЕНИЕ ПРОБЛЕМЫ 3: Иконки теперь точно видны */
.contact-icon {
    font-size: 2rem;
    color: var(--accent-primary);
    width: 65px;
    height: 65px;
    background: var(--bg-section);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.contact-value {
    font-size: 1.15rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.3s ease;
}
.contact-value:hover {
    color: var(--accent-primary);
}

/* 10. Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(40, 36, 33, 0.9);
    overflow: auto;
    animation: fadeIn 0.4s;
}

.modal-content {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--bg-light);
    font-size: 50px;
    font-weight: 300;
    transition: var(--transition);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--accent-primary);
}

#caption {
    color: var(--bg-section);
    text-align: center;
    padding: 20px;
    font-size: 1.1rem;
    position: absolute;
    bottom: 5%;
    width: 100%;
    left: 0;
}


/* 11. Адаптивность (Media Queries) */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    .profile { flex-direction: column; text-align: center; }
    .profile-text { order: 2; }
    .profile-img-wrapper { order: 1; margin-bottom: 30px; }
    .social-links { justify-content: center; }
    header::before { right: -25%; opacity: 0.3; }
}

@media (max-width: 768px) {
    section { padding: 80px 0; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .main-nav .container { gap: 15px; }
    .main-nav a { font-size: 0.85rem; padding: 5px; }
    .contact-info { grid-template-columns: 1fr; }
    #qualification::before, header::before { display: none; } /* Убираем декор на мобильных */
    .qualification-cards { flex-flow: column; }
}

@media (max-width: 480px) {
    .profile-img-wrapper { width: 250px; height: 320px; }
    .request-title { font-size: 1.1rem; }
    .main-nav { padding: 10px 0; }
    .main-nav .container { gap: 10px; flex-wrap: wrap; }
}