/*
 * portal.css
 * Styles for the public landing page only (Portal controller, views/portal/view_portal.php).
 * Every rule is scoped under body.nu-portal and uses the np- class prefix,
 * so this file cannot affect any other page.
 *
 * Brand colors: indigo #2A2C86, green #009845
 */

.nu-portal,
.nu-portal *,
.nu-portal *::before,
.nu-portal *::after {
    box-sizing: border-box;
}

body.nu-portal {
    margin: 0;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.nu-portal h1,
.nu-portal h2,
.nu-portal h3,
.nu-portal p {
    margin: 0;
}

.nu-portal a {
    text-decoration: none;
    color: inherit;
}

.nu-portal .np-in {
    max-width: 1180px;
    margin: 0 auto;
}

/* ---------- Top bar (support email) ---------- */
.nu-portal .np-util {
    background: #eceefa;
    color: #2A2C86;
    font-size: 13px;
    border-bottom: 1px solid #d9dbf3;
}
.nu-portal .np-util .np-in {
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.nu-portal .np-util svg {
    color: #009845;
    flex: 0 0 auto;
}
.nu-portal .np-util a {
    color: #009845;
    font-weight: 700;
}
.nu-portal .np-util a:hover {
    color: #2A2C86;
}

/* ---------- Logo bar ---------- */
.nu-portal .np-top {
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}
.nu-portal .np-top .np-in {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nu-portal .np-top img {
    height: 52px;
    max-width: 100%;
    display: block;
}
.nu-portal .np-nav a {
    font-size: 14px;
    font-weight: 600;
    color: #2A2C86;
    margin-left: 22px;
}
.nu-portal .np-nav a:hover {
    color: #009845;
}
.nu-portal .np-nav a.np-nu {
    color: #fff;
    background: #009845;
    padding: 8px 14px;
    border-radius: 8px;
}
.nu-portal .np-nav a.np-nu:hover {
    background: #007a37;
    color: #fff;
}

/* ---------- Header band ---------- */
.nu-portal .np-intro {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(125deg, #1f2166 0%, #2A2C86 55%, #33369c 100%);
}
/* certificate-style wavy security pattern */
.nu-portal .np-intro::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    opacity: .09;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1'%3E%3Cpath d='M0 20 C30 0 30 40 60 20 S90 0 120 20'/%3E%3Cpath d='M0 20 C30 40 30 0 60 20 S90 40 120 20'/%3E%3Cpath d='M0 10 C30 -10 30 30 60 10 S90 -10 120 10'/%3E%3Cpath d='M0 30 C30 50 30 10 60 30 S90 50 120 30'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 40px;
}
.nu-portal .np-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}
.nu-portal .np-cert {
    position: absolute;
    color: #fff;
    pointer-events: none;
}
.nu-portal .np-c1 { width: 230px; height: 163px; left: 40px;  top: 18px;    transform: rotate(-9deg);  opacity: .16; }
.nu-portal .np-c2 { width: 240px; height: 170px; right: 36px; top: 10px;    transform: rotate(7deg);   opacity: .18; }
.nu-portal .np-c3 { width: 110px; height: 48px;  right: 290px; bottom: 6px; transform: rotate(-14deg); opacity: .16; }
/* dark glow behind the title so text stays readable over the artwork */
.nu-portal .np-glow {
    position: absolute;
    width: 520px;
    height: 160px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, rgba(31, 33, 102, .95) 0%, rgba(31, 33, 102, 0) 70%);
}
.nu-portal .np-intro .np-in {
    position: relative;
    z-index: 1;
    padding: 38px 20px 40px;
    text-align: center;
}
.nu-portal .np-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
    background: rgba(0, 152, 69, .25);
    border: 1px solid rgba(0, 152, 69, .7);
    border-radius: 20px;
    padding: 6px 14px;
}
.nu-portal .np-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2ee07f;
    box-shadow: 0 0 8px #2ee07f;
}
.nu-portal .np-intro h1 {
    font-size: 40px;
    line-height: 1.2;
    margin-top: 16px;
    color: #fff;
    letter-spacing: -.3px;
}
.nu-portal .np-ul {
    width: 70px;
    height: 4px;
    border-radius: 2px;
    background: #009845;
    margin: 16px auto 0;
}
.nu-portal .np-intro p {
    margin: 16px auto 0;
    max-width: 620px;
    color: #d4d6f3;
    font-size: 16px;
    line-height: 1.55;
}

