/* =============================================================
   Unified Styles for ©Steadygro Platform
   File: css/steadygro.css
   ============================================================= */

/* ----- 1. Reset & Base (shared by all pages) ----- */
* { box-sizing: border-box; margin: 0; padding: 0; }

/*
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: #222;
    background: #f9f9f9;
}
 */
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: #222;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
/*
body.main-body {
    padding-top: 3.125em;            
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
 */
body.main-body {
    padding-top: 3.125em;                 /* 50px – space for the fixed navbar */
}

img, video { max-width: 100%; height: auto; display: block; margin: 0 auto; }
a { color: #1A8A7D; text-decoration: none; }
a:hover { color: #DAA520; }
h1, h2, h3 { color: #1A8A7D; margin-bottom: 0.75rem; }

/* ---- Main Container (stretches to push footer down) ---- */
.tab-container {
    flex: 1;
}

/* ----- 2. Top Navigation (Tabs) ----- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #459F9F;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.125em;                      /* 50px */
    padding: 0 1.25em;                    /* 20px */
}

.navbar .logo img {
    height: 3.125em;
    margin: 0;
}

.tab-row {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.tablinks {
    font-weight: 600;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.tablinks:hover,
.tablinks.active {
    color: #fff;
    border-bottom-color: #DAA520;
}

/* ----- 3. Tab Content & Sidebar Layout ----- */
.tabcontent {
    display: none;
    padding: 1.25em 0;                    /* 20px 0 */
    flex: 1;
}

.sidebar-layout {
    display: flex;
    gap: 0;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.25em;                    /* 20px */
}

.sidebar {
    width: 15%;
    flex-shrink: 0;
    background: #fff;
    border-radius: 0.6em;                 /* 10px */
    overflow: hidden;
}

.sidebar .sidebar-title {
    background: #459F9F;
    color: white;
    height: 2.8125em;                     /* 45px */
    padding: 0 1em;                       /* 16px */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { border-bottom: 0.06em solid #eee; }

.sidebar .toggle-btn,
.sidebar .panel-link {
    display: block;
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: none;
    border: none;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1A8A7D;
    cursor: pointer;
    transition: background 0.2s;
    background: #fff;
}

.sidebar .toggle-btn:hover,
.sidebar .panel-link:hover { background: #e0f7f5; }

.sidebar .toggle-btn.active,
.sidebar .panel-link.active {
    background: #40E0D0;
    color: white;
}

.sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f4fdfc;
}

.sub-menu li { border-bottom: 0.06em solid #e0e0e0; }
.sub-menu .panel-link {
    padding-left: 2.5rem;
    font-weight: 400;
    font-size: 0.9rem;
}

li.open > .sub-menu { max-height: 50vh; }

/* ----- 4. Panels (main content area) ----- */
.panels {
    flex: 1;
    background: #fff;
    border-radius: 0.6em;                 /* 10px */
    padding: 1.5rem;
    margin-left: 1.25rem;                 /* 20px */
}

.panel { display: none; }
.panel.active { display: block; }
.panel.pdf-panel { padding: 0; }

.pdf-viewer {
    width: 100%;
    height: 90vh;
    border: 0.12em solid #40E0D0;         /* 2px */
    border-radius: 0.6em;
    display: block;
}

/* ============================================================
   Unified Slideshow Styles
   ============================================================ */

.slideshow-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.mySlides { display: none; }

.mySlides_akppkjc,
.mySlides_steadygro {
    display: none;
    width: 100%;
}

.mySlides video,
.mySlides img,
.mySlides_akppkjc video,
.mySlides_akppkjc img,
.mySlides_steadygro video,
.mySlides_steadygro img {
    border-radius: 0.6em;                 /* 10px */
}

.slideshow-container .dots {
    text-align: center;
    margin-top: 0.9375em;                 /* 15px */
}

.dot {
    cursor: pointer;
    height: 0.875rem;                     /* 14px */
    width: 0.875rem;
    margin: 0 0.3125rem;                  /* 5px */
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s;
}

.dot.active,
.dot:hover {
    background-color: #DAA520;
}

/* ----- 6. Footer ----- */
footer {
    background: #459F9F;
    color: white;
    text-align: center;
    padding: 0.25em 1em;                  /* 4px 16px */
    font-size: 1rem;
    flex-shrink: 0;
}

footer a { color: white; }

/* =============================================================
   7. Styles for inner iframe pages (ui.php, forms, etc.)
   Scoped under .iframe-content to avoid conflicts
   ============================================================= */

.iframe-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.iframe-content .cover-container {
    padding-top: 0 !important;
}

.iframe-content .masthead {
    margin-bottom: 0.5rem;
}

.iframe-content .nav-masthead {
    margin-bottom: 0.4rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.iframe-content .nav-masthead .nav-link {
    padding: 0.25rem 0;
    font-weight: 700;
    color: inherit;
    background-color: transparent;
    border-bottom: 0.25rem solid transparent;
}

.iframe-content .nav-masthead .nav-link:hover,
.iframe-content .nav-masthead .nav-link:focus {
    border-bottom-color: rgba(0, 0, 0, 0.25);
}

.iframe-content .nav-masthead .nav-link + .nav-link {
    margin-left: 1rem;
}

.iframe-content .nav-masthead .nav-link.active {
    font-weight: bold;
    text-decoration: none;
    color: #000;
    border-bottom-color: #000;
}

.iframe-content .cover .btn-lg {
    padding: 0.75rem 1.25rem;
    font-weight: 700;
}

.iframe-content .mastfoot {
    color: rgba(0, 0, 0, 0.4);
}

.iframe-content .pdfobject-container {
    height: 30rem;
    border: 1rem solid rgba(0, 0, 0, 0.1);
}

.iframe-content .navbar {
    position: static;
    width: auto;
    background: transparent;
    box-shadow: none;
    height: auto;
    padding: 0;
    margin: 0;
}

.iframe-content .option-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.iframe-content .option-row input[type="checkbox"] {
    flex-shrink: 0;
    margin-right: 0.4rem;
    margin-top: 0.2rem;
}

.iframe-content .option-row label {
    flex-shrink: 0;
    font-weight: bold;
    margin-right: 0.5rem;
}

.iframe-content .option-row .option-text {
    flex: 1 1 auto;
    min-width: 0;
}

.iframe-content img {
    display: inline-block;
    margin: 0;
    max-width: 100%;
    height: auto;
}

.iframe-content .question-img {
    display: block;
}

.iframe-content .option-text img {
    vertical-align: bottom;
}

.iframe-content .button-group .btn {
    margin-right: 0.5rem;
}

.iframe-content .button-group .btn:last-child {
    margin-right: 0;
}

.button {
    border: none;
    color: white;
    padding: 0.125em 0.25em;              /* 2px 4px */
    border-radius: 0.25em;                /* 4px */
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 0.75em;                    /* 12px */
    margin: 0.125em;                      /* 2px */
    cursor: pointer;
}

.button1 { background-color: #c4aead; }
.button2 { background-color: #B2BEB5; }
.button3 { background-color: #90EE90; }
.button4 { background-color: #50C878; }
.button5 { background-color: #009900; }

.dropdown-menu .dropdown-item input[type="checkbox"] {
    margin-right: 0.375em;                /* 6px */
}

/* ============================================================
   Functional additions (progress table, question nav, chapter menu)
   ============================================================ */

.progress-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.progress-table {
    width: 100%;
    font-size: 0.8125em;                  /* 13px */
    border-collapse: collapse;
    margin-top: 0.3125em;                 /* 5px */
    min-width: 0;
}

.progress-table th,
.progress-table td {
    padding: 0.5em 0.625em;               /* 8px 10px */
    text-align: center;
    vertical-align: middle;
    border: 0.06em solid #ccc;
    white-space: normal;
}

.progress-table td.num,
.progress-table th.num {
    white-space: nowrap;
}

/* Question navigation row */
.question-nav {
    display: flex;
    align-items: center;
    gap: 0.625em;                         /* 10px */
    flex-wrap: wrap;
    margin-bottom: 0.625em;
}

.chapter-multiselect {
    position: relative;
    display: inline-block;
}

.chapter-trigger-btn {
    background: #fff;
    border: 0.06em solid #ccc;
    padding: 0.125em 0.5em;               /* 2px 8px */
    font-size: 0.875em;
    min-width: 10em;                      /* ~150px */
    text-align: left;
    cursor: pointer;
}

.chapter-trigger-arrow { float: right; }

.chapter-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: #fff;
    border: 0.06em solid #ccc;
    min-width: 15em;                      /* ~250px */
    max-height: 12.5em;                   /* 200px */
    overflow-y: auto;
    padding: 0.3em 0.5em;
}

.question-timer {
    margin-left: auto;
    white-space: nowrap;
}

/* ============================================================
   Mobile stacking (sidebar above panels on small screens)
   ============================================================ */
@media (max-width: 48em) {                /* 768px */
    .sidebar-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        margin-bottom: 1em;
    }
    .panels {
        margin-left: 0;
    }
}
