/* =========================================================
   Quetta College of Dentistry mini-site (page-qcd.php)
   Colours come from WP Admin > QCD Site (--qcd, --qcd-gold).
   ========================================================= */
.qcd-site { --qcd-dark: color-mix(in srgb, var(--qcd) 55%, #021a0d); --qcd-soft: color-mix(in srgb, var(--qcd) 7%, #fff); background: #fff; }
.qcd-site .reveal { transition-duration: .8s; }

/* Top bar */
.qcd-topbar { background: var(--qcd-dark); color: rgba(255,255,255,.85); font-size: .84rem; padding: 8px 0; }
.qcd-topbar a { color: rgba(255,255,255,.85); display: inline-flex; align-items: center; gap: 6px; }
.qcd-topbar a:hover { color: var(--qcd-gold); }
.qcd-topbar-contact { display: flex; gap: 22px; flex-wrap: wrap; }
.qcd-parent-link { font-weight: 600; }

/* Header */
.qcd-header { position: sticky; top: 0; z-index: 1030; background: rgba(255,255,255,.97); border-bottom: 1px solid rgba(0,0,0,.06); transition: box-shadow .3s; }
.admin-bar .qcd-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .qcd-header { top: 0; } }
.qcd-header.scrolled { box-shadow: 0 8px 28px rgba(0, 40, 20, .1); }
.qcd-header-inner { display: flex; align-items: center; gap: 20px; min-height: 80px; }
.qcd-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); margin-right: auto; min-width: 0; }
.qcd-brand img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--qcd-gold); }
.qcd-brand strong { display: block; font-family: var(--font-head); font-size: 1.12rem; color: var(--qcd); line-height: 1.2; }
.qcd-brand small { display: block; font-size: .76rem; color: var(--muted); letter-spacing: .02em; }
.qcd-nav { display: flex; align-items: center; gap: 4px; }
.qcd-nav a { padding: 9px 14px; border-radius: 10px; font-weight: 500; font-size: .93rem; white-space: nowrap; color: var(--ink); transition: background .25s, color .25s; }
.qcd-nav a:hover, .qcd-nav a.active { background: var(--qcd-soft); color: var(--qcd); }
.qcd-nav .qcd-nav-cta { margin-left: 8px; background: var(--qcd); color: #fff; font-weight: 600; }
.qcd-nav .qcd-nav-cta:hover { background: var(--qcd-dark); color: #fff; }
.qcd-toggler { display: none; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: #fff; flex-direction: column; justify-content: center; gap: 5px; padding: 0 12px; }
.qcd-toggler span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
@media (min-width: 1200px) and (max-width: 1399px) { .qcd-nav { gap: 2px; } .qcd-nav a { padding: 9px 10px; font-size: .9rem; } }
@media (max-width: 1199px) {
    .qcd-toggler { display: inline-flex; }
    .qcd-nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 18px; background: #fff; box-shadow: 0 18px 30px rgba(0,0,0,.08); display: none; }
    .qcd-nav.open { display: flex; }
    .qcd-nav a { padding: 12px 14px; }
    .qcd-nav .qcd-nav-cta { margin: 6px 0 0; text-align: center; justify-content: center; }
}
@media (max-width: 575px) { .qcd-brand strong { font-size: .98rem; } .qcd-brand small { font-size: .7rem; } .qcd-brand img { width: 48px; height: 48px; } .qcd-header-inner { min-height: 70px; } }

/* Hero */
.qcd-hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: 110px 0 120px; background: radial-gradient(ellipse at 80% 20%, color-mix(in srgb, var(--qcd) 85%, #3bd17f) 0%, transparent 55%), linear-gradient(135deg, var(--qcd-dark) 0%, var(--qcd) 60%, color-mix(in srgb, var(--qcd) 80%, #000) 100%); }
.qcd-hero.has-photo { background: var(--qcd-dark); }
.qcd-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .35; }
.qcd-hero-pattern { position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.09) 1.2px, transparent 1.2px); background-size: 24px 24px; mask-image: linear-gradient(90deg, #000, transparent 75%); }
.qcd-hero::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -1px; height: 90px; background: #fff; clip-path: ellipse(60% 100% at 50% 100%); }
.qcd-hero-inner { display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px; align-items: center; }
.qcd-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--qcd-gold); margin-bottom: 14px; }
.qcd-kicker::before { content: ""; width: 34px; height: 2px; background: var(--qcd-gold); }
.qcd-hero h1 { color: #fff; font-size: clamp(2.2rem, 5.4vw, 4rem); font-weight: 700; line-height: 1.08; margin: 0 0 30px; text-shadow: 0 6px 30px rgba(0,0,0,.25); }
.qcd-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.qcd-btn-gold { background: var(--qcd-gold); color: #1f1704; font-weight: 600; border: 0; border-radius: 12px; display: inline-flex; align-items: center; gap: 8px; }
.qcd-btn-gold:hover { background: #fff; color: var(--qcd); }
.qcd-btn-ghost { color: #fff; border: 2px solid rgba(255,255,255,.6); border-radius: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.qcd-btn-ghost:hover { background: #fff; color: var(--qcd); border-color: #fff; }
.qcd-hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 34px 0 0; }
.qcd-hero-facts a { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.9); font-size: .9rem; }
.qcd-hero-facts a:hover { background: rgba(255,255,255,.2); color: #fff; }
.qcd-hero-facts strong { font-family: var(--font-head); font-size: 1.1rem; color: var(--qcd-gold); }
.qcd-hero-seal { position: relative; justify-self: center; width: min(340px, 80vw); aspect-ratio: 1; }
.qcd-hero-seal img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 10px rgba(255,255,255,.12), 0 30px 70px rgba(0,0,0,.35); }
.qcd-seal-ring { position: absolute; inset: -26px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--qcd-gold) 70%, transparent); animation: qcdSpin 40s linear infinite; }
@keyframes qcdSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .qcd-seal-ring { animation: none; } }
@media (max-width: 991px) {
    .qcd-hero { padding: 70px 0 110px; text-align: center; }
    .qcd-hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .qcd-hero-seal { order: -1; width: min(220px, 60vw); }
    .qcd-kicker::before { display: none; }
    .qcd-hero-actions, .qcd-hero-facts { justify-content: center; }
}

/* Sections */
.qcd-section { padding: 90px 0; }
.qcd-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.qcd-eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--qcd); background: var(--qcd-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 12px; }
.qcd-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin: 0; }
@media (max-width: 767px) { .qcd-section { padding: 64px 0; } }

