﻿@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap');
/* Base Styles */
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
}

main {
    margin-top: 60px;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#mcq-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 60vh;
    position: relative;
    justify-content: center;
}

.mcq-content {
    width: 100%;
    max-width: 800px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: opacity 0.5s ease;
    opacity: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .mcq-content.hidden {
        opacity: 0;
    }

.mcq-question p {
    font-size: 1.25rem;
    margin-bottom: 20px;
    font-weight: bold;
    color: #343a40;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.option-card {
    background-color: #f1f3f5;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
}

    .option-card input[type="radio"] {
        margin-right: 10px;
        cursor: pointer;
        transform: scale(1.2);
    }

    .option-card label {
        cursor: pointer;
        width: 100%;
        color: black;
        hyphens: auto;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

.explanation {
    display: none;
}

span.image.fit {
    border-radius: 10px;
    padding: 1rem;
    width: 20vw;
    height: auto;
    display: inline-block;
    cursor: zoom-in;
}

.video-fluid{
    border-radius: 10px;
    width: 30vw;
    height:auto;
    cursor: pointer;
}

/* Video thumbnail container */
.video-thumbnail {
    position: relative; /* Required for positioning the ::before pseudo-class */
    display: inline-block;
    cursor: pointer; /* Indicates it's clickable */
    overflow: hidden; /* Ensure pseudo-element stays inside */
}

    /* Thumbnail image styling */
    .video-thumbnail .video-fluid {
        display: block;
        width: 100%;
        height: auto;
        transition: filter 0.3s ease; /* Smooth darkening effect on hover */
    }

    /* Add SVG icon using ::before pseudo-class */
    .video-thumbnail::before {
        content: url('../images/play.svg'); /* Path to your SVG icon */
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(3); /* Center the icon */
   
      
        transition: opacity 0.3s ease, transform 0.3s ease; /* Smooth appearance */
        pointer-events: none; /* Prevent interaction with the icon */
    }

    /* Darken the thumbnail and show the play icon on hover */
    .video-thumbnail:hover .video-fluid {
        filter: brightness(0.7); /* Darken the image */
    }

    .video-thumbnail:hover::before {
        opacity: 1; /* Make the SVG icon visible */
        transform: translate(-50%, -50%) scale(1.1); /* Slightly enlarge the icon */
    }

/* Tablet view: Scale to 2x */
@media (min-width: 768px) and (max-width: 1023px) {
    .video-thumbnail::before {
        transform: translate(-50%, -50%) scale(2); /* Medium size for tablets */
    }

    .video-thumbnail:hover::before {
        transform: translate(-50%, -50%) scale(2.2); /* Slightly larger hover effect */
    }
}

/* Mobile view: Scale to 1.5x */
@media (max-width: 767px) {
    .video-thumbnail::before {
        transform: translate(-50%, -50%) scale(1.5); /* Smaller icon for mobile */
    }

    .video-thumbnail:hover::before {
        transform: translate(-50%, -50%) scale(1.7); /* Slightly larger hover effect */
    }
}

.img-fluid {
    border-radius: 10px;
    width:100%;
    height:auto;
}

.explanation ol {
    font-size: 1.2rem;
    font-family: "Merriweather", Georgia, serif;
    color: #101720;
    text-align: justify;
    line-height: 2.375;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    font-weight: 300;
}

.explanation.active {
    margin-top: 20px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: white;
    border-radius: 5px;
    word-wrap: break-word;
    line-height: 1.5;
    border: 1px solid #ddd;
    color: black;
    font-size: 1.35rem;
    font-family: 'Merriweather', Geneva, Verdana, sans-serif;
}

h5.exp {
    color: #838383;
    font-family: 'Cormorant', Geneva, Verdana, sans-serif;
    font-style: italic;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: underline double #212A37 1px;
}

.explanation p {
    font-size: 1.2rem;
    font-family: "Merriweather", Georgia, serif;
    color: #101720;
    text-align: justify;
    line-height: 2.375;
    font-weight: 300;
}

.explanation::-webkit-scrollbar {
    width: 8px;
}

.explanation::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

    .explanation::-webkit-scrollbar-thumb:hover {
        background: #aaa;
    }

@media (max-width: 768px) {
    main {
        margin-top: 0;
    }

   
}

@media (max-width: 580px) {
    .options-grid {
        grid-template-columns: 1fr;
    }

    .option-card {
        padding-right: 30px;
    }
}

.question-number p {
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 15px;
    text-align: left;
}

.question-number strong {
    color: #007bff;
    font-weight: 700;
}

.option-card.correct {
    background-color: #d4edda;
    border: 1px solid #28a745;
}

.option-card.incorrect {
    background-color: #f8d7da;
    border: 1px solid #dc3545;
}

.option-card.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.option-card.correct::after {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
}

.option-card.incorrect::after {
    content: "✗";
    color: #dc3545;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
}

#loader {
    margin: 20px 0;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

footer {
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

    footer .btn {
        min-width: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }

@media (max-width: 575.98px) {
    .mcq-question {
        font-size: 1.1rem !important;
    }

    .option-card {
        padding: 10px !important;
    }

        .option-card input[type="radio"] {
            transform: scale(1) !important;
        }

    footer .btn {
        width: 45% !important;
        font-size: 0.9rem !important;
    }

    #back-button {
        font-size: 0.9rem !important;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s forwards;
}

.navigation-bar {
    background: linear-gradient(30deg, #202024 10%, #333 50%, #202024 90%);
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    z-index: 999;
    backdrop-filter: blur(10px) brightness(1.2);
}

    .navigation-bar .btn {
        min-width: 100px;
        z-index: 1024;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border-radius: 5px;
        padding: 10px 15px;
        font-size: 1rem;
        transition: background-color 0.3s ease, border-color 0.3s ease;
    }

#next-button {
    background-color: #62c8df;
    border-color: #62c8df;
    color: #fff;
}

#submit-button {
    background-color: #62b0df;
    width: fit-content;
    align-self: center;
    border-color: hwb(203 38% 22% / 1);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}


#prev-button {
    background-color: #e9e9e926;
    color: #00d0ff;
}

#back-button {
    background-color: #fff;
    border-color: #62c8df;
    color: #62c8df;
}

