
/* ==========================================================
   BRATS - Advanced Licensing
   Page-specific styling for licondt.htm
   Shared style4.css remains unchanged.
   ========================================================== */

/* ---------- Page defaults ---------- */

.course-page {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 19px;
    line-height: 1.7;
    color: #18364a;
    background-color: #e2f0d8;
}

.course-page img {
    max-width: 100%;
    height: auto;
}

/* ---------- BRATS logo ---------- */

.course-page .logo-wrap {
    margin: 16px auto 22px;
    padding: 0 12px;
    text-align: center;
}

.course-page .logo-wrap img {
    display: block;
    width: auto;
    max-width: min(100%, 450px);
    height: auto;
    margin: 0 auto;
}

/* ---------- Navigation bar ---------- */

.course-page .navbar {
    position: relative;
    z-index: 10;
    box-sizing: border-box;
 
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;

    width: calc(100% - 32px);
    max-width: 1500px;
    min-height: 80px;
    height: auto;

    margin: 0 auto 30px;
    padding: 14px 18px;

    background-color: lightblue;
    border-radius: 9px;
}

.course-page .navbar .logo {
    flex: 0 1 auto;
    height: auto;
    padding: 0;
}

.course-page .navbar .logo img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 70px;
    height: auto;
}

/* Desktop navigation links */

.course-page .navbar .nav-list {
    position: static;
    z-index: auto;

    display: flex;
    flex: 1 1 650px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px 8px;

    width: auto;
    height: auto;
    max-height: none;
    min-width: 0;
    overflow: visible;

    margin: 0;
    padding: 0;
    list-style: none;
}

.course-page .navbar .nav-list li {
    margin: 0;
    padding: 0;
}

.course-page .navbar .nav-list a {
    display: block;
    padding: 9px 11px;

    color: #092c63;
    font-size: 16px;
    line-height: 1.4;
    text-decoration: none;

    border-radius: 6px;
}

.course-page .navbar .nav-list a:hover,
.course-page .navbar .nav-list a:focus-visible {
    background-color: #ffffff;
    color: #064579;
    text-decoration: underline;
}

.course-page .navbar .nav-list a[aria-current="page"] {
    color: #b42318;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Mobile menu button: hidden on desktop */

.course-page .menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    width: 46px;
    height: 44px;
    padding: 8px;

    border: 1px solid #547b91;
    border-radius: 6px;
    background: #ffffff;

    cursor: pointer;
}

.course-page .menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 3px 0;

    background-color: #092c63;
    border-radius: 2px;
}

/* ---------- Main content width ---------- */

.course-page .page-content {
    box-sizing: border-box;
    width: calc(100% - 40px);
    max-width: 1100px;
    margin: 0 auto;
}

/* ---------- Main heading ---------- */

.course-page .intro-card h1 {
    margin: 0 0 22px;
    color: #153d59;

    font-size: 2.1rem;
    line-height: 1.3;
    text-align: center;
}

/* ---------- Introduction panel ---------- */

.course-page .intro-card {
    box-sizing: border-box;

    margin: 0 auto 32px;
    padding: 32px 38px;

    border: 1px solid rgba(36, 74, 90, 0.18);
    border-left: 6px solid #387b96;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 4px 16px rgba(25, 54, 65, 0.07);

    text-align: left;
}

.course-page .intro-card p {
    max-width: 850px;
    margin: 0 auto 20px;
    padding: 0;

    font-size: 1em;
    line-height: 1.8;
    text-align: left;
}

.course-page .intro-card p:last-child {
    margin-bottom: 0;
}

/* Exam question count */

.course-page .intro-card .exam-count {
    margin-bottom: 24px;
    padding: 14px 18px;

    background: #e5f1fb;
    border-radius: 7px;

    font-size: 1.1em;
    font-weight: 700;
    text-align: center;
}

.course-page .exam-count strong {
    color: #b42318;
    font-size: 1.15em;
}

/* ---------- Reference Data link ---------- */

.course-page .reference-link {
    display: inline-block;
    margin: 4px 0;
    padding: 12px 20px;

    background: #075ca8;
    color: #ffffff;

    border: 2px solid #075ca8;
    border-radius: 7px;

    font-size: 1em;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
}

.course-page .reference-link:hover {
    background: #064579;
    border-color: #064579;
    text-decoration: underline;
}

.course-page .reference-link:focus-visible {
    outline: 3px solid #e3a62f;
    outline-offset: 4px;
}

/* ---------- Important notes ---------- */

.course-page .intro-card .note {
    padding: 16px 20px;

    background: #fff7e6;
    border-left: 5px solid #bb8525;
    border-radius: 4px;

    color: #344e5e;
}

