﻿:root {
    --primary: #103a87;
    --secondary: #255dcf;
    --light: #f4f6f8;
    --white: #ffffff;
    --shadow: 0 2px 6px rgba(0,0,0,0.1);
    --radius: 8px;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--light);
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

    header h1 {
        margin: 0;
        font-size: 1.5rem;
        flex: 1; /* let it expand */
        text-align: center;
    }

    header .govt-info {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.9rem;
        text-align: left;
    }

        header .govt-info img {
            height: 50px;
            width: auto;
        }

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

        header h1 {
            font-size: 1.2rem;
            margin: 0.5rem 0;
        }

        header .govt-info {
            flex-direction: column;
            text-align: center;
        }

    main {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .left-panel {
        order: 2; /* This will now work */
    }

    .info-block {
        order: 3; /* This will now work */
    }

    .notices {
        order: 4;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1rem;
    }

    header .govt-info img {
        height: 36px;
    }

    main {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .left-panel {
        order: 2; /* This will now work */
    }

    .info-block {
        order: 3; /* This will now work */
    }

    .notices {
        order: 4;
    }
}


/* Layout */
main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr minmax(300px, 400px) 1fr;
    gap: 2rem;
    padding: 2rem;
    align-items: start;
}

.ndml-logo {
    text-align: left;
}

/* Info block */
.info-block {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.95rem;
    font-family: Arial;
    letter-spacing: 0.5px;
    line-height: 1.6;
    text-align: justify;
}

/* Login */
.login-box {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

    .login-box h2 {
        color: var(--primary);
        margin-bottom: 1rem;
    }

.login-box-input {
    width: 89%;
    padding: 0.2rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    font-size: 1rem;
}

.login-box-button {
    width: 92%;
    padding: 0.3rem;
    margin: 0.5rem 0;
    font-size: 1rem;
    border: none;
    background: linear-gradient(145deg, #4A90E2, #3C75C6);
    color: white;
    border-radius: 4px;
    font-weight: 500;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    transition: background 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

    .login-box-button:hover {
        background: linear-gradient(145deg, #3C75C6, #3361AD);
        transform: translateY(-2px);
    }

    .login-box-button:active {
        transform: translateY(1px);
        background: #2B5BAA;
    }

.login-box input {
    border: 1px solid #ccc;
}

.login-box button {
    color: white;
    border: none;
    cursor: pointer;
}

/*.login-box button:hover {
                background: var(--primary);
            }*/

/* Notices / News ticker */
.notices {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    overflow: hidden;
    height: 200px;
}

.ticker {
    height: 100%;
    overflow: hidden;
    position: relative;
    text-align: left;
}

    .ticker ul {
        position: absolute;
        margin: 0;
        padding: 0;
        list-style: none;
        animation: scrollTicker 20s linear infinite;
    }


    .ticker li {
        padding: 6px 0;
        font-size: 0.95rem;
        color: #444;
        line-height: 1.4;
        min-height: 1.2rem;
        height: auto;
        white-space: normal;
        word-wrap: break-word;
    }

@media (max-width: 768px) {
    .ticker li {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .ticker li {
        font-size: 0.8rem;
    }
}

@keyframes scrollTicker {
    0% {
        top: 0;
    }

    15% {
        top: 0;
    }
    /* hold first message for ~3s */
    30% {
        top: -2rem;
    }
    /* then scroll to 2nd */
    50% {
        top: -4rem;
    }

    70% {
        top: -6rem;
    }

    90% {
        top: -8rem;
    }

    100% {
        top: 0;
    }
    /* loop back */
}

/* Right Side Panel */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Quick links */
.quick-links {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    gap: 1.5rem;
    text-align: left;
}

    .quick-links h3 {
        margin: 0 0 1rem 0;
        color: var(--primary);
        font-size: 1.1rem;
    }

    .quick-links ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .quick-links li {
        margin: 0.6rem 0;
    }

    .quick-links a {
        display: block;
        padding: 0.5rem 0.8rem;
        border-radius: 6px;
        color: var(--secondary);
        text-decoration: none;
        font-size: 0.95rem;
        transition: all 0.2s ease;
    }

        .quick-links a:hover {
            background: var(--secondary);
            color: white;
            padding-left: 1.2rem;
        }

    .quick-links h3 i {
        margin-right: 6px;
        vertical-align: middle;
    }

    .quick-links a {
        display: flex;
        align-items: center;
        gap: 8px; /* spacing between icon and text */
        padding: 0.5rem 0.8rem;
        border-radius: 6px;
        color: var(--secondary);
        text-decoration: none;
        font-size: 0.95rem;
        transition: all 0.2s ease;
    }

        .quick-links a i {
            width: 18px;
            height: 18px;
            stroke-width: 2; /* bolder lines */
            color: var(--secondary);
        }


/* Accordion */
.accordion {
    margin-top: 3%;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-align: left;
}

    .accordion h3 {
        margin: 0;
        padding: 0.8rem 1rem;
        background: var(--light);
        cursor: pointer;
        font-size: 1rem;
        color: var(--primary);
        border-bottom: 1px solid #ddd;
    }

.accordion-content {
    display: none;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    text-align: left;
}

    .accordion-content ul {
        margin: 0;
        padding-left: 1rem;
    }

    .accordion-content li {
        margin: 0.4rem 0;
    }

    .accordion-content a {
        color: var(--secondary);
        text-decoration: none;
    }

        .accordion-content a:hover {
            text-decoration: underline;
        }

/* Footer */
footer {
    background: #e9ecef;
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
}

@media (max-width: 1000px) {
    main {
        grid-template-columns: 1fr;
    }

    .info-block, .login-box, .right-panel, .quick-links, .left-panel {
        max-width: 700px;
        margin: auto;
    }

    main {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .left-panel {
        order: 2; /* This will now work */
    }

    .info-block {
        order: 3; /* This will now work */
    }

    .notices {
        order: 4;
    }
}

.left, .right {
    display: inline-block;
    vertical-align: middle; /* aligns them nicely */
}

.left {
    margin-right: 2px; /* space between image and text */
}
/* Center the wrapper horizontally */
.password-wrapper {
    display: flex;
    justify-content: center; /* center horizontally */
    width: 100%;
}

/* Toggle button on right */
.toggle-password {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -18px; /* overlaps input edge */
    z-index: 1;
    margin-top: -2px;
}

    .toggle-password svg {
        stroke: gray; /* icon color */
        transition: stroke 0.2s ease;
    }

    .toggle-password:hover svg {
        stroke: black;
    }
