/* Čižiūnų socialinių paslaugų centras – v7. Requires v5 global styles.
   Scope narrowly to avoid overwriting other WordPress pages. */
:root{--cz7-green:#176244;--cz7-dark:#103a28;--cz7-line:#d5e4da;--cz7-soft:#f5faf6;--cz7-mute:#435b4a}

/* LEGAL ACTS / DOCUMENT LIBRARY */
.cz-legal-page,.cz-eq-docs{max-width:1040px!important;margin-inline:auto;color:#182a20;line-height:1.68}
.cz-legal-page *, .cz-eq-docs *{box-sizing:border-box}
.cz-legal-page :is(a,button):focus-visible,.cz-eq-docs :is(a,button):focus-visible{outline:3px solid #085d3d!important;outline-offset:3px!important}
.cz-legal-page a,.cz-eq-docs a{overflow-wrap:anywhere}
.cz-legal-page .cz-doc-lead{font-size:1.15rem;line-height:1.75;max-width:78ch;color:#2e4939}
.cz-legal-notice{background:#edf6ef;border-left:4px solid var(--cz7-green);border-radius:0 12px 12px 0;padding:16px 19px;margin:20px 0 25px;color:#263a2d}
.cz-legal-notice strong{color:var(--cz7-dark)}
.cz-legal-toc{background:#fff;border:1px solid var(--cz7-line);border-radius:14px;padding:19px;margin-bottom:34px}
.cz-legal-toc>span{font-weight:750;color:var(--cz7-dark);display:block;margin-bottom:9px}
.cz-legal-toc ul{display:flex;flex-wrap:wrap;list-style:none!important;padding:0!important;margin:0!important;gap:8px}
.cz-legal-toc li{list-style:none!important;margin:0!important}
.cz-legal-toc a{display:inline-flex;align-items:center;min-height:44px;padding:9px 14px;background:var(--cz7-soft);border:1px solid #b5d1c0;border-radius:30px;font-weight:700;color:var(--cz7-green)!important;text-decoration:none!important}
.cz-legal-toc a:hover{background:#e2f0e7;text-decoration:underline!important}
.cz-legal-section{margin:0 0 35px;scroll-margin-top:110px}
.cz-legal-section__head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;border-bottom:2px solid #c5ddce;padding-bottom:11px;margin-bottom:15px}
.cz-legal-section__head h2{font-size:clamp(1.35rem,2.2vw,1.8rem)!important;line-height:1.3;margin:0!important;font-weight:750;color:var(--cz7-dark)!important}
.cz-legal-count{display:inline-block;font-size:.86rem;font-weight:700;color:#345942;background:#e9f3ec;border-radius:20px;padding:5px 11px}
.cz-legal-list{list-style:none!important;margin:0!important;padding:0!important;display:grid;gap:9px}
.cz-legal-entry{list-style:none!important;min-width:0;margin:0!important;padding:0!important;border:1px solid var(--cz7-line);border-radius:12px;background:white;overflow:hidden}
.cz-legal-entry>a,.cz-legal-entry--unlinked{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;min-height:65px;padding:14px 18px}
.cz-legal-entry>a{text-decoration:none!important;color:var(--cz7-dark)!important}
.cz-legal-entry>a:hover{background:var(--cz7-soft)}
.cz-legal-entry>a:hover .cz-legal-entry__title{text-decoration:underline;text-underline-offset:4px}
.cz-legal-entry__title{font-size:1rem;line-height:1.55;font-weight:650;flex:1 1 400px;min-width:0}
.cz-legal-entry__more{font-size:.86rem;white-space:nowrap;font-weight:750;color:var(--cz7-green)}
.cz-legal-entry--unlinked{background:#f8faf9;color:#394b40;padding:14px 18px!important}
.cz-legal-entry--unlinked .cz-legal-entry__title{font-weight:500}
.cz-legal-entry__note{font-size:.82rem;color:#52645a;font-weight:650}
.cz-legal-footnote{padding:17px 19px;border-radius:12px;background:var(--cz7-soft);font-size:.96rem}
.cz-legal-footnote a{color:var(--cz7-green)!important;text-decoration:underline!important;font-weight:750}

/* EQUASS QUALITY DOCUMENTS (pasted at the end of the existing EQUASS page) */
.cz-eq-docs{margin-top:32px;padding-top:8px}
.cz-eq-docs__intro{margin:0 0 26px;padding:clamp(19px,3vw,28px);border:1px solid var(--cz7-line);background:linear-gradient(130deg,#f1f8f3 0%,#fff 90%);border-radius:15px}
.cz-eq-docs__eyebrow{font-weight:750;font-size:.82rem;letter-spacing:.08em;text-transform:uppercase;color:var(--cz7-green);margin:0 0 7px!important}
.cz-eq-docs__intro h2{margin:0 0 9px!important;color:var(--cz7-dark);font-size:clamp(1.5rem,2.6vw,2.1rem);font-weight:750}
.cz-eq-docs__intro p:last-child{margin:0;max-width:80ch;color:#405748}
.cz-eq-docs__group{margin:0 0 23px}
.cz-eq-docs__group-heading{display:flex;justify-content:space-between;align-items:start;gap:16px;border-bottom:2px solid #cddfd2;padding:0 2px 12px;margin:0 0 13px}
.cz-eq-docs__group-heading h3{font-size:clamp(1.2rem,2vw,1.5rem);line-height:1.35;color:var(--cz7-dark);margin:0 0 6px;font-weight:750}
.cz-eq-docs__group-heading p{margin:0!important;font-size:.96rem;color:var(--cz7-mute)}
.cz-eq-docs__group-heading>span{font-size:.84rem;white-space:nowrap;color:var(--cz7-green);background:#e9f4ed;padding:4px 10px;border-radius:14px;font-weight:750}
.cz-eq-docs__list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;list-style:none!important;margin:0!important;padding:0!important}
.cz-eq-docs__list li{margin:0!important;list-style:none!important;min-width:0}
.cz-eq-docs__list a{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 17px;height:100%;min-height:70px;color:var(--cz7-dark)!important;text-decoration:none!important;border:1px solid var(--cz7-line);border-radius:12px;background:#fff}
.cz-eq-docs__list a:hover{background:var(--cz7-soft);border-color:#a2c6ae}
.cz-eq-docs__list a:hover .cz-eq-docs__name{text-decoration:underline;text-underline-offset:4px}
.cz-eq-docs__name{font-size:.97rem;line-height:1.5;font-weight:650;min-width:0}
.cz-eq-docs__file{flex:0 0 auto;background:#e6f1e9;color:#184b32;border:1px solid #cde3d2;border-radius:5px;padding:4px 7px;line-height:1.2;font-size:.68rem;font-weight:800;letter-spacing:.025em}
.cz-eq-docs__footer{padding:16px 20px;background:var(--cz7-soft);border-radius:12px;color:#324c3c;margin-top:26px!important;font-size:.96rem}
.cz-eq-docs__footer a{color:var(--cz7-green)!important;text-decoration:underline!important;font-weight:750}

/* NEWS: make card images a full-frame preview instead of cropping subjects. */
.cz-news-card__media{display:grid!important;place-items:center;aspect-ratio:16/10;background:#eef3ef;overflow:hidden}
.cz-news-card__media .cz-news-card__img{width:100%!important;height:100%!important;max-width:100%;max-height:100%;object-fit:contain!important;object-position:center center!important;display:block}
/* The previous code used page-gallery (hard-cropped at image generation). The v7
   single-post.php requests the FULL image instead. CSS alone cannot restore it. */
.cz-news-article__cover{max-width:1000px;margin:26px auto 38px;padding:clamp(10px,2vw,18px);background:#f1f5f2;border:1px solid #e0e9e3;border-radius:16px;text-align:center}
.cz-news-article__cover .cz-news-article__cover-img{width:auto!important;max-width:100%!important;height:auto!important;max-height:min(75vh,720px)!important;display:block;margin:0 auto;object-fit:contain!important;object-position:center!important;border-radius:7px}
.cz-news-article__cover figcaption{margin:10px auto 0;max-width:72ch;font-size:.9rem;color:#405549}

/* Classic WordPress [gallery], which generates dl/dt/dd and 'clear:both' breaks.
   Every image fits, no clipping of faces, captions, documents, or portrait photos. */
.cz-news-article__body .gallery{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:stretch;max-width:100%;margin:27px 0 35px!important;padding:0!important;clear:both}
.cz-news-article__body .gallery .gallery-item{float:none!important;display:block!important;width:auto!important;min-width:0;max-width:none!important;margin:0!important;padding:0!important;border:1px solid #dce8df;border-radius:12px;background:#f3f7f3;overflow:hidden;box-sizing:border-box}
.cz-news-article__body .gallery .gallery-icon{width:100%;height:auto;aspect-ratio:4/3;display:grid;place-items:center;margin:0!important;padding:9px!important;overflow:hidden}
.cz-news-article__body .gallery .gallery-icon a{display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;border-radius:7px;overflow:hidden}
.cz-news-article__body .gallery .gallery-icon img{display:block!important;width:100%!important;height:100%!important;min-width:0!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;border:0!important;box-shadow:none!important;border-radius:5px}
.cz-news-article__body .gallery .gallery-caption{padding:4px 11px 10px!important;margin:0!important;font-size:.84rem;line-height:1.45;text-align:left;color:#385241}
.cz-news-article__body .gallery>br{display:none!important}
.cz-news-article__body .gallery :is(a,button):focus-visible{outline:3px solid #095f3a!important;outline-offset:-3px!important}
/* Gutenberg gallery and individual blocks, if the site adds them later */
.cz-news-article__body .wp-block-gallery{gap:14px!important;align-items:stretch}
.cz-news-article__body .wp-block-gallery :is(.wp-block-image,figure){background:#f3f7f3;border-radius:12px;padding:9px;display:grid;place-items:center;overflow:hidden}
.cz-news-article__body .wp-block-gallery img{display:block!important;width:100%!important;height:auto!important;max-width:100%!important;object-fit:contain!important}
.cz-news-article__body .wp-block-gallery figcaption{font-size:.84rem;text-align:center}
@media(max-width:780px){.cz-eq-docs__list{grid-template-columns:1fr}.cz-news-article__body .gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:430px){.cz-legal-entry>a,.cz-legal-entry--unlinked{padding:14px}.cz-legal-section{margin-bottom:30px}.cz-eq-docs__group-heading{flex-wrap:wrap}.cz-news-article__body .gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cz-news-article__body .gallery .gallery-icon{padding:5px!important}.cz-news-article__cover{padding:7px}}
/* Contrast/reduced-motion preferences from existing header v4 */
body.cz-high-contrast .cz-legal-page :is(a,h2),body.cz-high-contrast .cz-eq-docs :is(a,h2,h3){color:#003c8f!important}
body.cz-high-contrast .cz-legal-page,body.cz-high-contrast .cz-eq-docs{color:#000!important;background:#fff!important}
@media(prefers-reduced-motion:reduce){.cz-legal-page *, .cz-eq-docs *{transition:none!important}}
