/* Terms & Conditions — standalone public page */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.page-terms {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(160deg, #eef1f6 0%, #dfe6ef 45%, #d4dce8 100%);
    color: #1a202c;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.page-terms #form1 {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top navigation bar */
body.page-terms .terms-public-header {
    background: linear-gradient(90deg, #393960 0%, #5a2a10 100%);
    border-bottom: 3px solid #ff4500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

body.page-terms .terms-public-header-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.page-terms .terms-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none !important;
}

body.page-terms .terms-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

body.page-terms .terms-brand-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

body.page-terms .terms-brand-sub {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 500;
}

body.page-terms .terms-public-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

body.page-terms .terms-public-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body.page-terms .terms-public-back-home {
    background: rgba(57, 57, 96, 0.95);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.page-terms .terms-public-back-home:hover,
body.page-terms .terms-public-back-home:focus {
    background: #393960;
    color: #ffe066 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(57, 57, 96, 0.45);
}

body.page-terms .terms-public-back-login {
    background: linear-gradient(135deg, #e85d04 0%, #dc2f02 100%);
    border-color: rgba(255, 224, 102, 0.35);
    box-shadow: 0 2px 8px rgba(220, 47, 2, 0.35);
}

body.page-terms .terms-public-back-login:hover,
body.page-terms .terms-public-back-login:focus {
    background: linear-gradient(135deg, #ff4500 0%, #e85d04 100%);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 69, 0, 0.45);
}

body.page-terms .terms-public-back:hover,
body.page-terms .terms-public-back:focus {
    color: #fff !important;
}

body.page-terms .terms-public-back-dashboard {
    background: linear-gradient(135deg, #e85d04 0%, #dc2f02 100%);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Main content shell */
body.page-terms .terms-page-shell {
    flex: 1 1 auto;
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 20px 28px;
}

body.page-terms .terms-card {
    background: #fff;
    border: 1px solid #c5ced8;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(57, 57, 96, 0.12);
    overflow: hidden;
}

/* Hero header inside card */
body.page-terms .terms-card-head {
    padding: 28px 32px 24px;
    background: linear-gradient(135deg, #393960 0%, #2d2d4a 55%, #5a2a10 100%);
    color: #fff;
    text-align: center;
    border-bottom: 4px solid #ff4500;
}

body.page-terms .terms-card-head h1 {
    margin: 0 0 12px;
    font-size: clamp(24px, 3.5vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    letter-spacing: 0.01em;
}

body.page-terms .terms-intro {
    margin: 0 auto;
    max-width: 760px;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.92);
}

body.page-terms .terms-updated {
    display: inline-block;
    margin-top: 14px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Quick jump links */
body.page-terms .terms-quick-nav {
    padding: 18px 32px;
    background: #f7f9fc;
    border-bottom: 1px solid #e2e8f0;
}

body.page-terms .terms-quick-nav-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #393960;
}

body.page-terms .terms-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.page-terms .terms-quick-links a {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #cbd5e0;
    color: #2b6cb0 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease;
}

body.page-terms .terms-quick-links a:hover,
body.page-terms .terms-quick-links a:focus {
    background: #ebf8ff;
    border-color: #90cdf4;
    color: #2c5282 !important;
}

/* Body sections */
body.page-terms .terms-card-body {
    padding: 28px 32px 32px;
}

body.page-terms .terms-section {
    margin-bottom: 24px;
    padding: 20px 22px 18px 24px;
    background: #fafbfc;
    border: 1px solid #e8edf2;
    border-left: 4px solid #ff4500;
    border-radius: 0 10px 10px 0;
    scroll-margin-top: 88px;
}

body.page-terms .terms-section:last-child {
    margin-bottom: 0;
}

body.page-terms .terms-section h2 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #393960;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.page-terms .terms-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, #393960 0%, #5a2a10 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

body.page-terms .terms-section p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.75;
    color: #2d3748;
}

body.page-terms .terms-section p:last-child {
    margin-bottom: 0;
}

body.page-terms .terms-section ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

body.page-terms .terms-section li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 22px;
    font-size: 15px;
    line-height: 1.75;
    color: #2d3748;
}

body.page-terms .terms-section li:last-child {
    margin-bottom: 0;
}

body.page-terms .terms-section li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e85d04;
    box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.2);
}

body.page-terms .terms-section li strong {
    color: #1a365d;
}

body.page-terms .terms-section-policy {
    border-left-color: #393960;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
}

body.page-terms .terms-section-policy > h2 {
    font-size: 20px;
    color: #1a365d;
    justify-content: center;
    text-align: center;
    flex-wrap: wrap;
}

body.page-terms .terms-section-policy > h2 .terms-section-num {
    background: linear-gradient(135deg, #e85d04 0%, #dc2f02 100%);
}

body.page-terms .terms-contact a {
    color: #2b6cb0;
    font-weight: 700;
    text-decoration: none;
    word-break: break-word;
}

body.page-terms .terms-contact a:hover {
    text-decoration: underline;
}

/* Footer */
body.page-terms .terms-public-footer {
    margin-top: auto;
    text-align: center;
    padding: 16px 20px 20px;
    background: #393960;
    border-top: 3px solid #ff4500;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
}

body.page-terms .terms-public-footer p {
    margin: 0;
}

body.page-terms .terms-public-footer b {
    color: #fff;
}

@media (max-width: 767px) {
    body.page-terms .terms-public-header-inner {
        padding: 10px 14px;
        justify-content: center;
    }

    body.page-terms .terms-brand {
        width: 100%;
        justify-content: center;
    }

    body.page-terms .terms-public-nav {
        width: 100%;
        justify-content: center;
    }

    body.page-terms .terms-page-shell {
        padding: 16px 12px 20px;
    }

    body.page-terms .terms-card-head,
    body.page-terms .terms-quick-nav,
    body.page-terms .terms-card-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.page-terms .terms-card-head {
        padding-top: 22px;
        padding-bottom: 20px;
    }

    body.page-terms .terms-section {
        padding: 16px 14px 14px 16px;
    }

    body.page-terms .terms-section h2 {
        font-size: 16px;
        align-items: flex-start;
    }

    body.page-terms .terms-intro,
    body.page-terms .terms-section p,
    body.page-terms .terms-section li {
        font-size: 14px;
    }
}

@media print {
    body.page-terms {
        background: #fff;
    }

    body.page-terms .terms-public-header,
    body.page-terms .terms-quick-nav,
    body.page-terms .terms-public-footer {
        display: none;
    }

    body.page-terms .terms-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
