:root {
    --primary: #2680eb;
    --primary-dark: #0a3d91;
    --accent: #00e5c8;
    --bg: #f4f8ff;
    --bg-soft: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.96);
    --bg-card-end: rgba(255, 255, 255, 0.92);
    --text: #122037;
    --text-heading: #09152b;
    --text-card: #10223d;
    --text-body: #2d3f5b;
    --text-muted: #52627f;
    --border: rgba(18, 32, 55, 0.12);
    --shadow-lg: 0 26px 56px rgba(10, 61, 145, 0.14);
    --radius: 20px;
    --radius-sm: 12px;
    --body-bg: linear-gradient(180deg, #edf5ff 0%, #f8fbff 48%, #f4f8ff 100%);
    --body-radial-1: rgba(38, 128, 235, 0.18);
    --body-radial-2: rgba(0, 229, 200, 0.15);
    --meta-bg: rgba(255, 255, 255, 0.72);
    --meta-border: rgba(18, 32, 55, 0.08);
    --meta-color: #304461;
    --home-link-bg: rgba(255, 255, 255, 0.62);
    --home-link-border: rgba(10, 61, 145, 0.18);
    --eyebrow-bg: rgba(38, 128, 235, 0.1);
    --orb1: #8dc3ff;
    --orb2: #88efe3;
    --orb3: #a8bfff;
}

[data-theme='dark'] {
    --primary: #4d9ef7;
    --primary-dark: #88c0ff;
    --accent: #00e5c8;
    --bg: #0f172a;
    --bg-soft: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.96);
    --bg-card-end: rgba(30, 41, 59, 0.92);
    --text: #e2e8f0;
    --text-heading: #f1f5f9;
    --text-card: #e2e8f0;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.15);
    --shadow-lg: 0 26px 56px rgba(0, 0, 0, 0.3);
    --body-bg: linear-gradient(180deg, #0f172a 0%, #1a2332 48%, #0f172a 100%);
    --body-radial-1: rgba(38, 128, 235, 0.08);
    --body-radial-2: rgba(0, 229, 200, 0.06);
    --meta-bg: rgba(30, 41, 59, 0.72);
    --meta-border: rgba(148, 163, 184, 0.12);
    --meta-color: #94a3b8;
    --home-link-bg: rgba(30, 41, 59, 0.62);
    --home-link-border: rgba(148, 163, 184, 0.2);
    --eyebrow-bg: rgba(77, 158, 247, 0.15);
    --orb1: rgba(38, 128, 235, 0.2);
    --orb2: rgba(0, 229, 200, 0.12);
    --orb3: rgba(100, 140, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 12%, var(--body-radial-1), transparent 36%),
        radial-gradient(circle at 92% 4%, var(--body-radial-2), transparent 30%),
        var(--body-bg);
    line-height: 1.75;
    min-height: 100vh;
    padding-top: 80px; /* space for fixed navbar */
}

a {
    color: var(--primary-dark);
}

a:hover {
    color: var(--primary);
}

.policy-bg {
    display: none;
}

/* Safe animated gradient — uses background-position (no transform, no stacking context issues) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(79, 172, 254, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 10%, rgba(0, 242, 254, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(67, 233, 123, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 70%, rgba(142, 45, 226, 0.18) 0%, transparent 50%),
        var(--body-bg);
    background-size: 200% 200%;
    animation: gradientShift 18s ease-in-out infinite alternate;
}

[data-theme='dark'] body::before {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(79, 172, 254, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 10%, rgba(0, 242, 254, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(67, 233, 123, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 70%, rgba(142, 45, 226, 0.08) 0%, transparent 50%),
        var(--body-bg);
    background-size: 200% 200%;
    animation: gradientShift 18s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0%   { background-position: 0% 0%; }
    33%  { background-position: 100% 0%; }
    66%  { background-position: 100% 100%; }
    100% { background-position: 0% 100%; }
}


.policy-header {
    max-width: 1120px;
    margin: 0 auto;
    padding: 26px 24px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    color: var(--text);
    letter-spacing: 0.01em;
}

.brand-link img {
    border-radius: 10px;
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Theme Toggle — matches index .theme-toggle */
.theme-toggle-sub {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-sub:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.theme-toggle-sub .fa-sun { display: none; }
.theme-toggle-sub .fa-moon { display: inline; }
[data-theme="light"] .theme-toggle-sub .fa-sun { display: inline; }
[data-theme="light"] .theme-toggle-sub .fa-moon { display: none; }

/* Language Switch — matches index .nav-lang-switch */
.lang-switch {
    display: inline-flex;
    align-items: center;
    padding: 4px;
    gap: 2px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme='dark'] .lang-switch {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-btn:hover {
    color: var(--primary);
    background: rgba(38, 128, 235, 0.15);
}

.lang-btn.is-active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(38, 128, 235, 0.4);
}

.home-link {
    text-decoration: none;
    font-weight: 600;
    color: var(--primary-dark);
    border: 1px solid var(--home-link-border);
    background: var(--home-link-bg);
    padding: 10px 14px;
    border-radius: 999px;
    transition: all 0.24s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.home-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 61, 145, 0.14);
}

