/* =========================================================
   Șablon document instituție – articol + listă categorie
   GeneratePress Child – Servicii-IT PRO
   ========================================================= */

/* ---------- Butoane (și pentru <button>) ---------- */
.pd-doc .pd-btn,
.pd-archive .pd-btn,
.pd-404 .pd-btn {
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.pd-btn--light {
    background: var(--pd-soft);
    color: var(--pd-primary);
}
.pd-btn--light:hover,
.pd-btn--light:focus-visible {
    background: #dde7f1;
    color: var(--pd-primary-dark);
}

/* ---------- Breadcrumbs ---------- */
.pd-breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
}
.pd-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pd-breadcrumbs li {
    display: inline-flex;
    align-items: center;
    margin: 0;
    color: #6b7280;
}
.pd-breadcrumbs li + li::before {
    content: "›";
    margin: 0 10px;
    color: #9aa3af;
}
.pd-breadcrumbs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--pd-primary);
    text-decoration: none;
}
.pd-breadcrumbs a:hover { text-decoration: underline; }
.pd-breadcrumbs svg { width: 15px; height: 15px; }
.pd-breadcrumbs [aria-current] {
    max-width: 48ch;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ---------- Antet articol ---------- */
.pd-doc__header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e3e8ef;
}
.pd-doc__cat {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--pd-soft);
    color: var(--pd-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    text-decoration: none;
}
.pd-doc__cat:hover { background: #dde7f1; }
.pd-doc .pd-doc__title {
    margin: 0 0 12px;
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 700;
    line-height: 1.25;
    color: var(--pd-primary-dark);
}
.pd-doc__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    font-size: 14px;
    color: #6b7280;
}
.pd-doc__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pd-doc__meta svg { width: 16px; height: 16px; color: var(--pd-accent); }

/* ---------- Detalii document ---------- */
.pd-doc__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    margin: 0 0 28px;
    overflow: hidden;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    background: #e3e8ef;
}
.pd-doc__info-item {
    padding: 14px 18px;
    background: #f8fafc;
}
.pd-doc__info dt {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #6b7280;
}
.pd-doc__info dt svg { width: 14px; height: 14px; color: var(--pd-accent); }
.pd-doc__info dd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 600;
    color: var(--pd-text);
}

/* Stare termen */
.pd-termen {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
}
.pd-termen.is-active  { background: #e6f4ec; color: #17603b; }
.pd-termen.is-urgent  { background: #fdf0d5; color: #8a5a00; }
.pd-termen.is-expired { background: #f1f2f4; color: #5b6472; }

/* ---------- Conținut ---------- */
.pd-doc__content {
    font-size: 17px;
    line-height: 1.7;
}
.pd-doc__content a:not(.pd-btn) { color: var(--pd-primary); }
.pd-doc__content .pd-pdf { font-size: 16px; }

/* ---------- Acțiuni ---------- */
.pd-doc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 32px 0 0;
    padding-top: 24px;
    border-top: 1px solid #e3e8ef;
}
.pd-doc__actions .pd-btn:hover svg { transform: none; }

/* ---------- Anterior / Următor ---------- */
.pd-doc__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}
.pd-doc__nav-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    color: var(--pd-text);
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.pd-doc__nav-link:hover,
.pd-doc__nav-link:focus-visible {
    border-color: var(--pd-primary);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}
.pd-doc__nav-link.is-next { text-align: right; }
.pd-doc__nav-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--pd-primary);
}
.pd-doc__nav-link.is-next .pd-doc__nav-label { justify-content: flex-end; }
.pd-doc__nav-label svg { width: 14px; height: 14px; }
.pd-doc__nav-title {
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Articole similare ---------- */
.pd-doc__related {
    margin-top: 36px;
    padding: 24px;
    border-radius: 14px;
    background: #f3f6f9;
}
.pd-doc__related h2 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--pd-primary);
}
.pd-doc__related ul {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}
.pd-doc__related li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px dashed #d5dde7;
}
.pd-doc__related li:last-child { border-bottom: 0; }
.pd-doc__related li a {
    color: var(--pd-text);
    font-weight: 500;
    text-decoration: none;
}
.pd-doc__related li a:hover { color: var(--pd-primary); text-decoration: underline; }
.pd-doc__related time {
    flex: none;
    font-size: 13px;
    color: #6b7280;
}
.pd-doc__related-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--pd-primary);
    text-decoration: none;
}
.pd-doc__related-all:hover { text-decoration: underline; }
.pd-doc__related-all svg { width: 16px; height: 16px; }

