/* تنسيق عام للصفحة */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:wght@400;700&display=swap');

:root {
    --primary-color: #8e4162;
    --secondary-color: #d1a080;
    --background-color: #f9f1f4;
    --text-color: #333;
    --gold-color: #d4af37;
}

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

body {
    font-family: 'Times New Roman', Times, serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    direction: rtl;
}

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

header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid var(--gold-color);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.logo img {
    max-width: 150px;
    margin-left: 15px;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
}

.language-switcher {
    position: absolute;
    top: 20px;
    left: 20px;
}

.language-switcher button {
    background-color: transparent;
    border: 1px solid var(--gold-color);
    color: var(--primary-color);
    padding: 5px 10px;
    cursor: pointer;
    margin-right: 5px;
    font-family: 'Times New Roman', Times, serif;
}

.language-switcher button.active {
    background-color: var(--gold-color);
    color: white;
}

/* تنسيق العناوين */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-family: 'Times New Roman', Times, serif;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--gold-color);
    padding-bottom: 10px;
    margin-top: 30px;
}

h3 {
    font-size: 1.5rem;
    margin-top: 20px;
}

/* تنسيق الأقسام */
section {
    margin-bottom: 40px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* تنسيق جدول المقاسات */
.size-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.size-table th, .size-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

.size-table th {
    background-color: var(--primary-color);
    color: white;
}

.size-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.size-table tr:hover {
    background-color: #f1f1f1;
}

/* تنسيق الحاسبة */
.calculator {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.calculator h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Times New Roman', Times, serif;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #723350;
}

.result {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    display: none;
}

.result.show {
    display: block;
}

/* تنسيق قسم التعليمات */
.instructions {
    margin-bottom: 30px;
}

.instructions p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.instructions ul, .instructions ol {
    margin-right: 20px;
    margin-bottom: 15px;
}

.instructions li {
    margin-bottom: 10px;
}

.instructions strong {
    color: var(--primary-color);
}

/* تنسيق قسم العناية بالمشدات */
.care-instructions {
    margin-bottom: 30px;
}

.care-instructions p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.care-instructions ul {
    margin-right: 20px;
    margin-bottom: 15px;
}

.care-instructions li {
    margin-bottom: 10px;
}

/* تنسيق الملاحظة المهمة */
.important-note {
    margin-bottom: 15px;
    line-height: 1.8;
    font-weight: bold;
    color: var(--primary-color);
    background-color: #fff3f8;
    padding: 10px;
    border-right: 3px solid var(--gold-color);
    border-radius: 4px;
}

/* تنسيق التذييل */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 2px solid var(--gold-color);
}

footer .logo {
    margin-bottom: 15px;
}

footer .logo img {
    max-width: 100px;
}

footer p {
    color: var(--text-color);
    font-size: 14px;
}

/* تنسيق للأجهزة المحمولة */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .calculator-form {
        grid-template-columns: 1fr;
    }
    
    .size-table {
        font-size: 14px;
    }
    
    .size-table th, .size-table td {
        padding: 8px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
}

/* تنسيق للأجهزة الصغيرة جداً */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .size-table {
        font-size: 12px;
    }
    
    .size-table th, .size-table td {
        padding: 6px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
}
