/* -------------------------------------------------------------
   TRAPOLSI STORE - PRIVACY POLICY STYLESHEET
   Premium, Modern, Glassmorphic, and Dynamic Layout
   ------------------------------------------------------------- */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;850&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Custom Variables & Theme --- */
:root {
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.85);
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --accent-gradient: linear-gradient(135deg, #e0f2fe 0%, #f3e8ff 100%);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Reset & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* RTL Support - Cairo Font for Arabic */
[dir="rtl"] {
    font-family: 'Cairo', sans-serif;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

/* --- Main Layout --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Glassmorphic Navigation Bar --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 76px;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

header.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.9);
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 850;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.lang-toggle-btn {
    padding: 8px 18px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.lang-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* --- Hero Banner Section --- */
.hero {
    padding: 140px 0 60px 0;
    background: var(--accent-gradient);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, var(--bg-color), transparent);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeUp 0.8s ease;
}

.hero-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 20px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 850;
    line-height: 1.25;
    color: var(--text-main);
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* --- Content Wrapper (Sidebar + Main Policy) --- */
.content-wrapper {
    margin: 40px 0 80px 0;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
    animation: fadeUp 1s ease;
}

/* --- Sidebar Table of Contents --- */
.sidebar {
    position: sticky;
    top: 110px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc-link {
    display: block;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.toc-link:hover, .toc-link.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
    padding-inline-start: 16px;
}

/* --- Main Policy Card --- */
.policy-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 48px;
    box-shadow: var(--shadow-md);
}

.policy-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.policy-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-block {
    margin-bottom: 40px;
    scroll-margin-top: 110px;
}

.section-block:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.45rem;
    font-weight: 750;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 24px;
    background: var(--primary-gradient);
    border-radius: 4px;
}

.policy-card p {
    color: var(--text-muted);
    margin-bottom: 16px;
    text-align: justify;
}

.policy-list {
    margin: 16px 0;
    padding-inline-start: 24px;
    color: var(--text-muted);
}

.policy-list li {
    margin-bottom: 8px;
}

.policy-list li strong {
    color: var(--text-main);
}

/* --- Alert Note Box --- */
.alert-box {
    margin: 24px 0;
    padding: 20px;
    background: rgba(37, 99, 235, 0.03);
    border-inline-start: 4px solid var(--primary);
    border-radius: 12px;
}

.alert-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.alert-box p {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: var(--text-muted);
}

/* --- Language Visibility Toggles --- */
.lang-ar, .lang-en {
    display: none;
    transition: var(--transition-smooth);
}

.visible {
    display: block !important;
}

/* --- Footer --- */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

.footer-logo {
    font-size: 1.15rem;
    font-weight: 850;
    color: white;
    margin-bottom: 8px;
}

.footer-copyright {
    font-size: 0.85rem;
}

/* --- Animations --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none; /* Hide Table of Contents on mobile for simplicity */
    }
    .policy-card {
        padding: 32px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 1.8rem;
    }
    .policy-card {
        padding: 24px;
        border-radius: 20px;
    }
    .header-container {
        padding: 0 16px;
    }
    .logo-text {
        font-size: 1.15rem;
    }
}
