/* ===============================================
   PRBRSA Basic Text & Layout Styles
   =============================================== */

/* ===== CSS Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: "Noto Sans", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

h1 {
    font-size: clamp(1rem, calc(4vw + 1rem), 2.5rem);
    line-height: 1.3;
    font-weight: 700;
}

h2 {
    font-size: clamp(1rem, calc(4vw + 0.5rem), 1.5rem);
    line-height: 1.3;
    font-weight: 700;
}

h3 {
    font-size: clamp(1rem, calc(4vw + 0.5rem), 1.25rem);
    line-height: 1.3;
    font-weight: 700;
}

h4 {
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 700;
    display: inline;
}

/* Universal Classes */
.row {
    display: flex;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 1rem;

    @media screen and (max-width: 920px) {
        flex-direction: column !important;
    }

    & > * {
        flex: 1;
    }
}

.grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 1rem !important;

    @media screen and (max-width: 920px) {
        grid-template-columns: 1fr;
    }
}

.col-700 {
    max-width: 700px;

    @media screen and (max-width: 920px) {
        max-width: 100%;
    }
}

.col-220 {
    max-width: 220px;

    @media screen and (max-width: 920px) {
        max-width: 100%;
    }
}

.last {
    margin-left: auto;

    @media screen and (max-width: 920px) {
        margin-left: 0;
    }
}

/* ===== Container & Layout ===== */
#wrap {
    max-width: 1080px;
    width: 95vw;
    margin: 0 auto;
}

#header {
    padding: 0.5rem 0;
}

#header > div {
    padding: 0.5rem 0;
}

/* ===== Header Section ===== */
#header-top {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: min(3vw, 1.25rem);
}

#header-top img {
    width: 100%;
    max-width: 450px;
    height: auto;
}

/* Meeting Info & Menu Button Container */
#header-extras {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: min(2.5vw, 1rem);
    text-align: right;
}

#header-extras > div {
    padding: 0.5rem 1rem;
    width: 100%;
    gap: 0.5rem;
    border: 1px solid #ddd;
}

/* Mobile Menu Button */
#header-menu-toggle {
    display: none;
    border: 1px solid #333;
    padding: min(2vw, 0.75rem) min(4vw, 1.5rem);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 3rem;
    min-width: 3rem;
}

/* ===== Navigation ===== */
#header-menu {
    margin: 0;
    padding: 0;
}

#header-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#header-menu > ul {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

#header-menu > ul > li {
    position: relative;
}

#header-menu > ul > li a {
    color: black;
    min-height: 3rem;
}

/* Dropdown/Submenu */
#header-menu > ul > li > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    border: 1px solid #ddd;
    z-index: 1000;
    background-color: #fff;
}

#header-menu > ul > li:hover > ul,
#header-menu > ul > li:focus-within > ul {
    display: block;
}

#header-menu > ul > li > ul > li {
    border-bottom: 1px solid #ddd;
    padding: 0.25rem 0.5rem;
}

#header-menu > ul > li > ul > li:last-child {
    border-bottom: none;
}

/* ===== Banner Section ===== */
#header-content {
    margin: 0;
    position: relative;
}

#header-content {
    position: relative;
}

#header-content > img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
}

/* ===== Main Content ===== */
#content {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    margin: 0 auto;

    & h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    a,
    ul,
    ol,
    table {
        margin-bottom: 1rem;
        width: 100%;
    }
}

#content ul {
    list-style-position: inside;
}

#content table {
    border-collapse: collapse;
    width: 100%;

    & caption {
        caption-side: bottom;
    }
}

#content td,
#content th {
    border: 1px solid #ccc;
    padding: 0.25rem 0.5rem;
}

#content tr:nth-child(even) {
    background-color: #eee;
}

#content tr:not(:first-child):hover {
    background-color: #ddd;
}

/* ===== Footer ===== */
#footer {
    margin: 0 auto;
    border-top: 1px solid #ddd;
    line-height: 1.6;
}

#footer > div {
    padding: 1rem 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: min(6vw, 2rem);
}

#footer > div > div {
    padding: 0;
}

/* Footer Navigation Lists */
#footer > div > div:nth-child(3) {
    display: grid;
    grid-template-columns: 1fr;
    gap: min(4vw, 1rem);
}

#footer ul {
    list-style: none;
}

/* Footer Logo */
#footer > div > div:nth-child(4) {
    text-align: center;
}

#footer > div > div:nth-child(4) img {
    max-width: 200px;
}

/* ===== Tablet Styles ===== */
@media screen and (min-width: 720px) {
    #header-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    #header-top img {
        max-width: 350px;
    }

    #footer > div {
        grid-template-columns: repeat(2, 1fr);
    }

    #footer > div > div:nth-child(3) {
        grid-template-columns: 1fr 1fr 1fr;
    }

    #header-content img {
        max-height: 220px;
    }
}

/* ===== Desktop Styles ===== */
@media screen and (min-width: 1080px) {
    #header-top img {
        max-width: 450px;
    }

    #footer > div {
        grid-template-columns: repeat(4, 1fr);
    }

    #footer > div > div:nth-child(3) {
        grid-template-columns: 1fr;
    }
}

/* ===== Mobile Menu Styles ===== */
@media screen and (max-width: 720px) {
    #header-extras {
        width: 100%;
        text-align: center;
    }

    #header-menu-toggle {
        display: block;
        width: 100%;
        border: none;
        border-radius: 0.25rem;
    }

    #header-menu {
        background-color: #fff;
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 9999;
        overflow-y: auto;
        border: 1px solid #ddd;
    }

    #header-menu.mobile-menu-open {
        left: 0;
    }

    #header-menu > ul {
        flex-direction: column;
        padding: 60px 0 20px;
    }

    #header-menu > ul > li {
        width: 100%;
        border-bottom: 1px solid #ddd;
        position: relative;
        padding: 0.25rem 0.5rem;
    }

    #header-menu > ul > li > ul {
        padding-left: 1rem;
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid #ddd;
    }

    #header-menu > ul > li.open > ul {
        display: block;
    }

    /* Submenu Toggle Button Styles */
    #header-menu .submenu-toggle {
        position: absolute !important;
        right: min(3vw, 1rem) !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: #fff !important;
        border: 1px solid #ddd !important;
        color: #333 !important;
        width: 30px !important;
        height: 30px !important;
        border-radius: 3px !important;
        cursor: pointer !important;
        font-size: 16px !important;
        line-height: 1 !important;
        z-index: 10 !important;
        display: none !important;
    }

    #header-menu .submenu-toggle:hover,
    #header-menu .submenu-toggle:focus {
        background-color: #f0f0f0 !important;
        border-color: #999 !important;
    }

    #header-content img {
        max-height: 180px;
    }
}
