/* ==========================================================================
   QLessons — Shared Design System for internal (non-home) pages.
   Reuses the --ql-* tokens defined in ql-home.css (loaded first) without
   touching that file, so the approved Home Page is never at risk of being
   affected by internal-page redesign work. Every rule here is scoped under
   a ql-page-*/ql-auth-*/ql-* component class that only appears on the
   pages that opt into it - nothing here targets bare wm-* selectors or
   unscoped tags, so Default.aspx (Home) is untouched by this file.
   ========================================================================== */

/* ---------------- Page header (breadcrumb hero) ---------------- */
/* Compact, cream-on-cream hero (not a bold burgundy banner): the title
   itself carries the brand color, with two small soft accent blobs for
   depth. Kept short so page content starts quickly - no large empty
   panel above the fold. */

.ql-page-hero {
    background:
        radial-gradient(circle at 8% 20%, rgba(122, 31, 61, 0.06), transparent 55%),
        radial-gradient(circle at 92% 85%, rgba(201, 143, 160, 0.12), transparent 50%),
        var(--ql-bg);
    padding: 28px 0 24px;
    margin-bottom: 28px;
    position: relative;
    border-bottom: 1px solid var(--ql-border);
}

.ql-page-hero .container {
    position: relative;
    z-index: 1;
}

.ql-page-hero h1 {
    color: var(--ql-primary);
    font-family: var(--ql-font-display);
    font-weight: 800;
    font-size: clamp(1.35rem, 1rem + 1.2vw, 1.9rem);
    margin: 0 0 6px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.ql-page-hero h1::before,
.ql-page-hero h1::after {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--ql-secondary);
    flex: 0 0 auto;
}

.ql-page-hero p {
    color: var(--ql-text-muted);
    margin: 0 0 10px;
    font-family: var(--ql-font-body);
}

.ql-page-hero .ql-breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-family: var(--ql-font-body);
    font-size: 0.85rem;
}

.ql-page-hero .ql-breadcrumb li {
    color: var(--ql-text-muted);
}

.ql-page-hero .ql-breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-inline-start: 8px;
    color: var(--ql-border);
}

.ql-page-hero .ql-breadcrumb a {
    color: var(--ql-primary);
    text-decoration: none;
    font-weight: 600;
}

.ql-page-hero .ql-breadcrumb a:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .ql-page-hero {
        padding: 20px 0 18px;
    }
}

/* ---------------- Generic content section wrapper ---------------- */

/* padding-top: .ql-page-hero (which would otherwise supply the gap above
   this section) isn't actually used on any page, so this had zero space
   between the header and the content - login/register cards, terms/privacy
   text, etc. all rendered flush against the nav bar. */
.ql-page-section {
    padding: 40px 0 64px;
}

/* ---------------- Card ---------------- */

.ql-card {
    background: var(--ql-surface);
    border-radius: var(--ql-radius);
    box-shadow: var(--ql-shadow-sm);
    padding: 32px;
    transition: box-shadow var(--ql-transition);
}

@media (max-width: 767px) {
    .ql-card {
        padding: 22px;
    }
}

/* ---------------- Auth (login / register) card ---------------- */

.ql-auth-wrap {
    display: flex;
    justify-content: center;
}

.ql-auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--ql-surface);
    border-radius: var(--ql-radius);
    box-shadow: var(--ql-shadow-md);
    padding: 40px 36px;
}

@media (max-width: 767px) {
    .ql-auth-card {
        padding: 28px 22px;
    }
}

.ql-auth-card h2 {
    text-align: center;
    font-family: var(--ql-font-display);
    font-weight: 800;
    color: var(--ql-primary);
    font-size: 1.6rem;
    margin: 0 0 26px;
}

.ql-field {
    margin-bottom: 18px;
}

.ql-field label {
    display: block;
    font-family: var(--ql-font-body);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ql-text);
    margin-bottom: 6px;
}