/* ---------- Student / College portals ---------- */
.nu-portal .np-portals {
    max-width: 1180px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.nu-portal .np-pt {
    border-radius: 18px;
    padding: 30px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.nu-portal .np-pt.np-s { background: linear-gradient(140deg, #007a37, #009845); }
.nu-portal .np-pt.np-c { background: linear-gradient(140deg, #007a37, #009845); }
.nu-portal .np-pt::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}
.nu-portal .np-hd {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}
.nu-portal .np-pt .np-ic {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.nu-portal .np-pt h2 {
    font-size: 24px;
    color: #fff;
}
.nu-portal .np-sub {
    opacity: .9;
    font-size: 14px;
    margin: 6px 0 20px;
}
.nu-portal .np-lk {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    color: #0f172a;
    border: 1.5px solid transparent;
    border-radius: 12px;
    padding: 15px 18px;
    margin-top: 12px;
    font-weight: 600;
    font-size: 15.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    transition: border-color .15s, transform .15s;
}
.nu-portal .np-lk:hover { transform: translateY(-1px); }
.nu-portal .np-s .np-lk:hover { border-color: #009845; }
.nu-portal .np-c .np-lk:hover { border-color: #2A2C86; }
.nu-portal .np-lk small {
    display: block;
    font-weight: 400;
    color: #64748b;
    font-size: 12.5px;
    margin-top: 2px;
}
.nu-portal .np-ar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex: 0 0 auto;
}
.nu-portal .np-s .np-ar { background: #e6f6ed; color: #009845; }
.nu-portal .np-c .np-ar { background: #e6f6ed; color: #009845; }

/* ---------- Manuals & forms ---------- */
.nu-portal .np-man {
    max-width: 1180px;
    margin: 10px auto 40px;
    padding: 0 20px;
}
.nu-portal .np-man h3 {
    font-size: 20px;
    margin-bottom: 4px;
    color: #2A2C86;
}
.nu-portal .np-note {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 16px;
}
.nu-portal .np-tbl {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}
.nu-portal .np-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
.nu-portal .np-table th {
    background: #2A2C86;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    text-align: left;
    padding: 12px 18px;
}
.nu-portal .np-table td {
    padding: 13px 18px;
    border-top: 1px solid #e2e8f0;
    vertical-align: middle;
}
.nu-portal .np-table tbody tr:nth-child(even) td { background: #f7f8fc; }
.nu-portal .np-table tbody tr:hover td { background: #eef7f2; }
.nu-portal .np-col-sl {
    width: 80px;
    color: #64748b;
}
.nu-portal .np-col-date {
    width: 130px;
    color: #475569;
    white-space: nowrap;
}
.nu-portal .np-col-title {
    font-weight: 600;
}
.nu-portal .np-table th.np-col-act,
.nu-portal .np-table td.np-col-act {
    width: 140px;
    text-align: right;
}
.nu-portal .np-new {
    display: inline-block;
    margin-left: 8px;
    background: #009845;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
}
.nu-portal .np-dbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1.5px solid #009845;
    color: #009845;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 8px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.nu-portal .np-dbtn:hover {
    background: #009845;
    color: #fff;
}

/* ---------- Support email block ---------- */
.nu-portal .np-sup {
    max-width: 1180px;
    margin: 0 auto 40px;
    padding: 0 20px;
}
.nu-portal .np-bx {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f2f3fb;
    border: 1px solid #d9dbf3;
    border-left: 5px solid #009845;
    border-radius: 12px;
    padding: 16px 20px;
}
.nu-portal .np-bx .np-ic {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 50%;
    background: #2A2C86;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nu-portal .np-tx {
    font-size: 15.5px;
    color: #1f2166;
}
.nu-portal .np-tx a {
    color: #009845;
    font-weight: 700;
    border-bottom: 1.5px solid rgba(0, 152, 69, .35);
    white-space: nowrap;
}
.nu-portal .np-tx a:hover { border-bottom-color: #009845; }

/* ---------- Footer ---------- */
.nu-portal .np-footer {
    background: #1f2166;
    color: #c3c5ea;
    font-size: 13px;
    border-top: 4px solid #009845;
}
.nu-portal .np-footer .np-in {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* ---------- Keyboard focus ---------- */
.nu-portal a:focus-visible {
    outline: 3px solid #009845;
    outline-offset: 2px;
}

/* ---------- Tablet & mobile ---------- */
@media (max-width: 800px) {
    .nu-portal .np-c1,
    .nu-portal .np-c3 { display: none; }
    .nu-portal .np-c2 { width: 170px; height: 120px; right: -40px; top: 8px; opacity: .13; }
    .nu-portal .np-glow { width: 100%; }

    .nu-portal .np-nav { display: none; }
    .nu-portal .np-top img { height: 40px; }
    .nu-portal .np-intro h1 { font-size: 26px; }
    .nu-portal .np-intro .np-in { padding: 28px 18px 30px; }

    .nu-portal .np-portals { grid-template-columns: 1fr; }
    .nu-portal .np-pt { padding: 22px; }

    /* tables become stacked cards: Sl No + Date on top, then Title, then Download */
    .nu-portal .np-table thead { display: none; }
    .nu-portal .np-table,
    .nu-portal .np-table tbody { display: block; }
    .nu-portal .np-table tr {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 10px;
        row-gap: 6px;
        padding: 14px 16px;
        border-top: 1px solid #e2e8f0;
    }
    .nu-portal .np-table tbody tr:first-child { border-top: 0; }
    .nu-portal .np-table tbody tr:nth-child(even) { background: #f7f8fc; }
    .nu-portal .np-table td,
    .nu-portal .np-table tbody tr:nth-child(even) td,
    .nu-portal .np-table tbody tr:hover td {
        display: block;
        width: auto;
        padding: 0;
        border: 0;
        background: transparent;
        text-align: left;
    }
    .nu-portal .np-table td.np-col-sl {
        font-size: 12px;
        font-weight: 700;
        color: #2A2C86;
        background: #eceefa;
        border-radius: 4px;
        padding: 2px 8px;
    }
    .nu-portal .np-table td.np-col-date {
        font-size: 13px;
        align-self: center;
    }
    .nu-portal .np-table td.np-col-title,
    .nu-portal .np-table td.np-col-act {
        grid-column: 1 / -1;
        width: auto;
        text-align: left;
    }

    .nu-portal .np-footer .np-in {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .nu-portal .np-util .np-in {
        justify-content: center;
        font-size: 12px;
        padding: 7px 12px;
    }
    .nu-portal .np-bx { padding: 14px; }
    .nu-portal .np-tx { font-size: 14.5px; }
    .nu-portal .np-tx a {
        display: inline-block;
        margin-top: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nu-portal * { transition: none !important; }
}
