/* ==========================================================================
   1. VARIABLES & ROOT
   ========================================================================== */
:root {
    --u3a-yellow: #FFD700;
    --u3a-blue: #0056b3;
    --u3a-dark-blue: #003399;
    --u3a-dark: #333;
    --footer-blue: #5064eb;
    --bg-light: #f4f4f4;
    --card-bg: #ffffff;
}

/* ==========================================================================
   2. GLOBAL RESET & BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--u3a-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    text-decoration: underline;
}

.wrapper, .page, main {
    width: 96%;
    max-width: 1400px;
    margin: 0 auto;
}

.page {
    background: #fff;
    border: 2px solid #333;
    max-width: 100%;
    padding: 20px;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1 {
    font-family: Geneva, Helvetica, sans-serif;
    font-size: 1.7rem;
    padding: 10px;
    color: #4c0000;
    margin: 15px auto;
    text-align: center;
    border: 1px solid #666659;
    background: linear-gradient(0deg, rgb(67 249 146) 0%, rgb(45 87 253) 100%);
    border-radius: 6px;
    box-shadow: 0 2px 2px #ccc;
}

h2, h3, h4 {
    font-family: Helvetica, sans-serif;
    margin-bottom: 1rem;
    font-weight: 600;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.3rem;
    color: #000;
}

h4 {
    font-size: 1.2rem;
    text-align: center;
}

p {
    padding: 0.7rem;
    margin-bottom: 10px;
    font-size: 1rem;
}

.text-center {
    text-align: center;
    margin: 0 auto;
}

/* ==========================================================================
   4. HEADER & NAVIGATION (DESKTOP)
   ========================================================================== */
header {
    background: #147ae0;
    color: #ffeb3b;
    padding: 0.6rem 2%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 5px;
    align-items: center;
}

.nav-links li {
    position: relative;
}

.nav-links li a {
    color: #fff;
    font-size: 1rem;
    padding: 15px 20px;
    display: block;
    white-space: nowrap;
}

.nav-links li a:hover {
    color: #F5EE2B;
    text-decoration: none;
}

/* Submenu Styling */
.has-submenu > a::after {
    content: "\25BE";
    font-size: 0.8em;
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.has-submenu:hover > a::after {
    transform: rotate(180deg);
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2862E0;
    min-width: 200px;
    list-style: none;
    padding: 10px 0;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.submenu li {
    width: 100%;
}

.submenu li a {
    padding: 10px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.submenu li:last-child a {
    border-bottom: none;
}

.nav-links li:hover > .submenu {
    display: block;
}

/* Mobile Controls */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 20;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    transition: 0.3s ease;
}

#menu-toggle {
    display: none;
}

/* ==========================================================================
   5. COMPONENTS & LAYOUT
   ========================================================================== */
.banner {
    text-align: center;
    margin-bottom: 10px;
    background: #fff;
}

.banner img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.floatLeft {
    float: left;
    margin-right: 15px;
}

.floatRight {
    float: right;
    margin-left: 15px;
}

hr.style2 {
    border: 0;
    height: 2px;
    background-image: linear-gradient(to right, #fff0, rgba(0, 0, 0, 0.75), #fff0);
    margin-bottom: 20px;
}

.notice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-top: 5px solid var(--u3a-blue);
    display: flex;
    flex-direction: column;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--u3a-dark-blue);
    color: var(--u3a-yellow);
    border-radius: 5px;
    font-weight: 600;
    margin-top: auto;
    text-align: center;
}

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

details[open] {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    padding: 20px;
    overflow: auto;
}

details[open] summary {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 15px;
    cursor: pointer;
}

details[open] img {
    display: block;
    max-width: 95%;
    max-height: 90vh;
    width: auto;
    margin: 0 auto;
    background: white;
}

details[open] p,
details[open] div,
details[open] {
    color: white;
}

.more-info summary {
    cursor: pointer;
    padding: 8px 12px;
    background: #0066cc;
    color: white;
    border-radius: 4px;
    display: inline-block;
}

.close-text {
    display: none;
}

.more-info[open] .open-text {
    display: none;
}