.course-page .intro-card .course-note {
    margin-top: 22px;
    padding: 16px 20px;

    background: #f5eee7;
    border-left: 5px solid #80552f;
    border-radius: 4px;

    color: #75451f;
    font-weight: 700;
}

/* ---------- Syllabus section ---------- */

.course-page .syllabus-section {
    margin: 0 auto 32px;
}

.course-page .syllabus-section h2 {
    margin: 0 0 14px;
    padding: 0;

    color: #153d59;
    font-size: 1.7rem;
    line-height: 1.4;
    text-align: left;
}

.course-page .syllabus-intro {
    margin: 0 0 18px;
    padding: 0;
    text-align: left;
}

/* Table wrapper */

.course-page .syllabus-table-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;

    overflow-x: auto;
    border: 1px solid #c6dbe3;
    border-radius: 9px;

    box-shadow: 0 4px 16px rgba(25, 54, 65, 0.08);
}

/* ---------- Syllabus table ---------- */

.course-page .syllabus-table {
    width: 100%;
    margin: 0;

    border: 0;
    border-collapse: collapse;
    border-spacing: 0;

    background: #ffffff;
    text-align: left;

    font-size: 1em;
    line-height: 1.6;
}

.course-page .syllabus-table th {
    width: auto;
    padding: 17px 20px;

    border: 0;
    background: #b1dce8;
    color: #14364b;

    font-size: 1em;
    font-weight: 700;
    text-align: left;
}

.course-page .syllabus-table th:first-child {
    width: 75%;
}

.course-page .syllabus-table td {
    padding: 18px 20px;

    border: 0;
    border-bottom: 1px solid #d5e2e7;

    vertical-align: middle;
    text-align: left;
}

.course-page .syllabus-table tbody tr:nth-child(even) {
    background: #f3f8fb;
}

.course-page .syllabus-table tbody tr:hover {
    background: #e4f1f8;
}

.course-page .syllabus-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Topic links */

.course-page .syllabus-table a {
    color: #064b8e;
    font-weight: 700;

    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.course-page .syllabus-table a:hover {
    color: #a12b23;
    text-decoration-thickness: 2px;
}

.course-page .syllabus-table a:focus-visible {
    outline: 3px solid #e3a62f;
    outline-offset: 4px;
}

/* Exam reference codes */

.course-page .syllabus-table .exam-code {
    color: #b42318;
    white-space: nowrap;
    font-weight: 700;
}

/* ---------- Bottom navigation ---------- */

.course-page .page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;

    margin: 30px auto;
    padding: 24px 0;

    border-top: 1px solid rgba(24, 54, 74, 0.35);
    border-bottom: 1px solid rgba(24, 54, 74, 0.35);
}

.course-page .page-actions .button {
    box-sizing: border-box;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 200px;
    max-width: 100%;
    padding: 13px 22px;
    margin: 0;

    border: 2px solid #318d42;
    border-radius: 7px;

    background: #318d42;
    color: #ffffff;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 1em;
    line-height: 1.5;
    font-weight: 700;

    text-align: center;
    text-decoration: none;
}

.course-page .page-actions .button:hover,
.course-page .page-actions .button:focus-visible {
    background: #246d32;
    border-color: #246d32;
    text-decoration: underline;
}

.course-page .page-actions .button:focus-visible {
    outline: 3px solid #e3a62f;
    outline-offset: 4px;
}

/* ---------- Footer ---------- */

.course-page .site-footer {
    box-sizing: border-box;

    width: calc(100% - 32px);
    max-width: 1500px;

    margin: 36px auto 12px;
    padding: 16px 20px;

    border-radius: 9px;
    background: #3f9ff0;
    color: #ffffff;

    font-size: 0.9em;
    line-height: 1.6;
    text-align: center;
}

.course-page .site-footer p {
    margin: 0;
    padding: 0;
    text-align: center;
}

/* ---------- Keyboard accessibility ---------- */

.course-page a:focus-visible,
.course-page button:focus-visible {
    outline: 3px solid #e3a62f;
    outline-offset: 3px;
}

/* ---------- Tablet and smaller screens ---------- */

