:root {
    --main-blue: #0D47A1;
    --text-white: #FFFFFF;
    --placeholder-gray: #9E9E9E;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: 'Roboto', sans-serif;
    scroll-behavior: smooth;
    background-color: #f8f9fa;
}

.page-wrapper {
    position: relative;
    width: 100%;
    background: linear-gradient(to top, #bde6ff 0%, #7ab3ef 100%);
    overflow-x: hidden; 
    display: flex;
    flex-direction: column; 
    justify-content: flex-start; 
    align-items: center;
    padding: 20px 20px 60px 20px; 
    box-sizing: border-box;
}

.sky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.cloud {
    position: absolute;
    height: auto;
    animation-name: float;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    opacity: 0.85;
}

.cloud-1 {
    width: 300px;
    top: 15%;
    animation-duration: 90s;
}

.cloud-2 {
    width: 450px;
    top: 25%;
    animation-duration: 70s;
    animation-delay: -10s;
    opacity: 0.7;
}

.cloud-3 {
    width: 250px;
    top: 60%;
    animation-duration: 110s;
    animation-delay: -25s;
}

.cloud-4 {
    width: 400px;
    top: 75%;
    animation-duration: 80s;
    animation-delay: -40s;
    opacity: 0.9;
}

.cloud-5 {
    width: 200px;
    top: 40%;
    animation-duration: 120s;
    animation-delay: -50s;
    opacity: 0.75;
}

.cloud-6 {
    width: 350px;
    top: 5%;
    animation-duration: 100s;
    animation-delay: -65s;
    opacity: 0.8;
}

@keyframes float {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100vw);
    }
}

.main-content {
    position: relative;
    z-index: 2;
    color: var(--text-white);
    text-align: center;
    max-width: 500px;
    width: 100%;
    background: rgb(65 65 65 / 40%);
    padding: 20px;
    padding-top: 160px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    margin-bottom: 60px; 
}

.top-flag {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background-image: url('flag.gif');
    background-size: cover;
    background-position: center;
    opacity: 0.8;
}

.coat-of-arms {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.4));
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 5px 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 25px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
}

.criteria-list {
    list-style-position: inside;
    text-align: left;
    display: inline-block;
    font-size: 1rem;
    margin: 0 auto 25px auto;
    padding-left: 0;
    position: relative;
    z-index: 1;
}

.criteria-list li {
    margin-bottom: 10px;
}

.form-mockup {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.input-field, .submit-button {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
}

.input-field {
    background-color: var(--text-white);
    border: 1px solid #ddd;
    color: #333;
}

.input-field::placeholder {
    color: var(--placeholder-gray);
}

.submit-button {
    background-color: var(--main-blue);
    color: var(--text-white);
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background-color 0.3s, opacity 0.3s;
}

.submit-button:hover {
    background-color: #0b3a8a;
}

.submit-button:disabled {
    background-color: #9E9E9E;
    cursor: not-allowed;
    opacity: 0.7;
}

.footer-info {
    margin-top: 30px;
    color: var(--text-white);
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-law {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.law-link {
    color: var(--text-white);
    text-decoration: underline;
    transition: opacity 0.3s;
}

.law-link:hover {
    opacity: 0.8;
}

.logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.gosuslugi-logo-img {
    height: 35px; 
    width: auto;
    vertical-align: middle; 
}

.other-logos {
    display: flex;
    gap: 15px;
}

.social-logo {
    height: 24px;
    border-radius: 50%;
    vertical-align: middle;
    transition: opacity 0.3s;
}

.social-logo:hover {
    opacity: 0.8;
}

.additional-info {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.7); 
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.info-row.visible {
    opacity: 1;
    transform: translateY(0);
}

.info-image {
    width: 100px;
    height: 100px;
    object-fit: cover; 
    border-radius: 10px;
    flex-shrink: 0; 
}

.info-text {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

.site-footer {
    width: 100%;
    background-color: #f8f9fa; 
    padding: 40px 20px;
    box-sizing: border-box;
    z-index: 3;
}

.footer-content-wrapper {
    max-width: 1100px;
    margin: 0 auto; 
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: nowrap; 
}

.footer-col {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    color: #6c757d;
    font-size: 0.85rem;
}

.footer-col p {
    margin: 0;
}

.copyright {
    color: #adb5bd;
    font-size: 0.8rem;
}

.footer-logo-main {
    height: 40px;
    margin-bottom: 5px;
}

.footer-logo-cc {
    height: 28px;
    margin-bottom: 5px;
}

.cc-link {
    color: inherit;
    text-decoration: underline;
    transition: opacity 0.3s;
}

.cc-link:hover {
    opacity: 0.7;
}

.footer-socials {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    flex-wrap: wrap; 
}

.footer-socials a img {
    height: 28px;
    opacity: 0.7;
    transition: opacity 0.3s;
    cursor: pointer;
    vertical-align: middle;
}

.footer-socials a:hover img {
    opacity: 1;
}


/* --- СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Изначально скрыто */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 15px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

#modal-message {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #333;
}

#modal-close-button {
    background-color: var(--main-blue);
    color: var(--text-white);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
}

#modal-close-button:hover {
    background-color: #0b3a8a;
}


@media (max-width: 900px) {
    .footer-content-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px; 
    }

    .footer-col {
        align-items: center;
        min-width: 100%;
    }

    .footer-socials {
        justify-content: center; 
    }
}