/* ================= GLOBAL RESET ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter","Segoe UI",Roboto,Arial,sans-serif;
    background: linear-gradient(to right,#1e3c72,#2a5298);
    color:#1f2a3a;
    line-height:1.65;
    letter-spacing:.2px;
    overflow-x:hidden;
    overflow-y:auto;
}

img{
    max-width:100%;
    height:auto;
    display:block;
}

html{
    scroll-behavior:smooth;
}


a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus{
    outline:2px solid #2a5298;
    outline-offset:2px;
}



/* ================= TOP BAR ================= */

.topbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #1e3c72;
    z-index: 1000;
    padding: 0;
}

.topbar-line {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 4px 8px;
    min-height: 32px;
}

.topbar-line:first-child {
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.topbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 3px 6px;
    line-height: 1.2;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.topbar-line:nth-child(2) a{
    font-size:13px;
    font-weight:500;
}

.topbar a:hover {
    background: rgba(255,255,255,0.15);
}

/* ================= WRAPPER ================= */

.wrapper {
    margin-top: 75px;
    margin-bottom: 95px;
}

/* ================= HEADER ================= */

.header{
    text-align: center;
    color: white;
    width:85%;
    max-width:1000px;
    margin:12px auto;
    margin-bottom:10px;
    background:transparent;
    padding:22px 18px;
    border-radius:0;
    box-shadow:none;
}


.header h1 {
    font-size:30px;
    font-weight:700;
    color:#ffffff;
    margin-bottom:2px;
    letter-spacing:0.5px;
}

.header p {
    font-size:14px;
    margin-bottom:0;
    color:#ffffff;
    text-align:center;
}

/* ================ SECTION ================= */

.section {
    width: 85%;
    max-width: 1000px;
    margin: 20px auto;
    background: #ffffff;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* ================= HEADINGS ================= */

h1, h2, h3 {
    text-align: center;
    color: #1e3c72;
    margin-bottom: 8px;
    font-weight: 700;
}

h2 {
    font-size: 22px;
}

h3 {
    font-size: 18px;
}

/* ================= TEXT ================= */

p {
    line-height: 1.7;
    margin-bottom: 14px;
    text-align: left;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

ul {
    padding-left: 22px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 4px;
    line-height: 1.45;
}

/* ================= GRID ================= */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}


/* ================= CARD ================= */

.card {
    display: flex;
    flex-direction: column;   /* ADD THIS */
    align-items: center;
    justify-content: center;
    text-align: center;

    background: #e6eef8;
    padding: 8px 12px;
    border-radius: 8px;

    color: #1e2a3a;
    font-weight: 600;
    text-decoration: none;

    border: 1px solid rgba(30,60,114,0.15);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);

    transition: all 0.25s ease;

    min-height: auto;   /* IMPORTANT */
}

.card *,
.card p,
.card span,
.card div,
.card h3 {
    text-decoration: none !important;
    text-align: center;
    color: inherit;
    margin: 0;
}

.card:hover {
    background: #2a5298;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 60, 114, 0.25);
}

/* ================= INPUTS ================= */

input, select, textarea {
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}

/* FULL WIDTH INPUTS */
.section input,
.section select,
.section textarea {
    width: 100%;
}

/* ================= SEARCH BOX ================= */

.search-box {
    text-align: center;
    margin:20px auto;
}

.search-box input {
    width: 70%;
    max-width: 420px;
    display: inline-block;
    text-align: left;
}

.search-box input:focus{
    border-color:#2a5298;
    box-shadow:0 0 0 3px rgba(42,82,152,.15);
}

/* REMOVE NUMBER SPINNERS */

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* ================= BUTTON ================= */

button {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    min-width: 120px;
    background: #2a5298;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s ease;
}

button:hover {
    opacity: 0.9;
}

/* ================= RESULT BOX ================= */

.result-box {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

/* RESULT CARD */

.result-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(30, 60, 114, 0.15);
    text-align: center;
    margin: 20px auto 0;   /* Centers the card */
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}


.result-title{
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}


.result-table {
    width: auto;
    min-width: 320px;
    margin: 0 auto;
    border-collapse: collapse;
    font-size: 14px;
}

.result-table th,
.result-table td{
    border: 1px solid #ccc;
    padding: 8px 12px;
    text-align: center;
}


.sr-only{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
}



/* TITLE */

.result-card h3 {
    margin-bottom: 12px;
    font-size: 18px;
    color: #1e3c72;
    text-align: center;
}

/* ================= TABLE ================= */



.result-table th {
    background: #1e3c72;
    color: #fff;
    padding: 10px;
    text-align: center;
    font-weight: 600;
}

.result-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.result-table tr:nth-child(even) {
    background: #f6f9ff;
}

.result-table tr:hover {
    background: #eef4ff;
}

.result-table th,
.result-table td {
    min-width: 120px;
}

/* ================= FOOTER ================= */

.footer{
    position:fixed;
    bottom:0;
    width:100%;
    background:#1e3c72;
    color:#ffffff;
    text-align:center;
    padding:8px 10px;
    font-size:14px;
    line-height:1.4;
}

.footer-links{
    margin-top:4px;
}

.footer-links a{
    color:#ffffff;
    text-decoration:none;
    margin:0 8px;
    font-size:13px;
    font-weight:500;
    letter-spacing:0.2px;
}

.footer-links a:hover{
    opacity:0.85;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {

.topbar a{
    font-size:13px;
    padding:2px 4px;
}

.topbar-line{
    gap:5px;
}

.topbar-line:nth-child(2) a{
    font-size:12px;
}
    

.wrapper{
    margin-top:75px;
    margin-bottom:90px;
}

    
    .section {
        width: 85%;
        padding: 18px;
    }

    .header h1 {
        font-size: 28px;
    }

    .header p {
        font-size: 14px;
    }

    .search-box input {
        width: 85%;
    }

.footer{
    font-size:12px;
}

.footer-links a{
    font-size:12px;
    margin:0 5px;
}
    
}


/* ================= LABEL ================= */

label {
    display: block;
    font-weight: 600;
    color: #1e3c72;
    margin-top: 12px;
    margin-bottom: 4px;
    font-size: 14px;
}

.tool-layout{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

@media(max-width:768px){
    .tool-layout{
        grid-template-columns:1fr;
    }
}


