/* ==========================================================================
   SQH — The Research Center for Safety and Quality in Health
   Pastel green theme
   ========================================================================== */

:root {
    --sqh-50:  #f2faf4;
    --sqh-100: #e2f4e7;
    --sqh-200: #c7e9d1;
    --sqh-300: #a3d9b3;
    --sqh-400: #7cc491;
    --sqh-500: #5aac74;
    --sqh-600: #46905e;
    --sqh-700: #38724b;
    --sqh-800: #2e5a3d;
    --sqh-900: #234631;
    --sqh-gold: #e0b04a;
    --sqh-gold-dark: #c8952e;
    --sqh-text: #2c3a32;
    --sqh-muted: #647268;
    --sqh-bg: #fbfdfb;
    --sqh-radius: 1rem;
    --sqh-shadow: 0 10px 30px -12px rgba(35, 70, 49, 0.18);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Prompt', sans-serif;
    color: var(--sqh-text);
    background-color: var(--sqh-bg);
    font-weight: 400;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    color: var(--sqh-900);
}

a { text-decoration: none; }

::selection { background: var(--sqh-300); color: var(--sqh-900); }

/* ---------- Topbar ---------- */
.topbar {
    background: var(--sqh-900);
    color: #eaf5ec;
    font-size: 0.82rem;
    padding: 0.4rem 0;
}
.topbar .container { flex-wrap: wrap; row-gap: 0.25rem; }
.topbar a { color: #eaf5ec; opacity: 0.9; }
.topbar a:hover { opacity: 1; text-decoration: underline; }

/* ---------- Navbar ---------- */
.navbar-sqh {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 18px rgba(35, 70, 49, 0.08);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    transition: box-shadow .2s ease;
}
.navbar-sqh .nav-link {
    color: var(--sqh-800);
    font-weight: 500;
    margin: 0 0.15rem;
    padding: 0.55rem 0.9rem !important;
    border-radius: 0.6rem;
    transition: all .18s ease;
}
.navbar-sqh .nav-link:hover,
.navbar-sqh .nav-link.active {
    color: var(--sqh-700);
    background: var(--sqh-100);
}
.navbar-sqh .dropdown-menu {
    border: none;
    border-radius: 0.9rem;
    padding: 0.5rem;
    max-width: 340px;
    max-height: 70vh;
    overflow-y: auto;
}
.navbar-sqh .dropdown-item {
    border-radius: 0.6rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.92rem;
    white-space: normal;
    color: var(--sqh-800);
}
.navbar-sqh .dropdown-item:hover,
.navbar-sqh .dropdown-item:focus {
    background: var(--sqh-100);
    color: var(--sqh-700);
}
.navbar-sqh .dropdown-item i { color: var(--sqh-500); }

/* ---------- Buttons ---------- */
.btn-sqh {
    background: linear-gradient(135deg, var(--sqh-500), var(--sqh-700));
    color: #fff;
    border: none;
    border-radius: 50rem;
    padding: 0.7rem 1.8rem;
    font-weight: 500;
    box-shadow: 0 8px 20px -6px rgba(70, 144, 94, 0.55);
    transition: transform .18s ease, box-shadow .18s ease;
}
.btn-sqh:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -8px rgba(70, 144, 94, 0.6);
}
.btn-sqh-outline {
    border: 1.5px solid var(--sqh-500);
    color: var(--sqh-700);
    border-radius: 50rem;
    padding: 0.65rem 1.7rem;
    font-weight: 500;
    background: transparent;
    transition: all .18s ease;
}
.btn-sqh-outline:hover {
    background: var(--sqh-500);
    color: #fff;
}

/* ---------- Hero ---------- */
.hero-sqh {
    position: relative;
    background: linear-gradient(150deg, var(--sqh-100) 0%, var(--sqh-50) 45%, #ffffff 100%);
    padding: 5.5rem 0 6rem;
    overflow: hidden;
}
.hero-sqh::before, .hero-sqh::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--sqh-300) 0%, transparent 70%);
    opacity: 0.5;
    z-index: 0;
}
.hero-sqh::before { width: 480px; height: 480px; top: -180px; right: -160px; }
.hero-sqh::after { width: 360px; height: 360px; bottom: -160px; left: -140px; background: radial-gradient(circle, var(--sqh-gold) 0%, transparent 70%); opacity: 0.25;}
.hero-sqh .container { position: relative; z-index: 1; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--sqh-100);
    color: var(--sqh-700);
    border-radius: 50rem;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.2rem;
}
.hero-title {
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.1rem;
}
.hero-title span { color: var(--sqh-600); }
.hero-lead {
    font-size: 1.1rem;
    color: var(--sqh-muted);
    max-width: 640px;
    margin-bottom: 2rem;
}

