/* Document Style CSS - Paper-like Design */

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

body {
    font-family: 'Tajawal', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    direction: rtl;
}

.document-container {
    max-width: 210mm; /* A4 width */
    min-height: 297mm; /* A4 height */
    margin: 20px auto;
    background: white;
    padding: 40px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    position: relative;
}

/* Paper texture effect */
.document-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(0,0,0,0.01) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(0,0,0,0.01) 1px, transparent 1px),
        radial-gradient(circle at 40% 60%, rgba(0,0,0,0.01) 1px, transparent 1px);
    background-size: 30px 30px, 40px 40px, 50px 50px;
    pointer-events: none;
}

/* Header Styles */
.document-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 20px;
}

.main-title-ar {
    font-size: 28px;
    font-weight: 900;
    color: #e74c3c;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.main-title-en {
    font-size: 22px;
    font-weight: 600;
    color: #e74c3c;
    margin-bottom: 15px;
    font-style: italic;
}

.project-info {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.project-info span {
    color: #666;
    font-style: italic;
}

/* Section Styles */
.document-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ecf0f1;
}

.section-title span {
    color: #7f8c8d;
    font-style: italic;
    font-weight: 500;
}

.description-text {
    font-size: 14px;
    line-height: 1.8;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: justify;
}

.description-text-en {
    font-size: 13px;
    line-height: 1.7;
    color: #7f8c8d;
    font-style: italic;
    text-align: justify;
    direction: ltr;
}

.highlight {
    background: rgba(231, 76, 60, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}

.track-description {
    font-size: 14px;
    line-height: 1.8;
    color: #2c3e50;
    margin-bottom: 10px;
    text-align: justify;
}

.track-description-en {
    font-size: 13px;
    line-height: 1.7;
    color: #7f8c8d;
    font-style: italic;
    text-align: justify;
    direction: ltr;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.content-box {
    border: 2px solid #bdc3c7;
    padding: 15px;
    background: #fafafa;
    position: relative;
    min-height: 200px;
}

.content-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 4px;
    background: #3498db;
}

.content-box.development::before { background: #27ae60; }
.content-box.sports::before { background: #e74c3c; }
.content-box.social::before { background: #9b59b6; }
.content-box.economic::before { background: #f39c12; }
.content-box.cultural::before { background: #e67e22; }
.content-box.diplomatic::before { background: #1abc9c; }

.box-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 5px;
}

.box-title-en {
    font-size: 14px;
    font-weight: 500;
    color: #7f8c8d;
    text-align: center;
    font-style: italic;
    margin-bottom: 15px;
}

.box-content p {
    font-size: 12px;
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 8px;
    text-align: justify;
}

.box-content .content-en {
    font-size: 11px;
    color: #7f8c8d;
    font-style: italic;
    direction: ltr;
    text-align: justify;
}

/* Partners Section */
.partners-list {
    margin-top: 20px;
}

.partner-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.partner-number {
    font-weight: 600;
    color: #e74c3c;
    margin-left: 8px;
    flex-shrink: 0;
}

.partner-text {
    color: #2c3e50;
    font-weight: 500;
}

.partner-text-en {
    color: #7f8c8d;
    font-style: italic;
    margin-right: 5px;
}

/* Join Form Section */
.join-form-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e74c3c;
    background: rgba(231, 76, 60, 0.02);
    padding: 30px;
    border-radius: 8px;
}

.form-title {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
    text-align: center;
    margin-bottom: 25px;
}

/* Alert Messages */
.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert i {
    margin-left: 8px;
}

.alert ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.alert li {
    margin-bottom: 5px;
}

/* Form Styles */
.join-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-input,
.form-select {
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Tajawal', Arial, sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-select option {
    padding: 10px;
}

.submit-btn {
    grid-column: 1 / -1;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Tajawal', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn i {
    margin-left: 8px;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .document-container {
        box-shadow: none;
        border: none;
        margin: 0;
        max-width: none;
        min-height: auto;
    }

    .join-form-section {
        page-break-before: always;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .document-container {
        margin: 10px;
        padding: 20px;
        max-width: none;
    }

    .main-title-ar {
        font-size: 24px;
    }

    .main-title-en {
        font-size: 18px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .content-box {
        min-height: auto;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .partner-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .partner-text-en {
        margin-right: 15px;
        margin-top: 2px;
    }
}

@media (max-width: 480px) {
    .document-container {
        padding: 15px;
    }

    .content-grid {
        gap: 10px;
    }

    .content-box {
        padding: 12px;
    }

    .box-content p,
    .box-content .content-en {
        font-size: 11px;
    }
}
