/* =========================================================================
   MODERN FACELIFT - SLEEK DARK MODE OVERRIDE
   ========================================================================= */

/* GLOBAL DARK THEME */
body, html, .qt-main, .qt-parentcontainer {
    background-color: #0d0d0f !important;
    color: #e0e0e0 !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
}

p, span, li, a, div, td, th, blockquote, label {
    color: #e0e0e0 !important;
}

a:hover {
    color: #dd0e34 !important;
    text-decoration: none;
}

/* NAVIGATION BAR - GLASSMORPHISM */
.qt-menubar, .qt-menubar-top {
    background: rgba(13, 13, 15, 0.75) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

nav.qt-menubar ul.qt-desktopmenu > li > a {
    color: #ffffff !important;
    transition: all 0.3s ease;
}

nav.qt-menubar ul.qt-desktopmenu > li > a:hover {
    color: #dd0e34 !important;
    background: transparent !important;
}

/* MOBILE MENU */
#qt-mobile-menu, .side-nav {
    background-color: #121215 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}
#qt-mobile-menu li a {
    color: #e0e0e0 !important;
}
#qt-mobile-menu li a:hover {
    color: #dd0e34 !important;
    background-color: rgba(221, 14, 52, 0.1) !important;
}

/* CARDS & SECTIONS */
.qt-card, .qt-section-booking, .qt-item, .qt-part-archive-item, .qt-section {
    background-color: #2a2a35 !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qt-card:hover, .qt-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6) !important;
}

/* BUTTONS */
.qt-btn, .btn-primary, .button-playlistswitch {
    border-radius: 12px !important;
    background-color: #dd0e34 !important;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    border: none !important;
    box-shadow: 0 8px 24px rgba(221, 14, 52, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.qt-btn:hover, .btn-primary:hover, .button-playlistswitch:hover {
    background-color: #ff1c45 !important;
    box-shadow: 0 12px 28px rgba(221, 14, 52, 0.6) !important;
    transform: translateY(-2px);
}

.qt-btn-secondary {
    background-color: #2a2a30 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.qt-btn-secondary:hover {
    background-color: #383840 !important;
}

/* FORMS & INPUTS */
input[type=text], input[type=password], input[type=email], input[type=url], input[type=time], input[type=date], input[type=datetime-local], input[type=tel], input[type=number], input[type=search], textarea.materialize-textarea {
    border-bottom: 2px solid #dd0e34 !important;
    color: #ffffff !important;
}

input[type=text]:focus, input[type=email]:focus, textarea.materialize-textarea:focus {
    border-bottom: 2px solid #ff1c45 !important;
    box-shadow: 0 1px 0 0 #ff1c45 !important;
}

label {
    color: #a0a0a0 !important;
}

/* FOOTER */
.qt-footer, .qt-footerwidgets {
    background-color: #0a0a0c !important;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.qt-footer h5 span {
    color: #dd0e34 !important;
}

/* IMAGES & MEDIA */
img {
    border-radius: 8px;
}

/* MISC TWEAKS */
hr {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.qt-pageheader {
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}

.qt-header-bg img {
    border-radius: 0 !important;
    opacity: 0.6; /* Darken header images */
}

/* TABS */
.tabs {
    background-color: transparent !important;
}
.tabs .tab a {
    color: #a0a0a0 !important;
    font-weight: 600;
}
.tabs .tab a:hover, .tabs .tab a.active {
    color: #ffffff !important;
}
.tabs .tab a:focus, .tabs .tab a.active:focus {
    background-color: transparent !important;
}
.tabs .indicator {
    background-color: #dd0e34 !important;
}

/* CONTACTS OVERRIDE */
#contacts {
    background-color: #ffffff !important;
    padding: 24px;
    border-radius: 12px;
}
#contacts h3, #contacts p, #contacts span {
    color: #000000 !important;
}
#contacts i {
    color: #dd0e34 !important;
}

/* =========================================================================
   MOBILE RESPONSIVE FIXES
   ========================================================================= */

/* FIX 1: Banking details - ensure all text (including account number) is
   visible on white card background (dark theme global rule was overriding) */
#booking p, #booking strong, #booking span, #booking label {
    color: #000000 !important;
}

/* FIX 2: Tabs / tooltip items - reduce font sizes on mobile so tab labels
   and content titles are fully visible and not cramped */
