/* Atelier 500 – main stylesheet (návrh B) */
:root {
	--ink: #111111;
	--muted: #6b6b6b;
	--soft: #8a8a8a;
	--line: #d9d9d9;
	--bg: #f4f4f4;
	--bgword: #ebebeb;
	--pad: clamp(20px, 4.45vw, 64px);
	--gap: 24px;
	--max: 1440px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, Helvetica, Arial, sans-serif; font-weight: 400; font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--muted); }
b, strong { font-weight: 600; }
.a5-skip { position: absolute; left: -9999px; }
.a5-skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 100; }
main { max-width: var(--max); margin: 0 auto; }
.a5-wrap { padding-left: var(--pad); padding-right: var(--pad); }
.a5-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* type */
.a5-label { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.a5-label--dark { color: #8c8c8c; }
.a5-display { font-size: clamp(34px, 3.2vw, 46px); font-weight: 300; line-height: 1.08; letter-spacing: -.03em; margin: 0; }
.a5-display b { font-weight: 600; }
.a5-display--l { font-size: clamp(38px, 3.9vw, 56px); line-height: 1.02; letter-spacing: -.035em; }
.a5-display--xl { font-size: clamp(48px, 5vw, 72px); line-height: 1; letter-spacing: -.035em; }
.a5-display sup { font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--soft); vertical-align: top; margin-left: 8px; }
.a5-lead { font-size: 17px; font-weight: 300; line-height: 1.65; color: #3a3a3a; max-width: 620px; margin: 0; }
.a5-link { font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--ink); padding-bottom: 2px; white-space: nowrap; }

/* header */
.a5-header { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 36px var(--pad); position: relative; z-index: 20; }
.a5-logo img { height: 26px; width: auto; }
.a5-nav { list-style: none; display: flex; gap: 40px; margin: 0; padding: 0; font-size: 14px; letter-spacing: .04em; }
.a5-nav .current-menu-item > a { font-weight: 600; }
.a5-menu-toggle { display: none; background: none; border: 0; font: inherit; font-size: 14px; letter-spacing: .04em; padding: 10px 0; cursor: pointer; min-height: 44px; }

/* hero (úvod) */
.a5-hero { display: flex; flex-direction: column; gap: 20px; }
.a5-hero__img { width: 100%; height: auto; }
.a5-hero__cap { display: grid; grid-template-columns: 6fr 3fr 2fr 1fr; gap: var(--gap); align-items: end; padding-top: 10px; }
.a5-hero__title { font-size: 22px; letter-spacing: -.01em; }
.a5-hero__title b { font-weight: 500; }
.a5-kv { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.a5-hero__cap .a5-link { justify-self: end; }

/* intro */
.a5-intro { row-gap: 56px; padding-top: 128px; padding-bottom: 128px; }
.a5-intro__label { grid-column: span 3; padding-top: 14px; }
.a5-intro__body { grid-column: 4 / span 7; display: flex; flex-direction: column; gap: 24px; }
.a5-services { grid-column: 4 / span 9; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.a5-services > a:hover b span { transform: translateX(4px); }
.a5-services b span { display: inline-block; font-weight: 400; font-size: inherit; color: inherit; transition: transform .2s; }
.a5-services > a:hover { color: var(--ink); }
.a5-services > a:hover span:not(b span) { color: var(--ink); }
.a5-services > * { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--ink); }
.a5-services b { font-size: 20px; letter-spacing: -.01em; }
.a5-services span { font-size: 14px; font-weight: 300; color: var(--muted); }
.a5-intro__more { grid-column: 4 / span 4; justify-self: start; font-size: 22px; font-weight: 500; letter-spacing: -.01em; padding-bottom: 4px; }

/* about */
.a5-about { align-items: end; padding-top: 32px; padding-bottom: 160px; }
.a5-about--page { padding-top: 64px; }
.a5-about__text { grid-column: 1 / span 8; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 28px; }
.a5-about__text > * { grid-column: 4 / span 5; }
.a5-about__text > .a5-label { grid-column: 1 / span 3; grid-row: 1; padding-top: 4px; }
.a5-about__text > .a5-about__name { grid-row: 1; }
.a5-about__text p { margin: 0; color: #3a3a3a; line-height: 1.7; }
.a5-about__name { display: flex; flex-direction: column; gap: 6px; }
.a5-about__name > span:first-child { font-weight: 300; color: var(--soft); }
.a5-about__img { grid-column: 9 / span 4; justify-self: end; width: 70%; height: auto; aspect-ratio: auto; object-fit: contain; }

/* big background words */
.a5-bgword { position: absolute; z-index: 0 !important; font-weight: 600; line-height: .85; color: var(--bgword); white-space: nowrap; z-index: 0; pointer-events: none; user-select: none; }
.a5-bgword--top { left: 2.8%; top: -20px; font-size: min(20.8vw, 300px); letter-spacing: .08em; }
.a5-bgword--mid { left: 7%; top: 42%; font-size: min(29vw, 420px); letter-spacing: .04em; }
.a5-bgword--detail { left: 2.8%; top: 58%; font-size: min(9vw, 130px); letter-spacing: .02em; }
.a5-bgword--news { left: 2.8%; top: -20px; font-size: min(19.4vw, 280px); letter-spacing: .06em; }

/* projects collage */
.a5-projects { position: relative; overflow: hidden; padding: 40px var(--pad) 200px; }
.a5-projects__head { position: absolute; left: 8.3%; top: 110px; width: 34%; display: flex; flex-direction: column; gap: 28px; z-index: 3; }
.a5-filter { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; }
.a5-filter a { color: var(--muted); }
.a5-filter a[aria-current] { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.a5-collage { position: relative; width: 100%; z-index: 1; }
.a5-tile { position: absolute; margin: 0; z-index: 1; }
.a5-tile__img { display: block; position: relative; z-index: 1; }
.a5-tile__img img { width: 100%; height: 100%; object-fit: cover; }
.a5-tile figcaption { padding-top: 12px; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); line-height: 1.7; }
.a5-tile--r figcaption { text-align: right; }
.a5-tile figcaption b { display: block; color: var(--ink); letter-spacing: .08em; }
@media (hover: hover) and (min-width: 901px) {
	/* Fotka je v plnej (zväčšenej) veľkosti a v pokoji zmenšená – pri zväčšení je ostrá. */
	.a5-tile__img img { position: absolute; top: -20%; width: 140%; height: 140%; max-width: none; transform: scale(.714286); transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s; }
	.a5-tile--r .a5-tile__img img { right: 0; transform-origin: right center; }
	.a5-tile--l .a5-tile__img img { left: 0; transform-origin: left center; }
	.a5-tile--first .a5-tile__img img { top: 0; transform-origin: right top; }
	.a5-tile:hover { z-index: 10; }
	.a5-tile:hover .a5-tile__img img { transform: none; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
	.a5-tile:hover figcaption { visibility: hidden; }
}

/* detail */
.a5-detail__top { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding: 40px var(--pad) 0; align-items: start; }
.a5-detail__head { position: relative; z-index: 2; padding: 30px 8% 0 calc(8.3% - var(--pad)); display: flex; flex-direction: column; gap: 40px; }
.a5-detail__head .a5-display { margin-top: -20px; }
.a5-back { display: inline-flex; align-items: center; margin-bottom: 0; padding: 6px 0; line-height: 1; color: var(--ink); align-self: flex-start; }
.a5-detail__spacer { height: 72px; }
.a5-back svg { display: block; transition: transform .2s; }
.a5-back:hover svg { transform: translateX(-4px); }
.a5-facts, .a5-credits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; margin: 0; }
.a5-facts dd, .a5-credits dd { margin: 6px 0 0; }
.a5-facts dd { font-size: 15px; font-weight: 400; line-height: 1.45; color: #2a2a2a; }
.a5-credits dd { font-size: 13px; color: #3a3a3a; line-height: 1.6; }
.a5-detail__hero { display: block; position: relative; z-index: 1; }
.a5-detail__hero img { width: 100%; height: 100%; object-fit: cover; }
.a5-detail__hero.is-portrait { width: 62%; }
.a5-detail__text { row-gap: 48px; padding: 96px var(--pad) 120px; }
.a5-detail__lead { grid-column: 1 / span 5; margin: 0; font-size: 24px; font-weight: 300; line-height: 1.45; letter-spacing: -.015em; }
.a5-detail__body { grid-column: 7 / span 6; display: flex; flex-direction: column; gap: 20px; font-size: 15px; font-weight: 300; line-height: 1.75; color: #3a3a3a; }
.a5-detail__body p { margin: 0; }
.a5-credits { margin-top: 20px; }

/* gallery (justified rows) */
.a5-gallery { display: flex; flex-direction: column; gap: var(--gap); padding: 0; }
.a5-gallery__row { display: flex; gap: var(--gap); }
.a5-gallery__row.is-solo { justify-content: center; }
.a5-gallery__item { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.a5-gallery__item > a { display: block; width: 100%; }
.a5-gallery__row img { width: 100%; height: 100%; object-fit: cover; }
.a5-gallery__item figcaption { font-size: 13px; line-height: 1.5; color: var(--soft); }
.a5-lightbox__cap { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; text-align: center; color: #cfcfcf; font-size: 13px; padding: 0 72px; }
.a5-lightbox__cap:empty { display: none; }
.a5-lb { cursor: zoom-in; }

/* pager */
.a5-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--gap); align-items: end; padding-top: 120px; padding-bottom: 140px; }
.a5-pager a:not(.a5-link) { display: flex; flex-direction: column; gap: 8px; font-size: 22px; font-weight: 300; letter-spacing: -.01em; }
.a5-pager__next a { align-items: flex-end; text-align: right; }

/* news */
.a5-news { position: relative; overflow: hidden; padding: 110px calc(var(--pad) + 4%) 160px; display: flex; flex-direction: column; gap: 96px; }
.a5-news__head { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 20px; }
.a5-news__head p { margin: 0; font-size: 15px; font-weight: 300; color: #555; }
.a5-news__item { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.a5-news__img { grid-column: span 6; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #e4e4e4; }
.a5-news__txt { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
.a5-news__txt h2 { margin: 0; font-size: 30px; font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
.a5-news__txt p { margin: 0; font-size: 15px; font-weight: 300; line-height: 1.7; color: #3a3a3a; }
.a5-news__txt .a5-link { align-self: flex-start; }
.a5-pagination { display: flex; gap: 16px; font-size: 14px; }
.a5-pagination .current { font-weight: 600; }

/* article / generic page */
.a5-article { padding-top: 64px; padding-bottom: 140px; }
.a5-article__head { max-width: 900px; margin: 0 auto 48px; }
.a5-article__img { margin: 0 auto 56px; max-width: 1100px; }
.a5-content { max-width: 720px; margin: 0 auto; font-size: 17px; font-weight: 300; line-height: 1.75; color: #3a3a3a; }
.a5-content img { margin: 32px 0; }
.a5-content a { border-bottom: 1px solid currentColor; }
.a5-content input, .a5-content textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); background: #fff; }
.a5-content input[type=submit], .a5-content button { width: auto; background: var(--ink); color: #fff; border: 0; padding: 14px 28px; cursor: pointer; }

/* footer */
.a5-footer { background: #111; color: #fff; padding: 112px var(--pad) 36px; display: flex; flex-direction: column; gap: 96px; }
.a5-footer a { color: #fff; }
.a5-footer__top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); max-width: calc(var(--max) - 2 * 64px); width: 100%; margin: 0 auto; }
.a5-footer__contact { grid-column: span 5; display: flex; flex-direction: column; gap: 24px; justify-content: space-between; }
.a5-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 32px 48px; }
.a5-ctile { display: flex; flex-direction: column; gap: 14px; transition: color .2s; }
.a5-ctile:hover { color: #8c8c8c; }
.a5-ctile__head { display: flex; justify-content: flex-start; gap: 10px; align-items: center; color: #8c8c8c; }
.a5-ctile__val { font-size: clamp(16px, 1.35vw, 19px); letter-spacing: -.005em; white-space: nowrap; }
.a5-footer__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; font-size: 15px; line-height: 1.5; margin-top: 32px; }
.a5-footer__meta > div { display: flex; flex-direction: column; gap: 8px; }
.a5-map { grid-column: 7 / span 6; aspect-ratio: 16 / 10; border: 1px solid #333; overflow: hidden; background: #1f1f1f; }
.a5-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); }
.a5-footer__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; padding-top: 24px; border-top: 1px solid #2e2e2e; font-size: 12px; line-height: 1.7; color: #8c8c8c; max-width: calc(var(--max) - 2 * 64px); width: 100%; margin: 0 auto; }
.a5-footer__bottom > div { display: flex; flex-direction: column; }
.a5-footer__logo { height: 16px; width: auto; filter: invert(1); opacity: .6; }

/* lightbox */
.a5-footer__seo { margin: 0 auto -72px; font-size: 12px; line-height: 1.7; color: #6f6f6f; max-width: calc(var(--max) - 2 * 64px); width: 100%; }
.a5-lightbox { position: fixed; inset: 0; background: rgba(17,17,17,.96); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.a5-lightbox[hidden] { display: none; }
.a5-lightbox img { max-width: calc(100vw - 160px); max-height: calc(100vh - 110px); width: auto; height: auto; background: #f3f3f3; }
.a5-lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 28px; cursor: pointer; min-width: 56px; min-height: 56px; }
.a5-lightbox__close { top: 16px; right: 16px; }
.a5-lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.a5-lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

/* responsive */
@media (max-width: 900px) {
	.a5-header { padding-top: 20px; padding-bottom: 20px; }
	.a5-menu-toggle { display: block; }
	.a5-nav-wrap { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); padding: 8px var(--pad) 24px; }
	.a5-nav-wrap.is-open { display: block; }
	.a5-nav { flex-direction: column; gap: 0; font-size: 18px; }
	.a5-nav a { display: block; padding: 12px 0; }
	.a5-grid, .a5-footer__top { grid-template-columns: 1fr; row-gap: 32px; }
	.a5-grid > *, .a5-footer__top > * { grid-column: 1 / -1 !important; }
	.a5-hero__cap { grid-template-columns: 1fr 1fr; align-items: start; }
	.a5-hero__title { grid-column: 1 / -1; }
	.a5-hero__cap .a5-link { grid-column: 1 / -1; justify-self: start; }
	.a5-intro { padding-top: 72px; padding-bottom: 72px; row-gap: 32px; }
	.a5-services { grid-template-columns: 1fr; }
	.a5-about { padding-bottom: 96px; }
	.a5-about__text { display: flex; flex-direction: column; gap: 28px; }
	.a5-about__img { width: 49%; justify-self: start; }
	.a5-projects { padding-top: 24px; padding-bottom: 96px; }
	.a5-projects__head { position: relative; left: auto; top: auto; width: auto; margin: 24px 0 40px; }
	.a5-collage { aspect-ratio: auto !important; display: flex; flex-direction: column; gap: 40px; }
	.a5-tile { position: static; width: 100% !important; }
	.a5-tile figcaption { text-align: left !important; }
	.a5-bgword--mid { display: none; }
	.a5-detail__top { grid-template-columns: 1fr; }
	.a5-detail__head { padding: 0; }
	.a5-detail__hero.is-portrait { width: 100%; }
	.a5-detail__text { padding: 56px var(--pad) 72px; }
	.a5-gallery { padding: 0; }
	.a5-gallery__row { flex-direction: column; }
	.a5-gallery__item { flex: none !important; width: 100%; }
	.a5-pager { grid-template-columns: 1fr; padding-top: 72px; padding-bottom: 96px; }
	.a5-pager__next a { align-items: flex-start; text-align: left; }
	.a5-news { padding: 56px var(--pad) 96px; gap: 56px; }
	.a5-news__item { grid-template-columns: 1fr; row-gap: 20px; }
	.a5-news__img, .a5-news__txt { grid-column: 1 / -1; }
	.a5-footer { padding-top: 72px; gap: 56px; }
	.a5-footer__seo { margin-bottom: -32px; }
	.a5-tiles, .a5-footer__meta { grid-template-columns: 1fr; }
	.a5-footer__bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
	.a5-lightbox img { max-width: 100vw; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* Menšie písmo na mobile */
@media (max-width: 900px) {
	.a5-display { font-size: 24px; }
	.a5-display--l { font-size: 24px; }
	.a5-display--xl { font-size: 34px; }
	.a5-lead { font-size: 15px; }
	.a5-hero__title { font-size: 19px; }
	.a5-services b { font-size: 18px; }
	.a5-intro__more { font-size: 18px; }
	.a5-facts dd { font-size: 14px; }
	.a5-facts { gap: 20px 16px; }
	.a5-detail__lead { font-size: 16px; line-height: 1.55; }
	.a5-detail__top { padding-top: 8px; display: flex; flex-direction: column; gap: 16px; }
	.a5-detail__head { display: contents; }
	.a5-detail__head .a5-display { margin-top: 0; order: 2; }
	.a5-back { order: 1; }
	.a5-detail__hero { order: 3; margin-top: 8px; }
	.a5-facts { order: 4; margin-top: 12px; }
	.a5-detail__body { font-size: 14px; }
	.a5-pager a:not(.a5-link) { font-size: 17px; }
	.a5-news__txt h2 { font-size: 22px; }
	.a5-content { font-size: 15px; }
	.a5-footer__meta { font-size: 14px; }
}

/* Mapa – náhľad pred načítaním */
.a5-map__load { width: 100%; height: 100%; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #1a1a1a; border: 1px solid #2e2e2e; color: #fff; font: inherit; cursor: pointer; transition: border-color .2s; padding: 24px; }
.a5-map__load:hover { border-color: #8c8c8c; }
.a5-map__title { font-size: 16px; font-weight: 500; border-bottom: 1px solid #fff; padding-bottom: 2px; }
.a5-map__note { font-size: 12px; color: #8c8c8c; text-align: center; }

/* Stránka Kontakt */
.a5-facts--kontakt { margin: 32px 0 40px; }
.a5-facts--kontakt a { border-bottom: 1px solid currentColor; }
.a5-kontakt__company { font-size: 13px; line-height: 1.7; color: var(--soft); }

/* Úvod – klikateľný projekt pod hlavnou fotkou */
.a5-hero__link { display: block; }
.a5-hero__title a, .a5-kv__links a { color: inherit; border-bottom: 1px solid transparent; transition: border-color .2s; }
.a5-hero__title a:hover, .a5-kv__links a:hover { border-bottom-color: currentColor; color: inherit; }

/* Galéria – viac vzduchu okolo fotiek, pôdorysov a rezov */
.a5-gallery { gap: 180px; }
.a5-gallery__row { gap: 64px; }
@media (max-width: 900px) {
	.a5-gallery { gap: 64px; }
	.a5-gallery__row { gap: 64px; }
}

/* Doplnková skica v koláži – bez popisku, na mobile skrytá */
.a5-tile--extra .a5-tile__img img { object-fit: contain; }

/* Úvod – pod hlavnou fotkou: na počítači odkaz na projekt, na mobile na všetky projekty */
.a5-only-mobile { display: none !important; }
@media (max-width: 900px) {
	.a5-only-desktop { display: none !important; }
	.a5-only-mobile { display: inline-block !important; }
}

/* Názov projektu so skicami za projektom: na počítači pod projektom, na mobile pod poslednou skicou */
.a5-tile figcaption.a5-cap-mob { display: none; }
@media (max-width: 900px) {
	.a5-tile figcaption.a5-cap-mob { display: block; }
	.a5-tile figcaption.a5-cap-desk { display: none; }
}

/* Mobil: filtre projektov v jednom riadku, posúvanie prstom do strany */
@media (max-width: 900px) {
	.a5-filter { flex-wrap: nowrap; overflow-x: auto; gap: 22px; padding-bottom: 6px; margin-right: calc(-1 * var(--pad)); padding-right: var(--pad); scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
		-webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
	.a5-filter::-webkit-scrollbar { display: none; }
	.a5-filter li { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
}

/* Mobil: menšia medzera nad nadpisom Projekty / kategórie */
@media (max-width: 900px) {
	.a5-projects { padding-top: 24px; }
	.a5-projects__head { margin-top: 0; }
}

/* Mobil: veľké sivé slovo v pozadí nesmie byť zhora orezané */
@media (max-width: 900px) {
	.a5-bgword--top, .a5-bgword--news { top: 2px; }
}

/* Mobil: pri každom projekte najprv skice, posledná fotka/vizualizácia s názvom */
@media (max-width: 900px) {
	.a5-collage .a5-tile { order: var(--o, 0); }
	.a5-tile figcaption.a5-cap-mob { display: none; }
	.a5-tile figcaption.a5-cap-desk { display: block; }
}

/* Mobil: skice vypnuté pre telefón */
@media (max-width: 900px) {
	.a5-collage .a5-tile--mhide { display: none !important; }
}

/* RCIS – skica polikliniky o 20 % menšia (len počítač) */
@media (min-width: 901px) {
	.a5-gallery__row.is-solo .a5-gallery__item:has(a[href*="rcis-surany-skica"]) { flex: 0 0 53% !important; }
}

/* Tablet (700–900 px): zoznam projektov rozmiestnený ako na počítači */
@media (min-width: 700px) and (max-width: 900px) {
	.a5-collage { display: block; aspect-ratio: var(--ar) !important; }
	.a5-collage .a5-tile { position: absolute; width: var(--w) !important; display: block !important; }
	.a5-collage .a5-tile--r figcaption { text-align: right !important; }
	.a5-tile figcaption { font-size: 10px; padding-top: 8px; }
}

/* Tablet (700–900 px): kontakty v pätičke vedľa seba */
@media (min-width: 700px) and (max-width: 900px) {
	.a5-tiles, .a5-footer__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
	.a5-map { aspect-ratio: 16 / 7; }
}

/* Tablet: obrázky v zozname projektov o 10 % väčšie (najviac po stredovú os) */
@media (min-width: 700px) and (max-width: 900px) {
	.a5-collage { width: auto; margin-left: -16px; margin-right: -16px; }
	.a5-collage .a5-tile { width: min(calc(var(--w) * 1.1), 50%) !important; }
	.a5-collage .a5-tile--l { left: auto !important; right: 50%; }
}

/* Tablet: pri zväčšených obrázkoch úmerne zväčšiť aj zvislé rozostupy, aby sa nedotýkali */
@media (min-width: 700px) and (max-width: 900px) {
	.a5-collage { aspect-ratio: calc(var(--arn) / 1.12) !important; }
}

/* Tablet (700–900 px): detail projektu rozložený ako na počítači */
@media (min-width: 700px) and (max-width: 900px) {
	.a5-detail__top { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding-top: 24px; }
	.a5-detail__head { display: flex; flex-direction: column; gap: 28px; padding: 6px 6% 0 0; }
	.a5-detail__head .a5-display { order: 0; margin-top: -8px; }
	.a5-back, .a5-detail__hero, .a5-detail__top .a5-facts { order: 0; margin-top: 0; }
	.a5-detail__hero.is-portrait { width: 100%; }
	.a5-detail__text.a5-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: 32px; }
	.a5-detail__text .a5-detail__lead { grid-column: 1 / span 5 !important; font-size: 18px; line-height: 1.5; }
	.a5-detail__text .a5-detail__body { grid-column: 1 / -1 !important; }
	.a5-gallery { gap: 96px; }
	.a5-gallery__row { flex-direction: row; gap: 32px; }
	.a5-gallery__item { flex: var(--f, 1 1 0) !important; width: auto; }
	.a5-pager { grid-template-columns: 1fr auto 1fr; }
	.a5-pager__next a { align-items: flex-end; text-align: right; }
}

/* Tablet: titulná fotka na šírku zostáva na celú šírku (názov, fotka, údaje pod sebou); fotka na výšku je vpravo vedľa údajov */
@media (min-width: 700px) and (max-width: 900px) {
	.a5-detail__top:has(.a5-detail__hero:not(.is-portrait)) { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
	.a5-detail__top:has(.a5-detail__hero:not(.is-portrait)) .a5-detail__head { display: contents; }
	.a5-detail__top:has(.a5-detail__hero:not(.is-portrait)) .a5-back { order: 1; }
	.a5-detail__top:has(.a5-detail__hero:not(.is-portrait)) .a5-detail__head .a5-display { order: 2; margin-top: 0; }
	.a5-detail__top:has(.a5-detail__hero:not(.is-portrait)) .a5-detail__hero { order: 3; margin-top: 8px; }
	.a5-detail__top:has(.a5-detail__hero:not(.is-portrait)) .a5-facts { order: 4; margin-top: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Tablet: úvodný text v úvodzovkách na celú šírku; mená (architekti…) každé v jednom riadku */
@media (min-width: 700px) and (max-width: 900px) {
	.a5-detail__text .a5-detail__lead { grid-column: 1 / -1 !important; }
	.a5-detail__lead::before { content: "„"; }
	.a5-detail__lead::after { content: "“"; }
	.a5-facts .a5-fact--people { grid-column: 1 / -1; }
	.a5-facts .a5-nw { white-space: nowrap; }
}

/* Všetky zariadenia: úvodný text v úvodzovkách; meno a priezvisko vždy v jednom riadku */
.a5-detail__lead::before { content: "„"; }
.a5-detail__lead::after { content: "“"; }
.a5-facts .a5-nw { white-space: nowrap; }
.a5-facts .a5-fact--people { grid-column: 1 / -1; }