.btn-group .btn {
    border-radius: 0;
    margin: 0;
}

    .btn-group .btn:first-child {
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
    }

    .btn-group .btn:last-child {
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
    }

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.fade-out {
    animation: fadeOut 0.5s forwards;
}

.navigation-bar .btn i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .navigation-bar {
        padding: 8px 0 !important;
    }

        .navigation-bar .btn {
            font-size: 0.9rem !important;
            padding: 8px 10px !important;
        }

            .navigation-bar .btn i {
                font-size: 1rem !important;
            }
}

@media (max-width: 576px) {
    .navigation-bar .btn {
        font-size: 0.85rem !important;
        padding: 6px 8px !important;
    }

        .navigation-bar .btn i {
            font-size: 0.9rem !important;
        }

    .option-card span.image.fit {
        width: 35vw;
    }

    span.image.fit {
        width: 45vw;
    }

}



/* Modal Container */
#imageModal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

    /* Modal Content */
    #imageModal .modal-content {
        position: relative;
        max-width: 90vw;
        max-height: 90vh;
        display: flex;
        justify-content: center;
        height: auto;
        width: fit-content;
        padding: 50px;
        align-items: center;
        background: color(srgb 1 1 1 / 0.2);
        backdrop-filter: blur(10px)
    }

        /* Modal Image */
        #imageModal .modal-content img {
            max-width: 100%; /* Scale down image to fit modal */
            max-height: 100%; /* Ensure it doesn't exceed viewport */
            border-radius: 8px; /* Optional: Rounded corners */
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Optional: Shadow for effect */
        }

    /* Close Button */
    #imageModal .close {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 25px;
        font-weight:900;
        color: white;
        cursor: pointer;
        transition: color 0.3s ease;
    }

        #imageModal .close:hover {
            color: red;
        }

/* Hover effect for thumbnails */
.image.fit:hover img {
    cursor: pointer;
    filter: brightness(0.8); /* Slight darkening effect */
    transition: filter 0.3s ease;
}