.pd-print-only { display: none; }

/* =========================================================
   LISTĂ CATEGORIE
   ========================================================= */
.pd-archive__header { margin-bottom: 20px; }
.pd-archive .pd-archive__title {
    margin: 0 0 8px;
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 700;
    color: var(--pd-primary-dark);
}
.pd-archive__desc { color: #4b5563; }
.pd-archive__desc p:last-child { margin-bottom: 0; }

/* Filtre */
.pd-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 12px;
    background: #f3f6f9;
}
.pd-filter__search {
    position: relative;
    flex: 1 1 280px;
}
.pd-filter__search svg {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}
.pd-filter input[type="search"],
.pd-filter select {
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    color: var(--pd-text);
}
.pd-filter input[type="search"] { padding-left: 38px; }
.pd-filter select { width: auto; min-width: 130px; }
.pd-filter input:focus,
.pd-filter select:focus {
    outline: 3px solid rgba(201, 162, 39, .45);
    outline-offset: 0;
    border-color: var(--pd-primary);
}
.pd-filter .pd-btn { height: 44px; }
.pd-filter__reset {
    font-size: 14px;
    color: var(--pd-primary);
}
.pd-archive__count {
    margin: 0 0 8px;
    font-size: 14px;
    color: #6b7280;
}

/* Rânduri */
.pd-archive__list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.pd-row {
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 18px 0;
    border-bottom: 1px solid #e3e8ef;
}
.pd-row:last-child { border-bottom: 0; }
.pd-row__date {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 70px;
    border-radius: 10px;
    background: var(--pd-primary);
    color: #fff;
    line-height: 1;
}
.pd-row__d { font-size: 24px; font-weight: 700; }
.pd-row__m {
    margin-top: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--pd-accent);
}
.pd-row__y { margin-top: 3px; font-size: 11px; opacity: .8; }
.pd-row__body { flex: 1; min-width: 0; }
.pd-archive .pd-row__title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}
.pd-row__title a {
    color: var(--pd-text);
    text-decoration: none;
}
.pd-row__title a:hover,
.pd-row__title a:focus-visible {
    color: var(--pd-primary);
    text-decoration: underline;
}
.pd-row__excerpt {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.55;
    color: #4b5563;
}
.pd-row__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    font-size: 13px;
    color: #6b7280;
}
.pd-row__meta > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.pd-row__meta svg { width: 14px; height: 14px; }
.pd-row__pdf { color: #b42318; font-weight: 600; }

/* Paginare */
.pd-archive .pagination,
.pd-archive .navigation.pagination { margin-top: 28px; }
.pd-archive .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.pd-archive .page-numbers {
    display: inline-grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    color: var(--pd-primary);
    font-weight: 600;
    text-decoration: none;
}
.pd-archive a.page-numbers:hover { border-color: var(--pd-primary); }
.pd-archive .page-numbers.current {
    background: var(--pd-primary);
    border-color: var(--pd-primary);
    color: #fff;
}
.pd-archive .page-numbers.dots { border: 0; }

.pd-archive__empty {
    padding: 28px;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
}


/* =========================================================
   PAGINI – subpagini „În această secțiune”
   ========================================================= */
.pd-subpages {
    margin-top: 36px;
}
.pd-subpages h2 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    color: var(--pd-primary);
}
.pd-subpages__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pd-subpages__grid li { margin: 0; }
.pd-subpage {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 14px 16px;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    background: #fff;
    color: var(--pd-text);
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.pd-subpage:hover,
.pd-subpage:focus-visible {
    border-color: var(--pd-primary);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
    transform: translateY(-2px);
    color: var(--pd-primary);
}
.pd-subpage__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--pd-soft);
    color: var(--pd-primary);
}
.pd-subpage__title { flex: 1; }
.pd-subpage__arrow { flex: none; color: var(--pd-accent); }

