/* Базовые сбросы и переменные */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #dddddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding: 20px;
}

/* Skip Link для доступности */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 1000;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

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

/* Навигация */
.navigation {
    background: var(--bg-secondary);
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.navigation__links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.navigation__link {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: var(--transition);
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navigation__link:hover {
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
}

.navigation__link:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.25);
}

.navigation__link--active {
    background: var(--primary-color);
    color: white;
}

/* Шапка */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.header__title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.header__subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.header__nav {
    margin-top: 1.5rem;
}

.nav-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-link:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Секции */
.section {
    background: white;
    margin-bottom: 3rem;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.section__title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Контейнер для изображений */
.image-container {
    margin-bottom: 1.5rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    background: #f8fafc;
}

/* 1. Базовое адаптивное изображение */
.responsive-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

/* 2. Picture element */
picture {
    display: block;
}

/* 4. Retina изображение */
.retina-image {
    width: 100px;
    height: 100px;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius);
}

/* 5. Object-fit демонстрация */
.object-fit-demo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.object-fit-item {
    text-align: center;
}

.object-fit-item img {
    width: 100%;
    height: 200px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.object-fit-cover {
    object-fit: cover;
}

.object-fit-contain {
    object-fit: contain;
    background: #f1f5f9;
}

.object-fit-fill {
    object-fit: fill;
}

/* 6. Адаптивная галерея */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gallery__item {
    overflow: hidden;
    border-radius: var(--radius);
}

.gallery__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

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

/* Блоки с объяснениями */
.explanation {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.explanation h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.explanation ul {
    list-style-position: inside;
}

.explanation li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

/* Подвал */
.footer {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text-light);
}

/* Контент страницы контактов */
.content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.contacts__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Форма контактов */
.contact-form {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--radius);
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form__input,
.form__textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form__textarea {
    min-height: 120px;
    resize: vertical;
}

.button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.button--primary {
    background: var(--primary-color);
    color: white;
}

.button--primary:hover {
    background: #1d4ed8;
}

.form__button {
    width: 100%;
}

/* Контактная информация */
.contact-info {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--radius);
}

.contact-info__title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.contact-info__items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.contact-item__icon {
    font-size: 1.5rem;
}

.contact-item__content {
    flex: 1;
}

.contact-item__title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.contact-item__value {
    color: var(--text-light);
}

/* Адаптивные изображения на странице контактов */
.adaptive-images {
    margin-top: 3rem;
}

.adaptive-section {
    margin-bottom: 2rem;
}

.adaptive-section__title {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.adaptive-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.adaptive-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.adaptive-gallery__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
}

/* Адаптивность для планшетов */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header__title {
        font-size: 2rem;
    }
    
    .section {
        padding: 1rem;
    }
    
    .section__title {
        font-size: 1.5rem;
    }
    
    .object-fit-demo {
        grid-template-columns: 1fr;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery__image {
        height: 150px;
    }
    
    .contacts__content {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 1rem;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .header__title {
        font-size: 1.5rem;
    }
    
    .section__title {
        font-size: 1.3rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .object-fit-item img {
        height: 150px;
    }
}

/* Высокие экраны */
@media (min-height: 800px) and (min-width: 1200px) {
    .gallery__image {
        height: 250px;
    }
}

