/* ==========================================================================
   Programmes — dars-e-nizami.php, english-tafseer.php, urdu-fiqah.php,
   tajweed-fiqh.php (markup helpers in includes/programmes.php).
   Same palette and type as the Faculty, Contact and Our Graduates pages.
   Everything is scoped under .pg so it cannot leak into the shared header,
   footer or the Bootstrap 3 / style-v1.css rules used on the rest of the site.
   ========================================================================== */

.pg {
    --pg-navy: #243a73;
    --pg-navy-deep: #1a2b57;
    --pg-navy-soft: #eef1f8;
    --pg-gold: #faa619;
    --pg-gold-soft: #fbe3b3;
    --pg-gold-wash: #fff6e6;
    --pg-gold-text: #9a5b00;
    --pg-green: #2f6b4f;
    --pg-green-soft: #e8f3ed;
    --pg-ink: #1c2541;
    --pg-text: #3d4458;
    --pg-muted: #586074;
    --pg-line: #e6e3da;
    --pg-cream: #faf8f3;
    --pg-card: #ffffff;
    --pg-radius: 14px;
    --pg-shadow: 0 1px 2px rgba(28, 37, 65, .04), 0 2px 8px rgba(28, 37, 65, .04);
    --pg-shadow-hover: 0 4px 10px rgba(28, 37, 65, .06), 0 14px 32px rgba(28, 37, 65, .08);
    --pg-serif: "Noto Serif", Georgia, "Times New Roman", serif;
    --pg-sans: "Open Sans", "Segoe UI", Arial, sans-serif;

    display: block;
    background: var(--pg-cream);
    color: var(--pg-text);
    font-family: var(--pg-sans);
    font-size: 15px;
    font-weight: 400;
    /* style-v1.css sets body line-height in em, which would inherit as a fixed px value */
    line-height: 1.6;
}

/* style-v1.css paints #content white with no padding, and its id selector outranks .pg */
#content.pg {
    padding-top: 8px;
    background: var(--pg-cream);
}

/* The hero's bottom margin would otherwise show as a white band above the cream page */
.ph {
    margin-bottom: 0;
}

/* Below the overlapping stat card, continue the page's cream instead of the white body */
.ph__stats-wrap {
    background: linear-gradient(180deg, transparent 44px, #faf8f3 44px);
}

.pg *,
.pg *::before,
.pg *::after {
    box-sizing: border-box;
}

.pg [hidden] {
    display: none !important;
}

.pg h1,
.pg h2,
.pg h3,
.pg h4 {
    margin: 0;
    font-family: var(--pg-serif);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none;
    color: var(--pg-ink);
}

.pg p {
    margin: 0;
}

.pg a {
    color: var(--pg-navy);
}

.pg :focus-visible {
    outline: 3px solid var(--pg-gold);
    outline-offset: 2px;
}

.pg-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   Sections, headings, cards
   -------------------------------------------------------------------------- */

.pg-section {
    padding-top: 56px;
    scroll-margin-top: 24px;
}

.pg-section__head {
    margin-bottom: 22px;
}

.pg .pg-heading {
    position: relative;
    padding-left: 16px;
    font-size: clamp(24px, 3vw, 30px);
}

.pg .pg-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: .2em;
    bottom: .2em;
    width: 4px;
    border-radius: 2px;
    background: var(--pg-gold);
}

.pg-section__note {
    max-width: 720px;
    margin-top: 6px !important;
    padding-left: 16px;
    font-size: 15px;
    color: var(--pg-muted);
}

.pg-card {
    padding: 26px;
    background: var(--pg-card);
    border: 1px solid var(--pg-line);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
}

.pg-card--tint {
    background: linear-gradient(180deg, var(--pg-gold-wash) 0, var(--pg-card) 140px);
    border-color: var(--pg-gold-soft);
    border-top: 3px solid var(--pg-gold);
}

.pg .pg-card__title {
    margin-bottom: 16px;
    font-size: 19px;
}

.pg-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--pg-navy);
    color: var(--pg-gold);
    font-size: 19px;
}

.pg-icon--sm {
    width: 38px;
    height: 38px;
    font-size: 15px;
}

.pg-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--pg-navy-soft);
    color: var(--pg-navy);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Intro: about text + side card
   -------------------------------------------------------------------------- */

.pg-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    padding-top: 48px;
}

.pg-intro__text p {
    max-width: 640px;
    margin-top: 14px !important;
    font-size: 16px;
    line-height: 1.75;
}

