/* ================================================================
   150.dentistry.utoronto.ca — Static Archive Overrides
   Patches JS-dependent plugins to work as static HTML.

   KEY INSIGHT: The .extllightbox div is the ENTIRE card container.
   It has background-image AND contains .wpex-timeline-label as a
   child. We use padding-top to create image space, letting the
   card content flow naturally below without clipping.
   ================================================================ */

/* ----------------------------------------------------------------
   Foundation
   ---------------------------------------------------------------- */
html {
    scroll-behavior: smooth !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
::-webkit-scrollbar-thumb { background: #00a189; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #00214f; }
::selection { background: rgba(0, 161, 137, 0.25); color: inherit; }

/* ----------------------------------------------------------------
   Navigation — center text inside pill buttons
   Yellow Pencil sets asymmetric padding (left:39px, right:21px)
   which throws text off-center. We zero it out and let flexbox
   handle centering.
   ---------------------------------------------------------------- */
#primary-site-navigation-desktop .menu-item .menu-link {
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    transition: all 0.3s ease !important;
}

/* Also override the Yellow Pencil rule on .menu-item a */
#primary-site-navigation-desktop .menu-item a {
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
}

/* Hover fill for buttons 1 (teal) and 6 (green) — missing from Yellow Pencil */
#primary-site-navigation-desktop .menu-item:nth-child(1) .menu-link:hover {
    background-color: #107fa3 !important;
    color: #ffffff !important;
    border-color: #107fa3 !important;
}

#primary-site-navigation-desktop .menu-item:nth-child(6) .menu-link:hover {
    background-color: #0CA189 !important;
    color: #ffffff !important;
    border-color: #0CA189 !important;
}

/* ----------------------------------------------------------------
   Header — subtle frosted glass
   ---------------------------------------------------------------- */
#ast-desktop-header > div > div {
    backdrop-filter: blur(10px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(150%) !important;
    background-color: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06) !important;
}

/* ----------------------------------------------------------------
   HORIZONTAL TIMELINE — CSS fallback (before JS rebuild kicks in)
   The timeline-rebuild.js script replaces the broken slider with
   clean HTML cards. These rules just ensure visibility while the
   JS loads or if JS is disabled.
   ---------------------------------------------------------------- */

/* Tighten spacing between acknowledgements text and timeline */
.den-on-track {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.den-on-track + .wp-block-spacer,
.wpex.horizontal-timeline {
    margin-top: 0 !important;
}

/* Kill the 15px spacer div above timeline */
.wpex.horizontal-timeline ~ .wp-block-spacer,
.wp-block-spacer + .wpex.horizontal-timeline {
    margin-top: 0 !important;
}

/* The spacer before the timeline */
.wp-block-columns:has(.den-on-track) {
    margin-bottom: 4px !important;
}

/* Hide the loading spinner */
.wpex.ld-screen .wpextl-loadcont,
.wpex.ld-screen > .wpextl-loadcont {
    display: none !important;
    opacity: 0 !important;
}

/* Unlock the loading-screen container */
.wpex.ld-screen,
.wpex.ld-screen.at-childdiv {
    max-height: none !important;
    overflow: visible !important;
}

.wpex.ld-screen > *,
.wpex.ld-screen.at-childdiv > * {
    opacity: 1 !important;
}

/* ----------------------------------------------------------------
   INSTAGRAM FEED — Static fallback
   Show images that were swapped from data-full-res
   ---------------------------------------------------------------- */

/* Make feed items visible */
#sbi_images .sbi_item {
    opacity: 1 !important;
    visibility: visible !important;
}

#sbi_images .sbi_item .sbi_photo_wrap {
    opacity: 1 !important;
}

#sbi_images .sbi_item img {
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
}

/* Hide load more since there's no backend */
.sbi_load_btn,
#sbi_load .sbi_load_btn {
    display: none !important;
}

/* ----------------------------------------------------------------
   METASLIDER — Ensure visibility
   ---------------------------------------------------------------- */
.metaslider .flexslider,
.metaslider .slides > li {
    display: block !important;
    opacity: 1 !important;
}

/* ----------------------------------------------------------------
   LETTERS OF RECOGNITION — handled by letters-rebuild.js
   The JS replaces the broken FlexSlider carousel with a clean
   centered CSS-columns masonry grid. These rules are fallback only.
   ---------------------------------------------------------------- */

/* Break out of WordPress is-layout-constrained and center grid via flexbox */
#metaslider-id-923 {
    max-width: none !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
}