@media only screen and (max-width: 600px) {

    /* Tab navigation labels inside the contacts/booking card */
    #booking .tabs .tab h5,
    #booking .tabs .tab a,
    .qt-booking-form .tabs .tab h5,
    .qt-booking-form .tabs .tab a {
        font-size: 0.7rem !important;
        letter-spacing: 0 !important;
        padding: 0 4px !important;
        white-space: normal !important;
        line-height: 1.2 !important;
    }

    .qt-booking-form .tabs .tab {
        padding: 0 !important;
    }

    /* Reduce h3 / h5 title sizes inside cards on mobile */
    #booking h3,
    .qt-section h3,
    .qt-card h3 {
        font-size: 1.2rem !important;
    }

    #booking h5,
    .qt-section h5,
    .qt-card h5 {
        font-size: 0.85rem !important;
    }

    /* General flow-text reduction on mobile */
    .flow-text {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    /* Banking details paragraph */
    #booking p {
        font-size: 0.88rem !important;
        line-height: 1.6 !important;
    }

    /* FIX 4: Donate page - "What would you like to donate?" textarea placeholder
       and "Organization (Optional)" label/input reduced on mobile */
    #donation_type,
    #donation_type::placeholder {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
    }

    label[for="donation_type"] {
        font-size: 0.75rem !important;
    }

    #organization,
    #organization::placeholder {
        font-size: 0.78rem !important;
    }

    /* Label for Organization (Optional) - targets the sibling label */
    #organization ~ label,
    .input-field:has(#organization) label {
        font-size: 0.75rem !important;
    }
}

/* FIX 3: Mobile side-nav menu - "JHB Service Providers" and "Contacts"
   were cramped; allow wrapping and improve spacing */
#qt-mobile-menu .qt-side-nav li a {
    white-space: normal !important;
    word-break: break-word !important;
    padding: 10px 16px !important;
    line-height: 1.3 !important;
    display: block !important;
    font-size: 0.9rem !important;
}

#qt-mobile-menu .qt-side-nav li {
    min-height: auto !important;
    height: auto !important;
}

/* Slightly smaller font in side-nav to ensure long items fit */
@media only screen and (max-width: 480px) {
    #qt-mobile-menu .qt-side-nav li a {
        font-size: 0.85rem !important;
        padding: 8px 14px !important;
    }
}

/* FIX 5: Shows schedule - days of the week headings smaller on mobile */
@media only screen and (max-width: 600px) {
    /* Targets Monday-Wednesday / Thursday / Friday / Saturday / Sunday labels */
    .qt-content-primary-light .qt-container > h5.qt-caption-small,
    .qt-content-primary-light .qt-container > h5.qt-caption-small span {
        font-size: 0.72rem !important;
        letter-spacing: 0.5px !important;
        line-height: 1.3 !important;
    }
}

/* FIX 6: shows.html schedule tabs - show abbreviations on mobile, full text on desktop */

/* Default: show full text, hide abbreviation */
.tab-abbr { display: none; }
.tab-full { display: inline; }

@media only screen and (max-width: 600px) {
    /* Switch to abbreviated text on mobile */
    .tab-abbr { display: inline !important; }
    .tab-full { display: none !important; }

    /* Shrink the tab links themselves */
    .qt-show-schedule .tabs .tab a {
        font-size: 0.7rem !important;
        padding: 0 6px !important;
        letter-spacing: 0 !important;
    }

    /* Shrink the .qt-day spans inside show schedule cards (e.g. "Tuesday & Thursday") */
    .qt-day.qt-capfont {
        font-size: 0.65rem !important;
        letter-spacing: 0 !important;
    }
}

/* FIX 7: Facebook feed iframe - responsive on mobile */
.fb-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.fb-page-container iframe {
    border: none;
    overflow: hidden;
    max-width: 500px;
    width: 100% !important;
    height: 800px;
}

@media only screen and (max-width: 600px) {
    .fb-page-container iframe {
        max-width: 100% !important;
        width: 100% !important;
        height: 650px;
    }

    .fb-page-container {
        padding: 0 8px;
    }
}

/* FIX 8: News page social media banner header */
.news-social-header {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: block;
}

.news-social-banner-img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

.news-social-title-bar {
    background: rgba(0, 0, 0, 0.75);
    padding: 18px 24px;
    text-align: center;
}

.news-social-title {
    color: #ffffff !important;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0 !important;
    text-transform: uppercase;
}

@media only screen and (max-width: 600px) {
    .news-social-banner-img {
        max-height: 180px;
    }
    .news-social-title {
        font-size: 1.1rem !important;
        letter-spacing: 0.5px;
    }
    .news-social-title-bar {
        padding: 12px 16px;
    }
}