@media (max-width: 900px) {
    .course-page .navbar {
        gap: 10px;
        min-height: 64px;
        padding: 12px 16px;
    }

    .course-page .navbar .logo {
        max-width: calc(100% - 64px);
    }

    .course-page .navbar .logo img {
        max-height: 60px;
    }

    .course-page .menu-toggle {
        display: flex;
        flex: 0 0 46px;
        margin-left: auto;
    }

    /* Hidden menu uses the same "active" class as app.js */

    .course-page .navbar .nav-list {
        position: absolute;
        top: calc(100% + 5px);
        right: 0;
        left: 0;
        z-index: 1000;

        display: none;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 2px;

        width: 100%;
        height: auto;
        max-height: 70vh;
        overflow-y: auto;

        padding: 10px;
        margin: 0;

        background: #f2f6f8;
        border: 1px solid #c6dbe3;
        border-radius: 8px;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    }

    .course-page .navbar .nav-list.active {
        display: flex;
    }

    .course-page .navbar .nav-list li {
        display: block;
        width: 100%;
        margin: 0;
    }

    .course-page .navbar .nav-list a {
        padding: 12px 14px;
        font-size: 17px;
    }

    .course-page .page-content {
        width: calc(100% - 32px);
    }

    .course-page .intro-card {
        padding: 26px;
    }

    .course-page .syllabus-table th,
    .course-page .syllabus-table td {
        padding: 16px;
    }
}

/* ---------- Mobile phones ---------- */

@media (max-width: 560px) {
    .course-page {
        font-size: 17px;
        line-height: 1.7;
    }

    .course-page .logo-wrap {
        margin: 12px auto 16px;
    }

    .course-page .navbar,
    .course-page .site-footer {
        width: calc(100% - 20px);
    }

    .course-page .navbar {
        margin-bottom: 22px;
        padding: 10px 12px;
    }

    .course-page .page-content {
        width: calc(100% - 24px);
    }

    .course-page .intro-card {
        padding: 20px 18px;
        margin-bottom: 24px;
    }

    .course-page .intro-card h1 {
        font-size: 1.7rem;
    }

    .course-page .intro-card p {
        line-height: 1.75;
    }

    .course-page .syllabus-section h2 {
        font-size: 1.45rem;
    }

    .course-page .syllabus-table {
        font-size: 16px;
    }

    .course-page .syllabus-table th,
    .course-page .syllabus-table td {
        padding: 13px 11px;
    }

    .course-page .syllabus-table th:first-child {
        width: auto;
    }

    .course-page .page-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .course-page .page-actions .button {
        width: 100%;
        min-width: 0;
    }
}

/* ---------- Reduced motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
    .course-page *,
    .course-page *::before,
    .course-page *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}


/* ==========================================================
   Technical Aspects additions
   Shared theme remains in course-page.css
   ========================================================== */

.techasp-page .intro-card .centre {
    display: block;
    text-align: center;
}

.techasp-page .intro-card .gre {
    margin: 24px auto;
    padding: 16px 20px;
    background: #eef7e9;
    border-left: 5px solid #387b96;
    border-radius: 4px;
    color: #18364a;
    line-height: 1.7;
}

.techasp-page .maths-note,
.techasp-page .exam-sheet {
    margin: 24px auto 0;
}

.techasp-page .maths-symbol {
    display: inline-block;
    width: 41px;
    height: 12px;
    object-fit: contain;
    vertical-align: middle;
}

.techasp-page .exam-sheet-link {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
}

.techasp-page .exam-sheet-image {
    display: block;
    width: 60px;
    height: 103px;
    object-fit: contain;
}

.techasp-page .revision-link {
    margin: 0 0 18px;
    padding: 0;
}

.techasp-page .syllabus-table .syllabus-code {
    color: #b42318;
    font-weight: 700;
    white-space: normal;
}

.techasp-page .syllabus-table .no-code {
    color: #18364a;
    font-style: italic;
}

.techasp-page .maths-link {
    color: red;
}

/* Keep the exam-sheet image and links usable on phones */
@media (max-width: 560px) {
    .techasp-page .exam-sheet-link {
        align-items: flex-start;
    }

    .techasp-page .exam-sheet-image {
        flex: 0 0 60px;
    }
}

/* Feeders and Antennas page additions */

.feed-page .maths-note {
    margin: 24px auto 0;
    padding: 16px 20px;
    background: #eef7e9;
    border-left: 5px solid #387b96;
    color: #18364a;
    line-height: 1.7;
}

.feed-page .maths-note img {
    display: inline-block;
    object-fit: contain;
    vertical-align: middle;
}

.feed-page .syllabus-table .syllabus-code {
    color: #b42318;
    font-weight: 700;
    white-space: normal;
}

@media (max-width: 560px) {
    .feed-page .maths-note {
        padding: 14px;
    }
}

/* Propagation page additions */

.prop-page .syllabus-table .syllabus-code {
    color: #b42318;
    font-weight: 700;
    white-space: normal;
}

/* Centre the attribution text on all course pages */
.course-page .attribution {
    text-align: center;
    margin: 20px auto;
}

/* Remove shadow from the maths note on feed.htm */
body.feed-page .maths-note {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    border: none;
    background: transparent;
}