/* Accessibility helpers for Quranic Hikma public theme */

/* Header top: white on brand green failed WCAG (~3.9:1) — darken bar + solid white text */
.header-top {
    background-color: #0b3f30 !important;
}
.header-top .header-top_list li,
.header-top .header-top_list-two li,
.header-top .header-top_list a,
.header-top .header-top_list-two a,
.header-top .header-top_list-two li .icon {
    color: #ffffff !important;
}

/* Social icons in the empty header-top gap (between Bismillah and site URL) */
.header-top .d-flex.justify-content-between {
    gap: 12px;
}
.header-top_socials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 4px 8px;
}
.header-top_socials a,
.header-top_socials .qh-social-pending {
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 13px;
    margin: 0;
    transition: background .2s ease, transform .2s ease;
}
.header-top_socials a:hover {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff !important;
    transform: translateY(-1px);
}
.header-top_socials .qh-social-pending {
    opacity: 0.55;
    cursor: default;
}
.header-top_socials .qh-x-mark {
    font-family: Inter, Arial, sans-serif;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    display: block;
}
@media (max-width: 991px) {
    .header-top_socials {
        order: 3;
        flex: 1 1 100%;
        justify-content: flex-start;
        padding: 6px 0 2px;
    }
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Newsletter contrast (Lighthouse) */
.newsletter-box,
.newsletter-widget .footer-text,
.newsletter-widget .footer-title {
    color: #f4efe4;
}
.newsletter-box input[type="email"],
.newsletter-box input[type="text"] {
    color: #10261c !important;
    background: #fffdf8 !important;
    border: 1px solid #c9b896;
    caret-color: #10261c;
}
.newsletter-box input::placeholder {
    color: #5d6b62;
    opacity: 1;
}
.newsletter-box button.theme-btn {
    color: #1d1608;
}

/* Keep toggler buttons looking like theme controls */
button.search-box-btn,
button.mobile-nav-toggler {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
}
button.search-box-btn:focus-visible,
button.mobile-nav-toggler:focus-visible,
.newsletter-box button:focus-visible,
.search-popup button:focus-visible,
a:focus-visible {
    outline: 2px solid #c6a15b;
    outline-offset: 3px;
}

ul.footer_list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* About section: Courses, Fee Plans, Register Now — stacked on phones */
.qh-about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px 0 22px;
}
.qh-about-action {
    flex: 1 1 140px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #0b3f30;
    background: #fff;
    color: #0b3f30;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}
.qh-about-action-primary,
.qh-mobile-cta a.qh-about-action-primary {
    background: #0b3f30;
    color: #fff;
    border-color: #0b3f30;
}
.qh-about-action:hover,
.qh-about-action:focus {
    background: #0b3f30;
    color: #fff;
}
@media (max-width: 767px) {
    .qh-about-actions,
    .about-two_text,
    .about-two_learning {
        padding-right: 68px;
    }
    .qh-about-action {
        flex: 1 1 100%;
    }
}

.qh-mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 22px 28px;
}
.qh-mobile-cta a {
    display: block;
    text-align: center;
    padding: 13px 16px;
    border-radius: 8px;
    background: #f3e7c4;
    color: #1d1608;
    font-weight: 700;
}

.footer_socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.footer_socials a,
.footer_socials .qh-social-pending {
    margin: 0;
}
.footer_socials .qh-social-pending {
    width: 52px;
    height: 52px;
    line-height: 52px;
    text-align: center;
    border-radius: 50px;
    display: inline-block;
    color: #fff;
    background: #0b3f30;
}
.footer_socials .qh-x-mark {
    font-family: Inter, Arial, sans-serif;
    font-weight: 700;
    font-size: 15px;
    line-height: 52px;
    display: block;
}

