/* Canon 1.8: shared presentation for the approved sample, home and pattern. */
@layer hw-canon{
 body.hw-grafit :is(.hw-home,.hw-realizacje) .gallery-tabs{display:flex!important;flex-wrap:wrap;gap:12px!important}
 body.hw-grafit :is(.hw-home,.hw-realizacje) .gallery-tabs>button[role="tab"]{display:inline-flex!important;align-items:center;justify-content:center;min-height:44px;padding:12px 20px!important;text-align:center;box-sizing:border-box}
 @media(max-width:480px){body.hw-grafit :is(.hw-home,.hw-realizacje) .gallery-tabs{display:grid!important;grid-template-columns:minmax(0,1fr)}body.hw-grafit :is(.hw-home,.hw-realizacje) .gallery-tabs>button[role="tab"]{width:100%}}
 .hw-toc .hw-toc-toggle[aria-expanded="true"] .hw-toc-chevron{transform:rotate(180deg)!important}
 .hw-toc .hw-toc-toggle[aria-expanded="false"] .hw-toc-chevron{transform:none!important}
 body.hw-grafit .hw-home.hw-media-scope .service-card img{aspect-ratio:3/2!important;transform:none!important}
 body.hw-grafit .site-header .header-search>.sr-only{color:#272722!important}
}
.hw-media-scope .hw-photo{box-sizing:border-box;max-width:100%;margin-inline:0}
.hw-pattern .site-header .nav-list>.nav-item>a,.hw-pattern .site-header .nav-list>.nav-item>details>summary>a{font-size:13px!important;font-weight:700!important}
.hw-media-scope .hw-photo img{display:block;width:100%;max-width:100%;height:auto!important;aspect-ratio:3/2;object-fit:cover;margin-inline:0!important}
.hw-media-scope .hw-photo--half{width:calc((100% - 24px)/2)}
.hw-media-scope .hw-photo--native-300{max-width:300px}
.hw-media-scope .hw-photo--native-449{max-width:449px}
.hw-media-scope .hw-photo-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start;margin-block:24px}
.hw-media-scope .hw-photo-pair>.hw-photo{width:100%;margin-block:0}
.hw-media-scope .hw-photo figcaption{text-align:left;margin-inline:0}
.hw-media-scope :is(.hw-card,.service-card,.project-card)>img,
.hw-media-scope .blog-grid article img{display:block;width:100%!important;max-width:100%;height:auto!important;aspect-ratio:3/2!important;object-fit:cover;border-radius:0!important}
.hw-media-scope .hw-card{display:flex;flex-direction:column;align-self:stretch}
.hw-media-scope .hw-card__body{display:flex;flex-direction:column;flex:1}
.hw-media-scope .hw-card__body>[data-widget_type="button.default"],
.hw-media-scope .hw-card__body>.hw-card-action{margin-top:auto;padding-top:24px}
.hw-media-scope .hw-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.hw-media-scope .hw-gallery .hw-photo{width:100%;margin:0}
.hw-media-scope .hw-gallery a{display:block}
.hw-media-scope .hw-gallery img{aspect-ratio:3/2!important;border-radius:2px}
.hw-media-dialog{box-sizing:border-box;width:max-content;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);padding:16px;border:1px solid #d8d4cc;background:#fbfaf7;color:#252522}
.hw-media-dialog::backdrop{background:rgb(0 0 0 / 75%)}
.hw-media-dialog img{display:block;width:auto;max-width:100%;height:auto;max-height:calc(100vh - 150px);object-fit:contain;margin:auto}
.hw-media-dialog button{display:block;min-width:44px;min-height:44px;margin:0 0 12px auto;padding:8px 16px;background:#d6c2a0;color:#252522;border:1px solid #705c3e;border-radius:3px;font:600 15px/1.4 Arial,sans-serif}
.hw-media-dialog p{font:400 15px/1.4 Arial,sans-serif;margin:12px 0 0}
.hw-media-dialog button:focus-visible,.hw-media-scope .hw-gallery a:focus-visible{outline:2px solid #705c3e;outline-offset:4px}
.hw-sample-elewacje .hw-content>.hw-photo{width:calc(100% - 32px);max-width:1240px;margin-inline:auto}
@media(max-width:768px){
 .hw-media-scope .hw-photo--half{width:100%}
 .hw-media-scope .hw-photo-pair,.hw-media-scope .hw-gallery{grid-template-columns:minmax(0,1fr)}
 .hw-media-scope .hw-gallery .hw-photo{max-width:400px}
}

/* Align actions within each row, allowing descriptions to keep their full text. */
@layer hw-canon{
 :is(body.hw-grafit .hw-home,.hw-pattern) .service-copy{display:flex!important;flex-direction:column!important;flex:1!important}
 :is(body.hw-grafit .hw-home,.hw-pattern) .service-copy>.service-link{margin-top:auto!important}
 :is(body.hw-grafit .hw-home,.hw-pattern) .component-grid>article>div{display:flex!important;flex-direction:column!important;flex:1!important;min-width:0}
 :is(body.hw-grafit .hw-home,.hw-pattern) .component-links{margin-top:auto!important;padding-top:16px}
}