.policy-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 24px 72px;
    position: relative;
    z-index: 1;
}

.policy-hero {
    max-width: 800px;
    margin: 24px 0 28px;
}

.eyebrow {
    display: inline-block;
    border-radius: 999px;
    background: var(--eyebrow-bg);
    color: var(--primary-dark);
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.policy-hero h1 {
    font-size: clamp(2rem, 4.6vw, 3rem);
    line-height: 1.14;
    margin-bottom: 16px;
    color: var(--text-heading);
}

.policy-hero p {
    color: var(--text-muted);
    max-width: 720px;
}

.meta-row {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-row span {
    background: var(--meta-bg);
    border: 1px solid var(--meta-border);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--meta-color);
}

.policy-card {
    background: linear-gradient(180deg, var(--bg-card), var(--bg-card-end));
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: clamp(20px, 4vw, 44px);
}

.policy-card section + section {
    border-top: 1px dashed rgba(18, 32, 55, 0.14);
    margin-top: 22px;
    padding-top: 22px;
}

[data-theme='dark'] .policy-card section + section {
    border-color: rgba(148, 163, 184, 0.12);
}

.policy-card h2 {
    font-size: clamp(1.1rem, 2.6vw, 1.5rem);
    line-height: 1.28;
    margin-bottom: 12px;
    color: var(--text-card);
}

.policy-card p {
    color: var(--text-body);
}

.policy-card ul {
    margin-top: 10px;
    padding-left: 20px;
    color: var(--text-body);
}

.policy-card li + li {
    margin-top: 7px;
}

@media (max-width: 760px) {
    .policy-header {
        padding-top: 18px;
        flex-wrap: wrap;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .home-link {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .policy-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .policy-hero {
        margin-top: 10px;
    }
}

/* ============ SUB-PAGE FOOTER ============ */
.sub-footer {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 24px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sub-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
    color: var(--text);
}

.sub-footer-brand img {
    border-radius: 8px;
}

.sub-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.sub-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.sub-footer-links a:hover {
    color: var(--primary);
}

@media (max-width: 600px) {
    .policy-header {
        padding-left: 16px;
        padding-right: 16px;
    }

    .header-actions {
        gap: 8px;
        flex-wrap: wrap;
    }

    .home-link {
        display: block;
        width: 100%;
        text-align: center;
    }

    .sub-footer {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}
/* Floating WhatsApp */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
    text-decoration: none;
}
.floating-wa:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 14px 32px rgba(37, 211, 102, 0.6);
    color: white;
}


/* Page Transitions */
.page-transition-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg, #F8FAFC);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.page-transition-overlay.fade-in {
    opacity: 1;
    pointer-events: all;
}
body {
    animation: pageFadeIn 0.35s ease forwards;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============ SHARED NAVBAR OVERRIDES ============ */
/* Ensure the main navbar is always fixed + visible on secondary pages */
.navbar {
    position: fixed !important;
    top: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 48px) !important;
    max-width: 1280px !important;
    z-index: 1000 !important;
    display: flex !important;
    /* Always solid on secondary pages — no transparent phase */
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(32px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    border-radius: 999px !important;
    padding: 10px 24px !important;
    transition: box-shadow 0.3s ease !important;
}

[data-theme='light'] .navbar {
    background: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(11, 17, 32, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 24px;
    z-index: 999;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

[data-theme='light'] .mobile-menu {
    background: rgba(248, 250, 252, 0.97);
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-menu a {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
}
