.complex-view {
    --cv-ink: #241b35;
    --cv-muted: #625b70;
    --cv-accent: #5832ab;
    --cv-border: #e5dfee;
    --cv-soft: #f4effb;
    background: #f8f6fb;
    color: var(--cv-ink);
    font-size: 14px;
    line-height: 1.85;
    text-align: start;
    padding-block: 14px 36px;
}

.complex-view, .complex-view *,
.complex-view *::before, .complex-view *::after { box-sizing: border-box; }
.complex-view a { color: var(--cv-accent); }
.complex-view :focus-visible, #termsModal :focus-visible { outline: 2px solid #8255d6; outline-offset: 3px; }
.complex-view [id] { scroll-margin-top: 96px; }
.complex-view :is(h1,h2,h3,h4,h5,h6,p,li,dt,dd) {
    letter-spacing: normal;
    overflow-wrap: anywhere;
}
.complex-view p { font-size: inherit; line-height: inherit; color: inherit; }
.complex-view .cv-shell { width: min(calc(100% - 32px), 1160px); margin-inline: auto; }
.complex-view :is(.cv-tags,.cv-halls,.cv-sports,.cv-facilities) {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cv-breadcrumb {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--cv-muted);
    font-size: 12px;
    margin-block-end: 10px;
}
.cv-breadcrumb i { font-size: 9px; }

.cv-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 20px;
    background: radial-gradient(ellipse at top right, #4c2b77, #26183e 72%);
}
.cv-hero--text { grid-template-columns: minmax(0, 1fr); }
.cv-hero--text .cv-hero-copy { min-height: 220px; }
.cv-hero-copy {
    align-self: center;
    padding: clamp(22px, 4vw, 48px);
    min-width: 0;
    color: #fff;
}
.complex-view .cv-hero-location { color: #e5d5fb; margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.cv-hero-location i { margin-inline-end: 4px; }
.complex-view .cv-hero h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.45;
    font-weight: 800;
}
.complex-view .cv-hero .cv-intro { color: #f0e8fa; max-width: 50ch; margin: 0; line-height: 1.9; }
.cv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-block-start: 18px; }
.complex-view .cv-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 7px 14px;
    border: 1px solid var(--cv-border);
    border-radius: 9px;
    background: #fff;
    color: var(--cv-accent);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.complex-view .cv-button:hover { background: var(--cv-soft); }
.complex-view .cv-button--light { border-color: #f1e5ff; background: #f1e5ff; color: #352050; }
.complex-view .cv-button--light:hover { background: #fff; }
.complex-view .cv-button--outline { color: #fff; background: transparent; border-color: #a88dc9; }
.complex-view .cv-button--outline:hover { background: #593c77; }
.complex-view .cv-button--primary { background: var(--cv-accent); border-color: var(--cv-accent); color: #fff; }
.complex-view .cv-button--primary:hover { background: #42227f; }
.complex-view .cv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 15px; }
.complex-view .cv-tags a {
    display: block;
    padding: 3px 10px;
    border: 1px solid #a88dc9;
    border-radius: 99px;
    color: #f3eafd;
    font-size: 12px;
}
.cv-hero-photos { min-width: 0; min-height: 305px; background: #382650; direction: ltr; }
.cv-hero-photos .carousel-inner { position: absolute; inset: 0; height: 100%; }
.cv-hero-photos .carousel-item { height: 100%; }
.cv-hero-photos img { display: block; width: 100%; height: 100%; object-fit: cover; color: #fff; text-align: center; }
.cv-photo-controls {
    position: absolute;
    z-index: 1;
    inset-inline-start: 12px;
    inset-block-end: 12px;
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 3px;
    color: #fff;
    background: #221635;
    border-radius: 12px;
    direction: rtl;
    font-size: 12px;
}
.cv-photo-controls button {
    width: 42px;
    height: 42px;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}
.cv-photo-controls button:hover { background: #4e356e; }

.cv-management, .cv-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-block: 12px; }
.cv-management { color: var(--cv-muted); font-size: 13px; }
.cv-jump { gap: 3px 6px; }
.complex-view .cv-jump a {
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: #4d3a68;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
}
.complex-view .cv-jump a:hover { background: var(--cv-soft); color: var(--cv-accent); }

.complex-view .cv-panel, .complex-view .tf-gallery {
    min-width: 0;
    margin: 0 0 14px;
    padding: clamp(14px, 2.2vw, 24px);
    background: #fff;
    border: 1px solid var(--cv-border);
    border-radius: 14px;
    box-shadow: none;
}
.complex-view .cv-heading, .complex-view .tf-gallery h2 {
    margin: 0 0 12px;
    font-size: clamp(17px, 1.8vw, 22px);
    line-height: 1.65;
    font-weight: 800;
    color: var(--cv-ink);
}
.complex-view .cv-subheading { margin: 16px 0 8px; font-size: 15px; line-height: 1.7; font-weight: 750; color: var(--cv-ink); }
.complex-view .cv-muted, .complex-view .tf-gallery p { color: var(--cv-muted); }
.cv-errors ul { margin: 0; }
.cv-halls, .cv-facilities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr));
    gap: 8px;
}
.cv-facilities { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cv-halls li, .cv-facilities li {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px;
    background: #fcfaff;
    border: 1px solid var(--cv-border);
    border-radius: 9px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.7;
}
.cv-tile-icon {
    flex: 0 0 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--cv-accent);
    background: var(--cv-soft);
    border-radius: 8px;
}
.cv-status { display: block; color: var(--cv-muted); font-weight: 500; font-size: 12px; }
.cv-status--available { color: #176247; }
.cv-status i { margin-inline-end: 2px; font-size: 10px; }

.cv-sports { display: flex; flex-wrap: wrap; gap: 7px; }
.cv-sports a, .cv-sports li > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 5px 10px;
    border: 1px solid var(--cv-border);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.55;
}
.cv-sports a:hover { background: var(--cv-soft); text-decoration: none; }
.cv-sports i { font-size: 10px; }

.cv-prose { max-width: 85ch; color: var(--cv-ink); }
.cv-prose :is(p,ul,ol,blockquote,table) { margin-block: 0 10px; line-height: 1.95; }
.cv-prose > div + div { margin-block-start: 14px; }
.cv-prose :is(h1,h2,h3,h4,h5,h6) {
    color: var(--cv-ink);
    font-size: clamp(15px, 1.5vw, 18px);
    font-weight: 750;
    line-height: 1.7;
    margin-block: 16px 8px;
}
.cv-prose :is(img,iframe,video,table) { max-width: 100%; }
.cv-prose :is(img,video) { height: auto; }
.cv-prose table { display: block; overflow-x: auto; }
.cv-prose a, .cv-text-link, .cv-details a { text-decoration: underline; text-underline-offset: 3px; }
.cv-prose > div > :last-child { margin-block-end: 0; }

.cv-location { display: grid; gap: 16px; }
.cv-location--map { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.cv-location > div { min-width: 0; }
.cv-details { margin: 0 0 14px; }
.cv-details > div { padding-block: 8px; border-bottom: 1px solid var(--cv-border); }
.cv-details > div:first-child { padding-block-start: 0; }
.cv-details dt { margin: 0; font-weight: 750; color: var(--cv-ink); font-size: 13px; }
.cv-details dt i { width: 16px; color: var(--cv-accent); }
.cv-details dd { margin: 3px 0 0; color: var(--cv-muted); }
.cv-details a[dir=ltr] { display: inline-block; }
.cv-location-map { display: block; width: 100%; height: 300px; background: var(--cv-soft); border: 1px solid var(--cv-border); border-radius: 10px; }

.cv-event-list + .cv-event-list { margin-block-start: 22px; padding-block-start: 18px; border-top: 1px solid var(--cv-border); }
.cv-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr)); gap: 10px; }
.complex-view .cv-event-strip {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: clamp(160px, 24%, 250px);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 4px;
}
.cv-event-strip .cv-media-card { scroll-snap-align: start; }
.complex-view .cv-media-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--cv-border);
    border-radius: 10px;
    color: var(--cv-ink);
    background: #fff;
    text-decoration: none;
}
.complex-view .cv-media-card:hover { border-color: #9d80c8; }
.cv-media-image { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--cv-soft); }
.cv-media-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cv-media-copy { padding: 8px 10px; }
.complex-view .cv-media-copy h3 { color: inherit; margin: 0; font-size: 13px; font-weight: 750; line-height: 1.75; }
.cv-media-copy small { color: var(--cv-muted); font-size: 12px; }
.cv-media-play {
    position: absolute;
    inset: 0;
    margin: auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    color: #fff;
    background: #28193de6;
}
.cv-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-block-start: 12px; }

