/* ==========================================================================
   ICSOC recognition site: components for the register, profiles and content pages.
   Builds on the tokens in newstyle.css (:root --navy-*, --gold-*, --ink, --line ...).
   ========================================================================== */
:root {
  --ok: #1e8e5a;      --ok-bg: #e8f6ef;      --ok-line: #bfe6d1;
  --warn: #9a6317;    --warn-bg: #fbf3e4;    --warn-line: #f0d6a8;
  --bad: #b03a3a;     --bad-bg: #fdecec;     --bad-line: #f3c6c6;
  --neutral: #4d566b; --neutral-bg: #eef0f6; --neutral-line: #d9ddea;
}
.container-narrow { max-width: 820px; margin-inline: auto; }
.section { padding-block: clamp(3rem, 2rem + 3.5vw, 5.5rem); }
.section-alt { background: var(--surface); }
.section-navy { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #dfe2f5; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy p { color: #c9cde6; }
.eyebrow { display: inline-block; font-size: .8125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: .6rem; }
.section-navy .eyebrow { color: var(--gold-400); }
.section-head { max-width: 720px; margin: 0 auto clamp(2rem, 1.5rem + 2vw, 3.25rem); text-align: center; }
.section-head h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.6rem); margin-bottom: .75rem; }
.section-head p { font-size: 1.0625rem; margin: 0; }
.lead { font-size: 1.125rem; line-height: 1.75; color: var(--muted); }

