/* Profy Advertising – front-end */

.pa-zone { clear: both; margin: 20px 0; }
.pa-wrap > .pa-zone { margin: 0 0 30px; }
.pa-zone[data-mode="rotate"] .pa-banner:not(:first-child),
.pa-zone[data-mode="single"] .pa-banner:not(:first-child) { display: none; }
.pa-zone .pa-banner[hidden] { display: none !important; }
.pa-zone[data-mode="all"] .pa-banner + .pa-banner { margin-top: 16px; }

.pa-banner { position: relative; text-align: center; }
.pa-banner .pa-link { position: relative; display: inline-block; max-width: 100%; vertical-align: top; text-decoration: none; color: inherit; line-height: 0; }
.pa-type-card .pa-link, .pa-house .pa-link { display: block; line-height: normal; }
.pa-banner img.pa-img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 6px; }
.pa-layout-wide .pa-banner img.pa-img { max-height: 420px; width: auto; }
.pa-label { position: absolute; top: 6px; right: 6px; padding: 1px 6px; font-size: 10px; line-height: 16px; letter-spacing: .04em; color: #fff; background: rgba(0,0,0,.55); border-radius: 3px; pointer-events: none; }

/* content card */
.pa-card { display: flex; overflow: hidden; border-radius: 10px; text-align: left; min-height: 200px; }
.pa-card-wide { flex-direction: row; }
.pa-card-box, .pa-card-popup { flex-direction: column; }
.pa-card-media { display: block; flex: 0 0 40%; position: relative; background: #111; }
.pa-card-box .pa-card-media, .pa-card-popup .pa-card-media { flex: 0 0 auto; }
.pa-card-noimage .pa-card-media { display: none; }
.pa-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; min-height: 200px; }
.pa-card-box .pa-card-media img, .pa-card-popup .pa-card-media img { height: auto; max-height: 420px; }
.pa-card-body { display: flex; flex: 1 1 auto; flex-direction: column; justify-content: center; gap: 8px; padding: 24px 28px; }
.pa-card-kicker { font-size: 11px; letter-spacing: .12em; opacity: .7; }
.pa-card-title { font-size: 26px; line-height: 1.15; font-weight: 800; }
.pa-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; opacity: .85; }
.pa-card-flag { width: 18px; height: auto; border-radius: 2px; }
.pa-card-text { font-size: 15px; line-height: 1.4; }
.pa-card-cta { display: inline-block; align-self: flex-start; margin-top: 6px; padding: 9px 18px; border-radius: 6px; font-size: 14px; font-weight: 700; }
.pa-card-dark { background: #1b1f24; color: #fff; }
.pa-card-dark .pa-card-cta { background: #2b8e9f; color: #fff; }
.pa-card-light { background: #fff; color: #1b1f24; border: 1px solid #e3e6ea; }
.pa-card-light .pa-card-cta { background: #1b1f24; color: #fff; }
.pa-card-accent { background: linear-gradient(59deg, #2b8e9f 4%, #3fb1c2 100%); color: #fff; }
.pa-card-accent .pa-card-cta { background: #fff; color: #2b8e9f; }
.pa-type-card .pa-link:hover .pa-card-cta { filter: brightness(1.08); }

/* built-in house block */
.pa-house-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 24px; border-radius: 10px; background: linear-gradient(59deg, #1b1f24 0%, #2b8e9f 100%); color: #fff; text-align: center; }
.pa-house-title { font-size: 22px; font-weight: 800; }
.pa-house-text { font-size: 15px; opacity: .9; max-width: 640px; }
.pa-house-inner .pa-card-cta { background: #fff; color: #1b1f24; align-self: center; }

/* pop-up */
.pa-popup[hidden] { display: none; }
.pa-popup, .pa-popup * { box-sizing: border-box; }
.pa-popup { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 24px; --pa-popup-max: 92vh; }
.pa-popup-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .65); }
/* fixed stage: width from settings, height from the ratio, never taller than the screen */
.pa-popup-dialog { position: relative; width: min(var(--pa-w, 800px), 100%, calc((var(--pa-popup-max) - 60px) * var(--pa-r, 1.3333))); max-height: var(--pa-popup-max); overflow: visible; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.4); padding: 12px; }
.pa-popup-dialog .pa-zone { position: relative; margin: 0; aspect-ratio: var(--pa-r, 1.3333); overflow: hidden; border-radius: 8px; background: var(--pa-bg, #000); }
.pa-popup-dialog .pa-banner { position: absolute; inset: 0; display: none; margin: 0; }
.pa-popup-dialog .pa-banner.is-active { display: block; }
.pa-popup-dialog .pa-banner .pa-link { display: block; width: 100%; height: 100%; line-height: 0; }
.pa-popup-dialog .pa-banner picture { display: block; width: 100%; height: 100%; }
.pa-popup-dialog .pa-banner img.pa-img, .pa-popup-dialog .pa-banner picture img { display: block; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border-radius: 0; object-fit: contain; }
.pa-popup.pa-fit-cover .pa-banner img.pa-img, .pa-popup.pa-fit-cover .pa-banner picture img { object-fit: cover; }
.pa-popup-dialog .pa-card { height: 100%; max-height: none; border-radius: 0; }
.pa-popup-dialog .pa-card-media { flex: 1 1 auto; min-height: 0; }
.pa-popup-dialog .pa-card-media img { height: 100%; max-height: none; object-fit: cover; }
.pa-popup-dialog .pa-card-body { flex: 0 0 auto; }
.pa-popup-dialog .pa-label { top: 6px; right: 6px; }
/* "all stacked": natural heights, scroll inside if needed */
.pa-popup.pa-multi-stack .pa-popup-dialog .pa-zone { aspect-ratio: auto; max-height: calc(var(--pa-popup-max) - 60px); overflow: auto; background: transparent; }
.pa-popup.pa-multi-stack .pa-popup-dialog .pa-banner { position: static; }
.pa-popup.pa-multi-stack .pa-popup-dialog .pa-banner + .pa-banner { margin-top: 12px; }
.pa-popup.pa-multi-stack .pa-popup-dialog .pa-banner img.pa-img { height: auto; }

/* controls: reset first so theme button styles cannot leak in */
#pa-popup .pa-popup-close, #pa-popup .pa-popup-arrow, #pa-popup .pa-popup-dots button { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; cursor: pointer; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
#pa-popup .pa-popup-close { position: absolute; top: -16px; right: -16px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; background: #1b1f24; color: #fff; font-size: 26px; font-weight: 400; line-height: 1; box-shadow: 0 2px 10px rgba(0,0,0,.35); transition: background .2s; }
#pa-popup .pa-popup-close:hover { background: #000; }
#pa-popup .pa-popup-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#pa-popup .pa-popup-close[disabled] { cursor: default; background: #6c757d; color: #fff; font-size: 15px; font-weight: 700; }
#pa-popup .pa-popup-close[disabled] .pa-popup-x { display: none; }
#pa-popup .pa-popup-close:not([disabled]) .pa-popup-count { display: none; }
#pa-popup .pa-popup-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 28px; line-height: 1; padding-bottom: 3px; }
#pa-popup .pa-popup-arrow:hover { background: rgba(0,0,0,.8); }
#pa-popup .pa-popup-prev { left: 20px; }
#pa-popup .pa-popup-next { right: 20px; }
#pa-popup .pa-popup-dots { display: flex; justify-content: center; gap: 8px; padding: 10px 0 0; }
#pa-popup .pa-popup-dots button { width: 10px; height: 10px; border-radius: 50%; background: #c9ced3; }
#pa-popup .pa-popup-dots button.is-active { background: #2b8e9f; }
body.pa-popup-open { overflow: hidden; }

/* fixed on screen: sticky sides, sticky bottom bar, page skin */
.pa-sticky[hidden] { display: none; }
.pa-sticky { position: fixed; z-index: 9990; }
.pa-sticky .pa-zone { margin: 0; }
.pa-sticky .pa-banner img.pa-img { border-radius: 4px; }
.pa-sticky-left, .pa-sticky-right { top: 50%; transform: translateY(-50%); max-height: 90vh; }
.pa-sticky-left { left: 8px; }
.pa-sticky-right { right: 8px; }
.pa-sticky-left .pa-banner img.pa-img, .pa-sticky-right .pa-banner img.pa-img { max-height: 90vh; width: auto; }
.pa-sticky-bottom { left: 0; right: 0; bottom: 0; padding: 6px 48px 6px 8px; background: rgba(255,255,255,.96); box-shadow: 0 -4px 18px rgba(0,0,0,.15); text-align: center; transform: translateY(100%); transition: transform .35s ease; }
.pa-sticky-bottom.is-visible { transform: none; }
.pa-sticky-bottom .pa-banner img.pa-img { max-height: 90px; width: auto; margin: 0 auto; }
.pa-sticky-bottom .pa-label { top: 2px; right: 2px; }
body.pa-has-sticky-bottom { padding-bottom: 104px; }
#pa-sticky-wrap .pa-sticky-close, .pa-sticky .pa-sticky-close { all: unset; box-sizing: border-box; position: absolute; top: -12px; right: -12px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #1b1f24; color: #fff; font: 400 18px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.pa-sticky-bottom .pa-sticky-close { top: 50%; right: 10px; transform: translateY(-50%); }
.pa-sticky-skin { inset: 0; z-index: 0; transform: none; }
.pa-sticky-skin .pa-zone, .pa-sticky-skin .pa-banner, .pa-sticky-skin .pa-banner .pa-link { width: 100%; height: 100%; }
.pa-sticky-skin .pa-banner .pa-link { display: block; }
.pa-sticky-skin .pa-banner img.pa-img { width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: center top; border-radius: 0; }
.pa-sticky-skin .pa-label { top: 8px; left: 8px; right: auto; }
body.pa-has-skin { background: transparent; }
@media (max-width: 768px) {
    .pa-sticky-left, .pa-sticky-right, .pa-sticky-skin { display: none !important; }
    .pa-sticky-bottom { padding-right: 44px; }
    .pa-sticky-bottom .pa-banner img.pa-img { max-height: 100px; }
}

/* slide transitions */
@keyframes pa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pa-slide { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.pa-popup.pa-fx-fade .pa-banner.is-active { animation: pa-fade .45s ease both; }
.pa-popup.pa-fx-slide .pa-banner.is-active { animation: pa-slide .45s ease both; }

@media (max-width: 768px) {
    .pa-card-wide { flex-direction: column; }
    .pa-card-media { flex: 0 0 auto; }
    .pa-card-media img { min-height: 0; max-height: 260px; }
    .pa-card-body { padding: 18px 20px; }
    .pa-card-title { font-size: 21px; }
    .pa-popup { padding: 0; align-items: flex-end; --pa-popup-max: 85vh; }
    .pa-popup-dialog { width: 100%; max-width: none; border-radius: 12px 12px 0 0; }
    .pa-popup-dialog .pa-zone { aspect-ratio: var(--pa-rm, 0.75); max-height: calc(var(--pa-popup-max) - 60px); }
    #pa-popup .pa-popup-close { top: 8px; right: 8px; }
    #pa-popup .pa-popup-arrow { width: 34px; height: 34px; font-size: 24px; }
    .pa-popup.pa-popup-sheet { --pa-popup-max: 70vh; }
}
@media (min-width: 769px) {
    .pa-popup.pa-popup-sheet { align-items: center; }
}

