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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-image: url('../images/backgrounds/تسجيل تريك.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #5035a7;
}

html[dir="rtl"] body {
    direction: rtl;
}

html[dir="ltr"] body {
    direction: ltr;
}

.container-modal {
    max-height: 90vh;
    overflow-y: auto;
}

/* Titles Styling */
h1.main-title {
    font-size: 2.25rem;
    font-weight: 900;
    background: linear-gradient(135deg, #6f42c1 0%, #5035a7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 1.5rem 0 0.75rem 0;
    border-left: 4px solid #6f42c1;
    padding-left: 0.875rem;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

h2 > span:not(.section-number) {
    font-weight: 700;
    color: #1f2937;
    font-size: 1.1rem;
}

html[dir="rtl"] h2 {
    border-left: none;
    border-right: 5px solid #6f42c1;
    padding-left: 0;
    padding-right: 1rem;
}

/* Section Toggle Styles */
.section-wrapper {
    margin-bottom: 0.5rem;
}

.section-toggle {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.section-toggle:hover {
    opacity: 0.8;
}

.toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    color: #6f42c1;
    font-size: 1.2rem;
    font-weight: bold;
    transition: color 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
    cursor: pointer;
}

html[dir="rtl"] .toggle-icon {
    margin-left: 0;
    margin-right: auto;
}

.toggle-icon:hover {
    color: #5035a7;
}

.section-content {
    max-height: 5000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Section Numbers with Badges */
.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #6f42c1 0%, #5035a7 100%);
    color: white;
    border-radius: 50%;
    font-weight: 900;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(111, 66, 193, 0.3);
}

/* Sub-section Numbers - Style minimaliste */
.sub-section-number {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: #6f42c1;
    margin-right: 0.5rem;
    min-width: auto;
}

html[dir="rtl"] .sub-section-number {
    margin-right: 0;
    margin-left: 0.5rem;
}

p {
    margin: 1rem 0;
    line-height: 1.85;
    color: #374151;
    font-size: 0.95rem;
    text-align: justify;
}

/* Auto-format sub-numbers like 1.1, 1.2, etc. */
p strong {
    font-weight: 700;
    color: #374151;
}

html[dir="rtl"] p strong {
    font-weight: 700;
}

.intro {
    margin-bottom: 2.5rem;
    font-size: 1rem;
    line-height: 1.85;
    color: #374151;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.05) 0%, rgba(17, 24, 39, 0.05) 100%);
    border-radius: 0.75rem;
    border-left: 4px solid #6f42c1;
    text-align: justify;
}

html[dir="rtl"] .intro {
    border-left: none;
    border-right: 4px solid #6f42c1;
}

.last-updated {
    margin-top: 3rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-left: 5px solid #6f42c1;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    color: #1f2937;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(31, 41, 55, 0.1);
}

html[dir="rtl"] .last-updated {
    border-left: none;
    border-right: 5px solid #6f42c1;
}

/* Strong text styling */
strong {
    font-weight: 400;
    color: #374151;
}

/* List items */
li {
    margin: 0.75rem 0;
    color: #374151;
    line-height: 1.8;
}

/* Link styling */
a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

a:hover {
    color: #111827;
    text-decoration: underline;
}