.pg-intro__text .pg-lead {
    margin-top: 18px !important;
    font-family: var(--pg-serif);
    font-size: clamp(18px, 2vw, 21px);
    line-height: 1.6;
    color: var(--pg-ink);
}

.pg-intro__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.pg-subjects {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pg-subject {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.pg-subject__title {
    font-weight: 700;
    color: var(--pg-ink);
}

.pg-subject__text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--pg-muted);
}

.pg-facts {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.pg-fact {
    padding: 12px 0;
    border-top: 1px dashed var(--pg-line);
}

.pg-fact:first-child {
    padding-top: 0;
    border-top: 0;
}

.pg .pg-fact dt {
    margin-bottom: 1px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--pg-gold-text);
}

.pg .pg-fact dd {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--pg-ink);
}

/* --------------------------------------------------------------------------
   Dars-e-Nizami syllabus: year tabs + panels
   -------------------------------------------------------------------------- */

.pg-years__nav {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.pg .pg-year-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-height: 62px;
    padding: 8px 6px;
    border: 1px solid var(--pg-line);
    border-radius: 12px !important;
    background: var(--pg-card);
    color: var(--pg-ink);
    font: inherit;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}

.pg .pg-year-tab:hover {
    border-color: var(--pg-navy);
}

.pg .pg-year-tab[aria-selected="true"] {
    background: var(--pg-navy);
    border-color: var(--pg-navy);
    color: #fff;
}

.pg-year-tab__n {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pg-muted);
}

.pg-year-tab[aria-selected="true"] .pg-year-tab__n {
    color: var(--pg-gold);
}

.pg-year-tab__name {
    font-family: var(--pg-serif);
    font-size: 16px;
    font-weight: 700;
}

.pg-year {
    padding: 26px;
    background: var(--pg-card);
    border: 1px solid var(--pg-line);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
}

/* Without JavaScript every year is listed one after another */
.pg-year + .pg-year {
    margin-top: 18px;
}

.pg-years--js .pg-year + .pg-year {
    margin-top: 0;
}

.pg-year__head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--pg-line);
}

.pg-year__badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--pg-navy);
    color: var(--pg-gold);
    font-family: var(--pg-serif);
    font-size: 22px;
    font-weight: 700;
}

.pg .pg-year__title {
    font-size: 21px;
}

.pg .pg-year__urdu {
    font-family: "Jameel Noori Nastaleeq", "Noto Nastaliq Urdu", serif;
    font-size: 19px;
    line-height: 1.7;
    color: var(--pg-gold-text);
    text-align: left;
}

.pg-year__count {
    margin-left: auto !important;
    font-size: 13px;
    font-weight: 700;
    color: var(--pg-muted);
    white-space: nowrap;
}

.pg-books {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: pg-book;
}

.pg-books li {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 14px;
    background: var(--pg-cream);
    border: 1px solid var(--pg-line);
    border-radius: 10px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--pg-ink);
    counter-increment: pg-book;
}

.pg-books li::before {
    content: counter(pg-book);
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--pg-navy-soft);
    color: var(--pg-navy);
    font-size: 12px;
    font-weight: 700;
}

.pg-year__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.pg-source {
    margin-top: 12px !important;
    font-size: 13px;
    color: var(--pg-muted);
}

/* --------------------------------------------------------------------------
   Class timings
   -------------------------------------------------------------------------- */

.pg-section__note a {
    font-weight: 600;
}

.pg-campus + .pg-campus {
    margin-top: 28px;
}

.pg-campus__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 12px;
}

.pg .pg-campus__title {
    font-size: 18px;
}

.pg-classes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pg-class {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 18px 20px;
    background: var(--pg-card);
    border: 1px solid var(--pg-line);
    border-left: 3px solid var(--pg-gold);
    border-radius: 12px;
    box-shadow: var(--pg-shadow);
}

.pg-class__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--pg-gold-text);
}

.pg-class__days {
    font-family: var(--pg-serif);
    font-size: 17px;
    font-weight: 700;
    color: var(--pg-ink);
}

.pg-class__time {
    font-size: 14px;
    font-weight: 600;
    color: var(--pg-text);
}

.pg-class__time .fa {
    margin-right: 4px;
    color: var(--pg-muted);
}

.pg .pg-class__wa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: 10px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--pg-green-soft);
    color: var(--pg-green);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.pg .pg-class__wa:hover,
