/* ==========================================================================
   AP Development – galerie grafických návrhů a živý náhled webu (PC / tablet / telefon)
   ========================================================================== */

/* odkazy u dalších referencí (případové studie) */
.ref__links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; }
.ref__links a { font: 500 14px var(--mono); color: var(--em); display: inline-flex; align-items: center; gap: 6px; }
.ref__links a i { font-size: 11px; transition: transform .15s ease; }
.ref__links a:hover { text-decoration: underline; }
.ref__links a:hover i { transform: translate(2px, -2px); }

/* galerie */
.showcase { margin-top: clamp(48px, 7vw, 80px); }
.showcase__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.showcase__shot { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); cursor: zoom-in; aspect-ratio: 16 / 10; transition: transform .2s ease, box-shadow .2s ease; }
.showcase__shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .4s ease; }
.showcase__zoom { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font-size: 14px; opacity: 0; transform: translateY(6px); transition: .2s ease; }
.showcase__badges { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.showcase__badge { padding: 4px 10px; border-radius: 999px; font: 600 12px/1.3 var(--mono); letter-spacing: .02em; background: var(--ink); color: #fff; box-shadow: 0 2px 8px rgba(20, 24, 28, .18); }
.showcase__badge--alt { background: var(--sig); color: var(--ink); }
.showcase__shot:hover, .showcase__shot:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.showcase__shot:hover img { transform: scale(1.03); }
.showcase__shot:hover .showcase__zoom, .showcase__shot:focus-visible .showcase__zoom { opacity: 1; transform: none; }
.showcase__name { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; color: var(--ink); }
.showcase__name span { font-weight: 600; font-size: 16px; line-height: 1.3; }
.showcase__name small { font: 400 13px var(--mono); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.showcase__name small i { font-size: 10px; }
.showcase__name:hover span { color: var(--em); }
.showcase__name:hover small { color: var(--em); }

/* další weby rozbalené tlačítkem */
.js-showcase .showcase:not(.is-open) .showcase__item--more { display: none; }
.showcase.is-open .showcase__item--more { animation: rise .35s ease both; }
.showcase__more { display: flex; justify-content: center; margin-top: 36px; }
.showcase__more { display: none; }
.js-showcase .showcase__more { display: flex; }
.showcase__more .btn > i { transition: transform .25s ease; }
.showcase.is-open .showcase__more .btn > i { transform: rotate(180deg); }

.showcase__etc { margin: 32px 0 0; text-align: center; font: 500 18px/1.4 var(--font); color: var(--muted); }
.js-showcase .showcase:not(.is-open) .showcase__etc { display: none; }
.showcase.is-open .showcase__etc { animation: rise .35s ease both; }

@media (max-width: 1024px) { .showcase__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .showcase__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; } }
@media (max-width: 420px)  { .showcase__grid { grid-template-columns: 1fr; } }

/* modální okno s živým webem */
.modal--site { padding: 16px; }
.spv { display: flex; flex-direction: column; width: min(1480px, 100%); height: calc(100vh - 32px); height: calc(100dvh - 32px); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; animation: rise .25s ease; }
.spv__bar { display: flex; align-items: center; gap: 12px 16px; padding: 12px 14px 12px 22px; border-bottom: 1px solid var(--line); }
.spv__title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spv__devices { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--alt); }
.spv__devices button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--muted); transition: .15s ease; }
.spv__devices button:hover { color: var(--ink); }
.spv__devices button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.spv__open { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--em); white-space: nowrap; }
.spv__open:hover { text-decoration: underline; }
.spv__close { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; background: var(--alt); font-size: 18px; display: flex; align-items: center; justify-content: center; }
.spv__close:hover { background: var(--ink); color: #fff; }

.spv__stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 18px; background: var(--alt) radial-gradient(circle at 1px 1px, rgba(20, 24, 28, .07) 1px, transparent 0) 0 0 / 22px 22px; }
.spv__frame { position: absolute; left: 50%; top: 18px; transform-origin: top center; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); transition: width .25s ease, height .25s ease; }
.spv__frame iframe { display: block; border: 0; background: #fff; transform-origin: top left; }
.spv__frame.is-device { border: 10px solid var(--ink); border-radius: 28px; }
.spv__frame.is-phone { border-radius: 38px; }
.spv__loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 15px; text-align: center; padding: 24px; }
.spv__loading i { font-size: 26px; color: var(--em); }
.spv__loading a { font-size: 14px; color: var(--em); font-weight: 600; }

@media (max-width: 760px) {
    .modal--site { padding: 0; }
    .spv { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; }
    .spv__bar { flex-wrap: wrap; padding: 10px 10px 10px 16px; }
    .spv__title { flex-basis: calc(100% - 60px); font-size: 16px; }
    .spv__devices { order: 3; }
    .spv__devices button { padding: 7px 10px; }
    .spv__devices button span { display: none; }
    .spv__open { order: 4; margin-left: auto; }
    .spv__close { order: 2; }
    .spv__stage { padding: 10px; }
    .spv__frame { top: 10px; }
}
