/* ===== CERTS PAGE ===== */

    .certs-hero {
      padding: 40px 0 36px;
    }
    .certs-h1 {
      font-size: 40px;
      font-weight: 900;
      color: var(--text);
      margin-bottom: 16px;
      line-height: 1.1;
    }
    .certs-intro {
      max-width: 820px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-bottom: 32px;
    }
    .certs-intro p {
      font-size: 15px;
      color: var(--text-muted);
      line-height: 1.7;
    }

    /* --- Filter tabs --- */
    .certs-filter {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 40px;
    }
    .certs-filter label {
      display: inline-flex;
      align-items: center;
      padding: 9px 18px;
      border: 1.5px solid var(--border);
      border-radius: 50px;
      font-size: 13px;
      font-weight: 600;
      color: var(--text-muted);
      cursor: pointer;
      transition: background .2s, border-color .2s, color .2s;
      white-space: nowrap;
      user-select: none;
    }
    .certs-filter label:hover {
      border-color: var(--blue);
      color: var(--blue);
    }
    #cf-all:checked ~ .certs-filter label[for="cf-all"],
    #cf-license:checked ~ .certs-filter label[for="cf-license"],
    #cf-smr:checked ~ .certs-filter label[for="cf-smr"],
    #cf-project:checked ~ .certs-filter label[for="cf-project"],
    #cf-lab:checked ~ .certs-filter label[for="cf-lab"] {
      background: var(--blue);
      border-color: var(--blue);
      color: var(--white);
    }

    /* Hide by category */
    #cf-license:checked ~ .certs-grid .cert-card:not([data-cat~="license"]) { display: none; }
    #cf-smr:checked ~ .certs-grid .cert-card:not([data-cat~="smr"]) { display: none; }
    #cf-project:checked ~ .certs-grid .cert-card:not([data-cat~="project"]) { display: none; }
    #cf-lab:checked ~ .certs-grid .cert-card:not([data-cat~="lab"]) { display: none; }

    /* --- Cert grid --- */
    .certs-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
      margin-bottom: 60px;
    }

    /* --- Cert card --- */
    .cert-card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
      transition: box-shadow .2s;
    }
    .cert-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,.08); }

    /* Image area */
    .cert-card__img-wrap {
      position: relative;
      background: var(--gray-bg);
      min-height: 180px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      cursor: pointer;
    }
    .cert-card__img-wrap img {
      width: 100%;
      height: 200px;
      object-fit: cover;
      object-position: top;
    }

    /* Document SVG placeholder */
    .cert-doc {
      width: 160px;
      height: 220px;
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 4px;
      box-shadow: 2px 4px 12px rgba(0,0,0,.12);
      display: flex;
      flex-direction: column;
      padding: 16px;
      gap: 8px;
      position: relative;
      margin: 20px 0;
    }
    .cert-doc__header {
      height: 10px;
      background: var(--blue);
      border-radius: 2px;
      opacity: .3;
    }
    .cert-doc__line {
      height: 6px;
      background: #ccc;
      border-radius: 2px;
    }
    .cert-doc__line--short { width: 70%; }
    .cert-doc__line--xshort { width: 40%; }
    .cert-doc__seal {
      position: absolute;
      bottom: 24px;
      right: 16px;
      width: 52px;
      height: 52px;
      border-radius: 50%;
      border: 3px solid var(--blue);
      opacity: .25;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: 800;
      color: var(--blue);
    }
    .cert-doc__stamp {
      position: absolute;
      bottom: 20px;
      left: 16px;
      width: 44px;
      height: 28px;
      border: 2px solid var(--red);
      opacity: .2;
      border-radius: 2px;
    }

    /* Multi-page stack effect */
    .cert-doc-stack {
      position: relative;
      width: 160px;
      height: 240px;
      margin: 20px 0;
    }
    .cert-doc-stack .cert-doc {
      position: absolute;
      margin: 0;
    }
    .cert-doc-stack .cert-doc:nth-child(1) {
      top: 0; left: 12px;
      transform: rotate(3deg);
      opacity: .5;
    }
    .cert-doc-stack .cert-doc:nth-child(2) {
      top: 4px; left: 6px;
      transform: rotate(1.5deg);
      opacity: .75;
    }
    .cert-doc-stack .cert-doc:nth-child(3) {
      top: 8px; left: 0;
      transform: rotate(0deg);
      opacity: 1;
    }

    /* Page counter badge */
    .cert-card__pages {
      position: absolute;
      bottom: 12px;
      left: 12px;
      background: rgba(0,0,0,.55);
      color: #fff;
      font-size: 12px;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 20px;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .cert-card__pages svg { opacity: .8; }

    /* Expand icon */
    .cert-card__zoom {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 32px;
      height: 32px;
      background: rgba(255,255,255,.9);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      opacity: 0;
      transition: opacity .2s;
      cursor: zoom-in;
    }
    .cert-card:hover .cert-card__zoom { opacity: 1; }

    /* Caption */
    .cert-card__caption {
      padding: 16px 20px 20px;
      font-size: 14px;
      font-weight: 600;
      color: var(--text);
      line-height: 1.45;
    }

    /* --- CTA block --- */
    .certs-cta {
      background: var(--navy);
      border-radius: 20px;
      padding: 48px 56px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 32px;
      margin-bottom: 64px;
    }
    .certs-cta__text h2 {
      font-size: 26px;
      font-weight: 800;
      color: var(--white);
      margin-bottom: 10px;
      line-height: 1.3;
    }
    .certs-cta__text p {
      font-size: 15px;
      color: rgba(255,255,255,.6);
      line-height: 1.6;
      max-width: 560px;
    }
    .certs-cta__icon {
      flex-shrink: 0;
      font-size: 64px;
      opacity: .4;
    }

    /* --- Form --- */
    .certs-form {
      background: var(--navy);
      border-radius: 28px;
      padding: 60px;
      margin: 0 40px 60px;
    }
    .certs-form__title {
      font-size: 30px;
      font-weight: 800;
      color: var(--white);
      margin-bottom: 6px;
    }
    .certs-form__sub {
      font-size: 15px;
      color: rgba(255,255,255,.55);
      margin-bottom: 8px;
    }
    .certs-form__contacts {
      font-size: 14px;
      color: rgba(255,255,255,.55);
      margin-bottom: 36px;
    }
    .certs-form__contacts a { color: var(--blue); font-weight: 700; }
    .cf-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 20px; }
    .cf-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

    @media (max-width: 960px) {
      .certs-h1 { font-size: 30px; }
      .certs-grid { grid-template-columns: repeat(3, 1fr); }
      .certs-cta { flex-direction: column; text-align: center; padding: 36px 28px; }
      .certs-cta__icon { display: none; }
      .certs-form { margin: 0 24px 60px; padding: 40px 24px; }
      .cf-row3 { grid-template-columns: 1fr 1fr; }
    }
    @media (max-width: 640px) {
      .certs-h1 { font-size: 26px; }
      .certs-grid { grid-template-columns: repeat(2, 1fr); }
      .certs-form { margin: 0 16px 40px; padding: 32px 20px; }
      .cf-row3 { grid-template-columns: 1fr; }
      .cf-row2 { grid-template-columns: 1fr; }
    }