.page-section {
    max-width: 900px;
    margin: 48px auto 64px auto;
    padding: 48px 32px 64px 32px;
    background: none;
    color: #fff;
    min-height: 400px;
    text-align: left;
    border-radius: 18px;
    /* border: 1.5px solid rgba(107,42,163,0.13); */
    animation: legal-fade-in 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hide search on legal/contact pages */
.microheader-search,
#mobile-page-search-bar {
    display: none !important;
}

/* Price text color in promo-info pages */
span[replace-price],
b span[replace-price] {
    color: #22c55e !important;
    font-weight: 600;
    white-space: nowrap !important;
}

/* Exclude balance in header and microheader from green color on legal pages */
.microheader-balance-value[replace-price],
.header .balance-value[replace-price],
header [replace-price] {
    color: #fff !important;
}

/* Wrap price-containing paragraphs in flexbox to prevent breaks */
.page-section p,
.page-section li,
.invite-steps li {
    display: inline;
}

.page-section p span,
.page-section li span,
.invite-steps li span {
    display: inline;
    white-space: normal;
}

.page-section p span[replace-price],
.page-section li span[replace-price],
.invite-steps li span[replace-price] {
    white-space: nowrap !important;
}

@keyframes legal-fade-in {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.page-section h1 {
    font-size: 2.4rem;
    margin-bottom: 28px;
    color: #fff;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-shadow: 0 2px 12px rgba(168, 85, 247, 0.10);
}

.page-section h2 {
    font-size: 1.35rem;
    margin-top: 32px;
    margin-bottom: 12px;
    color: #a855f7;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 6px rgba(168, 85, 247, 0.08);
}

.page-section p {
    font-size: 1.13rem;
    line-height: 1.75;
    color: #f3f3f3;
    margin-bottom: 18px;
    text-shadow: 0 1px 6px rgba(59, 19, 87, 0.08);
    white-space: pre-line;
}

.page-section h3 {
    font-size: 1.12rem;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #c084fc;
    font-weight: 600;
}

.legal-contact-block {
    text-align: center;
    margin-top: 48px;
    padding-top: 32px;
}

.legal-contact-block h2 {
    text-align: center;
}

.legal-contact-block p {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.legal-contact-email {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.legal-contact-email:hover {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.55);
    color: #fff;
}

.contact-table-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 32px;
}

.contact-table {
    width: 100%;
    max-width: 480px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(107, 42, 163, 0.13);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(59, 19, 87, 0.13);
    border: 1.5px solid rgba(107, 42, 163, 0.13);
    /* animation: legal-fade-in 0.9s 0.1s cubic-bezier(0.22, 1, 0.36, 1); */
}

.contact-table th,
.contact-table td {
    padding: 18px 22px;
    text-align: left;
    font-size: 1.13rem;
}

.contact-table th {
    background: rgba(107, 42, 163, 0.18);
    color: #fff;
    font-weight: 700;
    border-bottom: 1.5px solid rgba(107, 42, 163, 0.18);
    letter-spacing: 0.5px;
}

.contact-table td {
    background: rgba(107, 42, 163, 0.07);
    color: #fff;
    font-weight: 500;
}

.contact-table a {
    color: #a855f7;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s;
}

.contact-table a:hover {
    color: #fff;
    text-decoration: underline wavy;
}

@media (max-width: 768px) {
    .page-section {
        max-width: 95vw;
        margin: 32px auto 48px auto;
        padding: 32px 24px 48px 24px;
        border-radius: 14px;
    }

    .page-section h1 {
        font-size: 2.1rem;
        margin-bottom: 24px;
        letter-spacing: 1px;
    }

    .page-section h2 {
        font-size: 1.25rem;
        margin-top: 28px;
        margin-bottom: 10px;
        letter-spacing: 0.4px;
    }

    .page-section p {
        font-size: 1.05rem;
        line-height: 1.7;
        margin-bottom: 16px;
    }

    .contact-table-wrapper {
        margin-top: 28px;
    }

    .contact-table {
        max-width: 100%;
        border-radius: 12px;
    }

    .contact-table th,
    .contact-table td {
        padding: 16px 18px;
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .page-section {
        max-width: 98vw;
        margin: 24px auto 32px auto;
        padding: 24px 16px 36px 16px;
        border-radius: 12px;
        min-height: 300px;
    }

    .page-section h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
        letter-spacing: 0.8px;
        line-height: 1.2;
    }

    .page-section h2 {
        font-size: 1.15rem;
        margin-top: 24px;
        margin-bottom: 8px;
        letter-spacing: 0.3px;
        line-height: 1.3;
    }

    .page-section p {
        font-size: 1rem;
        line-height: 1.65;
        margin-bottom: 14px;
    }

    .contact-table-wrapper {
        margin-top: 24px;
        overflow-x: auto;
    }

    .contact-table {
        border-radius: 10px;
        min-width: 300px;
    }

    .contact-table th,
    .contact-table td {
        padding: 14px 12px;
        font-size: 0.95rem;
    }
}

@media (max-width: 360px) {
    .page-section {
        margin: 20px auto 28px auto;
        padding: 20px 12px 32px 12px;
        border-radius: 10px;
    }

    .page-section h1 {
        font-size: 1.6rem;
        margin-bottom: 18px;
        letter-spacing: 0.6px;
    }

    .page-section h2 {
        font-size: 1.1rem;
        margin-top: 20px;
        margin-bottom: 6px;
        letter-spacing: 0.2px;
    }

    .page-section p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 12px;
    }

    .contact-table-wrapper {
        margin-top: 20px;
    }

    .contact-table {
        border-radius: 8px;
        min-width: 280px;
    }

    .contact-table th,
    .contact-table td {
        padding: 12px 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 320px) {
    .page-section {
        margin: 16px auto 24px auto;
        padding: 18px 10px 28px 10px;
        border-radius: 8px;
    }

    .page-section h1 {
        font-size: 1.45rem;
        margin-bottom: 16px;
        letter-spacing: 0.4px;
    }

    .page-section h2 {
        font-size: 1.05rem;
        margin-top: 18px;
        margin-bottom: 5px;
        letter-spacing: 0.1px;
    }

    .page-section p {
        font-size: 0.9rem;
        line-height: 1.55;
        margin-bottom: 10px;
    }

    .contact-table {
        border-radius: 6px;
        min-width: 260px;
    }

    .contact-table th,
    .contact-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .page-section {
        margin: 16px auto 20px auto;
        padding: 16px 20px 20px 20px;
        min-height: 200px;
    }

    .page-section h1 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }

    .page-section h2 {
        font-size: 1rem;
        margin-top: 16px;
        margin-bottom: 4px;
    }

    .page-section p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 8px;
    }

    .contact-table-wrapper {
        margin-top: 16px;
    }

    .contact-table th,
    .contact-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) and (hover: none) {
    .contact-table a:hover {
        color: #a855f7;
        text-decoration: underline;
    }

    .contact-table a:active {
        color: #fff;
        text-decoration: underline wavy;
    }
}

