@font-face {
    font-family: 'vazir';
    src: url('../fonts/Vazir.woff') format('woff2');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'vazir', Tahoma, Geneva, Verdana, sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.8;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.rules-section {
    padding: 40px 0 80px;
    min-height: calc(100vh - 200px);
}

.rules-wrapper {
    background-color: white;
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.rules-title {
    font-size: 32px;
    color: #243d74;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.rules-intro {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.rules-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rule-item {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.rule-item:hover {
    border-color: #5177ff;
    box-shadow: 0 4px 12px rgba(81, 119, 255, 0.1);
}

.rule-item[open] {
    border-color: #5177ff;
    box-shadow: 0 4px 15px rgba(81, 119, 255, 0.15);
}

.rule-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    cursor: pointer;
    list-style: none;
    background-color: white;
    font-weight: 600;
    font-size: 18px;
    color: #243d74;
    transition: background-color 0.3s ease;
    user-select: none;
}

.rule-summary:hover {
    background-color: #f0f4ff;
}

.rule-item[open] .rule-summary {
    background-color: #f0f4ff;
    border-bottom: 2px solid #e9ecef;
}

.rule-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #5177ff;
    color: white;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.rule-title-text {
    flex: 1;
}

.rule-icon {
    flex-shrink: 0;
    color: #5177ff;
    transition: transform 0.3s ease;
}

.rule-item[open] .rule-icon {
    transform: rotate(180deg);
}

/* حذف نشانگر پیش‌فرض summary */
.rule-summary::-webkit-details-marker {
    display: none;
}

.rule-summary::marker {
    display: none;
}

.rule-content {
    padding: 25px 30px 25px 65px;
    background-color: #f8f9fa;
    color: #555;
    font-size: 16px;
    line-height: 1.9;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rule-content p {
    margin-bottom: 15px;
}

.rule-content p:last-child {
    margin-bottom: 0;
}

.rules-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
    text-align: center;
}

.rules-note {
    font-size: 15px;
    color: #888;
    margin-bottom: 25px;
    font-style: italic;
}

.back-link {
    display: inline-block;
    background-color: #5177ff;
    color: white;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background-color: #3d5fd9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(81, 119, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .rules-wrapper {
        padding: 30px 20px;
    }

    .rules-title {
        font-size: 26px;
    }

    .rules-intro {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .rule-summary {
        padding: 18px 20px;
        font-size: 16px;
        gap: 12px;
    }

    .rule-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .rule-content {
        padding: 20px 20px 20px 55px;
        font-size: 15px;
    }

    .rules-footer {
        margin-top: 40px;
        padding-top: 25px;
    }

    .back-link {
        padding: 10px 25px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .rules-wrapper {
        padding: 25px 15px;
    }

    .rules-title {
        font-size: 22px;
    }

    .rule-summary {
        padding: 15px;
        font-size: 15px;
        flex-wrap: wrap;
    }

    .rule-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .rule-content {
        padding: 18px 15px 18px 50px;
        font-size: 14px;
    }

    .rule-icon {
        width: 18px;
        height: 18px;
    }
}