.pg .pg-class__wa:focus {
    background: var(--pg-green);
    color: #fff;
    text-decoration: none;
}

.pg-class__wa .fa {
    font-size: 16px;
}

/* --------------------------------------------------------------------------
   Other programmes
   -------------------------------------------------------------------------- */

.pg-more {
    display: grid;
    /* Four "other programmes" per page: one row on desktop, 2 x 2 on tablets. */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pg .pg-more__card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    padding: 22px;
    background: var(--pg-card);
    border: 1px solid var(--pg-line);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
    color: var(--pg-text);
    text-decoration: none;
    transition: box-shadow .25s, transform .25s, border-color .25s;
}

.pg .pg-more__card:hover,
.pg .pg-more__card:focus {
    border-color: #d8d3c4;
    box-shadow: var(--pg-shadow-hover);
    transform: translateY(-2px);
    text-decoration: none;
}

.pg-more__card .pg-icon {
    margin-bottom: 8px;
}

.pg-more__title {
    font-family: var(--pg-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--pg-ink);
}

.pg-more__title::after {
    content: " ›";
    color: var(--pg-gold-text);
}

.pg-more__text {
    font-size: 14px;
    color: var(--pg-muted);
}

/* --------------------------------------------------------------------------
   Buttons + call to action
   -------------------------------------------------------------------------- */

.pg .pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid var(--pg-navy);
    border-radius: 999px;
    background: var(--pg-navy);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s, border-color .2s, color .2s;
}

.pg .pg-btn:hover,
.pg .pg-btn:focus {
    background: var(--pg-navy-deep);
    border-color: var(--pg-navy-deep);
    color: #fff;
    text-decoration: none;
}

.pg .pg-btn .fa {
    color: var(--pg-gold);
}

.pg .pg-btn--sm {
    min-height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.pg .pg-btn--outline {
    background: transparent;
    color: var(--pg-navy);
}

.pg .pg-btn--outline .fa {
    color: var(--pg-navy);
}

.pg .pg-btn--outline:hover,
.pg .pg-btn--outline:focus {
    background: var(--pg-navy-soft);
    border-color: var(--pg-navy);
    color: var(--pg-navy);
}

.pg .pg-btn--gold {
    background: var(--pg-gold);
    border-color: var(--pg-gold);
    color: var(--pg-ink);
}

.pg .pg-btn--gold:hover,
.pg .pg-btn--gold:focus {
    background: #ffb938;
    border-color: #ffb938;
    color: var(--pg-ink);
}

.pg .pg-btn--ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, .55);
    color: #fff;
}

.pg .pg-btn--ghost:hover,
.pg .pg-btn--ghost:focus {
    background: rgba(255, 255, 255, .1);
    border-color: #fff;
    color: #fff;
}

.pg-cta {
    margin-top: 72px;
    padding: 64px 0;
    color: #fff;
    background-color: var(--pg-navy);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07'%3E%3Crect x='16' y='16' width='40' height='40'/%3E%3Crect x='16' y='16' width='40' height='40' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='8'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(180deg, var(--pg-navy) 0%, var(--pg-navy-deep) 100%);
    background-size: 72px 72px, auto;
    text-align: center;
}

.pg .pg-cta__title {
    margin-bottom: 12px;
    font-size: clamp(24px, 3vw, 34px);
    color: #fff;
}

.pg .pg-cta__text {
    max-width: 560px;
    margin: 0 auto 28px;
    font-size: 16px;
    color: rgba(255, 255, 255, .86);
}

.pg-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
    .pg-intro {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .pg-years__nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .pg-more {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 767px) {
    .pg-section {
        padding-top: 44px;
    }

    .pg-intro {
        padding-top: 36px;
    }

    .pg-card,
    .pg-year {
        padding: 20px 18px;
    }

    .pg-year__head {
        flex-wrap: wrap;
    }

    .pg-year__count {
        margin-left: 68px !important;
        width: 100%;
    }

    .pg-books {
        grid-template-columns: minmax(0, 1fr);
    }

    .pg-cta {
        margin-top: 56px;
        padding: 52px 0;
    }
}

@media (max-width: 480px) {
    .pg-years__nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pg-year__actions .pg-btn,
    .pg-intro__actions .pg-btn {
        flex: 1 1 100%;
    }

    .pg-more {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pg *,
    .pg *::before,
    .pg *::after {
        transition: none !important;
    }

    .pg .pg-more__card:hover,
    .pg .pg-more__card:focus {
        transform: none;
    }
}