:root {
    --skeleton-legal-bg: rgba(148, 163, 184, 0.16);
    --skeleton-legal-highlight: rgba(255, 255, 255, 0.28);
    --skeleton-legal-radius: 8px;
}

/* Shimmer animation */
@keyframes skeletonShimmerLegal {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.legal-skeleton,
body.loading-legal .page-section h1,
body.loading-legal .page-section h2,
body.loading-legal .page-section p,
body.loading-legal .contact-table th,
body.loading-legal .contact-table td {
    color: transparent !important;
    background: linear-gradient(90deg,
            var(--skeleton-legal-bg) 25%,
            var(--skeleton-legal-highlight) 37%,
            var(--skeleton-legal-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerLegal 1.1s ease-in-out infinite;
    border-radius: var(--skeleton-legal-radius);
}

/* Header sizes approximations */
body.loading-legal .page-section h1 {
    min-height: 2.2rem;
}

body.loading-legal .page-section h2 {
    min-height: 1.3rem;
    width: 60%;
}

/* Paragraph rhythm: simulate multiple lines */
body.loading-legal .page-section p {
    min-height: 1rem;
}

body.loading-legal .page-section p+p {
    width: 92%;
}

body.loading-legal .page-section p+p+p {
    width: 85%;
}

/* Contact table skeletons */
body.loading-legal .contact-table th,
body.loading-legal .contact-table td {
    min-height: 1.1rem;
}

@media (prefers-reduced-motion: reduce) {

    .legal-skeleton,
    body.loading-legal .page-section h1,
    body.loading-legal .page-section h2,
    body.loading-legal .page-section p,
    body.loading-legal .contact-table th,
    body.loading-legal .contact-table td {
        animation: none;
    }
}

/* Responsive tweaks */
@media (max-width: 768px) {
    body.loading-legal .page-section h1 {
        min-height: 2rem;
    }

    body.loading-legal .page-section h2 {
        min-height: 1.2rem;
        width: 70%;
    }
}

@media (max-width: 480px) {
    body.loading-legal .page-section h1 {
        min-height: 1.8rem;
    }

    body.loading-legal .page-section h2 {
        min-height: 1.1rem;
        width: 80%;
    }
}

/* Mobile Page Search Bar - Matching home.css styles */
.mobile-page-search-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(2, 6, 23, 0.9));
    border-top: 1px solid rgba(147, 51, 234, 0.25);
    box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.35);
    z-index: 50;
    backdrop-filter: blur(8px);
}

