/* Главная страница: две плитки — красный и синий угол ковра. Префиксы классов — mp- */

/* ---------- переменные ---------- */
.mp {
    --mp-red: #b3202a;
    --mp-red-deep: #8d171f;
    --mp-blue: #1d4f9c;
    --mp-blue-deep: #143a76;
    --mp-ink: #101826;
    --mp-white: #ffffff;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    color: var(--mp-white);
    background: var(--mp-ink);
}

.mp [hidden] {
    display: none;
}

/* ---------- плитки ---------- */
.mp-tile:focus-visible {
    outline: 3px solid var(--mp-white);
    outline-offset: -6px;
}

.mp__tiles {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.mp-tile {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.9rem;
    min-height: 90vh;
    padding: clamp(1.5rem, 5vw, 4rem);
    color: var(--mp-white);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.mp-tile--red {
    background: var(--mp-red);
}

.mp-tile--red:hover {
    background: var(--mp-red-deep);
}

.mp-tile--blue {
    background: var(--mp-blue);
}

.mp-tile--blue:hover {
    background: var(--mp-blue-deep);
}

.mp-tile__icon {
    flex: none;
    margin-bottom: auto;
    opacity: 0.9;
}

.mp-tile__title {
    max-width: 14ch;
    font-size: clamp(2rem, 4.2vw, 3.6rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

/* ---------- узкие экраны ---------- */
@media (max-width: 760px) {
    .mp__tiles {
        grid-template-columns: 1fr;
    }

    .mp-tile {
        min-height: 46vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mp-tile {
        transition: none;
    }
}

/* ---------- сообщения: оверлей поверх контента, под общий стиль ---------- */
.messages {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #101826;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.messages .alert {
    position: relative;
    background: transparent;
    border: none;
    color: #ffffff;
    margin: 0;
    border-radius: 0;
    padding: 0.85rem 1rem;
    border-left: 4px solid;
    opacity: 0.95;
}

.messages .alert-success   { border-left-color: #1d4f9c; }
.messages .alert-info      { border-left-color: #1d4f9c; }
.messages .alert-error,
.messages .alert-danger    { border-left-color: #b3202a; }
.messages .alert-warning   { border-left-color: #e0a800; }

.messages .alert-dismissible .btn-close {
    color: #ffffff;
    opacity: 0.6;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.messages .alert-dismissible .btn-close:hover {
    opacity: 1;
}
