/* ========== ОБЩИЕ СТИЛИ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

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

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
    color: #2c3e50;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn--primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* ========== ШАПКА ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav__list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav__list a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav__list a:hover {
    color: #667eea;
}

/* ========== ГЛАВНЫЙ ЭКРАН ========== */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 80px;
}

.hero__title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero__subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ========== О НАС ========== */
.about {
    padding: 80px 0;
    background: #f9f9f9;
}

.about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about__text p {
    margin-bottom: 1rem;
    color: #666;
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
}

/* ========== УСЛУГИ ========== */
.services {
    padding: 80px 0;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    padding: 2rem;
    text-align: center;
    background: #f9f9f9;
    border-radius: 10px;
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card__icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

/* ========== ПОРТФОЛИО ========== */
.portfolio {
    padding: 80px 0;
    background: #f9f9f9;
}

.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.portfolio-item:hover .portfolio-item__overlay {
    transform: translateY(0);
}

/* ========== КОМАНДА ========== */
.team {
    padding: 80px 0;
}

.team__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}

.team-member__photo {
    font-size: 5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

/* ========== КОНТАКТЫ ========== */
.contact {
    padding: 80px 0;
    background: #f9f9f9;
}

.contact__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact__form .form-group {
    margin-bottom: 1rem;
}

.contact__form input,
.contact__form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.contact__form input:focus,
.contact__form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.contact__info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact__info i {
    width: 30px;
    color: #667eea;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: #667eea;
    font-size: 1.8rem;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
}

/* ========== ПОДВАЛ ========== */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* ========== АДАПТАЦИЯ ========== */
@media (max-width: 768px) {
    .nav__list {
        display: none;
    }
    
    .hero__title {
        font-size: 2rem;
    }
    
    .about__content,
    .services__grid,
    .portfolio__grid,
    .team__grid,
    .contact__content {
        grid-template-columns: 1fr;
    }
    
    .about__stats {
        grid-template-columns: 1fr;
    }
}
/* ========== ТЁМНАЯ ТЕМА ========== */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #667eea;
    padding: 0 10px;
    transition: transform 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Тёмная тема */
body.dark-theme {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

/* Шапка в тёмной теме */
body.dark-theme .header {
    background: rgba(26, 26, 26, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

body.dark-theme .logo a {
    background: linear-gradient(135deg, #9f7aea, #b794f4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-theme .nav__list a {
    color: #f0f0f0;
}

body.dark-theme .nav__list a:hover {
    color: #9f7aea;
}

/* Секции в тёмной теме */
body.dark-theme .about,
body.dark-theme .portfolio,
body.dark-theme .contact {
    background: #222;
}

body.dark-theme .services {
    background: #1a1a1a;
}

body.dark-theme .team {
    background: #222;
}

/* Карточки в тёмной теме */
body.dark-theme .stat-item,
body.dark-theme .service-card,
body.dark-theme .team-member {
    background: #2a2a2a;
    color: #f0f0f0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

body.dark-theme .stat-number {
    color: #9f7aea;
}

body.dark-theme .stat-label,
body.dark-theme .service-card p,
body.dark-theme .team-member p {
    color: #ccc;
}

/* Заголовки в тёмной теме */
body.dark-theme .section-title {
    color: #f0f0f0;
}

body.dark-theme .section-title::after {
    background: linear-gradient(90deg, #9f7aea, #b794f4);
}

/* Форма в тёмной теме */
body.dark-theme .contact__form input,
body.dark-theme .contact__form textarea {
    background: #333;
    border-color: #444;
    color: #f0f0f0;
}

body.dark-theme .contact__form input:focus,
body.dark-theme .contact__form textarea:focus {
    border-color: #9f7aea;
}

body.dark-theme .contact__info p {
    color: #ccc;
}

body.dark-theme .contact__info i {
    color: #9f7aea;
}

body.dark-theme .social-links a {
    color: #9f7aea;
}

/* Подвал в тёмной теме */
body.dark-theme .footer {
    background: #111;
    color: #ccc;
}

/* Кнопка в тёмной теме */
body.dark-theme .btn--primary {
    background: linear-gradient(135deg, #9f7aea, #b794f4);
}

body.dark-theme .btn--primary:hover {
    box-shadow: 0 10px 20px rgba(159, 122, 234, 0.3);
}

/* Смена иконки */
body.dark-theme .theme-toggle i::before {
    content: "\f185"; /* иконка солнца */
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .theme-toggle {
        font-size: 1.2rem;
        padding: 0 5px;
    }
}
/* ========== КНОПКА "НАВЕРХ" ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.back-to-top:active {
    transform: translateY(0);
}

/* Стили для тёмной темы */
body.dark-theme .back-to-top {
    background: linear-gradient(135deg, #9f7aea, #b794f4);
    box-shadow: 0 4px 15px rgba(159, 122, 234, 0.3);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}