#metaslider-id-923 > .lr-grid {
    max-width: 900px !important;
    width: 100% !important;
}

/* Hide FlexSlider chrome */
#metaslider-id-923 .flex-direction-nav,
#metaslider-id-923 .flex-control-nav,
#metaslider-id-923 .flex-pauseplay {
    display: none !important;
}

/* ----------------------------------------------------------------
   "The Next 150 / Support the Next 150" — vertical alignment
   The <p> has 50px text with an inline <span> button. Flexbox
   keeps the button vertically centered with the heading text.
   ---------------------------------------------------------------- */
.den-next-150-text {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
}

/* ----------------------------------------------------------------
   Buttons — softer edges
   ---------------------------------------------------------------- */
.den-next-150-button {
    border-radius: 24px !important;
    transition: all 0.3s ease !important;
}

.den-next-150-button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 33, 79, 0.2) !important;
}

/* ----------------------------------------------------------------
   Underline effect — rounded
   ---------------------------------------------------------------- */
.den-underline-effect::after {
    border-radius: 3px !important;
}

/* ----------------------------------------------------------------
   Scroll-to-top
   ---------------------------------------------------------------- */
#ast-scroll-top {
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

/* ----------------------------------------------------------------
   REMOVE INSTAGRAM GALLERY — empty, non-functional
   Keep Letters of Recognition below it.
   ---------------------------------------------------------------- */
.den-gallery-pre {
    display: none !important;
}

/* Hide the Instagram feed container but not the Letters slider */
.den-gallery-main .sb_instagram,
.den-gallery-main #sb_instagram,
.den-gallery-main [id^="sbi"] {
    display: none !important;
}

/* ----------------------------------------------------------------
   HIDE DONATE SECTION — broken background image URL
   ---------------------------------------------------------------- */
.dent-jacket {
    display: none !important;
}

/* ----------------------------------------------------------------
   LETTERS OF RECOGNITION — force teal background through ALL layers
   White comes from: .flexslider base (bg:#fff, border:4px solid #fff),
   Clarity theme .slides li (bg-color:#fff), and flex-viewport.
   Use #id selectors to beat plugin specificity.
   ---------------------------------------------------------------- */
.den-gallery-main {
    background-color: #0ca189 !important;
    padding: 20px 40px !important;
}

#metaslider-id-923,
#metaslider_container_923,
#metaslider_923,
#metaslider_923.flexslider,
.den-gallery-main .metaslider,
.den-gallery-main .flexslider,
.den-gallery-main .flex-viewport {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Kill white bg + spacing on individual slide cards (Clarity theme) */
#metaslider_923 .slides li,
.ms-theme-clarity .flexslider .slides li,
#metaslider_923 .slides > li {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    margin-top: 0 !important;
    padding: 0 !important;
}

/* Blanket: kill ALL borders inside the Letters section */
.den-gallery-main *,
#metaslider-id-923 *,
#metaslider-id-923 .flexslider {
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ----------------------------------------------------------------
   FOOTER — vertically center the logo
   ---------------------------------------------------------------- */
.den-footer-final.is-layout-flex {
    align-items: center !important;
}

.den-footer-final > .wp-block-column {
    align-self: center !important;
}

/* ----------------------------------------------------------------
   CLASS REUNIONS — push content to top of column
   ---------------------------------------------------------------- */
.den-150-events .wp-block-column {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

.den-150-events .wp-block-column > div:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ----------------------------------------------------------------
   Lightbox — branded backdrop + description panel
   ---------------------------------------------------------------- */
.glightbox-container .goverlay {
    background: rgba(0, 32, 78, 0.85) !important;
}

.glightbox-container .gdesc-inner {
    padding: 20px !important;
}

.glightbox-container .gslide-description {
    background: #01204f !important;
}

.glightbox-container .gdesc-inner h3,
.glightbox-container .gdesc-inner .lb-title {
    color: #ffffff !important;
    font-size: 20px !important;
    margin-bottom: 12px !important;
}

.glightbox-container .gdesc-inner p {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
}

/* ----------------------------------------------------------------
   Print
   ---------------------------------------------------------------- */
@media print {
    #ast-desktop-header > div > div,
    .sffm-floatmenu-wrapper,
    #ast-scroll-top,
    #150-scrolling { display: none !important; }
    body { margin-top: 0 !important; }
}

/* Timeline responsive handled by timeline-rebuild.js */
