/* Legal / reglament pages — shared with User Agreement + Privacy Policy */

:root {
    --panel-text-inverse: #000;
}

.reglament-body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    background-color: #000;
    background-image: var(--site-bg-chip-image);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--color-text-primary);
    overflow-x: hidden;
}

@media (max-width: 991.98px) {
    .reglament-body {
        background-attachment: scroll;
    }
}

.reglament-bg-decor {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.35;
    background: radial-gradient(ellipse 80% 50% at 100% 100%, rgba(148, 85, 233, 0.18), transparent 55%);
}

.reglament-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    min-height: 56px;
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
    background: rgba(12, 12, 12, 0.04);
}

.reglament-lang-btn {
    color: #fff;
}

.reglament-main {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 72px 20px 140px;
}

@media (min-width: 992px) {
    .reglament-main {
        /* Room for fixed desktop back bar (see .reglament-back-wrap--desktop). */
        padding-bottom: 100px;
    }
    .reglament-header{
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px); 
    }
}

.reglament-article {
    text-align: left;
}

.reglament-doc-title {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    text-align: center;
    margin: 0 0 2.5rem;
    color: #fff;
    line-height: 1.2;
}

.tw-max-w-heading {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.reglament-section {
    margin-bottom: 2rem;
    padding: 1.25rem 1.35rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.tw-max-w-section {
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.reglament-section-num {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(148, 85, 233, 0.95);
    margin: 0 0 0.35rem;
}

.tw-num {
    letter-spacing: 0.04em;
}

.reglament-section-heading {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: #fff;
}

.tw-heading {
    line-height: 1.35;
}

.reglament-p {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
}

.reglament-p:last-child {
    margin-bottom: 0;
}

.tw-body {
    font-family: neue-haas-grot-text-roman, sans-serif;
}

.reglament-back-wrap--desktop {
    display: none;
    justify-content: center;
    padding: 0 20px 16px;
    position: relative;
    z-index: 2;
}

.reglament-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    border: none;
    line-height: 1;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.reglament-back-btn:hover {
    transform: translateY(-2px);
}

.reglament-back-btn__arrow {
    display: inline-flex;
    opacity: 0.9;
}

.reglament-back-btn--mobile-header {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: #fff;
    color: #000;
    font-size: 0.9rem;
    line-height: 1;
}

.reglament-back-btn--desktop {
    min-width: min(420px, 92vw);
    padding: 12px 24px;
    border-radius: 12px;
    background: #fff;
    color: #000;
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.reglament-back-btn--desktop:hover {
    background: rgba(255, 255, 255, 0.94);
}

@media (min-width: 992px) {
    .reglament-back-btn--mobile-header {
        display: none;
    }

    /* Fixed to viewport bottom — not scrolled away at end of document. */
    .reglament-back-wrap--desktop {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 850;
        padding: 10px 20px max(12px, env(safe-area-inset-bottom, 0px));
        justify-content: center;
        background: rgba(12, 12, 12, 0.04);
        backdrop-filter: blur(1px);
        -webkit-backdrop-filter: blur(1px);
        pointer-events: none;
    }

    .reglament-back-wrap--desktop .reglament-back-btn--desktop {
        pointer-events: auto;
    }
}

@media (max-width: 991.98px) {
    /* No desktop back bar — tighter vertical rhythm on phone/tablet. */
    .reglament-main {
        padding: 80px 16px 44px;
    }
}

.reglament-leave-overlay.panel-to-main-overlay {
    z-index: 10000;
}

.reglament-leave-modal.panel-to-main-modal {
    max-width: 480px;
}

.panel-to-main-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.panel-to-main-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s ease, visibility 0s;
}

.panel-to-main-modal {
    position: relative;
    max-width: 480px;
    width: 90%;
    padding: 32px 28px;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    max-height: min(750px, 90vh);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.panel-to-main-modal-title {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px 0;
}

.panel-to-main-modal-text {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 24px 0;
}

.panel-to-main-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.panel-to-main-modal-go,
.panel-to-main-modal-cancel {
    display: inline-block;
    padding: 12px 32px;
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.panel-to-main-modal-go {
    color: var(--panel-text-inverse);
    background-color: #fff;
}

.panel-to-main-modal-go:hover {
    transform: translateY(-3px);
}

.panel-to-main-modal-cancel {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.panel-to-main-modal-cancel:hover {
    background-color: rgba(255, 255, 255, 0.06);
    transform: translateY(-3px);
}

.panel-to-main-modal-cancel:focus-visible {
    background-color: rgba(255, 255, 255, 0.06);
}

.panel-to-main-modal-go:focus-visible,
.panel-to-main-modal-cancel:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
