/* ========== GLOBAL RESET ========== */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: #f9f9f9;
}

/* Apply box-sizing to everything */
*, *::before, *::after {
    box-sizing: inherit;
}

/* ========== LAYOUT STRUCTURE ========== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Full viewport height */
}

/* Main content fills space between header & footer */
main {
    flex: 1 0 auto;
    padding: 15px;
    width: 100%;
    overflow-x: hidden;
}

/* Footer stays at bottom */
footer {
    flex-shrink: 0;
    width: 100%;
    text-align: center;
    background-color: #f8f9fa;
    color: #555;
    padding: 10px 0;
    border-top: 1px solid #ccc;
}

/* ========== CONTAINERS ========== */
.container, .container-fluid {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin: 0 auto;
}

/* ========== RESPONSIVE IMAGES & TABLES ========== */
img, table {
    max-width: 100%;
    height: auto;
}

.table {
    width: 100%;
    table-layout: auto;
    word-wrap: break-word;
    border-collapse: collapse;
}
/* Table Header with AOU dark color */
/* Table Header with AOU dark color */
table thead {
    background-color: #002060; /* AOU Kuwait dark blue */
    color: #ffffff; /* white text for contrast */
    font-weight: bold;
    text-align: center; /* Center all header text */
}

table th, table td {
    padding: 10px 8px;
    border: 1px solid #dee2e6;
    text-align: center; /* Horizontal center */
    vertical-align: middle; /* Vertical center */
    white-space: nowrap; /* Prevent wrapping */
}

table tbody tr:hover {
    background-color: #f1f1f1; /* subtle hover for body rows */
}

.auto-height-table {
    display: block;
    max-height: calc(6 * 2.5rem); /* Approx height of 6 rows, adjust 2.5rem per row */
    overflow-y: auto;
    width: 100%;
}

    /* Table Header with AOU dark color */
    .auto-height-table thead {
        background-color: #002060; /* AOU Kuwait dark blue */
        color: #ffffff; /* white text */
        font-weight: bold;
        text-align: center; /* center header text */
        display: table; /* keep table layout */
        width: 100%;
        table-layout: fixed;
    }

    /* Table cells */
    .auto-height-table th,
    .auto-height-table td {
        padding: 10px 8px;
        border: 1px solid #dee2e6;
        text-align: center;
        vertical-align: middle;
        white-space: nowrap; /* prevent wrapping */
    }

    /* Hover effect for rows */
    .auto-height-table tbody tr:hover {
        background-color: #f1f1f1;
    }

    /* Scrollable body with auto-height for up to 6 rows */
    .auto-height-table tbody {
        display: block;
        max-height: calc(6 * 2.5rem); /* 6 rows, adjust 2.5rem per row */
        overflow-y: auto;
        width: 100%;
    }

        .auto-height-table tbody tr {
            display: table;
            width: 100%;
            table-layout: fixed;
        }

        .auto-height-table thead,
        .auto-height-table tbody tr {
            display: table;
            width: 100%;
            table-layout: fixed;
        }
.navbar-title {
    text-align: center; /* Center the text */
    font-weight: bold; /* Optional: make it bold */
    font-size: 1.2rem; /* Adjust size for readability */
    white-space: normal; /* Allow wrapping */
    word-wrap: break-word; /* Break long words if needed */
    overflow-wrap: break-word; /* Modern equivalent */
}

/* Optional: responsive font size for smaller screens */
@media (max-width: 768px) {
    .navbar-title {
        font-size: 1rem; /* Reduce font size on mobile */
        padding: 0 10px; /* Optional: add horizontal padding */
    }
}



/* ========== HEADER / NAVBAR ========== */
header {
    width: 100%;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 100;
}

.navbar img {
    height: 50px;
    width: auto;
    max-width: 100%;
}

/* ========== TEXT & LINKS ========== */
h1, h2, h3, h4 {
    color: #333;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
/* Navbar main title */
.navbar-title {
    display: block;
    width: 100%;
    text-align: center; /* center text horizontally */
    font-weight: bold; /* bold text */
    color: #003366; /* AOU Kuwait dark blue */
    font-size: 1.5rem; /* adjust as needed */
}


a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

    a:hover {
        color: #004d99;
        text-decoration: underline;
    }
/* Submit button with AOU dark color */
button[type="submit"],
input[type="submit"] {
    background-color: #002060; /* AOU Kuwait dark blue */
    color: #ffffff;
    border: none;
    padding: 8px 20px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    button[type="submit"]:hover,
    input[type="submit"]:hover {
        background-color: #001740; /* slightly darker on hover */
    }

/* ========== FOOTER TEXT ========== */
footer .container {
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word; /* allows long words or URLs to wrap */
    overflow-wrap: break-word; /* modern equivalent */
}

/* ========== RESPONSIVENESS ========== */
@media (max-width: 992px) {
    .navbar img {
        height: 45px;
    }

    footer {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 0.95rem;
    }

    header img {
        height: 40px;
    }

    main {
        padding: 10px;
    }

    footer {
        font-size: 0.85rem;
        padding: 8px 5px;
    }

        footer .container {
            word-wrap: break-word; /* allows long words or URLs to wrap */
            overflow-wrap: break-word; /* modern equivalent */
        }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.1rem;
    }

    footer .container {
        font-size: 0.8rem;
        line-height: 1.3;
        padding: 6px;
    }

    footer {
        padding: 6px 0;
    }
}
