html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    height: 100%; /* full viewport */
    margin: 0; /* remove any default margin */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Prevent showing right click context menu */
    -webkit-user-select: none; /* Chrome, Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+ */
    user-select: none; /* Standard */
}

.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

.teacher-card {
    border-radius: 0.5rem;
}

.teacher-card:hover {
    color: inherit;
}

.teacher-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
}

.teacher-avatar-lg {
    width: 180px;
    height: 180px;
    flex: 0 0 auto;
}

.teacher-profile {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 2rem;
}

.teacher-review {
    line-height: 1.5;
}

.teacher-lesson-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.teacher-lesson-details > div {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem;
    background: #f8f9fa;
}

.teacher-lesson-details span {
    display: block;
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.2rem;
}

.teacher-lesson-details strong {
    display: block;
    color: #212529;
}

@media (max-width: 575.98px) {
    .teacher-lesson-details {
        grid-template-columns: 1fr;
    }
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.125rem;
    margin-left: 0.125rem;
}

.dropdown-submenu > .test-info-submenu-label {
    cursor: default;
    pointer-events: none;
}

.dropdown-submenu > .test-info-submenu-label:hover {
    color: var(--bs-dropdown-link-color);
    background-color: transparent;
}

.dropdown-submenu:hover > .dropdown-menu,
.dropdown-submenu:focus-within > .dropdown-menu {
    display: block;
}

@media (max-width: 991.98px) {
    .dropdown-submenu > .dropdown-menu {
        position: static;
        margin-left: 1rem;
        border: 0;
        box-shadow: none;
    }
}

.accordion-button {
    font-weight: 500;
}

.list-group-item-success {
    background-color: #d4edda !important;
}

.list-group-item-danger {
    background-color: #f8d7da !important;
}

.reading-text {
    font-size: 1rem;
    line-height: 2;
    white-space: pre-wrap; /* preserves line breaks */
    word-wrap: break-word; /* wraps long lines */
}

.sample-item {
    display: flex;
    flex-direction: column; /* stack children vertically */
    align-items: stretch; /* buttons and collapse take full width */
    margin-bottom: 0.5rem; /* spacing between items */
}

.sample-toggle {
    display: inline-flex;
    align-items: center;
    width: auto;
    border: 0;
    background: transparent;
    color: #0d6efd;
    font-weight: 600;
    padding: 0.25rem 0;
    text-align: left;
}

.sample-toggle:hover,
.sample-toggle:focus {
    color: #084298;
    text-decoration: underline;
}

.tts-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #0d6efd;
    font-size: 0.95rem;
    line-height: 1;
    padding: 0;
}

.tts-icon-btn:hover,
.tts-icon-btn:focus {
    background: rgba(13, 110, 253, 0.08);
    color: #084298;
}

main {
    /* Ensure main grows to push footer down */
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

footer .container {
    padding-bottom: 0;
    margin-bottom: 0;
}