.cv-comment { padding-block: 10px; border-block-end: 1px solid var(--cv-border); }
.cv-comment header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cv-comment p { margin-block: 6px 0; white-space: pre-wrap; }
.cv-comment time { color: var(--cv-muted); font-size: 12px; }
.cv-comment-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--cv-soft); color: var(--cv-accent); }
.cv-reply { margin-block-start: 8px; padding-inline-start: 10px; border-inline-start: 2px solid var(--cv-border); }
.cv-comment-form { display: grid; justify-items: start; gap: 8px; max-width: 680px; margin-block-start: 12px; }
.cv-comment-form label { font-weight: 700; margin: 0; }
.cv-comment-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cec3df;
    border-radius: 8px;
    font: inherit;
    color: var(--cv-ink);
    background: #fff;
    resize: vertical;
}
#termsModal { z-index: 10010; color: #241b35; text-align: start; direction: rtl; }
#termsModal .modal-dialog { display: flex; max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); }
#termsModal .modal-content { max-height: inherit; overflow: hidden; }
#termsModal :is(.modal-header,.modal-footer) { flex-shrink: 0; }
#termsModal .modal-body { overflow-y: auto; overscroll-behavior: contain; font-size: 14px; line-height: 1.85; }
#termsModal .modal-body p { line-height: inherit; }
#termsModal .modal-title { font-size: 17px; line-height: 1.65; color: #241b35; }
#termsModal h6 { margin-block: 0 4px; font-size: 14px; line-height: 1.7; font-weight: 750; color: #241b35; }
#termsModal :is(ol,ul) { padding-inline-start: 22px; }
body.modal-open:has(#termsModal.show) .modal-backdrop { z-index: 10000; }
body.modal-open:has(#termsModal.show) #goftino_w { visibility: hidden; }

@media (max-width: 760px) {
    .cv-hero { grid-template-columns: minmax(0, 1fr); }
    .cv-hero-copy { padding: 20px 16px; }
    .cv-hero-photos { min-height: 0; aspect-ratio: 16 / 8; }
    .cv-location--map { grid-template-columns: minmax(0, 1fr); }
    .cv-facilities { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .complex-view .cv-shell { width: calc(100% - 20px); }
    .complex-view { padding-block-start: 9px; }
    .cv-hero { border-radius: 14px; }
    .cv-hero-photos { aspect-ratio: 16 / 9; }
    .cv-jump { margin-block: 8px; }
    .complex-view .cv-jump a { min-height: 33px; padding: 4px 7px; font-size: 12px; }
    .cv-facilities, .cv-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    #termsModal .modal-dialog { max-height: calc(100vh - 30px); max-height: calc(100dvh - 30px); }
}