/* =========================================================
   CĂUTARE
   ========================================================= */
.pd-results {
    margin: 0;
    padding: 0;
    list-style: none;
}
.pd-result {
    margin: 0;
    padding: 18px 0;
    border-bottom: 1px solid #e3e8ef;
}
.pd-result:last-child { border-bottom: 0; }
.pd-result__type {
    display: inline-block;
    margin-bottom: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--pd-soft);
    color: var(--pd-primary);
    font-size: 12px;
    font-weight: 700;
}
.pd-result__type.is-page { background: #fdf3d7; color: #7a5b00; }
.pd-search .pd-result__title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}
.pd-result__title a {
    color: var(--pd-text);
    text-decoration: none;
}
.pd-result__title a:hover,
.pd-result__title a:focus-visible {
    color: var(--pd-primary);
    text-decoration: underline;
}
.pd-result__snippet {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
}
.pd-search mark {
    padding: 0 2px;
    border-radius: 3px;
    background: #fdecb3;
    color: inherit;
}
.pd-result__url {
    color: #1f7a4d;
    overflow-wrap: anywhere;
}
.pd-search__tips {
    display: inline-block;
    margin: 8px 0 0;
    padding-left: 18px;
    text-align: left;
    color: #4b5563;
}

/* =========================================================
   404
   ========================================================= */
.pd-404__intro {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 0 8px;
    text-align: center;
}
.pd-404__code {
    margin: 0;
    font-size: clamp(72px, 12vw, 120px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.02em;
    color: var(--pd-soft);
    -webkit-text-stroke: 2px var(--pd-primary);
}
.pd-404 .pd-404__title {
    margin: 12px 0 10px;
    font-size: clamp(24px, 3.2vw, 32px);
    font-weight: 700;
    color: var(--pd-primary-dark);
}
.pd-404__text {
    margin: 0 0 20px;
    color: #4b5563;
}
.pd-404__intro .pd-filter { text-align: left; }
.pd-404__home { margin: 16px 0 0; }
.pd-404__section { margin-top: 40px; }
.pd-404__section > h2 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    color: var(--pd-primary);
}

/* ---------- Mobil ---------- */
@media (max-width: 768px) {
    .pd-doc__nav { grid-template-columns: 1fr; }
    .pd-doc__nav-link.is-next { text-align: left; }
    .pd-doc__nav-link.is-next .pd-doc__nav-label { justify-content: flex-start; }
    .pd-doc__related li { flex-direction: column; gap: 2px; }
    .pd-row { gap: 14px; }
    .pd-row__date { width: 54px; height: 60px; }
    .pd-row__d { font-size: 20px; }
    .pd-filter select,
    .pd-filter .pd-btn { flex: 1; }
}

/* =========================================================
   PRINT – doar documentul
   ========================================================= */
@media print {
    #wpadminbar,
    .top-bar,
    #masthead,
    #site-navigation,
    .site-footer,
    .pd-breadcrumbs,
    .pd-doc__actions,
    .pd-doc__nav,
    .pd-doc__related,
    .pd-pdf__preview,
    .pd-pdf__actions,
    .pd-pdf__mobile-note,
    .generate-back-to-top { display: none !important; }

    html { scroll-padding-top: 0; }
    body { background: #fff !important; }
    .site,
    .site-content,
    .inside-article { margin: 0 !important; padding: 0 !important; box-shadow: none !important; }
    .pd-doc__content { font-size: 12pt; }
    .pd-doc__info { background: #fff; }
    .pd-doc__info-item { background: #fff; }
    .pd-print-only {
        display: block;
        margin-top: 24px;
        padding-top: 8px;
        border-top: 1px solid #999;
        font-size: 9pt;
        color: #555;
    }
}
