* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    overflow-y: auto;
    padding: 40px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
header {
    padding: 40px 0 0;
    text-align: center;
    flex-shrink: 0;
}

.main-logo {
    max-width: 320px;
    height: auto;
    margin: 0 auto;
}

.main-logo img {
    width: 100%;
    height: auto;
}

/* Media logos section */
.media-section {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0;
    min-height: 0;
}

.media-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.media-item {
    flex: 0 1 auto;
    text-align: center;
}

.media-item a {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

.media-item a:hover img {
    transform: scale(1.08);
}

.media-item img {
    max-width: 180px;
    height: auto;
    max-height: 90px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Contacts section */
.contacts-section {
    padding: 20px 0;
    background-color: #f8f9fa;
    flex-shrink: 0;
}

.contacts-wrapper {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.contact-item img {
    width: 20px;
    height: 20px;
}

.contact-item a {
    color: #0056b3;
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #f8f9fa;
    padding: 0;
    border-top: 3px solid #0056b3;
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    padding-top: 12px;
}

.docs-btn {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.docs-btn:hover {
    background-color: #004494;
}

.docs-btn:active {
    transform: scale(0.98);
}

.footer-legal {
    text-align: center;
    font-size: 12px;
    color: #666;
    padding: 8px 0 12px;
    line-height: 1.5;
    white-space: nowrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #000;
}

.modal-content h3 {
    margin-top: 0;
    color: #0056b3;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.docs-list {
    list-style-type: none;
    padding: 0;
    margin-top: 20px;
}

.docs-list li {
    margin-bottom: 15px;
}

.docs-list a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.docs-list a:hover {
    color: #0056b3;
}

.docs-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Mobile */
@media (max-width: 768px) {
    html {
        height: auto;
    }

    body {
        display: block;
        padding: 20px 0;
        min-height: 0;
    }

    header {
        padding: 20px 0;
    }

    .main-logo {
        max-width: 320px;
    }

    .media-section {
        padding: 20px 0;
    }

    .media-grid {
        gap: 25px;
    }

    .media-item {
        flex: 0 1 100%;
    }

    .media-item img {
        max-width: 200px;
        max-height: 100px;
    }

    .contacts-section {
        padding: 15px 0;
    }

    .contacts-wrapper {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .contact-item {
        font-size: 14px;
    }

    .footer-legal {
        font-size: 11px;
        white-space: normal;
    }

    .footer-legal p {
        margin-bottom: 4px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 15px 0;
    }

    .main-logo {
        max-width: 280px;
    }

    .media-item img {
        max-width: 175px;
        max-height: 85px;
    }

    .docs-btn {
        width: 100%;
        max-width: 280px;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }
}