/* Mission & Vision */
.qcd-about { padding-top: 70px; }
.qcd-mv { position: relative; height: 100%; padding: 38px 36px 34px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(0, 40, 20, .07); overflow: hidden; }
.qcd-mv::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--qcd), var(--qcd-gold)); }
.qcd-mv-icon { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; font-size: 1.7rem; color: #fff; background: linear-gradient(145deg, var(--qcd), var(--qcd-dark)); margin-bottom: 18px; box-shadow: 0 12px 24px color-mix(in srgb, var(--qcd) 35%, transparent); }
.qcd-mv h2 { font-size: 1.5rem; margin-bottom: 12px; color: var(--qcd); }
.qcd-mv p { font-size: 1.06rem; line-height: 1.85; color: #3f4a44; margin: 0; }
@media (max-width: 575px) { .qcd-mv { padding: 28px 22px; } }

/* Key documents */
.qcd-docs { background: var(--qcd-soft); }
.qcd-doc { position: relative; display: flex; flex-direction: column; height: 100%; padding: 32px 28px 26px; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 10px 30px rgba(0, 40, 20, .06); transition: transform .35s, box-shadow .35s; overflow: hidden; }
.qcd-doc::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: color-mix(in srgb, var(--qcd-gold) 14%, transparent); transition: transform .5s; }
.qcd-doc:hover { color: var(--ink); transform: translateY(-6px); box-shadow: 0 24px 46px rgba(0, 40, 20, .14); }
.qcd-doc:hover::after { transform: scale(1.6); }
.qcd-doc-icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; color: var(--qcd); background: var(--qcd-soft); margin-bottom: 18px; transition: background .3s, color .3s; }
.qcd-doc:hover .qcd-doc-icon { background: var(--qcd); color: #fff; }
.qcd-doc h3 { font-size: 1.25rem; margin-bottom: 8px; }
.qcd-doc p { color: var(--muted); font-size: .95rem; flex: 1; margin-bottom: 18px; }
.qcd-doc-cta { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--qcd); }

