/* ============================================
   UAE RECRUITMENT MANAGEMENT SYSTEM
   User Manual Stylesheet
   ============================================ */

:root {
    --primary: #1E3A8A;
    --primary-light: #3B82F6;
    --secondary: #10B981;
    --accent: #F59E0B;
    --danger: #EF4444;
    --warning: #F59E0B;
    --success: #10B981;
    --info: #0EA5E9;
    --light: #F3F4F6;
    --dark: #1F2937;
    --gray: #6B7280;
    --border: #E5E7EB;
}

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

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: #FFFFFF;
}

/* ============ TYPOGRAPHY ============ */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--accent);
    padding-bottom: 1rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--secondary);
    padding-left: 1rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    text-align: justify;
    color: #444;
    font-size: 1rem;
}

strong {
    font-weight: 600;
    color: var(--primary);
}

em {
    font-style: italic;
    color: var(--gray);
}

/* ============ CONTAINER & LAYOUT ============ */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 40px 20px;
}

/* ============ HEADER & NAVIGATION ============ */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo::before {
    content: "📚";
    font-size: 1.8rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    font-size: 0.9rem;
}

nav a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
    background: var(--light);
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--gray);
}

/* ============ MAIN CONTENT ============ */
.chapter-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.chapter-header h1 {
    color: white;
    border: none;
    padding: 0;
    margin: 0;
}

.chapter-header p {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-top: 0.5rem;
}

/* ============ SECTIONS & BOXES ============ */
.section {
    margin-bottom: 3rem;
}

.info-box, .warning-box, .success-box, .error-box {
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    background-color: #f9fafb;
}

.info-box {
    border-left-color: var(--info);
    background-color: rgba(14, 165, 233, 0.05);
}

.info-box::before {
    content: "ℹ️ ";
    font-weight: bold;
}

.warning-box {
    border-left-color: var(--warning);
    background-color: rgba(245, 158, 11, 0.05);
}

.warning-box::before {
    content: "⚠️ ";
    font-weight: bold;
}

.success-box {
    border-left-color: var(--success);
    background-color: rgba(16, 185, 129, 0.05);
}

.success-box::before {
    content: "✅ ";
    font-weight: bold;
}

.error-box {
    border-left-color: var(--danger);
    background-color: rgba(239, 68, 68, 0.05);
}

.error-box::before {
    content: "❌ ";
    font-weight: bold;
}

/* ============ LISTS ============ */
ul, ol {
    margin: 1rem 0 1rem 2rem;
    color: #444;
}

li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

ol {
    counter-reset: item;
    list-style-type: none;
}

ol li {
    counter-increment: item;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

ol li::before {
    content: counter(item) ". ";
    font-weight: bold;
    color: var(--primary);
    margin-left: -1.5rem;
    margin-right: 0.5rem;
}

/* ============ TABLES ============ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

thead {
    background: var(--primary);
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

tbody tr:hover {
    background-color: var(--light);
}

tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* ============ CODE & SNIPPETS ============ */
code {
    background: #f3f4f6;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #d63384;
    font-size: 0.9rem;
}

pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
    line-height: 1.4;
}

pre code {
    background: none;
    color: #e5e7eb;
    padding: 0;
    border-radius: 0;
    font-size: 0.85rem;
}

/* ============ BUTTONS & ELEMENTS ============ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-outline {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ============ STEP-BY-STEP GUIDES ============ */
.steps {
    counter-reset: step-counter;
    list-style: none;
    margin: 2rem 0;
}

.steps li {
    counter-increment: step-counter;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 6px;
    border-left: 4px solid var(--secondary);
    position: relative;
    padding-left: 3rem;
}

.steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1rem;
    top: 1rem;
    background: var(--secondary);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.steps li strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 1.1rem;
}

/* ============ ACCORDION ============ */
.accordion {
    margin: 1.5rem 0;
}

.accordion-item {
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
    border-radius: 4px;
    overflow: hidden;
}

.accordion-header {
    background: var(--light);
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: #e5e7eb;
}

.accordion-header::after {
    content: "▼";
    transition: transform 0.3s;
    display: inline-block;
}

.accordion-item.active .accordion-header::after {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 1.5rem;
    background: white;
    border-top: 1px solid var(--border);
}

.accordion-item.active .accordion-content {
    display: block;
}

/* ============ CARDS ============ */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.card h3 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.25rem;
}

.card p {
    color: var(--gray);
    margin-bottom: 1rem;
}

/* ============ NAVIGATION BARS ============ */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 2px solid var(--border);
    margin-top: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-bar-item {
    flex: 1;
    min-width: 200px;
}

.nav-bar-item a {
    display: block;
    padding: 1rem;
    background: var(--light);
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.nav-bar-item a:hover {
    background: var(--primary);
    color: white;
}

.nav-bar-item.prev a::before {
    content: "← ";
}

.nav-bar-item.next a::after {
    content: " →";
}

.nav-bar-item.home {
    flex: 0 0 auto;
    text-align: center;
}

/* ============ TABLE OF CONTENTS ============ */
.toc {
    background: var(--light);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary);
}

.toc h3 {
    margin-top: 0;
    color: var(--primary);
}

.toc ul {
    list-style: none;
    margin: 1rem 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.toc a:hover {
    text-decoration: underline;
    color: var(--primary-light);
}

/* ============ FOOTER ============ */
footer {
    background: var(--dark);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: auto;
    font-size: 0.9rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ============ RESPONSIVE DESIGN ============ */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .container {
        padding: 10px;
    }

    main {
        padding: 20px 10px;
    }

    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        justify-content: center;
        gap: 10px;
    }

    nav a {
        font-size: 0.8rem;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.5rem 0.25rem;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .nav-bar {
        flex-direction: column;
    }

    .nav-bar-item {
        min-width: 100%;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    .info-box, .warning-box, .success-box, .error-box {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1rem;
    }

    p {
        font-size: 0.95rem;
    }

    .steps li {
        padding-left: 2.5rem;
    }

    .steps li::before {
        left: 0.5rem;
    }

    pre {
        padding: 1rem;
        font-size: 0.75rem;
    }
}

/* ============ PRINT STYLES ============ */
@media print {
    header, footer, .nav-bar {
        display: none;
    }

    body {
        font-size: 11pt;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    .section {
        page-break-inside: avoid;
    }

    pre {
        background: white;
        border: 1px solid #ccc;
    }
}

/* ============ UTILITY CLASSES ============ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-bold {
    font-weight: 700;
}

.text-muted {
    color: var(--gray);
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.highlight {
    background: rgba(245, 158, 11, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}

/* ============ SPECIAL ELEMENTS ============ */
.emoji-large {
    font-size: 3rem;
    text-align: center;
    margin: 1rem 0;
}

.quote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--gray);
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 2rem 0;
}
