/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.7;
    color: #2c3e50;
    background: #f8f9fa;
    min-height: 100vh;
    direction: rtl;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e3a8a, #3b82f6, #1e3a8a);
    border-radius: 8px 8px 0 0;
}

.main-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.meta-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.meta-info p {
    background: #f8f9fa;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    font-weight: 500;
}

/* Content Styles */
.content {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e3a8a, #3b82f6, #1e3a8a);
    border-radius: 8px 8px 0 0;
}

.section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f1f5f9;
}

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

.section h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3b82f6;
    display: inline-block;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #1e3a8a;
}

.section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    margin: 25px 0 15px 0;
    padding-right: 15px;
    border-right: 3px solid #d1d5db;
    position: relative;
}

.section h3::before {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
}

.section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #4b5563;
    margin: 20px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.section p {
    margin-bottom: 15px;
    text-align: justify;
    color: #374151;
    line-height: 1.8;
}

.section ul {
    margin: 15px 0;
    padding-right: 25px;
}

.section li {
    margin-bottom: 12px;
    line-height: 1.8;
    color: #374151;
    position: relative;
}

.section li::before {
    content: '•';
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    right: -15px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.info-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    position: relative;
}

.info-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.info-item strong {
    color: #1e3a8a;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Sharing Info */
.sharing-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    margin: 20px 0;
    border: 1px solid #e5e7eb;
    border-right: 4px solid #3b82f6;
}

.sharing-info h4 {
    color: #1e3a8a;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
}

.sharing-info h4:first-child {
    margin-top: 0;
}

/* Form Template */
.form-template {
    background: #eff6ff;
    padding: 25px;
    border-radius: 6px;
    border: 2px solid #dbeafe;
    margin: 20px 0;
    position: relative;
}

.form-template::before {
    content: 'نموذج طلب البيانات';
    position: absolute;
    top: -10px;
    right: 20px;
    background: #3b82f6;
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.form-template p {
    margin-bottom: 10px;
    color: #1e3a8a;
}

.form-template strong {
    color: #1e3a8a;
    font-weight: 600;
}

/* Conclusion */
.conclusion {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    padding: 30px;
    border-radius: 6px;
    text-align: center;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.conclusion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.conclusion h2 {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.conclusion p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.thank-you {
    font-size: 1.2rem;
    margin-top: 20px;
    color: white !important;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-style: italic;
    font-size: 0.9rem;
}

/* Links */
a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

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

/* Official Document Styling */
.official-stamp {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 80px;
    height: 80px;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    font-size: 0.7rem;
    font-weight: 600;
    color: #3b82f6;
    text-align: center;
    line-height: 1.2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .meta-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .content {
        padding: 30px 20px;
    }
    
    .section h2 {
        font-size: 1.4rem;
    }
    
    .section h3 {
        font-size: 1.1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .sharing-info {
        padding: 20px;
    }
    
    .form-template {
        padding: 20px;
    }
    
    .official-stamp {
        position: static;
        margin: 0 auto 20px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.6rem;
    }
    
    .header {
        padding: 25px 15px;
    }
    
    .content {
        padding: 25px 15px;
    }
    
    .section h2 {
        font-size: 1.2rem;
    }
    
    .section h3 {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .header,
    .content {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .main-title {
        color: black;
    }
    
    .conclusion {
        background: #f8f9fa;
        color: black;
    }
    
    .conclusion h2 {
        color: black;
    }
    
    .conclusion p {
        color: black;
    }
    
    .thank-you {
        color: black !important;
    }
    
    .official-stamp {
        display: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background: white;
        color: black;
    }
    
    .header,
    .content {
        background: white;
        border: 2px solid black;
    }
    
    .main-title {
        color: black;
    }
}

/* Document Number */
.document-number {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    font-weight: 500;
}

/* Legal Notice */
.legal-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    font-size: 0.9rem;
    color: #92400e;
}

.legal-notice strong {
    color: #92400e;
} 