/* Homepage refresh styles for templates/view_homepage + students/view_registration */
:root {
    --hp-bg: #edf3f8;
    --hp-panel: #ffffff;
    --hp-text: #18324a;
    --hp-muted: #536b82;
    --hp-primary: #0f5ea8;
    --hp-accent: #14a085;
    --hp-border: #d9e3ef;
}

.homepage-body {
    background:
        radial-gradient(circle at 8% 8%, rgba(20, 160, 133, 0.1), transparent 26%),
        radial-gradient(circle at 96% 14%, rgba(15, 94, 168, 0.14), transparent 30%),
        var(--hp-bg);
    color: var(--hp-text);
}

.homepage-navbar {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--hp-border);
    box-shadow: 0 8px 26px rgba(20, 41, 66, 0.08);
    backdrop-filter: blur(6px);
}

.homepage-navbar .nav-link {
    color: #244563 !important;
    font-weight: 600;
}

.homepage-navbar .nav-link:hover,
.homepage-navbar .nav-link.active {
    color: var(--hp-primary) !important;
}

.homepage-navbar .btn {
    border-radius: 999px;
    padding: 0.48rem 1.1rem;
    font-weight: 600;
}

.homepage-section {
    padding-top: 112px;
    padding-bottom: 38px;
}

.homepage-shell {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(214, 225, 237, 0.85);
    border-radius: 18px;
    padding: 22px 22px 8px;
    box-shadow: 0 22px 44px rgba(23, 44, 73, 0.08);
}

.homepage-hero {
    margin-bottom: 20px;
    border-radius: 14px;
    padding: 18px 16px 8px;
    background: linear-gradient(130deg, #f7fbff 0%, #eef8f3 100%);
    border: 1px solid #e1ebf5;
}

.homepage-hero h3 {
    color: #16344f;
    font-weight: 700 !important;
    letter-spacing: 0.1px;
    margin-bottom: 8px;
}

.homepage-hero h5 {
    color: #2f5678;
    font-weight: 600 !important;
}

.homepage-main-grid>[class*="col-"] {
    margin-bottom: 10px;
}

.news-card,
.registration-card {
    border: 1px solid #dce7f3;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(29, 58, 93, 0.1) !important;
}

.news-card {
    border-top: 4px solid var(--hp-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-list-wrap {
    width: 100%;
}

.news-list-item {
    height: auto !important;
    margin-bottom: 14px;
}

.news-list-entry {
    padding: 4px 0 14px;
    margin-bottom: 14px;
    border-bottom: 1px dashed #d8e3f0;
}

.news-list-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(29, 58, 93, 0.16) !important;
}

.carousel-indicators li {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #9fb8d3;
}

.carousel-indicators .active {
    background-color: var(--hp-primary);
}

.registration-title {
    color: #1f4a71 !important;
    font-weight: 700;
    margin-bottom: 14px;
}

.registration-pane {
    display: block;
}

.registration-card {
    border-top: 4px solid var(--hp-accent);
    height: auto !important;
}

.registration-field {
    width: 100%;
}

.registration-alert-wrap {
    width: 100%;
}

.registration-links-wrap {
    gap: 8px 12px;
    flex-wrap: wrap;
}

.captcha-spot img {
    max-width: 100%;
    height: auto;
}

#loginForm .form-label {
    font-weight: 600;
    color: #264a6a;
}

#myform .form-label {
    font-weight: 600;
    color: #264a6a;
}

#loginForm .form-control {
    min-height: 46px;
    border-radius: 9px;
    border-color: #bdd0e2;
}

#myform .form-control {
    min-height: 46px;
    border-radius: 9px;
    border-color: #bdd0e2;
}

#loginForm .form-control:focus {
    border-color: #74a6d7;
    box-shadow: 0 0 0 0.2rem rgba(15, 94, 168, 0.12);
}

#myform .form-control:focus {
    border-color: #74a6d7;
    box-shadow: 0 0 0 0.2rem rgba(15, 94, 168, 0.12);
}

#loginbtn {
    width: 100%;
    min-height: 46px;
    margin-top: 10px;
    border-radius: 9px;
    background: linear-gradient(90deg, #0f5ea8, #1a74c5);
    border-color: #0f5ea8;
    font-weight: 600;
}

#loginbtn:hover {
    background: linear-gradient(90deg, #0c4f8d, #155f9e);
}

.registration-submit-btn {
    width: 100%;
    min-height: 46px;
    margin-top: 10px;
    border-radius: 9px;
    background: linear-gradient(90deg, #0f5ea8, #1a74c5);
    border-color: #0f5ea8;
    font-weight: 600;
}

.registration-submit-btn:hover {
    background: linear-gradient(90deg, #0c4f8d, #155f9e);
}

.refresh-captcha-trigger {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #eaf3fd;
    border: 1px solid #d2e3f5;
}

.homepage-footer {
    font-size: 12px;
    color: #49627a;
    border-top: 1px solid #dbe6f2;
    margin-top: 12px;
    padding: 16px 0 6px;
}

#InstructionModal.modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1055;
    display: none;
    overflow: hidden;
    outline: 0;
}

#InstructionModal.modal.show {
    display: block;
}

#InstructionModal .modal-dialog {
    position: relative;
    width: calc(100% - 2rem);
    max-width: 560px;
    margin: 1.5rem auto;
    pointer-events: none;
}

#InstructionModal .modal-content {
    position: relative;
    background: #fff;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(14, 33, 55, 0.28);
    pointer-events: auto;
    overflow: hidden;
}

#InstructionModal .modal-header,
#InstructionModal .modal-footer {
    padding: 1rem 1rem;
}

#InstructionModal .modal-body {
    padding: 1rem;
    max-height: 65vh;
    overflow-y: auto;
    overflow-x: hidden;
    word-break: break-word;
}

#InstructionModal .modal-footer {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

#InstructionModal .modal-footer .btn {
    min-width: 88px;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    background: rgba(10, 20, 30, 0.55);
}

.modal-open {
    overflow: hidden;
}

.captcha-inline-wrap {
    gap: 0.5rem;
}

.captcha-inline-wrap>span {
    display: inline-flex;
    align-items: center;
}

.captcha-inline-wrap img {
    display: block;
    max-width: 100%;
    height: auto;
}

@media (max-width: 991.98px) {
    .homepage-section {
        padding-top: 92px;
    }

    .homepage-shell {
        padding: 16px 14px 6px;
        border-radius: 14px;
    }

    .homepage-navbar .navbar-collapse {
        background: #ffffff;
        border: 1px solid #d9e4f1;
        border-radius: 10px;
        padding: 10px 12px;
        margin-top: 10px;
        box-shadow: 0 10px 24px rgba(23, 44, 73, 0.1);
    }
}

@media (max-width: 767.98px) {
    .homepage-hero img {
        width: 74px;
        margin-right: 0 !important;
        margin-bottom: 8px;
    }

    .homepage-hero h3 {
        font-size: 1.2rem !important;
        line-height: 1.3;
    }

    .homepage-hero h5 {
        font-size: 0.98rem !important;
    }

    .homepage-footer .pull-left {
        text-align: center;
    }

    .registration-links-wrap {
        flex-direction: column;
        align-items: flex-start !important;
    }
}