/* Covers both asp:TextBox-rendered <input> and raw HtmlControl <input>/
   <select>/<textarea> - the pages use a mix of both, and neither needs a
   markup change to pick this up since it targets tag + context, not IDs. */
.ql-field input[type="text"],
.ql-field input[type="password"],
.ql-field input[type="email"],
.ql-field input[type="tel"],
.ql-field input[type="number"],
.ql-field input[type="date"],
.ql-field select,
.ql-field textarea {
    width: 100% !important;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--ql-border);
    border-radius: var(--ql-radius-sm);
    background: var(--ql-bg);
    color: var(--ql-text);
    font-family: var(--ql-font-body);
    font-size: 0.95rem;
    transition: border-color var(--ql-transition), box-shadow var(--ql-transition);
}

.ql-field textarea {
    height: auto;
    min-height: 110px;
    padding: 12px 16px;
    resize: vertical;
}

.ql-field input:focus,
.ql-field select:focus,
.ql-field textarea:focus {
    outline: none;
    border-color: var(--ql-primary);
    box-shadow: 0 0 0 3px rgba(122, 31, 61, 0.12);
    background: var(--ql-surface);
}

.ql-field-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -8px 0 18px;
    font-family: var(--ql-font-body);
    font-size: 0.88rem;
    color: var(--ql-text-muted);
}

.ql-field-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ql-primary);
}

.ql-field-check label {
    cursor: pointer;
    margin: 0;
}

.ql-file-upload {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px dashed var(--ql-border);
    border-radius: var(--ql-radius-sm);
    background: var(--ql-bg);
    font-family: var(--ql-font-body);
    font-size: 0.88rem;
}

/* ---------------- Buttons ---------------- */

.ql-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--ql-font-body);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--ql-radius-sm);
    border: 1px solid transparent;
    padding: 0 22px;
    height: 46px;
    cursor: pointer;
    transition: transform var(--ql-transition), box-shadow var(--ql-transition), background var(--ql-transition), color var(--ql-transition);
    text-decoration: none;
}

.ql-btn-primary {
    background: var(--ql-primary);
    color: #fff !important;
    box-shadow: var(--ql-shadow-sm);
}

.ql-btn-primary:hover {
    background: var(--ql-primary-dark);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: var(--ql-shadow-md);
    text-decoration: none;
}

.ql-btn-block {
    width: 100%;
}

.ql-btn-link {
    background: none;
    border: none;
    color: var(--ql-primary) !important;
    font-weight: 700;
    padding: 0;
    height: auto;
}

.ql-btn-link:hover {
    color: var(--ql-primary-dark) !important;
    text-decoration: underline;
}

.ql-auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.ql-auth-foot {
    text-align: center;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--ql-border);
    font-family: var(--ql-font-body);
    font-size: 0.92rem;
    color: var(--ql-text-muted);
}

/* ---------------- Alerts ---------------- */