/* Circle Buttons for Question Numbers */
.question-grid .circle {
    background-color: #65bef6;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

    .question-grid .circle:hover {
        background-color: #5598c0;
    }


.navigation-icon {
    position: absolute;
    top: 10px;
    right: 20px;
    background-color: #62b0df;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 968;
    transition: background-color 0.3s ease;
}

@media (max-width: 1024px) {
    .navigation-icon {
        width: 45px;
        height: 45px;
    }

        .navigation-icon i {
            font-size: 18px;
        }
}

@media (max-width: 768px) {
    .navigation-icon {
        width: 40px;
        height: 40px;
    }

        .navigation-icon i {
            font-size: 16px;
        }
}

@media (max-width: 576px) {
    .navigation-icon {
        width: 35px;
        height: 35px;
    }

        .navigation-icon i {
            font-size: 14px;
        }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    max-height: 70%;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.close-modal {
    position: static;
    color: #000;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    right: 50rem !important;
    top: 12.6rem;
}

h5 {
    color: black;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 10px;
    justify-items: center;
    align-items: center;
    margin-top: 20px;
    overflow-y: auto;
    margin-bottom: 4rem;
}

@media (max-width: 576px) {
    .modal-content {
        max-height: 90%;
    }

    .question-grid {
        grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    }

        .question-grid .circle {
            width: 40px;
            height: 40px;
            font-size: 14px;
        }
}

.pagination-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 10px;
    color: white;
    padding: 10px;
    border-radius: 5px;
}

.pagination-button {
    padding: 5px 15px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .pagination-button.prev-button {
        background-color: #007bff;
        color: white;
    }

    .pagination-button.next-button {
        background-color: #28a745;
        color: white;
    }

@media (max-width: 768px) {
    .pagination-controls {
        bottom: 5px;
        padding: 5px;
    }

    .pagination-button {
        font-size: 12px;
        padding: 4px 10px;
    }
}

.option-card p {
    color: #343a40;
    margin-bottom: 0;
}

.table-wrapper {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
}

table {
    margin: 0 0 2rem 0;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

    table tbody tr {
        border: solid 1px;
        border-left: 0;
        border-right: 0;
    }

    table td {
        padding: 0.75rem;
        border: solid 3px #fffdfd;
    }

    table th {
        font-family: "Source Sans Pro", Helvetica, sans-serif;
        font-size: 0.8rem;
        font-weight: 900;
        letter-spacing: 0.075em;
        line-height: 1.5;
        padding: 0 0.75rem 0.75rem 0.75rem;
        text-align: left;
        text-transform: uppercase;
    }

@media screen and (max-width: 980px) {
    table th {
        font-size: 0.9rem;
    }
}

table thead {
    border-bottom: solid 2px;
}

table tfoot {
    border-top: solid 2px;
}

table.alt {
    border-collapse: separate;
}

    table.alt tbody tr td {
        border: solid 1px;
        border-left-width: 0;
        border-top-width: 0;
    }

        table.alt tbody tr td:first-child {
            border-left-width: 1px;
        }

    table.alt tbody tr:first-child td {
        border-top-width: 1px;
    }

    table.alt thead {
        border-bottom: 0;
    }

    table.alt tfoot {
        border-top: 0;
    }

table tbody tr {
    border-color: #eeeeee;
}

    table tbody tr:nth-child(2n + 1) {
        background-color: #ffffff8c;
    }

table th {
    color: #00adfb8c;
    border-color: #000;
}

table thead {
    border-bottom-color: #eeeeee;
}

table tfoot {
    border-top-color: #eeeeee;
}

table.alt tbody tr td {
    border-color: #eeeeee;
}

table tbody tr {
    background-color: #94c6dd59;
}

@media (hover: hover) {
    .option-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

    #next-button:hover {
        background-color: #5498a7;
    }

    #prev-button:hover {
        background-color: #ffffff;
        color: #00d0ff;
        border-color: #62c8df;
    }

    #back-button:hover {
        background-color: #d9dfe1;
        color: #62c8df;
        border-color: #ffffff;
    }

    .navigation-icon:hover {
        background-color: #4c9eb1;
    }

    .pagination-button:hover {
        opacity: 0.9;
    }

    .close-modal:hover {
        color: black;
    }

    .question-grid .circle:hover {
        background-color: #5598c0;
    }
}
