body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: #ffffff;
    background-image: url('watermark.png');
    background-size: 350px;
    background-repeat: repeat;
    background-position: center;
}

/* TOP BANNER */
.top-banner {
    max-width: none;
    width: 100%;
    min-height: 120px;              /* ensure banner stays visible */
    height: auto;
    margin: 0;
    /* use the provided image as the banner background, then fall back to header image and tricolor */
    background-image: url("WhatsApp\ Image\ 2025-12-25\ at\ 13.28.12_d05270c3.jpg"), url('header-tricolor.png'), linear-gradient(to right, #FF9933 0 33%, #ffffff 33% 66%, #138808 66% 100%);
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: center center, center center, center center;
    background-size: cover, cover, cover;
    position: relative; /* enable absolute centering of inner elements */
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}


.logo-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 auto; /* allow natural sizing but enable shrinking */
    min-width: 0; /* allow children to shrink and wrap properly */
    position: absolute; /* center this block horizontally/vertically */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.logo-left img {
    height: 65px; /* restore consistent logo height on desktop */
    max-width: 140px;
    width: auto;
}

/* left-side banner logo (desktop left, stacks on mobile) */
.banner-logo {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: 90px; /* increased for more width/visibility */
    max-width: 260px; /* allow wider logo */
    width: auto;
    z-index: 3;
}

.logo-left > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0; /* enable text wrapping inside flex item */
    flex: 1 1 auto; /* take remaining space but allow shrink */
    width: auto;
}

.emblem {
    height: 75px; /* restore emblem height on desktop */
    max-width: 160px;
    width: auto;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.site-title {
    font-size: 22px;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: break-word; /* avoid breaking words into letters */
    word-break: normal;
    line-height: 1.15;
}

.site-sub {
    font-size: 14px;
    margin-top: -4px;
    white-space: normal;
    overflow-wrap: break-word;
}

/* NAVBAR */
nav {
    background: #0b3c7f;
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

/* CARD */
.card-container {
    width: 70%;
    margin: 40px auto;
    background: white;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0px 0px 12px rgba(0,0,0,0.25);
}

.cert-title {
    text-align: center;
    font-size: 22px;
    margin-bottom: 15px;
}

/* PDF DOWNLOAD BUTTON */
.pdf-btn {
    display: block;
    background: #0874d8;
    color: #fff;
    padding: 14px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    margin: 15px 0;
    text-align: center;
}

/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
}

table tr td {
    border: 1px solid #cccccc;
    padding: 10px 14px;
    font-size: 15px;
}

table tr td:first-child {
    font-weight: 600;
    background: #f4f4f4;
    width: 40%;
}



@media(max-width: 600px) {
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    table tr td {
        font-size: 13px;
        padding: 8px;
    }

    .pdf-btn {
    font-size: 17px;
    padding: 16px 20px;
}

}


/* FOOTER */
footer {
    margin-top: 60px;
    background: linear-gradient(to right, #063a7a, #116687);
    padding: 40px 0;
    text-align: center;
    color: white;
}

.footer-logos {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.footer-logos img {
    height: 45px;
}

.footer-links {
    font-size: 14px;
    margin-bottom: 12px;
}

.footer-links a {
    color: #e2e2e2;
    margin: 0 6px;
    text-decoration: none;
}

.footer-copy {
    font-size: 13px;
}

/* RESPONSIVE */
@media(max-width: 900px) {
    .card-container {
        width: 90%;
    }
}



     @media(max-width: 600px) {

    .top-banner {
        flex-direction: column;
        gap: 6px;
        padding: 12px 10px;
        text-align: center;
    }

    .logo-left {
        position: static; /* restore normal flow on small screens */
        transform: none;
        flex-direction: column;
        gap: 4px;
    }

    .banner-logo {
        position: static !important;
        transform: none !important;
        height: 60px !important; /* slightly larger on mobile */
        margin-bottom: 6px;
    }

    .logo-left img {
        height: 48px;
    }

    .emblem {
        height: 52px;
        margin-top: 6px;
        position: static; /* place emblem below/alongside on small screens */
        transform: none;
    }

    .site-title {
        font-size: 17px;
        line-height: 1.2;
    }

    .site-sub {
        font-size: 12px;
        line-height: 1.2;
    }
}


/* PAGE LOADER */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top: 5px solid #0b3c7f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


@media screen and (max-width: 600px) {

    .top-banner {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 14px 10px !important;
        min-height: 110px !important;
    }

    .logo-left {
        flex-direction: column !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .logo-left img {
        height: 42px !important;
    }

    .emblem {
        height: 48px !important;
        margin-top: 6px;
    }

    .site-title {
        font-size: 16px !important;
        line-height: 1.2;
    }

    .site-sub {
        font-size: 12px !important;
        line-height: 1.2;
    }
}

