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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #2d2d2d;
    padding-top: 90px; /* Отступ для фиксированной шапки */
}

/* ========== ШАПКА (ФИКСИРОВАННАЯ) ========== */
.header {
    background: linear-gradient(145deg, #4a4a4a 0%, #2d2d2d 100%);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.logo {
    height: auto;
    max-width: 120px;
    border-radius: 15px;
    transition: transform 0.3s ease;
    background: white;
    padding: 5px;
}

.logo:hover {
    transform: scale(1.05);
}

/* Десктопное меню */
.desktop-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.desktop-menu a {
    color: #FFD966;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2em;
    padding: 8px 20px;
    border-radius: 30px;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,217,102,0.3);
    cursor: pointer;
}

.desktop-menu a:hover {
    background: #FFD966;
    color: #2d2d2d;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255,217,102,0.4);
}

/* Мобильное меню */
.mobile-menu {
    display: none;
    font-size: 2.5em;
    cursor: pointer;
    color: #FFD966;
    background: #3a3a3a;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    box-shadow: 0 4px 10px rgba(255,217,102,0.3);
    z-index: 1001;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 90px;
    right: 20px;
    background: #2d2d2d;
    border: 2px solid #FFD966;
    border-radius: 20px;
    padding: 15px;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.mobile-nav.show {
    display: flex;
}

.mobile-nav a {
    color: #FFD966;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 15px;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,217,102,0.3);
    cursor: pointer;
}

.mobile-nav a:hover {
    background: #FFD966;
    color: #2d2d2d;
}

/* ========== КОНТЕЙНЕР ========== */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* ========== СТИЛИ ДЛЯ ГЛАВНОЙ ========== */
.site-title {
    font-size: 2.8em;
    font-weight: 800;
    color: #FFD966;
    text-shadow: 3px 3px 0 #2d2d2d;
    margin-bottom: 20px;
    text-align: center;
    scroll-margin-top: 100px;
}

.site-description {
    font-size: 1.3em;
    text-align: center;
    margin-bottom: 20px;
    background: rgba(255,217,102,0.2);
    padding: 15px 25px;
    border-radius: 50px;
    width: 100%;
}

.disclaimer {
    background-color: #ffecb3;
    border-left: 10px solid #FFD966;
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0 30px 0;
    font-size: 1.1em;
    line-height: 1.6;
    text-align: center;
    width: 100%;
    border: 2px solid #2d2d2d;
}

.disclaimer strong {
    color: #b71c1c;
}

/* Обновленные заголовки - все в одном стиле */
.section-title {
    font-size: 2.2em;
    margin: 40px 0 20px 0;
    color: #b8860b; /* Темно-золотой для всех */
    text-align: center;
    border-bottom: 3px dashed #b8860b;
    padding-bottom: 10px;
    width: 100%;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    font-weight: 700;
    scroll-margin-top: 100px;
}

/* Заголовок "Проекты" */
.section-title.projects-title {
    color: #b8860b;
    border-bottom: 3px dashed #b8860b;
}

/* Заголовок "О нас" */
.section-title.about-title {
    color: #b8860b;
    border-bottom: 3px dashed #b8860b;
}

.projects-grid, .authors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 100%;
    margin: 20px 0;
}

.card {
    background: linear-gradient(145deg, #FFD966 0%, #FFC107 100%);
    border-radius: 30px;
    padding: 25px;
    width: 280px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border: 2px solid #fff;
    color: #1e1e1e;
    transition: transform 0.3s ease;
}

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

.card h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: inherit;
}

.card p {
    margin: 15px 0;
    font-size: 1.1em;
}

.card a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    background: #2d2d2d;
    color: #FFD966;
}

.card a:hover {
    transform: scale(1.05);
}

.author-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: block;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* ========== СТИЛИ ДЛЯ СТРАНИЦ ПРОФИЛЕЙ ========== */
/* Обновленный back-button - жирнее и темнее */
.back-button {
    margin: 20px 0;
    align-self: flex-start;
}

.back-button a {
    color: #b8860b; /* Темно-золотой */
    font-size: 1.3em; /* Чуть больше */
    font-weight: 700; /* Жирнее */
    text-decoration: none;
    border-bottom: 2px dashed #b8860b; /* Темная обводка */
    padding-bottom: 3px;
    transition: all 0.3s ease;
    display: inline-block;
}

.back-button a:hover {
    color: #8b6910; /* Еще темнее при наведении */
    border-bottom-color: #8b6910;
    transform: translateX(-5px); /* Эффект движения влево */
}

.profile-card {
    border-radius: 50px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 20px 30px rgba(0,0,0,0.2);
    border: 4px solid #fff;
    width: 100%;
    max-width: 800px;
}

.profile-card.edgar-card {
    background: linear-gradient(145deg, #FFD966 0%, #FFC107 100%);
    color: #1e1e1e;
}

.profile-card.crmpdev-card {
    background: linear-gradient(145deg, #4a6fa5 0%, #2c3e50 100%);
    color: white;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-avatar-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.profile-title h1 {
    font-size: 3em;
    color: #2d2d2d;
    text-shadow: 2px 2px 0 #FFD966;
}

.crmpdev-card .profile-title h1 {
    color: white;
    text-shadow: 2px 2px 0 #2c3e50;
}

.profile-subtitle {
    font-size: 1.3em;
    margin-top: 5px;
}

.profile-bio {
    font-size: 1.3em;
    line-height: 1.8;
    padding: 30px;
    background: rgba(255,255,255,0.3);
    border-radius: 30px;
    margin: 20px 0;
}

.crmpdev-card .profile-bio {
    background: rgba(255,255,255,0.2);
}

.profile-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.profile-links a {
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.profile-links .telegram-link {
    background: #2d2d2d;
    color: #FFD966;
    border: 2px solid #FFD966;
}

.profile-links .website-link {
    background: #FFD966;
    color: #2d2d2d;
    border: 2px solid #2d2d2d;
}

.profile-links a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ========== ПОДВАЛ ========== */
.footer {
    background: #2d2d2d;
    color: #FFD966;
    padding: 30px 20px;
    text-align: center;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    margin-top: 40px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 1.1em;
    line-height: 1.6;
}

/* Счетчик */
.footer img {
    background: #808080;
    border-radius: 15px;
    padding: 3px;
    border: none;
    margin-top: 10px;
}

/* ========== АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ========== */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }
    
    .header {
        padding: 10px 20px;
    }

    .desktop-menu {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .logo {
        max-width: 70px;
    }

    .site-title {
        font-size: 2em;
    }

    .section-title {
        font-size: 1.8em;
        scroll-margin-top: 80px;
    }

    .card {
        width: 100%;
        max-width: 320px;
    }
    
    .profile-card {
        padding: 25px;
    }
    
    .profile-title h1 {
        font-size: 2.2em;
    }
    
    .mobile-nav {
        top: 70px;
    }
    
    .back-button a {
        font-size: 1.1em;
    }
    
    .site-title {
        scroll-margin-top: 80px;
    }
}

/* ========== АНИМАЦИИ ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.container > * {
    animation: fadeIn 0.8s ease forwards;
}

/* Эффект при скролле для шапки */
.header.scrolled {
    background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}