/* ==========================================================================
   Mobile responsiveness fixes
   Loaded after the theme CSS so these rules win. Keeps pages from scrolling
   sideways on phones (no horizontal overflow) and makes embedded media fluid.
   ========================================================================== */

/* Never allow horizontal scrolling on small screens. */
html,
body {
    overflow-x: hidden;
}

/* All images scale down to their container instead of forcing the page wider.
   (Same behaviour as Bootstrap's .img-fluid, applied globally.) */
img {
    max-width: 100%;
    height: auto;
}

/* Media inside editable page content (history, scenes, concourse, footer
   pages, news) stays within the screen even if it was inserted with a fixed
   width/height in the editor. */
.about-us-area img,
.about-us-area iframe,
.about-us-area table,
.single-text img,
.single-text iframe,
.single-text table {
    max-width: 100% !important;
    height: auto;
}

/* Embedded videos / maps and wide tables. */
iframe {
    max-width: 100%;
}

table {
    max-width: 100%;
}

/* Pagination wraps onto multiple lines on narrow screens instead of
   overflowing off the right edge. */
.pagination {
    flex-wrap: wrap;
    justify-content: center;
}

/* Infinite-scroll loading spinner (news, repertoire, archive, program). */
.infinite-loader {
    width: 100%;
    text-align: center;
    margin-top: 1.5rem;
}

.infinite-spinner {
    display: inline-block;
    width: 42px;
    height: 42px;
    border: 4px solid rgba(137, 26, 28, 0.2);
    border-top-color: #891A1C;
    border-radius: 50%;
    animation: infinite-spin 0.8s linear infinite;
}

@keyframes infinite-spin {
    to { transform: rotate(360deg); }
}

/* Footer light/dark theme toggle button. */
.theme-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    border-radius: 22px;
    padding: 7px 18px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.75);
}

.theme-toggle i {
    margin-right: 8px;
}

/* Footer language switcher. */
.footer-lang-switch .lang-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 14px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.footer-lang-switch .lang-link + .lang-link {
    margin-left: 4px;
}

.footer-lang-switch .lang-link:hover {
    color: #fff;
}

.footer-lang-switch .lang-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}