.mobile-search-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

.mobile-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(147, 51, 234, 0.35);
    border-radius: 12px;
    padding: 10px 12px;
}

.mobile-search-input-wrap .search-mobile {
    flex: 1;
    height: 36px;
    background: transparent;
    border: none;
    outline: none;
    color: #e2e8f0;
    font-size: 15px;
}

.mobile-search-icon {
    flex-shrink: 0;
}

.mobile-clear-search {
    background: transparent;
    border: none;
    padding: 4px;
    margin: 0;
    display: none;
    cursor: pointer;
}

.mobile-safe-area {
    height: env(safe-area-inset-bottom, 0);
}

.mobile-scroll-top {
    position: absolute;
    right: 12px;
    top: -40px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(147, 51, 234, 0.35);
    width: 36px;
    height: 36px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Remove hover/active effects on mobile */
.mobile-scroll-top:hover,
.mobile-scroll-top:active,
.mobile-scroll-top:focus {
    background: rgba(15, 23, 42, 0.8);
    outline: none;
}

/* Arrow rotation for collapsed state - iPhone compatible (copied from mobile-optimization.css) */
.mobile-page-search-bar.collapsed .mobile-scroll-top svg {
    transform: rotate(180deg) !important;
}

.mobile-page-search-bar:not(.collapsed) .mobile-scroll-top svg {
    transform: rotate(0deg) !important;
}

.mobile-search-results {
    padding: 8px 12px 10px 12px;
    border-top: 1px solid rgba(147, 51, 234, 0.15);
}

.mobile-search-results-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.mobile-search-results .search-nav-btn {
    background: rgba(147, 51, 234, 0.15);
    border: 1px solid rgba(147, 51, 234, 0.35);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-search-results .search-nav-btn:hover:not(:disabled) {
    background: rgba(147, 51, 234, 0.25);
    transform: scale(1.05);
}

.mobile-search-results .search-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#mobile-search-result-count {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

/* Collapsed state for mobile bottom search bar */
.mobile-page-search-bar.collapsed {
    padding: 0;
    background: transparent;
    border-top: none;
    box-shadow: none;
    transform: translateY(100%);
}

.mobile-page-search-bar.collapsed .mobile-search-results,
.mobile-page-search-bar.collapsed .mobile-search-inner,
.mobile-page-search-bar.collapsed .mobile-safe-area {
    display: none !important;
}

.mobile-page-search-bar.collapsed .mobile-scroll-top {
    position: fixed;
    right: 12px;
    bottom: 12px;
    top: auto;
}

/* Hide arrow button when near footer */
.mobile-page-search-bar[style*="translateY(100%)"] .mobile-scroll-top {
    opacity: 0;
    pointer-events: none;
}

.bottom-spacer {
    height: 0;
}

@media (max-width: 768px) {
    .mobile-page-search-bar {
        display: block;
    }

    /* Remove bottom spacer for legal/info pages - override home.css */
    body .bottom-spacer {
        height: 0 !important;
    }

    /* Hide microheader search on mobile */
    .microheader-search {
        display: none !important;
    }
}

/* ── Contact page social media block ────────────────────────────── */
.contact-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    margin-bottom: 8px;
}

.contact-social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex: 0 0 auto;
}

.contact-social-icon {
    width: 64px;
    height: 64px;
    background: rgba(107, 42, 163, 0.22);
    border: 1.5px solid rgba(168, 85, 247, 0.3);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-social-link:hover .contact-social-icon {
    background: rgba(168, 85, 247, 0.32);
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.25);
}

.contact-social-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.contact-social-name {
    color: #a855f7;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-decoration: underline;
    transition: color 0.2s;
}

.contact-social-link:hover .contact-social-name {
    color: #fff;
    text-decoration: underline wavy;
}

@media (max-width: 480px) {
    .contact-socials {
        gap: 12px;
    }

    .contact-social-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .contact-social-icon img {
        width: 24px;
        height: 24px;
    }

    .contact-social-name {
        font-size: 0.78rem;
    }
}