/* Page header (interior pages) */
.page-header {
    background: linear-gradient(135deg, var(--sqh-700), var(--sqh-500));
    color: #fff;
    padding: 3.4rem 0 3rem;
    position: relative;
    overflow: hidden;
}
.page-header::after {
    content: "";
    position: absolute;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 70%);
    top: -160px; right: -100px;
    border-radius: 50%;
}
.page-header h1 { color: #fff; font-weight: 700; margin-bottom: 0.5rem; }
.page-header .breadcrumb { margin-bottom: 0; }
.page-header .breadcrumb a { color: rgba(255,255,255,0.85); }
.page-header .breadcrumb-item.active { color: #fff; }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.6); }

/* ---------- Section helpers ---------- */
.section { padding: 4.5rem 0; }
.section-sm { padding: 3rem 0; }
.section-alt { background: var(--sqh-50); }
.section-tag {
    color: var(--sqh-600);
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: 0.82rem;
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.75rem; }
.section-lead { color: var(--sqh-muted); max-width: 720px; }

/* ---------- Cards ---------- */
.card-sqh {
    background: #fff;
    border: 1px solid var(--sqh-100);
    border-radius: var(--sqh-radius);
    padding: 1.8rem;
    height: 100%;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card-sqh:hover {
    transform: translateY(-6px);
    box-shadow: var(--sqh-shadow);
    border-color: var(--sqh-300);
}
.card-icon {
    width: 58px; height: 58px;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--sqh-200), var(--sqh-100));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: var(--sqh-700);
    margin-bottom: 1.1rem;
}
.card-sqh h5 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.card-sqh p { color: var(--sqh-muted); font-size: 0.93rem; margin-bottom: 0; }

.stat-card {
    text-align: center;
    padding: 1.6rem 1rem;
    border-radius: var(--sqh-radius);
    background: #fff;
    border: 1px solid var(--sqh-100);
    height: 100%;
}
.stat-card .stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--sqh-600);
}
.stat-card .stat-label { color: var(--sqh-muted); font-size: 0.9rem; }

/* Mission / Vision image frame */
.img-frame {
    border-radius: var(--sqh-radius);
    overflow: hidden;
    box-shadow: var(--sqh-shadow);
    position: relative;
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; display:block; }

/* Timeline (History) */
.timeline { position: relative; padding-left: 2.2rem; }
.timeline::before {
    content: "";
    position: absolute; left: 0.55rem; top: 0.4rem; bottom: 0.4rem;
    width: 2px; background: var(--sqh-200);
}
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: "";
    position: absolute; left: -2.2rem; top: 0.2rem;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--sqh-500);
    box-shadow: 0 0 0 4px var(--sqh-100);
}

/* Accordion (SQH Projects) */
.accordion-sqh .accordion-item {
    border: 1px solid var(--sqh-100);
    border-radius: var(--sqh-radius) !important;
    overflow: hidden;
    margin-bottom: 1rem;
}
.accordion-sqh .accordion-button {
    font-weight: 500;
    color: var(--sqh-800);
    background: #fff;
}
.accordion-sqh .accordion-button:not(.collapsed) {
    background: var(--sqh-50);
    color: var(--sqh-700);
    box-shadow: none;
}
.accordion-sqh .accordion-button:focus { box-shadow: none; border-color: var(--sqh-200); }
.accordion-sqh .accordion-button::after { margin-left: 1rem; }

/* Nav pills (Research tabs) */
.nav-pills-sqh .nav-link {
    color: var(--sqh-700);
    border-radius: 50rem;
    font-weight: 500;
    padding: 0.6rem 1.4rem;
    margin-right: 0.5rem;
    border: 1px solid var(--sqh-200);
}
.nav-pills-sqh .nav-link.active {
    background: var(--sqh-600);
    border-color: var(--sqh-600);
    color: #fff;
}

