/* =========================================
   Design System & Variables
   ========================================= */
   :root {
    --primary: #082C5D;
    --secondary: #061F42;
    --accent: #FF914D;
    --bg-color: #F7F9FC;
    --bg-light: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255,255,255,0.85);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --font-family: 'Cairo', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);

    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary: #4A90E2; 
    --secondary: #1e293b;
    --bg-color: #0f172a;
    --bg-light: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: #1e293b;
    --border-color: #334155;
    --glass-bg: rgba(30, 41, 59, 0.85);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
}

/* =========================================
   Global Reset & Base
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.7;
    transition: background-color var(--transition), color var(--transition);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   Reading Progress Bar
   ========================================= */
.progress-container {
    width: 100%;
    height: 4px;
    background: transparent;
    position: fixed;
    top: 0;
    z-index: 1000;
}

.progress-bar {
    height: 4px;
    background: var(--accent);
    width: 0%;
    border-radius: 0 2px 2px 0;
}

/* =========================================
   Header (Glassmorphism)
   ========================================= */
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--accent);
}

.glass-header span {
    color: var(--warning);
    font-weight: 650;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    padding: 10px;
    border-radius: 50%;
}

.icon-btn:hover {
    color: var(--accent);
    background: var(--border-color);
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-block {
    width: 100%;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    margin-top: 80px;
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" stroke="rgba(255,255,255,0.05)" stroke-width="2" fill="none"/></svg>') repeat;
    opacity: 0.5;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* =========================================
   Layout (Sidebar + Content)
   ========================================= */
.layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    padding: 60px 20px;
    align-items: start;
}

/* Sidebar TOC */
.sidebar {
    position: sticky;
    top: 100px;
}

.toc-glass {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.toc-glass h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-main);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.toc-glass ul {
    list-style: none;
    max-height: 60vh;
    overflow-y: auto;
}

.toc-glass ul::-webkit-scrollbar {
    width: 4px;
}
.toc-glass ul::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.toc-link {
    display: block;
    padding: 10px 12px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.toc-link:hover {
    background: var(--bg-color);
    color: var(--primary);
}

.toc-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

/* =========================================
   Content Cards
   ========================================= */
.content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.term-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.term-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.card-header i {
    font-size: 1.8rem;
}

.card-header h2 {
    font-size: 1.5rem;
    color: var(--text-main);
}

/* Icon Colors */
.icon-primary { color: var(--primary); }
.icon-accent { color: var(--accent); }
.icon-danger { color: var(--danger); }
.icon-warning { color: var(--warning); }
.icon-success { color: var(--success); }

.card-body p {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.custom-list {
    list-style: none;
    padding-right: 15px;
}

.custom-list li {
    position: relative;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.custom-list li::before {
    content: '\f058'; 
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: -25px;
    top: 4px;
    color: var(--accent);
    font-size: 1rem;
}

/* =========================================
   Contact Info Box (Specific for Refund)
   ========================================= */
.contact-info-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 5px;
}

.info-item div strong {
    display: block;
    color: var(--text-main);
    margin-bottom: 5px;
}

.info-item div span {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.action-btn-container {
    margin-top: 10px;
    text-align: right;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-brand h3 {
    color: var(--primary);
    font-size: 1.5rem;
}

.footer-brand h3 strong {
    color: var(--accent);
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 5px;
}

.footer-brand span {
    font-weight: 700;
    color: var(--text-main);
}

.footer-copyright {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   Back To Top Button
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--accent);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary);
}

/* =========================================
   Scroll Reveal Animations
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 992px) {
    .layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 20px;
    }

    .toc-glass ul {
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .header-actions .btn-outline {
        display: none;
    }
}


.footer-brand span {
    font-weight: 700;
    color: var(--warning);
}
