/* Основные настройки страницы */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f4f5; /* Мягкий серо-голубой фон */
    color: #34495e;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.8s ease-out;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Блок с фоновым изображением в верхней части */
.header-bg {
    width: 100%;
    height: 400px; /* Высота фоновой картинки */
    /* Здесь картинка плавно переходит в цвет фона страницы */
    background: linear-gradient(180deg, rgba(244, 249, 249, 0) 0%, #f4f9f9 110%), 
                url('/photo/photo2.jpg');
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    z-index: -1; /* Уводим на задний план */
    opacity: 0;
    animation: fadeIn 1.2s ease-out 0.2s forwards;
}

.container {
    max-width: 420px;
    width: 100%;
    text-align: center;
    margin-top: 180px; /* Сдвигаем контент ниже, чтобы было видно фото */
    padding: 20px;
    box-sizing: border-box;
}

/* Фото профиля */
.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background-color: white;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

h1 {
    font-size: 24px;
    margin: 15px 0 5px;
    color: #2c3e50;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.subtitle {
    font-size: 14px;
    color: #3498db;
    text-transform: uppercase;
    font-weight: bold;
    display: block;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.7s forwards;
}

p.description {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.7); /* Легкая подложка для читаемости текста */
    padding: 10px;
    border-radius: 10px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

/* Кнопки */
.link-button {
    display: block;
    background-color: #ffffff;
    color: #2c3e50;
    text-decoration: none;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #d1dce5;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.link-button:nth-of-type(1) { animation-delay: 0.9s; }
.link-button:nth-of-type(2) { animation-delay: 1.0s; }
.link-button:nth-of-type(3) { animation-delay: 1.1s; }
.link-button:nth-of-type(4) { animation-delay: 1.2s; }
.link-button:nth-of-type(5) { animation-delay: 1.3s; }

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    border-color: #3498db;
}

.cta-button {
    background-color: #3498db;
    color: white;
    border: none;
}

.cta-button:hover {
    background-color: #2980b9;
    color: white;
}

/* Секция отзывов */
.reviews-section {
    width: 100%;
    margin-top: 40px;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1.4s forwards;
}

.reviews-title {
    font-size: 22px;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 600;
}

.review-card {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e8ecef;
    box-shadow: 0 3px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.review-card:nth-of-type(2) { animation-delay: 1.5s; }
.review-card:nth-of-type(3) { animation-delay: 1.6s; }
.review-card:nth-of-type(4) { animation-delay: 1.7s; }
.review-card:nth-of-type(5) { animation-delay: 1.8s; }

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    border-color: #3498db;
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.review-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #3498db 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.review-info {
    flex: 1;
}

.review-name {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.review-stars {
    font-size: 14px;
    line-height: 1;
}

.review-text {
    margin: 0;
    color: #34495e;
    font-size: 14px;
    line-height: 1.6;
}

footer {
    margin-top: 40px;
    font-size: 12px;
    color: #95a5a6;
    padding-bottom: 30px;
    text-align: center;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1.9s forwards;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #ffffff;
    margin: 30px;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: relative;
    animation: slideIn 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}

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

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-button {
    color: #95a5a6;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-button:hover {
    color: #2c3e50;
}

.modal-content h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
}

.address-item {
    background-color: #f8fafb;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 12px;
    border-left: 4px solid #3498db;
    text-align: left;
}

.address-item h3 {
    margin: 0 0 8px 0;
    color: #3498db;
    font-size: 16px;
}

.address-item p {
    margin: 5px 0;
    color: #34495e;
    font-size: 14px;
    line-height: 1.6;
}

/* Модальное окно для услуг и стоимости */
.services-content {
    max-width: 700px;
    width: 95%;
    padding: 25px;
    max-height: 85vh;
    overflow-y: auto;
}

.services-content h2 {
    text-align: center;
    margin-bottom: 15px;
}

.special-offer {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(238, 90, 111, 0.3);
    border: 3px solid #fff;
    position: relative;
    overflow: hidden;
}

.special-offer::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.offer-badge {
    display: inline-block;
    background: #fff;
    color: #ff6b6b;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.special-offer h3 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 10px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.special-offer p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    margin: 8px 0 0 0;
    font-weight: 500;
}

.services-intro {
    text-align: center;
    background: linear-gradient(135deg, #e8f4f8 0%, #f8fafb 100%);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

.services-intro p {
    margin: 0;
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.6;
}

.services-category {
    margin-bottom: 30px;
}

.category-title {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f4f8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-card {
    background: #ffffff;
    border: 2px solid #e8f4f8;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.service-card.popular {
    border-color: #2980b9;
}


.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.service-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.service-badge {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-badge.best {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.service-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #f8fafb;
    border-radius: 8px;
    margin-bottom: 6px;
}

.service-price-row:last-child {
    margin-bottom: 0;
}

.duration {
    color: #7f8c8d;
    font-size: 13px;
    font-weight: 500;
}

.service-pricing {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background-color: #f8fafb;
    border-radius: 10px;
    transition: all 0.2s ease;
}


.location-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.price-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

.price-label {
    color: #7f8c8d;
    font-size: 13px;
    font-weight: 500;
}

.price-main {
    color: #3498db;
    font-size: 18px;
    font-weight: 700;
}

.services-footer {
    margin-top: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #f8fafb 0%, #e8f4f8 100%);
    border-radius: 12px;
    text-align: center;
}

.services-footer p {
    margin: 8px 0;
    color: #2c3e50;
    font-size: 13px;
}

.services-footer a {
    color: #3498db;
    font-weight: 600;
    text-decoration: none;
}

.services-footer a:hover {
    text-decoration: underline;
}

/* Удаляем старые стили */
.service-item {
    display: none;
}

/* Модальное окно для сертификатов */
.certificates-content {
    max-width: 900px;
    width: 95%;
    padding: 25px;
}

.certificates-content h2 {
    text-align: center;
    margin-bottom: 20px;
}

.certificate-viewer {
    width: 100%;
    background-color: #f8fafb;
    border-radius: 15px;
    padding: 15px;
    box-sizing: border-box;
    overflow: hidden;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-viewer img {
    max-width: 100%;
    max-height: 65vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    object-fit: contain;
}

.certificate-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.control-btn {
    background-color: #3498db;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background-color: #2980b9;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.control-btn:disabled {
    background-color: #d1dce5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.certificate-counter {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    background-color: #f8fafb;
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid #d1dce5;
    min-width: 80px;
    text-align: center;
}

/* Модальное окно "Обо мне" - Mobile First */
.about-content {
    max-width: 700px;
    width: 95%;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

.about-content h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8em;
    color: #2c3e50;
}

.about-section {
    text-align: left;
}

.about-intro {
    background: #2980b9;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.15);
    color: white;
    border-left: 5px solid #3498db;
}

.about-intro p {
    margin: 0;
    line-height: 1.9;
    font-size: 17px;
    text-align: left;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Badge d'éxpérience professionnel et minimaliste */
.experience-badges {
    margin: 25px 0;
}

.experience-badges .badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 25px 30px;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e9f5 100%);
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(52, 152, 219, 0.15);
    border: 2px solid #3498db;
    color: #2c3e50;
}

.experience-badges .badge-icon {
    font-size: 3.5em;
    line-height: 1;
}

.experience-badges .badge-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.experience-badges .badge-text strong {
    font-size: 2.5em;
    font-weight: 500;
    line-height: 1;
    margin-bottom: 6px;
    color: #3498db;
}

.experience-badges .badge-text span {
    font-size: 1em;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: #2c3e50;
}

.education-block {
    margin-bottom: 25px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2c3e50;
    background: #e8f4f8;
    font-size: 17px;
    margin-bottom: 18px;
    padding: 15px 18px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    font-weight: 600;
}

.title-icon {
    font-size: 26px;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    padding: 18px;
    background-color: white;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 1px solid #d4e9f5;
    box-shadow: 0 1px 3px rgba(52, 152, 219, 0.1);
}

.timeline-item:active {
    transform: scale(0.99);
}

.timeline-item.featured {
    background: #e8f4f8;
    border: 2px solid #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.timeline-year {
    font-size: 12px;
    font-weight: 700;
    color: white;
    background: #3498db;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
    letter-spacing: 0.3px;
}

.timeline-content h4 {
    margin: 8px 0 6px 0;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
}

.timeline-content .degree {
    color: #7f8c8d;
    font-size: 13px;
    margin: 4px 0;
}

.timeline-content .specialization {
    color: #3498db;
    font-size: 14px;
    margin: 4px 0;
    font-weight: 500;
}

/* Styles pour l'expérience de travail - Accent professionnel */
.work-item {
    border-left: 4px solid #3498db;
}

.work-item.current {
    background: #e8f4f8;
    border: 2px solid #3498db;
    border-left: 5px solid #3498db;
    box-shadow: 0 3px 12px rgba(52, 152, 219, 0.2);
}

.work-item.current .timeline-year {
    background: #2980b9;
    color: white;
}

.timeline-content .company {
    color: #7f8c8d;
    font-size: 13px;
    margin: 4px 0;
}

.work-duties {
    margin: 15px 0;
    padding: 15px;
    background: #e8f4f8;
    border-radius: 8px;
    list-style: none;
    border-left: 3px solid #3498db;
}

.work-duties li {
    color: #34495e;
    font-size: 13px;
    margin: 8px 0;
    padding-left: 22px;
    position: relative;
    line-height: 1.7;
}

.work-duties li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #3498db;
    font-weight: bold;
    font-size: 16px;
}

.work-types {
    color: #2c3e50;
    font-size: 13px;
    margin: 15px 0 10px 0;
    font-weight: 600;
}

.work-types-list {
    margin: 0;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    list-style: none;
    border: 1px solid #d4e9f5;
}

.work-types-list li {
    color: #34495e;
    font-size: 13px;
    margin: 7px 0;
    padding-left: 22px;
    position: relative;
}

.work-types-list li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #3498db;
    font-size: 14px;
}

/* Кнопка добавления отзыва */
.add-review-btn {
    width: 100%;
    background-color: #3498db;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 2.0s forwards;
}

.add-review-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.add-review-btn:active {
    transform: translateY(0);
}

/* Модальное окно для отзыва */
.review-form-content {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Секция авторизации */
.auth-section {
    text-align: center;
    padding: 30px 20px;
}

.auth-description {
    font-size: 16px;
    color: #34495e;
    margin-bottom: 25px;
    line-height: 1.5;
}

.yandex-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #ffcc00;
    color: #000;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
}

.yandex-auth-btn:hover {
    background-color: #ffd633;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.4);
}

.auth-note {
    margin-top: 20px;
    font-size: 13px;
    color: #7f8c8d;
}

/* Секция формы отзыва */
.review-form-section {
    padding: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #3498db 100%);
    border-radius: 12px;
    margin-bottom: 25px;
    color: white;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Форма */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 14px;
}

.star-rating {
    display: flex;
    gap: 5px;
    font-size: 32px;
    cursor: pointer;
}

.star-rating .star {
    color: #ffd700;
    transition: all 0.2s ease;
}

.star-rating .star:hover {
    transform: scale(1.2);
}

#reviewText {
    width: 100%;
    padding: 12px;
    border: 2px solid #e8ecef;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#reviewText:focus {
    outline: none;
    border-color: #3498db;
}

.submit-review-btn {
    width: 100%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.submit-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* Сообщение об успехе */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    font-size: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.success-message p {
    color: #7f8c8d;
    font-size: 14px;
}

/* Новый отзыв - выделение */
.new-review {
    border-left: 4px solid #3498db;
}

/* Адаптация для мобильных устройств */
@media screen and (max-width: 768px) {
    .reviews-section {
        margin-top: 30px;
    }

    .reviews-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .review-card {
        padding: 15px;
        margin-bottom: 12px;
    }

    .review-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-right: 10px;
    }

    .review-name {
        font-size: 15px;
    }

    .review-text {
        font-size: 13px;
    }

    .services-content {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        margin: 10px;
        max-height: 90vh;
    }

    .services-content h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .special-offer {
        padding: 16px;
        margin-bottom: 16px;
    }

    .offer-badge {
        font-size: 11px;
        padding: 5px 14px;
        margin-bottom: 10px;
    }

    .special-offer h3 {
        font-size: 19px;
        margin: 8px 0;
    }

    .special-offer p {
        font-size: 13px;
    }

    .services-intro {
        padding: 12px 15px;
        margin-bottom: 20px;
    }

    .services-intro p {
        font-size: 13px;
    }

    .services-category {
        margin-bottom: 25px;
    }

    .category-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .service-card {
        padding: 14px;
        margin-bottom: 10px;
    }

    .service-header h4 {
        font-size: 15px;
    }

    .service-badge {
        font-size: 10px;
        padding: 3px 10px;
    }

    .service-price-row {
        padding: 8px 10px;
    }

    .duration {
        font-size: 12px;
    }

    .price-main {
        font-size: 16px;
    }

    .price-option {
        padding: 9px 10px;
        gap: 10px;
    }

    .location-icon {
        font-size: 18px;
    }

    .add-review-btn {
        padding: 15px 20px;
        font-size: 15px;
        margin-top: 20px;
        animation-delay: 1.0s;
    }

    .review-form-content {
        max-width: 90%;
        margin: 20px;
    }

    .auth-description {
        font-size: 15px;
    }

    .yandex-auth-btn {
        padding: 12px 24px;
        font-size: 15px;
    }

    .user-info {
        padding: 12px;
        gap: 12px;
    }

    .user-avatar {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .user-name {
        font-size: 15px;
    }

    .star-rating {
        font-size: 28px;
    }

    .price-label {
        font-size: 12px;
    }

    .services-footer {
        padding: 12px;
        margin-top: 20px;
    }

    .services-footer p {
        font-size: 12px;
    }

    .service-item {
        display: none;
    }

    .certificates-content {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        margin: 10px;
        max-height: 98vh;
    }
    
    .certificates-content h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .certificate-viewer {
        padding: 10px;
        max-height: 75vh;
        border-radius: 12px;
    }

    .certificate-viewer img {
        max-height: 70vh;
        border-radius: 8px;
    }

    .certificate-controls {
        gap: 12px;
        margin-top: 12px;
    }

    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .certificate-counter {
        font-size: 14px;
        padding: 8px 15px;
        min-width: 70px;
    }
    .about-content {
        padding: 15px;
        margin: 10px;
    }

    .about-content h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    .about-intro {
        padding: 20px;
        margin-bottom: 25px;
    }

    .about-intro p {
        font-size: 16px;
        line-height: 1.8;
    }

    .experience-badge-single {
        padding: 22px 18px;
        gap: 18px;
    }

    .badge-icon-large {
        font-size: 3em;
    }

    .badge-number {
        font-size: 2.4em;
    }

    .badge-label {
        font-size: 0.95em;
    }

    .section-title {
        font-size: 16px;
        margin-bottom: 12px;
        padding: 12px;
    }

    .title-icon {
        font-size: 22px;
    }

    .timeline-item {
        padding: 12px;
        margin-bottom: 10px;
    }

    .timeline-year {
        font-size: 12px;
        padding: 5px 10px;
    }

    .timeline-content h4 {
        font-size: 15px;
    }

    .timeline-content .degree,
    .timeline-content .specialization {
        font-size: 13px;
    }

    .work-duties li,
    .work-types-list li {
        font-size: 13px;
    }

    .work-types {
        font-size: 13px;
    }}

@media screen and (max-width: 480px) {
    .reviews-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .review-card {
        padding: 12px;
        margin-bottom: 10px;
    }

    .review-avatar {
        width: 35px;
        height: 35px;
        font-size: 16px;
        margin-right: 8px;
    }

    .review-name {
        font-size: 14px;
    }

    .review-stars {
        font-size: 12px;
    }

    .review-text {
        font-size: 12px;
    }

    .services-content {
        padding: 10px;
        margin: 5px;
    }

    .services-content h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .special-offer {
        padding: 14px;
        margin-bottom: 14px;
    }

    .offer-badge {
        font-size: 10px;
        padding: 4px 12px;
        margin-bottom: 8px;
    }

    .special-offer h3 {
        font-size: 17px;
        margin: 6px 0;
    }

    .special-offer p {
        font-size: 12px;
        margin: 6px 0 0 0;
    }

    .services-intro {
        padding: 10px 12px;
        margin-bottom: 15px;
    }

    .services-intro p {
        font-size: 12px;
    }

    .services-category {
        margin-bottom: 20px;
    }

    .category-title {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .service-card {
        padding: 12px;
        margin-bottom: 8px;
    }

    .service-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .service-header h4 {
        font-size: 14px;
    }

    .service-badge {
        font-size: 9px;
        padding: 3px 8px;
    }

    .service-price-row {
        padding: 7px 8px;
        margin-bottom: 5px;
    }

    .duration {
        font-size: 11px;
    }

    .price-main {
        font-size: 15px;
    }

    .price-option {
        padding: 8px;
        gap: 8px;
    }

    .location-icon {
        font-size: 16px;
    }

    .add-review-btn {
        padding: 14px 18px;
        font-size: 14px;
        margin-top: 18px;
        animation-delay: 0.7s;
    }

    .review-form-content {
        max-width: 95%;
        margin: 10px;
        padding: 15px;
    }

    .auth-section {
        padding: 20px 15px;
    }

    .auth-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .yandex-auth-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .review-form-section {
        padding: 15px;
    }

    .user-info {
        padding: 10px;
        gap: 10px;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .user-name {
        font-size: 14px;
    }

    .logout-btn {
        padding: 5px 12px;
        font-size: 12px;
    }

    .star-rating {
        font-size: 26px;
    }

    #reviewText {
        font-size: 13px;
    }

    .submit-review-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }

    .success-message h3 {
        font-size: 18px;
    }

    .success-message p {
        font-size: 13px;
    }

    .price-label {
        font-size: 11px;
    }

    .services-footer {
        padding: 10px;
        margin-top: 15px;
    }

    .services-footer p {
        font-size: 11px;
        margin: 6px 0;
    }

    .service-item {
        display: none;
    }

    .certificates-content {
        padding: 10px;
        margin: 5px;
    }
    
    .certificates-content h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .certificate-viewer {
        padding: 8px;
        border-radius: 10px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .certificate-counter {
        font-size: 13px;
        padding: 6px 12px;
        min-width: 60px;
    }

    .about-content {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        margin: 5px;
        max-height: 95vh;
    }

    .about-content h2 {
        font-size: 1.4em;
        margin-bottom: 15px;
    }

    .about-intro {
        padding: 18px;
        margin-bottom: 22px;
    }

    .about-intro p {
        font-size: 15px;
        line-height: 1.75;
    }

    .experience-badge-single {
        padding: 20px 15px;
        gap: 15px;
        flex-direction: row;
        text-align: left;
    }

    .badge-icon-large {
        font-size: 2.5em;
    }

    .badge-content {
        align-items: flex-start;
    }

    .badge-number {
        font-size: 2em;
    }

    .badge-label {
        font-size: 0.85em;
    }

    .section-title {
        font-size: 15px;
        margin-bottom: 12px;
        padding: 12px;
    }

    .title-icon {
        font-size: 20px;
    }

    .timeline-item {
        padding: 12px;
        margin-bottom: 10px;
    }

    .timeline-year {
        font-size: 12px;
    }

    .timeline-content h4 {
        font-size: 14px;
    }

    .timeline-content .degree,
    .timeline-content .specialization {
        font-size: 12px;
    }

    .work-duties {
        padding: 10px;
    }

    .work-duties li {
        font-size: 12px;
        padding-left: 20px;
    }

    .work-types-list {
        padding: 10px;
    }

    .work-types-list li {
        font-size: 12px;
        padding-left: 20px;
    }
}

/* Optimisation des animations pour mobile */
@media screen and (max-width: 768px) {
    /* Réduction des délais d'animation sur mobile pour un chargement plus rapide */
    .header-bg {
        animation-delay: 0.1s;
        animation-duration: 0.6s;
    }
    
    .profile-img {
        animation-delay: 0.2s;
        animation-duration: 0.6s;
    }
    
    h1 {
        animation-delay: 0.3s;
        animation-duration: 0.6s;
    }
    
    .subtitle {
        animation-delay: 0.35s;
        animation-duration: 0.6s;
    }
    
    p.description {
        animation-delay: 0.4s;
        animation-duration: 0.6s;
    }
    
    .link-button:nth-of-type(1) { animation-delay: 0.5s; animation-duration: 0.4s; }
    .link-button:nth-of-type(2) { animation-delay: 0.55s; animation-duration: 0.4s; }
    .link-button:nth-of-type(3) { animation-delay: 0.6s; animation-duration: 0.4s; }
    .link-button:nth-of-type(4) { animation-delay: 0.65s; animation-duration: 0.4s; }
    .link-button:nth-of-type(5) { animation-delay: 0.7s; animation-duration: 0.4s; }
    
    .reviews-section {
        animation-delay: 0.8s;
        animation-duration: 0.6s;
    }
    
    .review-card:nth-of-type(2) { animation-delay: 0.85s; animation-duration: 0.5s; }
    .review-card:nth-of-type(3) { animation-delay: 0.9s; animation-duration: 0.5s; }
    .review-card:nth-of-type(4) { animation-delay: 0.95s; animation-duration: 0.5s; }
    .review-card:nth-of-type(5) { animation-delay: 1.0s; animation-duration: 0.5s; }
    
    footer {
        animation-delay: 1.1s;
        animation-duration: 0.6s;
    }
}

/* Pour les très petits écrans - animations encore plus rapides */
@media screen and (max-width: 480px) {
    .header-bg {
        animation-delay: 0s;
        animation-duration: 0.6s;
    }
    
    .profile-img {
        animation-delay: 0.1s;
        animation-duration: 0.6s;
    }
    
    h1 {
        animation-delay: 0.15s;
        animation-duration: 0.6s;
    }
    
    .subtitle {
        animation-delay: 0.2s;
        animation-duration: 0.6s;
    }
    
    p.description {
        animation-delay: 0.25s;
        animation-duration: 0.6s;
    }
    
    .link-button:nth-of-type(1) { animation-delay: 0.3s; animation-duration: 0.3s; }
    .link-button:nth-of-type(2) { animation-delay: 0.33s; animation-duration: 0.3s; }
    .link-button:nth-of-type(3) { animation-delay: 0.36s; animation-duration: 0.3s; }
    .link-button:nth-of-type(4) { animation-delay: 0.39s; animation-duration: 0.3s; }
    .link-button:nth-of-type(5) { animation-delay: 0.42s; animation-duration: 0.3s; }
    
    .reviews-section {
        animation-delay: 0.5s;
        animation-duration: 0.4s;
    }
    
    .review-card:nth-of-type(2) { animation-delay: 0.53s; animation-duration: 0.3s; }
    .review-card:nth-of-type(3) { animation-delay: 0.56s; animation-duration: 0.3s; }
    .review-card:nth-of-type(4) { animation-delay: 0.59s; animation-duration: 0.3s; }
    .review-card:nth-of-type(5) { animation-delay: 0.62s; animation-duration: 0.3s; }
    
    footer {
        animation-delay: 0.7s;
        animation-duration: 0.4s;
    }
}
/* Секция галереи отзывов */
.reviews-gallery {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.reviews-title {
    text-align: center;
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 50px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: fadeInUp 0.8s ease-out;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
    justify-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.review-item {
    position: relative;
    width: 100%;
    max-width: 350px;
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: rotate(var(--rotate, 0deg));
    animation: floatIn 0.8s ease-out forwards;
    animation-delay: var(--delay, 0s);
    opacity: 0;
    cursor: pointer;
}

@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(50px) rotate(var(--rotate, 0deg)) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(var(--rotate, 0deg)) scale(1);
    }
}

.review-item:hover {
    transform: rotate(0deg) scale(1.05) translateY(-10px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.25);
    z-index: 10;
}

.review-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    transition: transform 0.3s ease;
}

.review-item:hover img {
    transform: scale(1.02);
}

/* Эффект случайного размещения для каждого n-го элемента */
.review-item:nth-child(3n) {
    margin-top: 20px;
}

.review-item:nth-child(3n+1) {
    margin-top: -10px;
}

.review-item:nth-child(5n) {
    margin-top: 30px;
}

.review-item:nth-child(7n) {
    margin-top: -15px;
}

/* Адаптивность для планшетов */
@media screen and (max-width: 768px) {
    .reviews-gallery {
        margin: 40px 10px 30px;
        padding: 30px 15px;
    }

    .reviews-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .reviews-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
        padding: 10px;
    }

    .review-item {
        max-width: 300px;
    }

    .review-item:nth-child(3n),
    .review-item:nth-child(3n+1),
    .review-item:nth-child(5n),
    .review-item:nth-child(7n) {
        margin-top: 0;
    }
}

/* Адаптивность для мобильных */
@media screen and (max-width: 480px) {
    .reviews-gallery {
        margin: 30px 5px 20px;
        padding: 20px 10px;
        border-radius: 15px;
    }

    .reviews-title {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 5px;
    }

    .review-item {
        max-width: 100%;
        padding: 10px;
    }

    .review-item:hover {
        transform: rotate(0deg) scale(1.02) translateY(-5px);
    }
}

/* Lightbox pour les avis */
.review-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.review-lightbox.active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.2);
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-navigation {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10001;
}

.lightbox-prev,
.lightbox-next {
    pointer-events: all;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 40px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-prev:active,
.lightbox-next:active {
    transform: scale(0.95);
}

/* Адаптация lightbox для планшетов */
@media screen and (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 40px;
        width: 50px;
        height: 50px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        width: 50px;
        height: 50px;
    }
    
    .lightbox-content img {
        max-height: 90vh;
    }
}

/* Адаптация lightbox для мобильных */
@media screen and (max-width: 480px) {
    .lightbox-close {
        top: 5px;
        right: 5px;
        font-size: 35px;
        width: 45px;
        height: 45px;
    }
    
    .lightbox-navigation {
        padding: 0 5px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 25px;
        width: 45px;
        height: 45px;
        background: rgba(0, 0, 0, 0.7);
    }
    
    .lightbox-content {
        max-width: 100%;
        padding: 10px;
    }
    
    .lightbox-content img {
        max-height: 85vh;
        border-radius: 5px;
    }
}

/* Курсор для изображений отзывов */
.review-item img {
    cursor: zoom-in;
}
