:root {
    --color-primary: #00387d;
    --dark: #00387d;
    --text: #1a1a1a;
    --layout-max-width: 75rem;
    --header-height: 125px;
}

html {
    font-family: "Roboto", "Noto Sans", sans-serif;
    line-height: 150%;
    color: var(--text);
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f5f5f5;
}

header > div,
footer > div,
main > div {
    margin: 0 auto;
    max-width: var(--layout-max-width);
}

main,
header,
footer {
    box-sizing: border-box;
    padding: 0 clamp(1rem, 4vw, 3rem);
}

main {
    padding-top: calc(var(--header-height) + 1.5rem);
    padding-bottom: 3rem;
    overflow-y: auto;
    background: #f5f5f5;
}

main p {
    text-align: justify;
}

main a,
main a:visited {
    color: var(--dark);
}

main a:hover,
main a:active {
    text-decoration: none;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    padding: 1.625rem 2.21875rem 1.625rem 2rem;
    background: #2362a2;
    color: #2E2D2C;
    z-index: 1000;
    display: flex;
    align-items: center;
}

header > div {
    width: 100%;
}

header h1 {
    display: flex;
    box-sizing: border-box;
    height: 100%;
    margin: 0;
    padding: 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

header h1 img {
    height: 64px;
    object-fit: contain;
}


header .header-bar {
    display: flex;
    align-items: center;
    height: 100%;
}

section.tiles-section {
    margin: 2.5rem 0;
}

section.tiles-section p {
    margin-bottom: 1.5rem;
    color: #555;
}

.tiles-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tiles-grid a {
    display: block;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 24px -18px rgba(22, 31, 38, 0.15);
}

.tiles-grid a:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

.tiles-grid h2 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
}
.tiles-grid h2 span.tile-icon {
    font-size: 2rem;
    /* vertical-align: middle; */
    display: inline-block;
    padding: .25em 0;
}

.tiles-grid p {
    margin: 0;
    line-height: 1.6;
    color: #414141;
}

footer {
    font-size: 0.9rem;
    color: white;
    background: #2E2D2C;
}

footer p,
footer h3,
footer a {
    color: inherit;
}

footer a {
    text-decoration: underline;
}

footer > div {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 3rem;
    box-sizing: border-box;
}

footer > div > section,
footer > div > div {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 3rem;
    justify-content: space-around;
}

footer > div .footer-block {
    flex: 1;
    min-width: 250px;
}

footer .footer-contacts .footer-logo {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1rem;
    margin: 0.5rem 0;
}

footer .footer-contacts .footer-logo svg,
footer .footer-contacts .footer-logo img {
    width: 120px;
    height: 100%;
    object-fit: contain;
}

footer .footer-social {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

footer .footer-project {
    display: block;
}

footer .footer-project > div {
    display: flex;
    gap: 1rem;
    align-items: center;
}

footer .footer-project .logos {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
    gap: 16px;
}

footer .footer-project .logos img {
    max-height: 50px;
    object-fit: contain;
}

footer .footer-project p {
    margin: 0;
}

footer .footer-project p + p {
    margin-top: 1ex;
}

footer .footer-bottom p {
    font-size: 0.8rem;
    border-top: 1px solid #ffffff;
    padding-top: 1rem;
}

@media (max-width: 768px) {
    :root {
        /* --header-height: 56px; */
    }
    
    .tiles-grid {
        grid-template-columns: 1fr;
    }

    footer > div {
        padding: 2rem 1.5rem;
    }

    footer .footer-project > div {
        flex-direction: column;
    }

    footer .footer-project .logos {
        flex-direction: column;
    }

    footer .footer-project .logos img {
        max-width: 120px;
    }
}
