/* home.css - styles for the public Home/Index landing page.
   Kept separate from auth.css/registration.css because the landing page is its
   own distinct layout (two-column grid over a background image).
   The background image URL is dynamic (Url.Content), so the view sets it via
   the --home-bg custom property inline; everything else lives here. */

/* ===== Page shell ===== */
html, body {
    height: 100%;
}

body {
    background-color: #eef2f7;
    background-image: linear-gradient(180deg, rgba(20, 40, 90, 0.35), rgba(20, 40, 90, 0.55)), var(--home-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.main-content {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

#toggleWidthBtn {
    display: none !important;
}

/* ===== Layout ===== */
.home-main {
    max-width: 980px;
    margin: 0 auto;
    padding: 56px 20px 72px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;
}

.home-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 30, 70, 0.25);
    padding: 40px 42px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

.home-card__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #16244a;
    margin: 0 0 6px;
    text-align: center;
}

.home-card__subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 0.92rem;
    margin: 0 0 28px;
}

/* ===== Login form ===== */
#loginForm {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    float: none;
    border-right: none;
}

#loginForm ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

#loginForm .form-row {
    margin-bottom: 16px;
}

#loginForm label.field-label {
    display: block;
    font-weight: 600;
    color: #374151;
    font-size: 0.85rem;
    margin-bottom: 6px;
    text-align: left;
}

#loginForm input[type="text"],
#loginForm input[type="password"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1px solid #d1d7e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#loginForm input[type="text"]:focus,
#loginForm input[type="password"]:focus {
    outline: none;
    border-color: #2f6fed;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}

#loginForm li.field-error {
    list-style: none;
    color: #dc3545;
    font-size: 0.82rem;
    margin: -8px 0 8px;
}

#loginForm li.field-error:has(span:empty) {
    display: none;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 24px;
}

.login-options .show-pass {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #4b5563;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

.login-options .show-pass input {
    cursor: pointer;
}

#loginLink {
    color: #2f6fed;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

#loginLink:hover {
    text-decoration: underline;
}

.btn-home {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.98rem;
    background: #2f6fed;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.05s ease;
}

.btn-home:hover {
    background: #2159c7;
    color: #fff;
}

/* site.css sets a global anchor colour; keep the register button text white in every state. */
a.btn-home,
a.btn-home:link,
a.btn-home:visited,
a.btn-home:active,
a.btn-home:hover {
    color: #fff;
}

.btn-home:active {
    transform: translateY(1px);
}

#loginForm input[type="submit"].btn-home {
    width: 100%;
    margin-top: auto;
}

/* ===== Register card ===== */
.home-card--register {
    justify-content: center;
    text-align: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
}

.home-card--register .register-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(47, 111, 237, 0.1);
    color: #2f6fed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 20px;
}

.home-card--register p {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 0 26px;
}

.home-card--register .btn-home {
    width: auto;
    min-width: 180px;
}

@media (max-width: 820px) {
    .home-main {
        grid-template-columns: 1fr;
        padding: 32px 16px 48px;
    }
}