/* Library tabs + files */
.qcd-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.qcd-tab { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; transition: all .25s; scroll-margin-top: 120px; }
.qcd-tab span { font-size: .78rem; min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--qcd-soft); color: var(--qcd); }
.qcd-tab:hover { border-color: var(--qcd); color: var(--qcd); }
.qcd-tab.active { background: var(--qcd); border-color: var(--qcd); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--qcd) 35%, transparent); }
.qcd-tab.active span { background: rgba(255,255,255,.2); color: #fff; }
.qcd-lib-intro { text-align: center; color: var(--muted); margin-bottom: 24px; }
.qcd-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.qcd-file { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--ink); transition: border-color .25s, box-shadow .25s, transform .25s; }
.qcd-file:hover { color: var(--ink); border-color: transparent; box-shadow: 0 12px 26px rgba(0, 40, 20, .1); transform: translateY(-2px); }
.qcd-file-no { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-head); font-size: .85rem; font-weight: 700; color: var(--qcd); background: var(--qcd-soft); }
.qcd-file-name { flex: 1; font-weight: 500; font-size: .95rem; line-height: 1.35; }
.qcd-file-go { flex-shrink: 0; font-size: .85rem; font-weight: 600; color: var(--qcd); padding: 6px 12px; border-radius: 8px; background: var(--qcd-soft); transition: background .25s, color .25s; }
.qcd-file:hover .qcd-file-go { background: var(--qcd); color: #fff; }
@media (max-width: 575px) { .qcd-files { grid-template-columns: 1fr; } .qcd-tab { padding: 10px 16px; font-size: .9rem; } }

/* Contact */
.qcd-contact { background: linear-gradient(180deg, #fff 0%, var(--qcd-soft) 100%); }
.qcd-contact-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; height: 100%; padding: 30px 24px; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 12px 32px rgba(0, 40, 20, .07); transition: transform .3s, box-shadow .3s; }
a.qcd-contact-card:hover { color: var(--ink); transform: translateY(-5px); box-shadow: 0 22px 44px rgba(0, 40, 20, .13); }
.qcd-contact-card > span { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 1.45rem; color: #fff; background: linear-gradient(145deg, var(--qcd), var(--qcd-dark)); margin-bottom: 10px; }
.qcd-contact-card small { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .72rem; color: var(--qcd-gold); }
.qcd-contact-card strong { font-size: 1.02rem; font-weight: 600; }
.qcd-map { margin-top: 36px; border-radius: 20px; overflow: hidden; box-shadow: 0 14px 34px rgba(0, 40, 20, .1); height: 360px; }
.qcd-map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 575px) { .qcd-map { height: 280px; } }

/* Footer */
.qcd-footer { background: var(--qcd-dark); color: rgba(255,255,255,.8); padding: 46px 0 0; }
.qcd-footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.12); }
.qcd-footer-brand { display: flex; align-items: center; gap: 14px; }
.qcd-footer-brand img { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 3px var(--qcd-gold); }
.qcd-footer-brand strong { display: block; font-family: var(--font-head); color: #fff; font-size: 1.15rem; }
.qcd-footer-brand small { color: rgba(255,255,255,.7); }
.qcd-footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.qcd-footer-nav a { color: rgba(255,255,255,.85); font-size: .92rem; }
.qcd-footer-nav a:hover { color: var(--qcd-gold); }
.qcd-footer-bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 18px 0; font-size: .85rem; color: rgba(255,255,255,.6); }
@media (max-width: 575px) { .qcd-footer-top, .qcd-footer-bottom { flex-direction: column; text-align: center; } .qcd-footer-brand { flex-direction: column; } .qcd-footer-nav { justify-content: center; } }

/* Back-to-top in QCD colours */
.qcd-site .back-to-top { background: var(--qcd); box-shadow: 0 10px 26px color-mix(in srgb, var(--qcd) 40%, transparent); }
.qcd-site .back-to-top:hover { background: var(--qcd-dark); }
.qcd-site section[id] { scroll-margin-top: 90px; }

