* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: #f2f4f7;
}

a {
    text-decoration: none;
    color: inherit;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: #2f4154;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
}

.brand-block {
    order: 1;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.auth-block {
    order: 2;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    flex: 0 0 auto;
}

.notify-block {
    order: 3;
    display: flex;
    align-items: center;
    margin-left: 14px;
    flex: 0 0 auto;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    white-space: nowrap;
}

.site-logo {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #dde3ea;
}

.site-name {
    white-space: nowrap;
}

.topbar .btn,
.topbar .icon {
    min-width: 100px;
    height: 36px;
    background: #6f859e;
    border-radius: 4px;
    text-align: center;
    color: #d5dce3;
    font-weight: bold;
    border: none;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.topbar .btn:hover,
.topbar .icon:hover {
    background: #526274;
    transform: scale(1.1);
}

.hero {
    background: linear-gradient(rgba(80, 96, 114, 0.425), rgba(98, 117, 139, 0.493)), url("img/2.jpg") no-repeat center center;
    background-size: cover;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-box {
    width: 360px;
    height: 50px;
    background: #dde3ea;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    border: none;
    color: #2f4154;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.center-box:hover {
    background: #c8ced4;
    transform: scale(1.1);
}

.section {
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.wide-box {
    width: 70%;
    min-height: 90px;
    background: #e2e7ec;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    padding: 16px;
}

.cards {
    display: flex;
    gap: 30px;
    user-select: none;
    flex-wrap: wrap;
    justify-content: center;
}

.card {
    width: 260px;
    height: 245px;
    background: #fff;
    border: 1px solid #d5dce3;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    text-align: center;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.1);
}

.imagebox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.image {
    max-width: 60%;
    height: auto;
}

.card .title {
    width: 90%;
    height: auto;
    background: #d8dee6;
    border-radius: 4px;
    padding: 10px;
}

.site-footer {
    margin-top: auto;
    width: 100%;
    padding: 16px 20px;
    background: #2f4154;
    color: #d5dce3;
    font-size: 13px;
    text-align: center;
    box-sizing: border-box;
}

.site-footer .author {
    color: #fff;
    font-weight: bold;
}

.about-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    flex: 1;
}

.about-box {
    background: #fff;
    border: 1px solid #d5dce3;
    border-radius: 8px;
    max-width: 900px;
    width: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-title {
    color: #2f4154;
    font-size: 28px;
    text-align: center;
}

.about-subtitle {
    color: #526274;
    font-size: 16px;
    text-align: center;
    line-height: 1.5;
}

.about-grid {
    display: flex;
    gap: 24px;
}

.about-card {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.about-card h3 {
    color: #2f4154;
    font-size: 18px;
}

.map-container {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.social-buttons {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    height: 40px;
    background: #6f859e;
    color: #fff;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: background 0.3s ease;
}

.social-btn:hover {
    background: #526274;
}

.back-link {
    display: inline-block;
    align-self: center;
    color: #6f859e;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: 10px;
}

.back-link:hover {
    color: #2f4154;
}

@media screen and (max-width: 768px) {
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }

    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .topbar {
        height: auto;
        flex-direction: column;
        padding: 15px;
        gap: 12px;
    }

    .brand-block, .auth-block, .notify-block {
        order: unset;
        margin: 0 !important;
        width: 100%;
        justify-content: center;
    }

    .auth-block {
        flex-wrap: wrap;
        gap: 10px;
    }

    .site-brand {
        flex-direction: column;
        text-align: center;
    }

    .topbar .btn, .topbar .icon {
        flex: 1;
        min-width: 80px;
        font-size: 14px;
    }

    .topbar .btn:hover, .topbar .icon:hover {
        transform: scale(1.02);
    }

    .hero {
        height: 160px;
        padding: 0 15px;
    }

    .center-box {
        width: 100%;
        max-width: 320px;
        font-size: 14px;
    }
    
    .center-box:hover {
        transform: scale(1.02);
    }

    .section {
        padding: 20px 15px;
        gap: 20px;
    }

    .wide-box {
        width: 100%;
        font-size: 16px;
    }

    .cards {
        width: 100%;
        gap: 20px;
    }

    .card {
        width: 100%;
        max-width: 340px;
        height: auto;
        padding: 20px 15px;
    }

    .card:hover {
        transform: none;
    }

    .card .title {
        width: 100%;
        font-size: 14px;
    }
    
    .image {
        max-width: 45%;
    }

    .about-wrapper {
        padding: 20px 10px;
    }

    .about-box {
        padding: 20px 15px;
        gap: 16px;
    }

    .about-title {
        font-size: 22px;
    }

    .about-subtitle {
        font-size: 14px;
    }

    .about-grid {
        flex-direction: column;
        gap: 16px;
    }

    .about-card {
        width: 100%;
    }
}
