/* /certificates -- framed certificates, featured + grid + lightbox */
.ct { --ink:#493321; --brown:#805633; --gold:#c9a36a; --paper:#f6ecd9; --line:#e6d6bd; --ease:cubic-bezier(.22,.61,.36,1);
  max-width: 1180px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) 20px clamp(48px, 7vw, 96px); color: var(--ink); }

.ct-hero { text-align: center; margin-bottom: clamp(28px, 4vw, 48px); }
.ct-seal { width: 74px; height: 74px; color: var(--brown); animation: ctSpin 40s linear infinite; }
@keyframes ctSpin { to { transform: rotate(360deg); } }
.ct-hero h1 { margin: 12px 0 10px; font-family: 'Playfair Display','Tiro Devanagari Hindi',serif; font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.2; }
.ct-hero p { margin: 0 auto; max-width: 34em; color: #7a604d; line-height: 1.7; }
.ct-stats { margin-top: 14px !important; font-size: .95rem; }
.ct-stats strong { color: var(--brown); font-size: 1.15em; }
.ct-stats span { margin: 0 6px; color: var(--gold); }

/* frame: gold edge + cream mat, like a framed certificate */
.ct-frame { display: block; width: 100%; padding: 8px; border: 0; cursor: zoom-in; border-radius: 16px; position: relative;
  background: linear-gradient(135deg, #e3c78f, #a8793a 55%, #e3c78f); box-shadow: 0 18px 34px -22px rgba(73,51,33,.7);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.ct-mat { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 12px; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px rgba(128,86,51,.25), inset 0 6px 14px -8px rgba(73,51,33,.35); overflow: hidden; }
.ct-mat img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 3px; box-shadow: 0 8px 18px -10px rgba(0,0,0,.55); transition: transform .8s var(--ease); }
.ct-frame:focus-visible { outline: 3px solid rgba(128,86,51,.55); outline-offset: 4px; }
@media (hover: hover) {
  .ct-frame:hover { transform: translateY(-5px); box-shadow: 0 30px 44px -24px rgba(73,51,33,.75); }
  .ct-frame:hover img { transform: scale(1.04); }
}

/* featured */
.ct-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(22px, 4vw, 56px); align-items: center; margin-bottom: clamp(36px, 5vw, 60px); padding: clamp(18px, 3vw, 34px); border-radius: 26px; background: linear-gradient(135deg, #fffdf9, #f8efe0); border: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(73,51,33,.55); }
.ct-frame--big .ct-mat { aspect-ratio: 4 / 3; padding: clamp(12px, 2vw, 22px); }
.ct-chip { display: inline-block; padding: 6px 14px; border-radius: 999px; background: linear-gradient(135deg, #b98a3d, #8a5a20); color: #fff; font-size: .8rem; font-weight: 700; }
.ct-feature__info h2 { margin: 14px 0 10px; font-family: 'Playfair Display','Tiro Devanagari Hindi',serif; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.25; }
.ct-issuer { margin: 0 0 4px; font-weight: 600; color: var(--brown); }
.ct-date { margin: 0 0 10px; font-size: .9rem; color: #8b7761; }
.ct-desc { margin: 10px 0 20px; line-height: 1.75; color: #6b5340; }
.ct-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; font: 700 .95rem/1 inherit; font-family: inherit; color: #fff;
  background: linear-gradient(135deg, #8d6038, #6a4026); box-shadow: 0 14px 26px -12px rgba(90,52,25,.7); transition: transform .3s var(--ease), box-shadow .3s; }
.ct-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 32px -14px rgba(90,52,25,.8); }
.ct-btn:focus-visible { outline: 3px solid rgba(128,86,51,.5); outline-offset: 3px; }

/* filter */
.ct-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 clamp(20px, 3vw, 30px); }
.ct-filter button { border: 1px solid #d9c3a0; background: #fff; color: var(--brown); padding: 9px 20px; border-radius: 999px; cursor: pointer; font: 600 .9rem/1 inherit; font-family: inherit; transition: background .25s, color .25s, transform .2s; }
.ct-filter button:hover { transform: translateY(-1px); background: #f6ead8; }
.ct-filter button.is-on { background: var(--brown); border-color: var(--brown); color: #fff; }
.ct-filter button:focus-visible { outline: 3px solid rgba(128,86,51,.45); outline-offset: 2px; }

/* grid */
.ct-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.ct-card[hidden] { display: none; }
.ct-card { display: flex; flex-direction: column; gap: 14px; animation: ctIn .7s var(--ease) both; }
.ct-card:nth-child(3n+2) { animation-delay: .08s; } .ct-card:nth-child(3n) { animation-delay: .16s; }
@keyframes ctIn { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; transform: none; } }
.ct-card__body { padding: 0 6px; }
.ct-card__body h3 { margin: 0 0 6px; font-family: 'Playfair Display','Tiro Devanagari Hindi',serif; font-size: 1.15rem; line-height: 1.35; }
.ct-none { text-align: center; color: #8b7761; margin-top: 20px; }

/* empty */
.ct-empty { text-align: center; padding: clamp(40px, 8vw, 90px) 20px; border: 1px dashed #d9c3a0; border-radius: 24px; background: #fffdf9; }
.ct-empty h2 { font-family: 'Playfair Display','Tiro Devanagari Hindi',serif; margin: 0 0 10px; }
.ct-empty p { margin: 0 auto 22px; max-width: 30em; color: #7a604d; line-height: 1.7; }

/* lightbox */
.ct-lb { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(20, 12, 6, .92); backdrop-filter: blur(6px); animation: ctFade .25s ease; }
.ct-lb[hidden] { display: none; }
@keyframes ctFade { from { opacity: 0; } to { opacity: 1; } }
.ct-lb__fig { margin: 0; max-width: min(1100px, 92vw); text-align: center; color: #f1e2cb; }
.ct-lb__fig img { max-width: 100%; max-height: 78vh; border-radius: 6px; box-shadow: 0 30px 60px -20px #000; background: #fff; }
.ct-lb__fig figcaption { margin-top: 14px; display: grid; gap: 4px; }
.ct-lb__fig figcaption b { font-size: 1.1rem; color: #fff; }
.ct-lb__fig figcaption small { color: #cdb995; }
.ct-lb__x, .ct-lb__nav { position: absolute; border: 0; cursor: pointer; color: #fff; background: rgba(255,255,255,.12); border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.ct-lb__x:hover, .ct-lb__nav:hover { background: rgba(255,255,255,.26); }
.ct-lb__x { top: 18px; right: 18px; width: 46px; height: 46px; font-size: 28px; line-height: 1; }
.ct-lb__nav { top: 50%; width: 52px; height: 52px; margin-top: -26px; font-size: 34px; line-height: 1; }
.ct-lb__prev { left: 18px; } .ct-lb__next { right: 18px; }
.ct-lb button:focus-visible { outline: 3px solid #e3c78f; outline-offset: 3px; }

@media (max-width: 960px) {
  .ct-feature { grid-template-columns: 1fr; }
  .ct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .ct { padding-left: 14px; padding-right: 14px; }
  .ct-grid { grid-template-columns: 1fr; }
  .ct-feature { padding: 14px; border-radius: 20px; }
  .ct-lb__nav { width: 42px; height: 42px; margin-top: -21px; font-size: 28px; }
  .ct-lb__prev { left: 8px; } .ct-lb__next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .ct-seal, .ct-card, .ct-lb { animation: none; } .ct-frame, .ct-mat img { transition: none; } }