/* ---------- Commandant (QCD home) ---------- */
.qcd-leader { position: relative; z-index: 1; padding: 10px 0 0; }
.qcd-leader-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 44px; padding: 46px 50px; border-radius: 28px; color: #fff; overflow: hidden; isolation: isolate;
    background: radial-gradient(circle at 12% 50%, color-mix(in srgb, var(--qcd) 70%, #3bd17f) 0%, transparent 45%), linear-gradient(120deg, var(--qcd-dark) 0%, var(--qcd) 100%);
    box-shadow: 0 30px 60px color-mix(in srgb, var(--qcd) 30%, transparent); }
.qcd-leader-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.08) 1.2px, transparent 1.2px); background-size: 22px 22px; mask-image: linear-gradient(270deg, #000, transparent 70%); }
.qcd-leader-card::after { content: ""; position: absolute; right: -90px; top: -90px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid color-mix(in srgb, var(--qcd-gold) 22%, transparent); z-index: -1; }
.qcd-leader-portrait { position: relative; width: 176px; height: 176px; }
.qcd-leader-ring { position: absolute; inset: -14px; border-radius: 50%; border: 2px dashed var(--qcd-gold); animation: qcdSpin 30s linear infinite; }
.qcd-leader-avatar { position: relative; width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-family: var(--font-head); font-size: 3.2rem; font-weight: 700; letter-spacing: .02em; color: var(--qcd-dark);
    background: linear-gradient(145deg, #fff 0%, color-mix(in srgb, var(--qcd-gold) 45%, #fff) 100%); box-shadow: 0 0 0 6px rgba(255,255,255,.15), 0 20px 40px rgba(0,0,0,.3); }
.qcd-leader-avatar img, .elementor .qcd-leader-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.qcd-leader-body { min-width: 0; }
.qcd-leader-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--qcd-gold); color: #241a02; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.qcd-leader-body h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 14px 0 6px; }
.qcd-leader-role { margin: 0 0 18px; font-size: 1.05rem; color: rgba(255,255,255,.88); font-weight: 500; }
.qcd-leader-role span { display: inline-block; margin-left: 10px; padding-left: 12px; border-left: 2px solid var(--qcd-gold); color: var(--qcd-gold); }
.qcd-leader-quals { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.qcd-leader-quals li { padding: 5px 12px; border-radius: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); font-size: .85rem; font-weight: 500; }
.qcd-leader-side { display: grid; gap: 18px; justify-items: stretch; padding-left: 40px; border-left: 1px solid rgba(255,255,255,.18); }
.qcd-leader-stats { display: flex; gap: 26px; }
.qcd-leader-stats strong { display: block; font-family: var(--font-head); font-size: 2.3rem; line-height: 1; color: var(--qcd-gold); }
.qcd-leader-stats small { display: block; margin-top: 6px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.qcd-leader-side .btn { justify-content: center; padding: 12px 20px; }
@media (prefers-reduced-motion: reduce) { .qcd-leader-ring { animation: none; } }
@media (max-width: 1199px) {
    .qcd-leader-card { grid-template-columns: auto 1fr; gap: 34px; padding: 40px; }
    .qcd-leader-side { grid-column: 1 / -1; padding: 24px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.18); grid-template-columns: 1fr auto; align-items: center; }
}
@media (max-width: 767px) {
    .qcd-leader { padding: 0; }
    .qcd-leader-card { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 26px; padding: 40px 22px 28px; border-radius: 22px; }
    .qcd-leader-portrait { width: 140px; height: 140px; }
    .qcd-leader-avatar { font-size: 2.6rem; }
    .qcd-leader-role span { display: block; margin: 6px 0 0; padding: 0; border: 0; }
    .qcd-leader-quals { justify-content: center; }
    .qcd-leader-side { width: 100%; grid-template-columns: 1fr; justify-items: center; }
    .qcd-leader-side .btn { width: 100%; }
}

/* ---------- Faculty page ---------- */
.qcd-hero-sm { padding: 54px 0 100px; }
.qcd-hero-sm h1 { margin-bottom: 0; font-size: clamp(2rem, 4.5vw, 3.2rem); }
.qcd-hero-sm .qcd-hero-facts { margin-top: 24px; }
.qcd-crumbs { display: flex; align-items: center; gap: 8px; font-size: .85rem; margin-bottom: 22px; color: rgba(255,255,255,.75); }
.qcd-crumbs a { color: #fff; font-weight: 600; }
.qcd-crumbs a:hover { color: var(--qcd-gold); }
.qcd-crumbs i { font-size: .7rem; }
.qcd-faculty { padding-top: 30px; }
.qcd-site .pf-lead { box-shadow: 0 18px 40px rgba(0, 40, 20, .09); }
.qcd-site .pf-lead-label { color: #5e4508; }
.qcd-site .pf-lead-body h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin: 4px 0 0; }
.pf-dept { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 500; color: var(--muted); }
.pf-dept i { color: var(--qcd-gold); }
.pf-bottom .pf-dept { margin-top: 12px; }
.pf-bottom .pf-quals + .pf-dept { margin-top: 12px; }
.pf-lead-body .pf-dept { margin-top: 2px; }
.qcd-site .pf-card:hover { box-shadow: 0 16px 34px rgba(0, 40, 20, .1); }
.qcd-fac-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0 26px; padding: 14px; border-radius: 18px; background: var(--qcd-soft); }
.qcd-fac-search { position: relative; flex: 1 1 320px; margin: 0; }
.qcd-fac-search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--qcd); }
.qcd-fac-search input, .qcd-fac-select select { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: .95rem; color: var(--ink); }
.qcd-fac-search input { padding: 0 16px 0 44px; }
.qcd-fac-select { flex: 0 1 280px; margin: 0; }
.qcd-fac-select select { padding: 0 14px; cursor: pointer; }
.qcd-fac-search input:focus, .qcd-fac-select select:focus { outline: none; border-color: var(--qcd); box-shadow: 0 0 0 4px color-mix(in srgb, var(--qcd) 15%, transparent); }
.qcd-fac-count { margin: 0 6px 0 auto; font-size: .88rem; font-weight: 600; color: var(--qcd); white-space: nowrap; }
.qcd-fac-empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 1.05rem; }
#facGrid > [hidden] { display: none !important; }
@media (max-width: 767px) {
    .qcd-hero-sm { padding: 36px 0 84px; }
    .qcd-fac-tools { padding: 12px; }
    .qcd-fac-select { flex: 1 1 100%; }
    .qcd-fac-count { margin: 0; width: 100%; text-align: center; }
}