.ql-alert {
    border-radius: var(--ql-radius-sm);
    padding: 12px 16px;
    font-family: var(--ql-font-body);
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.ql-alert p {
    margin: 0;
}

.ql-alert-error {
    background: rgba(178, 34, 52, 0.1);
    color: #8a1f2e;
    border: 1px solid rgba(178, 34, 52, 0.25);
}

.ql-alert-success {
    background: rgba(43, 138, 62, 0.1);
    color: #1f6b31;
    border: 1px solid rgba(43, 138, 62, 0.25);
}

/* ---------------- About-us style content panel ---------------- */
/* A plain photo + title + body layout for single-record "page content"
   tables (PagesData-style). Replaces the legacy wm-album-medium-wrap/
   wm-album-medium-text classes, which assume white text over a dark photo
   overlay - unreadable once placed on the light ql-card surface. */

.ql-about-card {
    padding: 32px;
    line-height: 1.8;
}

.ql-about-photo img {
    width: 100%;
    border-radius: var(--ql-radius-sm);
    box-shadow: var(--ql-shadow-sm);
}

.ql-about-title {
    font-family: var(--ql-font-display);
    font-weight: 800;
    color: var(--ql-primary);
    font-size: 1.5rem;
    margin: 0 0 14px;
}

.ql-about-text {
    color: var(--ql-text);
    font-family: var(--ql-font-body);
    font-size: 1rem;
    margin: 0;
}

@media (max-width: 767px) {
    .ql-about-card {
        padding: 20px;
    }

    .ql-about-photo {
        margin-bottom: 18px;
    }
}

/* ---------------- Sticky footer (short-content pages) ---------------- */
/* .wm-main-wrapper already wraps header + page content + footer as direct
   children on every page (Home included). Making it a column flex
   container doesn't change how those block-level children stack - it just
   lets the footer's margin-top:auto absorb any leftover viewport height on
   pages with little content, instead of leaving a large gap below a
   footer that's already followed the natural content flow. Home already
   has enough content to reach the bottom on its own, so this is a no-op
   there and only helps short pages (e.g. Certificate, empty placeholders). */
html, body {
    height: 100%;
}

.wm-main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wm-main-wrapper > footer.ql-footer {
    margin-top: auto;
}

/* ---------------- Site-wide scroll-reveal ---------------- */
/* Applied by ql-reveal.js (IntersectionObserver, progressive enhancement -
   if JS or IO is unavailable, elements are simply never given
   .ql-reveal-pending and stay visible). Deliberately not a default hidden
   state in CSS alone, so content can never get stuck invisible. */
.ql-reveal-pending {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.ql-reveal-pending.ql-reveal-in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .ql-reveal-pending {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------------- Listing pagination ---------------- */
/* The theme's own .wm-pagination (gray #7c7c7c borders/text) was designed to
   sit over a dark banner photo - on these listing pages it sits on the
   light ql-page-section background instead and nearly disappears. Restyled
   as branded pill buttons; scoped to these two wm-* classes specifically
   (confirmed unused on Default.aspx/Home) rather than left unreadable. */
.wm-pagination-wrap {
    border-top: 1px solid var(--ql-border);
    padding-top: 32px;
    margin: 24px 0 16px;
}

/* The "..." li has no <a> inside it, so this base rule (not just the a's
   own styling below) is what makes it line up with the pill buttons. */
.wm-pagination li {
    margin: 0 6px;
    display: inline-flex;
    align-items: center;
    height: 40px;
    color: #8a8a8a;
    font-weight: 700;
}

.wm-pagination li a {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--ql-border);
    border-radius: 999px;
    background: var(--ql-surface);
    color: var(--ql-primary-dark);
    font-family: var(--ql-font-body);
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ql-shadow-sm);
    transition: transform var(--ql-transition), box-shadow var(--ql-transition), background var(--ql-transition), color var(--ql-transition), border-color var(--ql-transition);
}

.wm-pagination li a:hover {
    background: var(--ql-primary);
    border-color: var(--ql-primary);
    color: #fff;
    transform: translateY(-3px) scale(1);
    box-shadow: var(--ql-shadow-md);
}

.wm-pagination li.active a {
    background: linear-gradient(135deg, var(--ql-primary), var(--ql-primary-dark));
    border-color: var(--ql-primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(122, 31, 61, 0.35);
}

.wm-pagination li:last-child a {
    background: var(--ql-primary);
    border-color: var(--ql-primary);
    color: #fff;
}

.wm-pagination li:last-child a:hover {
    background: var(--ql-primary-dark);
    border-color: var(--ql-primary-dark);
}

.wm-pagination li:last-child a.ql-pager-disabled,
.wm-pagination li:last-child a.ql-pager-disabled:hover {
    background: var(--ql-border);
    border-color: var(--ql-border);
    color: #fff;
    cursor: default;
    transform: none;
    box-shadow: none;
}
