/* ==========================================
   Base
========================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #222;
    text-align: center;
    background: #f4f4f4;
}

h1 {
    font-size: 3.2rem;
}

main {
    padding: 2rem;
}

header {
    padding: 1rem;
    color: white;
    background: #003262;
}

footer {
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
    background: #ddd;
}

nav a {
    margin-right: 1rem;
    color: white;
    text-decoration: none;
}

/* ==========================================
   General layout and typography
========================================== */

.hero,
.slide-area {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
}

.tight-spacing-bottom {
    margin-bottom: 0;
}

.tight-spacing-top {
    margin-top: 0;
}

.left,
#slideText p.left {
    text-align: left !important;
}

.center { text-align: center; }
.right { text-align: right; }
.justify { text-align: justify; }
.bold { font-weight: bold; }
.italic { font-style: italic; }
.underline { text-decoration: underline; }
.text-small { font-size: small; }
.text-med { font-size: medium; }
.text-large { font-size: large; }

.center-list {
    display: inline-block;
    width: fit-content;
    margin: 1rem auto;
    text-align: left;
}

.center-list li {
    margin: 0.4rem 0;
    font-weight: bold;
}

.reset-password-warning-note-2 {
    text-align: left;
    margin-left: 4.5rem;
}

ul.reset-password-warning-note-2 {
    text-align: left;
    margin-left: 8rem;
}



.left-list {
    display: inline-block;
    padding: 0;
    margin: 0;
    text-align: left;
    list-style-type: none;
}

/* ==========================================
   Buttons
========================================== */

button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    color: #010101;
    text-align: center;
    cursor: pointer;
    background: #eff2f5;
    border: 0.5px solid #0b0b0b;
    border-radius: 5px;
}

button:hover,
button:focus {
    background: #cfd3d7;
}

.button { cursor: pointer; }
.button-full { display: block; width: 100%; }
.button-fixed,
.label-fixed { width: 9.5rem; }

/* ==========================================
   Utility states
========================================== */