/* ---------- page hero ---------- */
.page-hero {
  position: relative; color: #fff;
  background: radial-gradient(900px 380px at 90% -20%, rgba(224, 167, 79, .22), transparent 60%), linear-gradient(160deg, var(--navy-900), var(--navy-700));
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); margin: 0 0 .75rem; max-width: 20ch; }
.page-hero p { color: #d3d7ee; font-size: 1.125rem; max-width: 62ch; margin: 0; }
.breadcrumbs { font-size: .875rem; margin-bottom: 1rem; color: #aab0d6; }
.breadcrumbs a { color: #e3e6f8; text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold-400); }
.breadcrumbs span[aria-hidden] { margin-inline: .4rem; opacity: .6; }

/* ---------- home hero ---------- */
.home-hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(1000px 460px at 85% -10%, rgba(224, 167, 79, .25), transparent 60%),
    radial-gradient(700px 380px at -5% 110%, rgba(224, 167, 79, .14), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-700));
  padding-block: clamp(3rem, 2rem + 5vw, 6.5rem);
}
.home-hero h1 { color: #fff; font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.9rem); line-height: 1.1; margin-bottom: 1.1rem; }
.home-hero h1 em { font-style: normal; color: var(--gold-400); }
.home-hero .lead { color: #d3d7ee; max-width: 56ch; }
.hero-seal { width: min(280px, 60vw); filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .4)); }
.hero-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; color: #d3d7ee; font-size: .95rem; }
.hero-points li::before { content: "\2713"; color: var(--gold-400); font-weight: 700; margin-right: .5rem; }

/* ---------- search ---------- */
.search-box { display: flex; gap: .5rem; background: #fff; padding: .5rem; border-radius: 16px; box-shadow: var(--shadow-lg); max-width: 640px; }
.search-box input[type=search], .search-box input[type=text] {
  flex: 1 1 auto; min-width: 0; border: 0 !important; box-shadow: none !important; padding: .85rem 1rem !important; font-size: 1.05rem !important; background: transparent;
}
.search-box input:focus { outline: none; }
.search-box .btn { flex: 0 0 auto; padding-inline: 1.5rem; }
.search-box:focus-within { box-shadow: 0 0 0 4px rgba(224, 167, 79, .5), var(--shadow-lg); }
.search-hint { font-size: .875rem; color: #b7bcdd; margin-top: .75rem; }
.search-hint a { color: var(--gold-400); }

.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: .9rem; font-weight: 600; text-decoration: none; transition: all .15s ease;
}
.chip:hover { border-color: var(--gold-500); color: var(--gold-ink); }
.chip.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip .count { font-weight: 500; opacity: .7; }
.results-meta { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- status ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  padding: .3rem .7rem; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.status-pill::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.status-recognized   { color: var(--ok);      background: var(--ok-bg);      border-color: var(--ok-line); }
.status-unrecognized { color: var(--neutral); background: var(--neutral-bg); border-color: var(--neutral-line); }
.status-expired    { color: var(--warn);    background: var(--warn-bg);    border-color: var(--warn-line); }
.status-revoked    { color: var(--bad);     background: var(--bad-bg);     border-color: var(--bad-line); }
.status-line { font-size: 1.05rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin: .35rem 0 0; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.status-line .status-word { padding: .2rem .7rem; border-radius: 8px; }
.status-line.status-recognized .status-word   { background: var(--ok); color: #fff; }
.status-line.status-unrecognized .status-word { background: var(--neutral); color: #fff; }
.status-line.status-expired .status-word    { background: var(--warn); color: #fff; }
.status-line.status-revoked .status-word    { background: var(--bad); color: #fff; }
.status-line { background: none; border: 0; }
.status-line .status-key { color: var(--muted); font-weight: 700; }

/* ---------- logo with ribbon ---------- */
.logo-box {
  position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 1.1rem;
}
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-fallback {
  width: 5rem; height: 5rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head);
  font-weight: 700; font-size: 1.75rem; color: var(--navy-700); background: var(--surface); border: 2px dashed var(--line);
}
.logo-ribbon {
  position: absolute; top: 20px; left: -44px; width: 170px; transform: rotate(-45deg); text-align: center;
  background: linear-gradient(180deg, #25a56d, #1a7f50); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .14em;
  padding: .32rem 0; box-shadow: 0 3px 8px rgba(15, 18, 56, .3); z-index: 2;
}
.logo-ribbon i { margin-right: .3rem; }
.logo-box.is-large { aspect-ratio: 1 / 1; max-width: 300px; }
.logo-box.is-large .logo-ribbon { top: 28px; left: -50px; width: 200px; font-size: .78rem; padding: .4rem 0; }

/* ---------- institute cards ---------- */
.inst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.inst-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1rem; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.inst-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(201, 140, 55, .6); color: inherit; }
.inst-card .logo-box { aspect-ratio: 16 / 10; margin-bottom: .9rem; background: var(--surface); }
.inst-card h3 { font-size: 1.05rem; line-height: 1.35; margin: 0 0 .5rem; color: var(--navy-800); }
.inst-card p { font-size: .9rem; line-height: 1.55; color: var(--muted); margin: .6rem 0 1rem; flex: 1; }
.inst-card .card-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .85rem; color: var(--gold-ink); font-weight: 600; margin-top: auto; }
.inst-card.is-recognized { border-color: var(--ok-line); }
.pagination-nav { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 2.5rem; }
.pagination-nav a, .pagination-nav span {
  min-width: 2.5rem; padding: .5rem .8rem; text-align: center; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.pagination-nav a:hover { border-color: var(--gold-500); color: var(--gold-ink); }
.pagination-nav .is-current { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.pagination-nav .is-gap { border-color: transparent; background: transparent; }
.empty-state { text-align: center; padding: 3rem 1rem; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius-lg); }

/* ---------- institute profile ---------- */
.profile-head { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; align-items: center; }
@media (max-width: 767.98px) { .profile-head { grid-template-columns: 1fr; } .logo-box.is-large { max-width: 240px; margin-inline: auto; } }
.profile-head h1 { color: #fff; font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem); margin: 0; max-width: none; }
.page-hero .status-line .status-key { color: #aab0d6; }
.profile-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.btn-light-outline { border: 1.5px solid rgba(255, 255, 255, .5); color: #fff; background: transparent; }
.btn-light-outline:hover { background: #fff; color: var(--navy-900); border-color: #fff; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2rem; align-items: start; }
@media (max-width: 991.98px) { .profile-layout { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 1rem + 1vw, 2rem); box-shadow: var(--shadow-sm); }
.panel + .panel { margin-top: 1.5rem; }
.panel h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.fact-list { margin: 0; padding: 0; list-style: none; }
.fact-list li { display: flex; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .975rem; }
.fact-list li:last-child { border-bottom: 0; }
.fact-list .k { flex: 0 0 9.5rem; color: var(--muted); font-weight: 600; }
.fact-list .v { flex: 1; word-break: break-word; color: var(--ink); }
@media (max-width: 479.98px) { .fact-list li { flex-direction: column; gap: .15rem; } .fact-list .k { flex-basis: auto; } }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; color: var(--navy-800); font-weight: 600; }
.cert-card { border-radius: var(--radius-lg); padding: 1.5rem; border: 1px solid; }
.cert-card.status-recognized   { background: linear-gradient(180deg, #f3fbf7, #fff); border-color: var(--ok-line); }
.cert-card.status-unrecognized { background: var(--neutral-bg); border-color: var(--neutral-line); }
.cert-card.status-expired    { background: var(--warn-bg); border-color: var(--warn-line); }
.cert-card.status-revoked    { background: var(--bad-bg); border-color: var(--bad-line); }
.cert-card h2 { font-size: 1.15rem; margin: 0 0 .75rem; font-family: var(--font-body); font-weight: 700; }
.cert-card .seal { width: 92px; float: right; margin: 0 0 .5rem .75rem; }
.cert-card dl { margin: 1rem 0 0; font-size: .925rem; }
.cert-card dt { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin-top: .75rem; }
.cert-card dd { margin: 0; font-weight: 600; color: var(--ink); word-break: break-all; }
.cert-card .btn { margin-top: 1.1rem; width: 100%; }
@media (min-width: 992px) { .profile-side { position: sticky; top: 96px; } }

/* ---------- notices ---------- */
.notice { display: flex; gap: .9rem; padding: 1rem 1.15rem; border-radius: 12px; border: 1px solid; font-size: .95rem; line-height: 1.6; }
.notice i { margin-top: .2rem; font-size: 1.15rem; }
.notice p { margin: 0; color: inherit; }
.notice strong { color: inherit; }
.notice-info { background: var(--neutral-bg); border-color: var(--neutral-line); color: #2f3850; }
.notice-warn { background: var(--warn-bg); border-color: var(--warn-line); color: #6b4510; }
.notice-ok   { background: var(--ok-bg); border-color: var(--ok-line); color: #14573a; }
.notice-bad  { background: var(--bad-bg); border-color: var(--bad-line); color: #7d2525; }

/* ---------- steps + feature cards ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; counter-reset: step; padding: 0; list-style: none; }
.steps li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2.4rem 1.5rem 1.5rem; box-shadow: var(--shadow-sm); }
.steps li::before {
  counter-increment: step; content: counter(step); position: absolute; top: -1.15rem; left: 1.4rem; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: var(--navy-900); background: linear-gradient(180deg, var(--gold-400), var(--gold-500)); box-shadow: 0 6px 14px rgba(201, 140, 55, .4);
}
.steps h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.steps p { margin: 0; font-size: .95rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.feature .ico { width: 3rem; height: 3rem; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; color: var(--gold-ink); background: var(--gold-100); margin-bottom: 1rem; }
.feature h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.feature p { margin: 0; font-size: .95rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stat { text-align: center; padding: 1.4rem 1rem; border-radius: var(--radius-lg); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.stat .n { display: block; font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); color: var(--gold-400); line-height: 1.1; }
.stat .l { font-size: .9rem; color: #c9cde6; }
.status-explainer { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.status-explainer > div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; }
.status-explainer p { font-size: .925rem; margin: .75rem 0 0; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding: .55rem 0 .55rem 2rem; font-size: 1rem; }
.checklist li::before { content: "\2713"; position: absolute; left: 0; top: .5rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-weight: 800; font-size: .8rem; display: grid; place-items: center; }

/* ---------- FAQ ---------- */
.faq .accordion-item { border: 1px solid var(--line); border-radius: 14px !important; overflow: hidden; margin-bottom: .75rem; background: #fff; }
.faq .accordion-button { font-weight: 700; color: var(--navy-800); background: #fff; padding: 1.1rem 1.25rem; font-size: 1.025rem; box-shadow: none; }
.faq .accordion-button:not(.collapsed) { background: var(--gold-100); color: var(--navy-900); }
.faq .accordion-body { color: var(--muted); line-height: 1.75; }

/* ---------- forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); box-shadow: var(--shadow); }
.form-card h2 { font-size: 1.4rem; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .925rem; color: var(--navy-800); }
.field .req { color: var(--bad); }
.field .hint { display: block; margin-top: .35rem; font-size: .825rem; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; }
.field textarea { min-height: 130px; resize: vertical; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin-bottom: 1.25rem; }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; color: var(--muted); margin: .5rem 0 1.25rem; }
.consent input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--gold-500); flex: 0 0 auto; }

/* ---------- prose (legal and long-form pages) ---------- */
.prose { font-size: 1.025rem; line-height: 1.85; color: #3a4156; }
.prose h2 { font-size: 1.55rem; margin: 2.5rem 0 .9rem; }
.prose h3 { font-size: 1.15rem; margin: 1.8rem 0 .6rem; }
.prose p, .prose li { color: #3a4156; }
.prose ul, .prose ol { padding-left: 1.3rem; margin-bottom: 1.1rem; }
.prose li { margin-bottom: .45rem; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose .updated { font-size: .9rem; color: var(--muted); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.4rem; margin-bottom: 2rem; }
.toc ol { margin: .4rem 0 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
@media (max-width: 575.98px) { .toc ol { columns: 1; } }

/* ---------- certificate verifier ---------- */
.verify-result { border-radius: var(--radius-lg); padding: 1.75rem; border: 1px solid; display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.verify-result .seal { width: 84px; flex: 0 0 auto; }
.verify-result h2 { margin: 0 0 .25rem; font-size: 1.35rem; }

/* ---------- footer additions ---------- */
.footer-register-note { margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .9rem; color: #aab0d6; }
.footer-register-note strong { color: #fff; }
.footer-legal a { margin-left: 1.25rem; }
.footer-legal a:first-child { margin-left: 0; }
@media (max-width: 767.98px) { .footer-legal a { margin: 0 1.25rem 0 0; } }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(15, 18, 56, .12); }

@media print {
  .topbar, .site-header, .site-footer, .skip-link, .no-print { display: none !important; }
}

.home-hero .eyebrow, .page-hero .eyebrow { color: var(--gold-400); }
