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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: black;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.nav-links a {
    text-decoration: none;
    color: black;
    margin-left: 20px;
    padding: 8px 16px;
    border-radius: 15px;
    transition: all 0.3s;
}

.nav-links a:hover {
    background: #f0f0f0;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    flex: 1;
}

.about-header {
    text-align: center;
    margin-bottom: 40px;
}

.about-header h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 10px;
}

.about-header .subtitle {
    font-size: 18px;
    color: #666;
}

.about-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.about-section h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    display: inline-block;
}

.about-section p {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 15px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.team-member {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.member-avatar {
    font-size: 48px;
    margin-bottom: 10px;
}

.team-member h3 {
    font-size: 18px;
    color: #333;
}

.team-member p {
    font-size: 14px;
    color: #666;
}

.contacts-list {
    list-style: none;
    padding: 0;
}

.contacts-list li {
    padding: 8px 0;
    font-size: 16px;
    color: #444;
}

.contacts-list a {
    color: #667eea;
    text-decoration: none;
}

.contacts-list a:hover {
    text-decoration: underline;
}

.site-footer {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background: white;
    color: #fff;
    padding: 2rem 0 0 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0 2rem;
}

.footer-section p {
    line-height: 1.6;
    color: black;
    text-align: center;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: black;
    text-align: center;
}

.footer-bottom {
    text-align: center;
    padding: 10px;
    margin-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: black;
}

/* ============================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (улучшенная)
   ============================================ */

/* Планшеты и небольшие экраны (до 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        margin: 30px 15px;
        padding: 15px;
    }

    .about-header h1 {
        font-size: 32px;
    }

    .about-header .subtitle {
        font-size: 17px;
    }

    .about-section {
        padding: 25px;
    }
}

/* Мобильные устройства (до 768px) */
@media screen and (max-width: 768px) {
    .navbar {
        padding: 12px 15px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .logo {
        font-size: 20px;
        text-align: center;
    }

    .nav-links {
        justify-content: center;
        gap: 4px;
        flex-wrap: wrap;
    }

    .nav-links a {
        margin: 0;
        padding: 5px 10px;
        font-size: 14px;
        border-radius: 12px;
    }

    .container {
        margin: 20px 10px;
        padding: 10px;
    }

    .about-header h1 {
        font-size: 28px;
    }

    .about-header .subtitle {
        font-size: 16px;
    }

    .about-section {
        padding: 20px;
        border-radius: 10px;
        margin-bottom: 20px;
    }

    .about-section h2 {
        font-size: 20px;
        border-bottom-width: 2px;
        padding-bottom: 8px;
    }

    .about-section p {
        font-size: 15px;
        line-height: 1.5;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .team-member {
        padding: 12px;
    }

    .member-avatar {
        font-size: 36px;
    }

    .team-member h3 {
        font-size: 16px;
    }

    .team-member p {
        font-size: 13px;
    }

    .contacts-list li {
        font-size: 15px;
        padding: 6px 0;
    }

    .footer-container {
        padding: 0 1rem;
        gap: 1.5rem;
    }

    .footer-section h3 {
        font-size: 1.3rem;
    }

    .footer-section p {
        font-size: 14px;
    }

    .footer-bottom {
        font-size: 13px;
        padding: 8px;
    }
}

/* Маленькие телефоны (до 480px) */
@media screen and (max-width: 480px) {
    .navbar {
        padding: 8px 10px;
    }

    .logo {
        font-size: 18px;
    }

    .nav-links a {
        padding: 4px 8px;
        font-size: 12px;
        border-radius: 10px;
    }

    .container {
        margin: 10px 6px;
        padding: 6px;
    }

    .about-header {
        margin-bottom: 25px;
    }

    .about-header h1 {
        font-size: 22px;
    }

    .about-header .subtitle {
        font-size: 14px;
    }

    .about-section {
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 15px;
    }

    .about-section h2 {
        font-size: 18px;
        border-bottom-width: 2px;
        padding-bottom: 6px;
    }

    .about-section p {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 10px;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .team-member {
        padding: 10px;
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    .member-avatar {
        font-size: 32px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .team-member h3 {
        font-size: 15px;
        margin-bottom: 2px;
    }

    .team-member p {
        font-size: 13px;
        margin-bottom: 0;
    }

    .contacts-list li {
        font-size: 14px;
        padding: 5px 0;
    }

    .footer-container {
        padding: 0 0.8rem;
        gap: 1rem;
    }

    .footer-section h3 {
        font-size: 1.1rem;
    }

    .footer-section p {
        font-size: 13px;
    }

    .footer-bottom {
        font-size: 12px;
        padding: 6px;
    }
}

/* Очень маленькие телефоны (до 360px) */
@media screen and (max-width: 360px) {
    .logo {
        font-size: 16px;
    }

    .nav-links a {
        font-size: 11px;
        padding: 3px 6px;
    }

    .about-header h1 {
        font-size: 20px;
    }

    .about-header .subtitle {
        font-size: 13px;
    }

    .about-section h2 {
        font-size: 16px;
    }

    .about-section p {
        font-size: 13px;
    }

    .team-member {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .member-avatar {
        font-size: 28px;
    }

    .contacts-list li {
        font-size: 13px;
    }
}

/* Альбомный режим на телефонах */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .navbar {
        padding: 6px 12px;
        flex-direction: row;
    }

    .logo {
        font-size: 16px;
    }

    .nav-links a {
        padding: 4px 8px;
        font-size: 12px;
    }

    .container {
        margin: 10px 15px;
        padding: 10px;
    }

    .about-header h1 {
        font-size: 24px;
    }

    .about-header .subtitle {
        font-size: 14px;
    }

    .about-section {
        padding: 12px 15px;
        margin-bottom: 12px;
    }

    .about-section h2 {
        font-size: 18px;
    }

    .about-section p {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .team-member {
        padding: 8px;
    }

    .member-avatar {
        font-size: 28px;
    }

    .team-member h3 {
        font-size: 14px;
    }

    .team-member p {
        font-size: 12px;
    }
}

/* Безопасная зона для iPhone с вырезом */
@supports (padding: max(0px)) {
    @media screen and (max-width: 480px) {
        .navbar {
            padding-top: env(safe-area-inset-top, 10px);
            padding-left: env(safe-area-inset-left, 10px);
            padding-right: env(safe-area-inset-right, 10px);
        }
        .footer-container {
            padding-bottom: env(safe-area-inset-bottom, 10px);
        }
    }
}

/* Убираем выделение на мобильных */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Плавный скролл */
html {
    scroll-behavior: smooth;
}

/* Адаптация для тёмной темы (опционально) */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a2e;
    }
    .navbar,
    .about-section,
    .team-member,
    .site-footer {
        background: #16213e;
    }
    .logo,
    .about-header h1,
    .about-section h2,
    .team-member h3,
    .about-section p,
    .contacts-list li,
    .footer-section h3,
    .footer-section p,
    .footer-bottom {
        color: #e0e0e0;
    }
    .about-header .subtitle {
        color: #aaa;
    }
    .nav-links a {
        color: #e0e0e0;
    }
    .nav-links a:hover {
        background: #1a2a4a;
    }
    .about-section {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    .about-section h2 {
        border-bottom-color: #667eea;
    }
    .contacts-list a {
        color: #8ab4f8;
    }
    .footer-bottom {
        border-top-color: rgba(255,255,255,0.1);
    }
}