.loading { visibility: hidden; }
.ready { visibility: visible; }
.error { margin-bottom: 1rem; color: #b00020; }
.success { margin-bottom: 1rem; color: #006400; }

/* ==========================================
   Callouts
========================================== */

.callout {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: #f8fbff;
    border-left: 8px solid #003262;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.callout h3 {
    margin-top: 0;
    color: #003262;
}

.callout p:last-child { margin-bottom: 0; }

.callout-centered {
    width: fit-content;
    margin-right: auto;
    margin-left: auto;
    padding: 15px;
    background: #f8fbff;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.cbg-yellow { background: #fff8de; }
.cbg-green { background: #e8f2f0; border-left-color: #006405; }
.cbg-orange { background: #f7e1d3; border-left-color: #7a3100; }
.cbg-red { background: #f5d2d3; border-left-color: #6f0900; }
.cbg-violet { background: #e8dbf5; border-left-color: #300085; }
.cbg-blue { background: #dbeaff; border-left-color: #003262; }

/* ==========================================
   Accordion
========================================== */

.accordion-content { padding: 1rem; }

/* ==========================================
   Authentication pages
========================================== */

.reg { background: #003262; }

.auth-form {
    max-width: 500px;
    margin: 2rem auto;
}

.auth-form > label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #bbb;
    border-radius: 6px;
}

.auth-form button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.9rem;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    background: #003262;
    border: none;
    border-radius: 6px;
}

.auth-form button:hover,
.auth-form button:focus {
    background: #004b8d;
}

.auth-form button.button-fixed {
    width: auto;
    min-width: 220px;
}

.form-help { margin-top: 0.35rem; }

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: center;
    width: 100%;
}

.auth-form .password-field > input[type="password"],
.auth-form .password-field > input[type="text"] {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.auth-form .password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    font-weight: normal;
    cursor: pointer;
}

.auth-form .password-toggle input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

/* Standard inline highlight */
mark {
  background-color: #ff0; /* or any color */
  padding: 0.1em 0.2em;   /* optional breathing room */
}

/* ==========================================
   User menu and logout
========================================== */

.user-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin-top: 0.75rem;
    color: white;
}


.user-menu-details {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.access-expiration {
    font-size: 0.9rem;
}

.access-expiration.expiring-soon {
    font-weight: bold;
}

.user-menu a {
    margin-left: 1rem;
    color: white;
    font-weight: bold;
}

.logout-form { 
    margin: 0;
    font-weight: normal; 
}

.logout-link {
    margin: 0;
    padding: 0;
    color: white;
    font: inherit;
    cursor: pointer;
    background: none;
    border: none;
    text-decoration: underline;
}

a.logout-link {
    font-weight: normal;
    margin-left: 0;
}

.logout-link:hover { 
    background: #cfd3d7;
    color: #090909;
    border-radius:8px
}
.logout-link:focus { color: #090909; }

/* ==========================================
   Slideshow
========================================== */

body.slideshow-page { background: #003262; }
#title { margin-top: 0; }

#slide {
    display: block;
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 0 auto;
    background: white;
    border: 1px solid #ccc;
}

.caption {
    max-width: 800px;
    min-height: 1.5em;
    margin: 1rem auto;
    font-size: 1.1rem;
}

.caption-small {
    font-size: small;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 20px;
    
}

audio {
    display: block;
    width: 100%;
    max-width: 800px;
    margin: 1rem auto;
}

audio[hidden] {
    display: none !important;
}

#restartBtn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    color: white;
    cursor: pointer;
    background: #005ea2;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

#restartBtn:hover,
#restartBtn:focus { background: #00457a; }

/* ==========================================
   E-learning
========================================== */

.learning-app { padding: 2rem; }

#slideImage {
    max-width: 100%;
    height: auto;
    margin: 1rem auto;
}

.choices {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.choice-button {
    padding: 1rem;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
}

.controls { margin-top: 1.5rem; }
.controls button { margin: 0.25rem; padding: 0.75rem 1rem; }

/* ==========================================
   Invitation form
========================================== */

.invite-days { width: 80px !important; }

/* ==========================================
   Embedded video page
========================================== */

.video-frame-container {
    width: min(1000px, 100%);
    height: 800px;
    margin-top: 2rem;
    overflow: hidden;
    background: #000;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.video-frame-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.media-card {
    width: min(1000px, 100%);
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ==========================================
   Responsive adjustments
========================================== */

@media (max-width: 768px) {
    h1 { font-size: 2.4rem; }

    main,
    .learning-app { padding: 1rem; }

    .hero,
    .slide-area,
    .media-card { padding: 1.25rem; }

    .video-frame-container {
        height: auto;
        aspect-ratio: 4 / 3;
    }
}

.login-page {
    background: #003262;
    font-family: Arial, Helvetica, sans-serif;
}

.login-card {
    width: min(420px, calc(100% - 32px));
    margin: 80px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}

.login-card h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    box-sizing: border-box;
}

.login-button {
    width: 100%;
    padding: 12px;
    font-size: 17px;
    background: #003262;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.login-button:hover,
.login-button:focus-visible {
    background: #0055a5;
}

.login-message {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
}

.login-message.error {
    color: #842029;
    background: #f8d7da;
    border: 1px solid #f5c2c7;
}

.login-message.warning {
    color: #664d03;
    background: #fff3cd;
    border: 1px solid #ffecb5;
}

.register-link {
    margin-top: 28px;
    text-align: center;
}

.register-link p {
    margin-bottom: 12px;
}

.pretest-return .hero{
    max-width:900px;
    margin:3rem auto;
    background:white;
    padding:2.5rem;
    border-radius:12px;
    box-shadow:0 4px 20px rgba(0,0,0,.12);
}

.pretest-return .hero h2{
    text-align:center;
    color:#003262;
}

.pretest-return .hero p{
    line-height:1.7;
}

.pretest-return .center{
    text-align:center;
    margin-top:2rem;
}

.pretest-return .button{
    display:inline-block;
    background:#003262;
    color:white;
    text-decoration:none;
    padding:14px 36px;
    border-radius:8px;
    font-weight:bold;
}

.pretest-return .button:hover{
    background:#0055a5;
}

.pretest-return .notice{
    margin-top:2rem;
    background:#eef6ff;
    border-left:5px solid #003262;
    padding:1rem;
}

.home .hero {
    max-width: 900px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
}

.home .hero h2{
    text-align:center;
    margin-bottom:1.5rem;
}

.home .hero p{
    line-height:1.7;
    margin-bottom:1.2rem;
}

.home .begin{
    text-align:center;
    margin-top:2rem;
}

.home .begin a{
    display:inline-block;
    background:#003262;
    color:white;
    padding:14px 36px;
    border-radius:8px;
    text-decoration:none;
    font-size:1.1rem;
    font-weight:bold;
}

.home .begin a:hover {
    background:#0055a5;
}

.home .notice {
    background:#eef6ff;
    border-left:5px solid #003262;
    padding:1rem;
    margin-top:2rem;
}

.post-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 14px 36px;
    color: white;
    text-decoration:none;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    background: #003262;
    border: none;
    border-radius: 8px;
}

.post-button:hover,
.post-button:focus {
    background: #0055a5;
}

.notice{
    background:#eef6ff;
    border-left:5px solid #003262;
    padding:1rem;
    margin-top:2rem;
}

/*--------------------------
 slideshow
 ---------------------------*/

#slideContainer {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 3 / 2;
    margin: 0 auto;
    overflow: hidden;
} 

.slideshow-16-9 {
    aspect-ratio: 16 / 9;
}

#slideContainer #slideImage,
#slideContainer #slideVideo {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    margin: 0;
    max-width: none;

    object-fit: contain;
    display: block;
}

#slideContainer #slideImage {
    opacity: 1;
}

#slideContainer #slideVideo {
    opacity: 0;
    pointer-events: none;
}

.admin-heading-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}