.more-info[open] .close-text {
    display: inline;
}

/* ==========================================================================
   6. TABLES
   ========================================================================== */
.responsive-table {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    align-items: center;
}

table {
    width: 100%;
    max-width: 1300px;
    margin: 20px auto;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 12px;
    border: 1px solid #000;
}

th {
    background: var(--u3a-dark-blue);
    color: #fff;
    text-transform: uppercase;
    text-align: center;
}

td {
    text-align: center;
}

tbody tr:nth-child(odd) {
    background: #fafafa;
}

tbody tr:hover {
    background: #f0f0f0;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
footer {
    background: #2862E0;
    color: #fff;
    text-align: center;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.85em;
}

/* Helpers */
.yellow {
    color: #FFD700;
}

.cadmium {
    color: #D22B2B;
}

.red {
    color: #FF2E2E;
    font-weight: 700;
}

/* ==========================================================================
   8. IMAGE CLASSES
   ========================================================================== */
.thbpic {
    float: left;
    width: 100px;
    height: 150px;
    margin: 10px;
}

.thbnl2 {
    float: left;
    width: 70px;
    margin: 0.5% 0.5% 0.5% 0;
}

.thbnl {
    float: left;
    width: 120px;
    height: 80px;
    margin: 0.5% 0.5% 0.5% 0;
}

.thbnr {
    float: right;
    width: 150px;
    height: 100px;
    margin: 5px 0 5px 5px;
}

.thbln {
    float: left;
    margin: 5px 5px 5px 0;
}

.thbrn {
    float: right;
    margin: 5px 0 5px 5px;
}

.cbox {
    border-radius: 12px;
    border: 1px solid green;
    background-color: #b6f099;
    margin: 2% 0 2% 2%;
    padding: 0.5em 0.5em 0.5em 0.2em;
}

.flicn {
    float: left;
    width: 80px;
    height: 64px;
    margin: 0 10px 0 0;
    border: 0;
}

.video-container {
    max-width: 900px;
    margin: 20px auto;
    aspect-ratio: 16 / 9;
    background: #333;
    border-radius: 8px;
    overflow: hidden;
}

.video-player {
    width: 100%;
    height: 100%;
    display: block;
}

.table-container {
    width: 86%;
    margin: 0 auto;
    overflow-x: auto;
}

.res-table {
    width: 100%;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.info-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-top: 5px solid var(--u3a-blue);
}

.highlight {
    background-color: #fff3cd;
    font-weight: 600;
}

.w3w-container {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 700px;
    margin: 0 auto;
}

.table-r {
    max-width: 1300px;
    margin: 20px auto;
}

.wd10 {
    width: 10%;
}

.wd12 {
    width: 12%;
}

.wd15 {
    width: 15%;
}

.wd18 {
    width: 18%;
}

.wd20 {
    width: 20%;
}

.wd25 {
    width: 25%;
}

.wd30 {
    width: 30%;
}

.wd40 {
    width: 40%;
}

/* ==========================================================================
   9. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #147ae0;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
    }

    #menu-toggle:checked~.nav-links {
        max-height: 100vh;
    }

    .nav-links li {
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .submenu {
        position: static;
        display: none;
        width: 100%;
        background-color: #0d5fb1;
        box-shadow: none;
    }

    .has-submenu:hover>.submenu {
        display: block;
    }

    #menu-toggle:checked~.hamburger .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    #menu-toggle:checked~.hamburger .bar:nth-child(2) {
        opacity: 0;
    }

    #menu-toggle:checked~.hamburger .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
    }

    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 35%;
        text-align: left;
        min-height: 45px;
        display: flex;
        align-items: center;
    }

    td::before {
        content: attr(data-title);
        position: absolute;
        left: 10px;
        width: 45%;
        font-weight: bold;
        color: var(--u3a-dark-blue);
    }

    td:empty {
        display: none;
    }

    td .red {
        display: block;
        width: 100%;
    }

    .floatLeft,
    .floatRight {
        float: none;
        display: block;
        margin: 0 auto 15px;
    }

    .notice-grid {
        grid-template-columns: 1fr;
    }
}