/* People / profile card */
.profile-card {
    background: #fff;
    border-radius: var(--sqh-radius);
    border: 1px solid var(--sqh-100);
    overflow: hidden;
    height: 100%;
}
.profile-media {
    background: linear-gradient(150deg, var(--sqh-200), var(--sqh-400));
    height: 190px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 3.2rem;
}
.profile-body { padding: 1.5rem; }
.profile-body .position { color: var(--sqh-600); font-size: 0.88rem; font-weight: 500; margin-bottom: 0.8rem; }
.tag-pill {
    display: inline-block;
    background: var(--sqh-100);
    color: var(--sqh-700);
    font-size: 0.78rem;
    padding: 0.25rem 0.7rem;
    border-radius: 50rem;
    margin: 0.15rem 0.25rem 0.15rem 0;
}

/* ---------- What We Do ---------- */
.whatwedo-card {
    background: #fff;
    border-radius: var(--sqh-radius);
    border: 1px solid var(--sqh-100);
    padding: 1.8rem 1.6rem;
    height: 100%;
    text-align: center;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.whatwedo-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sqh-shadow);
    border-color: var(--sqh-300);
}
.whatwedo-num {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--sqh-700);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 auto 1rem;
}
.whatwedo-card .card-icon { margin-left: auto; margin-right: auto; }
.whatwedo-card p { color: var(--sqh-muted); font-size: 0.93rem; margin-bottom: 0; }