/* Homepage Our Scholars — arched portraits with male/female tabs */
.qh-scholars {
    position: relative;
    padding: 90px 0 70px;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(80, 188, 132, .08), transparent 45%),
        radial-gradient(ellipse at 80% 90%, rgba(198, 161, 91, .08), transparent 40%),
        linear-gradient(180deg, #f7f4ee 0%, #f1eee6 55%, #f7f4ee 100%);
    overflow: hidden;
}
.qh-scholars::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../images/background/pattern-2.png");
    background-size: 420px;
    opacity: .07;
    pointer-events: none;
}
.qh-scholars .auto-container { position: relative; z-index: 1; }
.qh-scholars-head {
    text-align: center;
    margin: 0 auto 28px;
    max-width: 820px;
}
.qh-scholars-badge {
    display: inline-block;
    margin-bottom: 16px;
    padding: 8px 22px 8px 16px;
    background: #d7e9de;
    color: #16352a;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}
.qh-scholars-title {
    margin: 0;
    color: #121a17;
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.25;
    font-weight: 700;
}
.qh-scholars-lead {
    max-width: 640px;
    margin: 12px auto 0;
    color: #5d6b62;
    font-size: 16px;
    line-height: 1.65;
}
.qh-scholars-page {
    padding: 72px 0 88px;
}
.qh-scholars-page-glow {
    position: absolute;
    inset: 8% 10% auto;
    height: 280px;
    background: radial-gradient(ellipse at center, rgba(198, 161, 91, .16), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.qh-scholars-highlights {
    list-style: none;
    margin: 0 auto 40px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    max-width: 960px;
}
.qh-scholars-highlights li {
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(14, 75, 56, .1);
    border-radius: 16px;
    padding: 16px 14px;
    text-align: center;
    box-shadow: 0 10px 24px rgba(16, 38, 28, .04);
}
.qh-scholars-highlights strong {
    display: block;
    color: #0e4b38;
    font-size: 15px;
    margin-bottom: 4px;
}
.qh-scholars-highlights span {
    display: block;
    color: #5d6b62;
    font-size: 13px;
    line-height: 1.4;
}
.qh-scholars-tablist {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 34px;
}
.qh-scholars-tab {
    border: 1px solid rgba(14, 75, 56, .22);
    background: #fff;
    color: #16352a;
    border-radius: 999px;
    padding: 10px 20px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.qh-scholars-tab.is-on,
.qh-scholars-tab:hover {
    background: #0e4b38;
    border-color: #0e4b38;
    color: #fff;
}
.qh-scholars-tab:hover {
    transform: translateY(-1px);
}
.qh-scholars-panel[hidden] { display: none !important; }
.qh-scholars-panel.is-on {
    animation: qh-scholars-fade .35s ease;
}
@keyframes qh-scholars-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.qh-scholar-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px 34px;
}
.qh-scholar-card {
    width: min(230px, 100%);
    text-align: center;
    animation: qh-scholar-rise .55s ease both;
    animation-delay: var(--qh-delay, 0s);
}
@keyframes qh-scholar-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.qh-scholar-frame {
    position: relative;
    margin: 0 auto 16px;
    padding: 8px;
}
.qh-scholar-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px 999px 32px 32px;
    border: 1px solid rgba(14, 75, 56, .14);
    background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
    pointer-events: none;
}
.qh-scholar-arch {
    position: relative;
    width: 100%;
    aspect-ratio: 0.78;
    margin: 0 auto;
    border-radius: 999px 999px 28px 28px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-shadow: 0 18px 36px rgba(16, 38, 28, .12);
    transition: transform .35s ease, box-shadow .35s ease;
}
.qh-scholar-card:hover .qh-scholar-arch {
    transform: translateY(-6px);
    box-shadow: 0 24px 40px rgba(16, 38, 28, .16);
}
.qh-scholar-arch--teal { background: linear-gradient(180deg, #c9e4dc 0%, #9ec9bc 100%); }
.qh-scholar-arch--sand { background: linear-gradient(180deg, #efe2c8 0%, #d8c39a 100%); }
.qh-scholar-arch--sage { background: linear-gradient(180deg, #d7e3d4 0%, #b4c7b0 100%); }
.qh-scholar-arch--stone { background: linear-gradient(180deg, #e4e7e4 0%, #c5cbc5 100%); }
.qh-scholar-arch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform .45s ease;
}
.qh-scholar-card:hover .qh-scholar-arch img {
    transform: scale(1.04);
}
.qh-scholar-initials {
    font-size: 54px;
    font-weight: 700;
    color: rgba(14, 75, 56, .55);
    padding-bottom: 28%;
}
.qh-scholar-name {
    margin: 0 0 4px;
    font-size: 20px;
    color: #10261c;
    font-weight: 700;
}
.qh-scholar-meta {
    margin: 0;
    color: #5a6b62;
    font-size: 14px;
    line-height: 1.45;
}
.qh-scholar-empty {
    text-align: center;
    color: #5a6b62;
    max-width: 560px;
    margin: 18px auto 8px;
    padding: 36px 28px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(14, 75, 56, .1);
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(16, 38, 28, .05);
}
.qh-scholar-empty-mark {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #0e4b38;
    color: #f4efe4;
    font-size: 26px;
    font-weight: 700;
}
.qh-scholar-empty p {
    margin: 0 0 10px;
    font-size: 17px;
    color: #16352a;
    font-weight: 600;
}
.qh-scholar-empty-note {
    font-weight: 400 !important;
    color: #5d6b62 !important;
    font-size: 15px !important;
    line-height: 1.6;
    margin-bottom: 18px !important;
}
.qh-scholars-cta {
    margin: 48px auto 0;
    max-width: 920px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 28px 30px;
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(14, 75, 56, .96), rgba(14, 75, 56, .88)),
        #0e4b38;
    color: #f7f4ee;
    box-shadow: 0 18px 40px rgba(14, 75, 56, .22);
}
.qh-scholars-cta-copy {
    flex: 1 1 280px;
}
.qh-scholars-cta h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: 1.3;
}
.qh-scholars-cta p {
    margin: 0;
    color: rgba(247, 244, 238, .86);
    font-size: 15px;
    line-height: 1.55;
    max-width: 460px;
}
.qh-scholars-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.qh-scholars-cta .btn-style-three {
    background: transparent;
    border: 1px solid rgba(255,255,255,.45);
}
.qh-scholars-cta .btn-style-three .text-one,
.qh-scholars-cta .btn-style-three .text-two {
    color: #fff;
}
.qh-scholars-page .qh-scholars-tablist {
    margin-bottom: 42px;
    padding: 8px;
    background: rgba(255,255,255,.65);
    border-radius: 999px;
    border: 1px solid rgba(14, 75, 56, .08);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.qh-scholars-page .qh-scholar-card {
    width: min(250px, 100%);
}
.qh-scholars-page .qh-scholar-name {
    font-size: 21px;
}
@media (max-width: 991px) {
    .qh-scholars-highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .qh-scholars { padding: 60px 0 48px; }
    .qh-scholars-page { padding: 52px 0 64px; }
    .qh-scholar-card { width: min(180px, 44%); }
    .qh-scholars-page .qh-scholar-card { width: min(200px, 46%); }
    .qh-scholars-highlights {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 28px;
    }
    .qh-scholars-cta {
        padding: 22px 18px;
        text-align: center;
        justify-content: center;
    }
    .qh-scholars-cta p { margin-left: auto; margin-right: auto; }
    .qh-scholars-cta-actions { justify-content: center; }
    .qh-scholars-page .qh-scholars-tablist {
        border-radius: 18px;
        width: 100%;
        justify-content: center;
    }
}

/* About Us welcome photos: any upload is fitted into the designed frame. */
.welcome-two_image {
    overflow: hidden;
    border-radius: 10px;
}
.welcome-two_image > img {
    width: 100% !important;
    height: 460px !important;
    max-height: 70vh;
    object-fit: cover;
    object-position: center 18%;
    display: block;
}
.welcome-two_image-two {
    width: min(220px, 46%);
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.welcome-two_image-two img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}
.welcome-two_ameen {
    width: min(140px, 28%);
    max-height: 80px;
    overflow: hidden;
}
.welcome-two_ameen img {
    width: 100% !important;
    height: auto !important;
    max-height: 80px;
    object-fit: contain;
    display: block;
}
.welcome-two_icon {
    width: min(210px, 42%);
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 50%;
    z-index: 2;
}
.welcome-two_icon img {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center;
    display: block;
}
.welcome-two_thumb {
    width: 170px;
    height: 120px;
}
.welcome-two_thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}
@media (min-width: 480px) {
    .welcome-two_middle-content {
        min-height: 230px;
        padding-right: min(210px, 40%);
    }
}
@media (max-width: 767px) {
    .welcome-two_image > img {
        height: 280px !important;
    }
}
@media (max-width: 479px) {
    .welcome-two_icon {
        width: min(180px, 70%);
        margin-left: auto;
        margin-right: auto;
    }
    .welcome-two_thumb {
        width: 100%;
        height: 200px;
    }
}

/* Blog author initials (homepage cards, blog list, article page) */
.qh-author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0e4b38;
    color: #fff;
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
    flex: 0 0 42px;
    line-height: 1;
}
.news-block_one-author_image .qh-author-avatar,
.news-block_five-author_image .qh-author-avatar {
    width: 100%;
    height: 100%;
    min-width: 40px;
    min-height: 40px;
    margin: 0;
    font-size: 13px;
}
.qh-post-author-name {
    font-weight: 700;
    color: inherit;
}

/* Courses-overview + homepage: equal-height / equal-width course cards */
.courses-two .row,
.qh-home-courses .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.courses-two .course-block_two,
.qh-home-courses .course-block_two {
    display: flex;
    margin-bottom: 24px !important;
}
.courses-two .course-block_two-inner,
.qh-home-courses .course-block_two-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}
.courses-two .course-block_two-image,
.qh-home-courses .course-block_two-image {
    flex: 0 0 auto;
}
.courses-two .course-block_two-image img,
.qh-home-courses .course-block_two-image img {
    width: 100%;
    height: 210px !important;
    object-fit: cover;
    display: block;
}
.courses-two .course-block_two-content,
.qh-home-courses .course-block_two-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 36px 28px 24px !important;
}
.courses-two .course-block_two-heading,
.qh-home-courses .course-block_two-heading {
    flex: 1 1 auto;
    min-height: 2.6em;
    margin: 8px 0 0 !important;
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
}
.courses-two .course-block_two-list,
.qh-home-courses .course-block_two-list {
    margin-top: auto !important;
}
.courses-two .course-block_two-lower,
.qh-home-courses .course-block_two-lower {
    margin-top: 12px;
}
.qh-home-courses {
    padding: 64px 0 56px !important;
}
.qh-home-courses .sec-title-two {
    margin-bottom: 28px !important;
}
.qh-home-courses .sec-title-two_heading {
    font-size: clamp(1.45rem, 2.3vw, 2.05rem) !important;
    line-height: 1.25 !important;
}
@media (max-width: 767px) {
    .courses-two .course-block_two-image img,
    .qh-home-courses .course-block_two-image img {
        height: 180px !important;
    }
    .courses-two .course-block_two-heading,
    .qh-home-courses .course-block_two-heading {
        min-height: 0;
    }
    .qh-home-courses {
        padding: 48px 0 40px !important;
    }
}

/* Homepage courses-four: compact + equal-height cards */
.courses-four {
    padding: 64px 0 56px !important;
}
.courses-four .sec-title-two {
    margin-bottom: 28px !important;
}
.courses-four .sec-title-two_heading {
    font-size: clamp(1.55rem, 2.4vw, 2.15rem) !important;
    line-height: 1.25 !important;
}
.courses-four .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.courses-four .offer-block_two {
    display: flex;
    margin-bottom: 20px !important;
}
.courses-four .offer-block_two-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}
.courses-four .offer-block_two-image img {
    height: 190px !important;
    object-fit: cover;
}
.courses-four .offer-block_two-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 0 0 16px;
}
.courses-four .offer-block_two-list {
    padding: 8px 16px !important;
}
.courses-four .offer-block_two-title {
    flex: 1 1 auto;
    min-height: 4.2em;
    margin: 0;
    padding: 14px 14px 10px !important;
    font-size: 1rem !important;
    line-height: 1.35 !important;
}
.courses-four .offer-block_two-btn {
    margin-top: auto;
    padding: 0 14px;
}
.courses-four .offer-block_two-more {
    margin: 0 !important;
    padding: 12px 10px !important;
}
@media (max-width: 767px) {
    .courses-four {
        padding: 48px 0 40px !important;
    }
    .courses-four .offer-block_two-image img {
        height: 170px !important;
    }
    .courses-four .offer-block_two-title {
        min-height: 0;
    }
}