/* ---------- Publication Highlights ---------- */
.pub-card {
    background: #fff;
    border: 1px solid var(--sqh-100);
    border-radius: var(--sqh-radius);
    overflow: hidden;
    height: 100%;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.pub-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sqh-shadow);
    border-color: var(--sqh-300);
}
.pub-img-wrap {
    position: relative;
    background: var(--sqh-50);
    height: 210px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    cursor: pointer;
}
.pub-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .35s ease;
}
.pub-card:hover .pub-img-wrap img { transform: scale(1.05); }
.pub-img-overlay {
    position: absolute; inset: 0;
    background: rgba(35, 70, 49, 0.55);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.92rem;
    opacity: 0;
    transition: opacity .22s ease;
}
.pub-card:hover .pub-img-overlay { opacity: 1; }
.pub-body { padding: 1.5rem; }
.pub-badges { display: flex; gap: 0.4rem; margin-bottom: 0.7rem; }
.pub-badge-if {
    background: var(--sqh-600);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 50rem;
}
.pub-badge-q {
    background: var(--sqh-gold);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 50rem;
}
.pub-body h5 { font-size: 1.02rem; margin-bottom: 0.5rem; }
.pub-body p { color: var(--sqh-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.pub-read-btn {
    color: var(--sqh-700);
    font-weight: 500;
    font-size: 0.9rem;
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.pub-read-btn:hover { color: var(--sqh-500); }
.pub-add-card {
    border: 1.5px dashed var(--sqh-300);
    border-radius: var(--sqh-radius);
    background: var(--sqh-50);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 320px;
    padding: 2rem;
    color: var(--sqh-muted);
}
.pub-add-card i { font-size: 2rem; color: var(--sqh-400); margin-bottom: 0.7rem; }

/* Publication modal */
.modal-sqh .modal-content { border: none; border-radius: 1.2rem; overflow: hidden; }
.modal-sqh .modal-header {
    background: linear-gradient(135deg, var(--sqh-700), var(--sqh-500));
    color: #fff;
    border: none;
    padding: 1.5rem 1.75rem;
}
.modal-sqh .modal-header .btn-close { filter: brightness(0) invert(1); }
.modal-sqh .modal-title { font-weight: 600; }
.modal-sqh .modal-body { padding: 1.75rem; }
.modal-sqh .modal-body img { width: 100%; border-radius: 0.8rem; margin-bottom: 1.25rem; border: 1px solid var(--sqh-100); }
.modal-sqh .modal-body p { color: var(--sqh-text); line-height: 1.75; }
.modal-sqh .citation-block {
    background: var(--sqh-50);
    border-left: 3px solid var(--sqh-500);
    border-radius: 0.5rem;
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
    color: var(--sqh-800);
    margin-top: 1.25rem;
}

/* ---------- Project detail (accordion rich content) ---------- */
.proj-section + .proj-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--sqh-200);
}
.proj-section-heading {
    color: var(--sqh-700);
    font-weight: 600;
    font-size: 1.02rem;
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.proj-section-heading::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--sqh-500);
    flex-shrink: 0;
}
.proj-intro p, .proj-achievements p { line-height: 1.75; margin-bottom: 0.9rem; }
.proj-intro ul { margin-bottom: 0.9rem; padding-left: 1.2rem; }
.proj-intro ul li { margin-bottom: 0.4rem; line-height: 1.6; }
.proj-subhead {
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sqh-600);
    margin: 1.4rem 0 0.7rem;
}
.proj-subhead:first-child { margin-top: 0; }
.proj-pub-list { display: flex; flex-direction: column; gap: 1rem; }
.proj-pub-item {
    background: var(--sqh-50);
    border: 1px solid var(--sqh-100);
    border-radius: 0.8rem;
    padding: 1rem 1.15rem;
}
.proj-pub-title { font-weight: 600; color: var(--sqh-900); font-size: 0.95rem; margin-bottom: 0.3rem; line-height: 1.5; }
.proj-pub-authors { font-size: 0.85rem; color: var(--sqh-muted); margin-bottom: 0.15rem; }
.proj-pub-source { font-size: 0.85rem; color: var(--sqh-muted); font-style: italic; margin-bottom: 0.6rem; }
.proj-pub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.proj-pub-metric {
    background: var(--sqh-600);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 50rem;
}
.proj-pub-access {
    font-size: 0.78rem;
    color: var(--sqh-muted);
    font-style: italic;
}
.proj-pub-link {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--sqh-700);
    background: #fff;
    border: 1px solid var(--sqh-200);
    border-radius: 50rem;
    padding: 0.25rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.proj-pub-link:hover { background: var(--sqh-600); color: #fff; border-color: var(--sqh-600); }

/* Placeholder / coming soon block */
.placeholder-block {
    border: 1.5px dashed var(--sqh-300);
    border-radius: var(--sqh-radius);
    background: var(--sqh-50);
    padding: 2.4rem;
    text-align: center;
    color: var(--sqh-muted);
}
.placeholder-block i { font-size: 2.2rem; color: var(--sqh-400); margin-bottom: 0.8rem; display: block; }

/* CTA band */
.cta-band {
    background: linear-gradient(135deg, var(--sqh-700), var(--sqh-500));
    border-radius: 1.5rem;
    color: #fff;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}
.cta-band::after {
    content: "";
    position: absolute; right: -60px; top: -60px;
    width: 220px; height: 220px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 70%);
}
.cta-band h3 { color: #fff; }

/* ---------- Footer ---------- */
.footer-sqh { background: var(--sqh-900); color: #cfe6d6; }
.footer-logo { filter: brightness(0) invert(1) opacity(0.92); }
.footer-text { color: #b9d7c1; font-size: 0.92rem; }
.footer-heading { color: #fff; font-weight: 600; margin-bottom: 1rem; font-size: 0.95rem; text-transform: uppercase; letter-spacing: .04em; }
.footer-links { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.footer-links li { margin-bottom: 0.7rem; color: #b9d7c1; line-height: 1.5; }
.footer-links a { color: #cfe6d6; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { background: #1b3728; font-size: 0.82rem; color: #a9cab3; }

/* ---------- Back to top ---------- */
.btn-back-top {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--sqh-600);
    color: #fff;
    border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 8px 20px -6px rgba(35, 70, 49, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s ease;
    z-index: 999;
}
.btn-back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.btn-back-top:hover { background: var(--sqh-700); }

/* ---------- Utilities ---------- */
.text-sqh { color: var(--sqh-600) !important; }
.bg-sqh-50 { background: var(--sqh-50) !important; }
.divider-sqh {
    width: 60px; height: 4px; border-radius: 2px;
    background: linear-gradient(90deg, var(--sqh-500), var(--sqh-gold));
    margin-bottom: 1.2rem;
}

@media (max-width: 991.98px) {
    .navbar-sqh .dropdown-menu { max-width: 100%; box-shadow: none; background: var(--sqh-50); }
    .hero-sqh { padding: 3.5rem 0 4rem; text-align: center; }
    .hero-lead { margin-left: auto; margin-right: auto; }
}
